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

:root {
  --color-navy: #0F172A;
  --color-navy-light: #1E293B;
  --color-gold: #eab308;
  --color-gold-hover: #ca8a04;
  --color-text-primary: #111827;
  --color-text-secondary: #4B5563;
  --color-text-muted: #9CA3AF;
  --color-bg-white: #FFFFFF;
  --color-bg-warm: #FEFCE8;

  /* Sound change colors */
  --sc-linking: #3B82F6;
  --sc-assimilation: #10b981;
  --sc-flapping: #ef4444;
  --sc-elision: #f43f5e;
  --sc-weak-form: #a855f7;
  --sc-contraction: #d946ef;

  --font-en: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-ja: 'Zen Kaku Gothic New', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;

  --max-width: 1100px;
  --section-padding: 5rem 1.5rem;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-ja);
  color: var(--color-text-primary);
  background: var(--color-bg-white);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* ========================================
   Utility
   ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.font-en {
  font-family: var(--font-en);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   Scroll Animation
   ======================================== */
.fade-in-section {
  opacity: 1;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   Header / Nav
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.08);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-family: var(--font-en);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-gold);
  letter-spacing: -0.02em;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-navy);
  background: var(--color-gold);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.nav-cta:hover {
  background: var(--color-gold-hover);
  transform: translateY(-1px);
}

/* ========================================
   Hero / First View
   ======================================== */
.hero {
  padding: 7rem 1.5rem 3rem;
  background: linear-gradient(180deg, #FFFFFF 0%, #FEFCE8 100%);
  display: flex;
  align-items: flex-start;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-text {
  max-width: 540px;
}

.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #854d0e;
  background: rgba(254, 184, 18, 0.12);
  padding: 0.3rem 0.9rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-navy);
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.hero-sub strong {
  color: var(--color-navy);
  font-weight: 700;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-ja);
  color: var(--color-navy);
  background: var(--color-gold);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(254, 184, 18, 0.3);
  text-decoration: none;
}

.cta-button:hover {
  background: var(--color-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(254, 184, 18, 0.4);
}

.cta-button:active {
  transform: translateY(0);
}

.cta-arrow {
  transition: transform 0.2s ease;
}

.cta-button:hover .cta-arrow {
  transform: translateX(3px);
}

/* Hero visual - mock app screenshot */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.app-mockup {
  background: var(--color-navy);
  border-radius: 24px;
  padding: 2rem 1.75rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.mockup-title {
  font-family: var(--font-en);
  font-size: 0.75rem;
  font-weight: 600;
  color: #94A3B8;
  letter-spacing: 0.1em;
}

.mockup-dots {
  display: flex;
  gap: 4px;
}

.mockup-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #334155;
}

.mockup-dots span:nth-child(1) { background: #EF4444; }
.mockup-dots span:nth-child(2) { background: #F59E0B; }
.mockup-dots span:nth-child(3) { background: #22C55E; }

.mockup-phrase {
  font-family: var(--font-en);
  font-size: 1.35rem;
  font-weight: 600;
  color: #F1F5F9;
  line-height: 2;
  margin-bottom: 1.25rem;
}

.mockup-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.mockup-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  color: #fff;
}

/* Highlight spans in mockup */
.hl-linking { background: rgba(59,130,246,0.25); border-bottom: 2px solid var(--sc-linking); color: #93c5fd; }
.hl-weak-form { background: rgba(168,85,247,0.25); border-bottom: 2px solid var(--sc-weak-form); color: #d8b4fe; }
.hl-contraction { background: rgba(217,70,239,0.25); border-bottom: 2px solid var(--sc-contraction); color: #f0abfc; }
.hl-flapping { background: rgba(239,68,68,0.25); border-bottom: 2px solid var(--sc-flapping); color: #fca5a5; }
.hl-elision { background: rgba(244,63,94,0.25); border-bottom: 2px solid var(--sc-elision); color: #fda4af; }
.hl-assimilation { background: rgba(16,185,129,0.25); border-bottom: 2px solid var(--sc-assimilation); color: #6ee7b7; }

.tag-linking { background: var(--sc-linking); }
.tag-weak-form { background: var(--sc-weak-form); }
.tag-contraction { background: var(--sc-contraction); }
.tag-flapping { background: var(--sc-flapping); }
.tag-elision { background: var(--sc-elision); }
.tag-assimilation { background: var(--sc-assimilation); }

@keyframes pulse-opacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ========================================
   Problem Section
   ======================================== */
.section-problem {
  padding: var(--section-padding);
  padding-top: 2rem;
  background: var(--color-bg-warm);
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-heading h2 {
  font-size: 1.875rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.section-heading p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.problem-content {
  max-width: 800px;
  margin: 0 auto;
}

.problem-example {
  text-align: center;
  margin-bottom: 2.5rem;
}

.problem-example .phrase-original {
  font-family: var(--font-en);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-navy);
  margin-bottom: 0.5rem;
}

.problem-example .phrase-spoken {
  font-family: var(--font-en);
  font-size: 1.2rem;
  color: var(--color-text-secondary);
  margin-bottom: 1.5rem;
}

.problem-body {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 2;
  text-align: center;
  margin-bottom: 3rem;
}

.problem-body strong {
  color: var(--color-navy);
}

/* Before / After comparison */
.comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.comparison-card {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid #E5E7EB;
  transition: transform 0.3s ease;
}

.comparison-card:hover {
  transform: translateY(-2px);
}

.comparison-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  display: inline-block;
  padding: 0.2rem 0.75rem;
  border-radius: 6px;
}

.comparison-card.before .comparison-label {
  color: #DC2626;
  background: #FEE2E2;
}

.comparison-card.after .comparison-label {
  color: #16A34A;
  background: #DCFCE7;
}

.comparison-phrase {
  font-family: var(--font-en);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-navy);
  line-height: 1.8;
  margin-bottom: 1rem;
}

/* Inline highlights for comparison */
.comparison-phrase .sc-weak-form {
  background: rgba(168, 85, 247, 0.15);
  border-bottom: 2px solid var(--sc-weak-form);
  padding: 0.1em 0.2em;
  border-radius: 3px;
}

.comparison-phrase .sc-contraction {
  background: rgba(217, 70, 239, 0.15);
  border-bottom: 2px solid var(--sc-contraction);
  padding: 0.1em 0.2em;
  border-radius: 3px;
}

.comparison-phrase .sc-linking {
  background: rgba(59, 130, 246, 0.15);
  border-bottom: 2px solid var(--sc-linking);
  padding: 0.1em 0.2em;
  border-radius: 3px;
}

.comparison-phrase .sc-flapping {
  background: rgba(239, 68, 68, 0.15);
  border-bottom: 2px solid var(--sc-flapping);
  padding: 0.1em 0.2em;
  border-radius: 3px;
}

.comparison-tag-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.comparison-tag {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  color: #fff;
}

.audio-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-ja);
  color: var(--color-text-secondary);
  background: transparent;
  border: 1.5px solid #CBD5E1;
  border-radius: 9999px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.audio-play-btn:hover {
  color: var(--color-navy);
  border-color: var(--color-navy);
}

.audio-play-btn.is-playing {
  color: var(--color-gold-hover);
  border-color: var(--color-gold);
}

.audio-play-btn svg {
  width: 16px;
  height: 16px;
}

.audio-play-btn.is-playing svg {
  animation: pulse-opacity 1.5s ease-in-out infinite;
}

.comparison-reaction {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.comparison-caption {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

