/* セルフカルテ LP - Clean & Professional Design */
/* White-based layout with minimal green accents */

/* Google Fonts - loaded via <link> in HTML for non-render-blocking performance */

/* CSS Variables - Design Tokens */
:root {
  /* Text Colors */
  --text-heading: #0F172A;
  --text-body: #334155;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;

  /* Accent */
  --accent: #22C55E;
  --accent-dark: #16A34A;
  --accent-border: #BBF7D0;

  /* Backgrounds */
  --bg-white: #FFFFFF;
  --bg-gray: #F8FAFC;
  --bg-green: #F0FDF4;

  /* Cards */
  --card-border: #E2E8F0;
  --card-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);

  /* Feature icon backgrounds (keep for inline style references) */
  --blue-50: #eff6ff;
  --purple-50: #faf5ff;
  --orange-50: #fff7ed;

  /* Typography */
  --font-main: 'Noto Sans JP', 'Hiragino Sans', sans-serif;
  --font-number: 'Inter', 'SF Pro Display', sans-serif;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--bg-white);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Main - clean, no aurora */
main {
  background-color: var(--bg-white);
}

/* Section Background Classes */
.section-white { background-color: var(--bg-white); }
.section-gray { background-color: var(--bg-gray); }
.section-green { background-color: var(--bg-green); }

.section-cta {
  background: linear-gradient(135deg, #22C55E 0%, #16A34A 100%);
  position: relative;
  overflow: hidden;
}

.section-cta::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.15) 0%, transparent 60%);
  pointer-events: none;
}

/* Components */

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem 4rem;
  text-align: center;
  background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 40%, #FFFFFF 100%);
}

/* Hero Inner - full-width, no card frame */
.hero-inner {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

/* About Description */
.about-description {
  color: var(--text-body);
  font-size: 0.9375rem;
  line-height: 1.85;
  text-align: center;
  max-width: 42rem;
  margin: 0 auto 1.5rem;
}

/* App Icon */
.app-icon {
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.5rem;
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.app-icon:hover {
  transform: scale(1.08);
}

/* Hero Text */
.hero-title {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  font-family: var(--font-main);
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--accent);
  margin: 0 0 1.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-description {
  color: var(--text-body);
  margin: 0 0 2rem;
  line-height: 1.8;
  font-size: 0.9375rem;
}

/* Store Badges (Hero) */
.store-badges {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1.5rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #ffffff;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: var(--card-shadow);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: all 0.3s ease;
  min-height: 2.75rem;
  width: 100%;
  white-space: nowrap;
}

.store-badge-active {
  cursor: pointer;
  opacity: 1;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.store-badge-active:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.store-badge-active:active {
  transform: translateY(-1px);
}

/* CTA Store Badges */
.store-badge-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  cursor: not-allowed;
  box-shadow: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  opacity: 0.7;
  min-height: 2.75rem;
  width: 100%;
  white-space: nowrap;
}

.store-badge-cta-active {
  cursor: pointer;
  text-decoration: none;
  background: #FFFFFF;
  color: var(--text-heading);
  font-weight: 600;
  border: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  opacity: 1;
}

.store-badge-cta-active:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.store-badge-cta-active:active {
  transform: translateY(-1px);
}

/* Feature Cards */
.feature-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
  box-shadow: var(--card-shadow-hover);
  border-color: var(--accent-border);
  transform: translateY(-4px);
}

.feature-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.08);
}

.feature-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-heading);
}

.feature-description {
  color: var(--text-body);
  font-size: 0.9375rem;
  line-height: 1.75;
  margin: 0;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

/* Screenshot Gallery */
.screenshot-gallery {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 0.5rem 1rem 1.5rem;
  margin: 0 -1rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.screenshot-gallery::-webkit-scrollbar {
  display: none;
}

.screenshot-card {
  flex-shrink: 0;
  width: min(15rem, 65vw);
  aspect-ratio: 9 / 19.5;
  background: linear-gradient(180deg, var(--bg-gray) 0%, #f3f4f6 100%);
  border-radius: var(--radius-xl);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  scroll-snap-align: center;
  overflow: hidden;
}

.screenshot-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--card-shadow-hover);
}

.screenshot-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  aspect-ratio: 1 / 2;
}

/* Scroll Hint */
.scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.scroll-hint-arrow-left,
.scroll-hint-arrow-right {
  display: inline-block;
  opacity: 0.6;
}

.scroll-hint-arrow-left {
  animation: scrollHintLeft 2s ease-in-out infinite;
}

.scroll-hint-arrow-right {
  animation: scrollHintRight 2s ease-in-out infinite;
}

@keyframes scrollHintLeft {
  0%, 100% { opacity: 0.3; transform: translateX(0); }
  50% { opacity: 0.8; transform: translateX(-4px); }
}

@keyframes scrollHintRight {
  0%, 100% { opacity: 0.3; transform: translateX(0); }
  50% { opacity: 0.8; transform: translateX(4px); }
}

/* Developer Story Section */
.story-card {
  max-width: 40rem;
  margin: 0 auto;
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
  border: 1px solid var(--card-border);
  border-left: 4px solid var(--accent-border);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0,0,0,0.12);
}

.story-quote-mark {
  position: absolute;
  top: -0.75rem;
  left: 2rem;
  font-size: 4rem;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.story-ribbon-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.15);
}

.story-body {
  color: var(--text-body);
  font-size: 0.9375rem;
  line-height: 1.85;
  margin-bottom: 1.5rem;
}

.story-body em {
  color: var(--text-heading);
  font-style: normal;
  font-weight: 600;
}

.story-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--card-border);
}

.story-signature-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading);
}

.story-signature-role {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.story-signature-link {
  color: var(--text-secondary);
  transition: color 150ms;
}

.story-signature-link:hover {
  color: var(--accent);
}

/* FAQ Section */
.faq-list {
  max-width: 42rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.125rem 1rem;
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.faq-item:hover {
  border-color: var(--accent-border);
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.faq-question {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.faq-answer {
  font-size: 0.9375rem;
  color: var(--text-body);
  line-height: 1.75;
}

.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
  padding: 0.25rem 0;
}

.faq-answer a:hover {
  color: var(--accent-dark);
}

/* Section Layout */
.section {
  padding: 3.5rem 1rem;
}

.section-container {
  max-width: 56rem;
  margin: 0 auto;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  color: var(--text-heading);
  font-family: var(--font-main);
}

.section-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin: 0 0 2.5rem;
  font-size: 0.9375rem;
}

/* CTA Section */
.cta-section {
  padding: 4rem 1rem;
  position: relative;
}

.cta-container {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #FFFFFF;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  font-family: var(--font-main);
}

.cta-description {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 2rem;
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* About Feature List */
.about-feature-list {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--text-body);
  font-size: 0.9375rem;
  line-height: 1.75;
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.about-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

.about-feature-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.125rem;
}

/* Footer */
.footer {
  background: var(--bg-gray);
  border-top: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 2.5rem 1rem 0;
}

.footer-container {
  max-width: 56rem;
  margin: 0 auto;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 2rem;
  text-align: center;
}

.footer-column {
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.footer-app-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 0.25rem;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
}

.footer-link {
  color: var(--text-secondary);
  transition: color 150ms;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0;
}

.footer-link:hover {
  color: var(--accent);
}

.footer-developer-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0 0 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-developer-link {
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  transition: color 150ms;
  font-size: 0.875rem;
}

.footer-developer-link:hover {
  color: var(--accent);
}

.footer-divider {
  border-top: 1px solid var(--card-border);
  padding: 1.25rem 0;
  text-align: center;
}

.footer-copyright {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Focus Visible (Accessibility) */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Mobile-only line break hiding */
.hide-on-mobile {
  display: none;
}

/* Responsive */
@media (min-width: 640px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .store-badges { flex-direction: column !important; align-items: center !important; }
  .store-badge,
  .store-badge-cta { width: 16rem; }
  .hide-on-mobile { display: inline; }
  .screenshot-card { width: 13rem; }
  .screenshot-gallery { gap: 1.5rem; }
  .scroll-hint { display: none; }

  /* FAQ: wider padding on tablet+ */
  .faq-list { gap: 1rem; }
  .faq-item { padding: 1.5rem; }
  .faq-question { font-size: 1rem; }
}

@media (min-width: 768px) {
  .hero-section { padding: 3.5rem 1.5rem; }
  .hero-title { font-size: 2.5rem; }
  .section { padding: 4.5rem 1.5rem; }
  .section-title { font-size: 1.75rem; }
  .cta-section { padding: 5rem 1.5rem; }
  .cta-title { font-size: 1.75rem; }
  .story-card { padding: 3rem 2.5rem; }

  /* Footer: 3-column layout on tablet+ */
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
  }
  .footer-column-left {
    text-align: left;
  }
  .footer-column-right {
    text-align: right;
  }
  .footer-nav {
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .features-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
  .feature-card { padding: 2rem; }
  .screenshot-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    overflow-x: visible;
    padding: 0.5rem 0 1.5rem;
    margin: 0;
  }
  .screenshot-card { width: 100%; }
  .hero-inner { max-width: 36rem; }
}

/* Testimonials Carousel */
.testimonials-section {
  padding-top: 3rem;
  padding-bottom: 3.5rem;
  background: linear-gradient(180deg, #FFFFFF 0%, #F0FDF4 40%, #F0FDF4 60%, #FFFFFF 100%);
  position: relative;
  overflow: hidden;
}

.testimonials-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-border), transparent);
}

.testimonials-carousel {
  overflow: hidden;
  margin: 0 auto;
  max-width: 56rem;
}

.testimonials-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-card {
  flex: 0 0 100%;
  padding: 2rem 1.75rem 1.75rem;
  background: #ffffff;
  border-radius: var(--radius-xl);
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(34, 197, 94, 0.04);
  box-sizing: border-box;
  position: relative;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
  transform: translateY(20px);
  animation: testimonialFadeIn 0.6s ease forwards;
}

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.25s; }
.testimonial-card:nth-child(3) { animation-delay: 0.4s; }

@keyframes testimonialFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(34, 197, 94, 0.12);
  border-color: var(--accent-border);
}

.testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 0.5rem;
  right: 1.25rem;
  font-size: 4rem;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--accent);
  opacity: 0.1;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

.testimonial-rating {
  color: #F59E0B;
  font-size: 1.125rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  text-shadow: 0 1px 2px rgba(245, 158, 11, 0.15);
}

.testimonial-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 0.625rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.testimonial-text {
  color: var(--text-body);
  font-size: 0.9375rem;
  line-height: 1.85;
  margin: 0 0 1.25rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--card-border);
}

.testimonial-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-heading);
}

.testimonial-source {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--accent-dark);
  background: var(--bg-green);
  padding: 0.1875rem 0.625rem;
  border-radius: 9999px;
  letter-spacing: 0.02em;
  border: 1px solid rgba(34, 197, 94, 0.12);
}

.testimonials-dots {
  display: flex;
  justify-content: center;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.testimonials-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--card-border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.testimonials-dot[aria-selected="true"] {
  background: var(--accent);
  transform: scale(1.4);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
}

@media (min-width: 768px) {
  .testimonials-track {
    gap: 1.25rem;
  }

  .testimonial-card {
    flex: 0 0 calc(33.333% - 0.833rem);
  }

  .testimonials-dots {
    display: none;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .scroll-hint-arrow-left,
  .scroll-hint-arrow-right {
    animation: none;
    opacity: 0.5;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
