/* ===== Track Start — homepage-specific styles ===== */

/* HERO */
.hero { padding: 56px 0 120px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow { margin-bottom: 24px; }
.hero h1 { margin-bottom: 24px; }
.hero h1 .accent { color: var(--accent-ink); font-style: italic; font-family: var(--font-serif); font-weight: 400; }
.hero .lede { margin-bottom: 36px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-meta { display: flex; gap: 24px; flex-wrap: wrap; color: var(--muted); font-size: 13px; font-family: var(--font-mono); }
.hero-meta .dot-line { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .dot-line::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(16,185,129,0.15); }

/* HERO right column (visual) wrappers */
.hero-stage {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  min-height: 480px;
}
.hero-stage::after {
  content: ""; position: absolute; inset: -1px; pointer-events: none;
  border-radius: var(--radius-lg);
  background: linear-gradient(140deg, rgba(139,92,246,0.18), transparent 40%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1px;
}

/* === Hero variant: PATH === */
.hero-path { position: relative; height: 100%; padding: 8px 4px; }
.hero-path-title { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 28px; display: flex; justify-content: space-between; }
.path-list { display: flex; flex-direction: column; gap: 20px; position: relative; }
.path-list::before {
  content: ""; position: absolute; left: 19px; top: 18px; bottom: 18px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 4px, transparent 4px 8px);
}
.path-list::after {
  content: ""; position: absolute; left: 19px; top: 18px;
  width: 2px;
  height: var(--progress, 0%);
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  border-radius: 2px;
  transition: height 1s var(--ease);
}
.path-step { display: flex; gap: 16px; align-items: flex-start; position: relative; z-index: 1; }
.path-step .num {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--muted);
  transition: all .4s var(--ease);
}
.path-step.active .num {
  background: var(--accent); border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 6px rgba(139, 92, 246, 0.16);
  transform: scale(1.05);
}
.path-step.done .num { background: var(--ink); border-color: var(--ink); color: #fff; }
.path-step .body { padding-top: 6px; }
.path-step .body strong { font-size: 15px; display: block; margin-bottom: 2px; font-weight: 500; }
.path-step .body span { font-size: 13.5px; color: var(--muted); }
.path-step.active .body strong { color: var(--accent-ink); }

/* === Hero variant: PLAYER === */
.player {
  background: linear-gradient(180deg, #14130f 0%, #1f1d18 100%);
  color: #f4f1ea;
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 18px;
}
.player-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; color: rgba(244,241,234,0.5); text-transform: uppercase; }
.player-head .badge { background: rgba(139,92,246,0.18); color: #c4b5fd; padding: 4px 8px; border-radius: 999px; }
.player-title { font-size: 22px; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 4px; }
.player-meta { font-size: 13px; color: rgba(244,241,234,0.55); margin-bottom: 18px; font-family: var(--font-mono); }
.waveform { display: flex; align-items: center; gap: 3px; height: 60px; margin-bottom: 14px; }
.waveform .bar {
  flex: 1; background: rgba(244,241,234,0.18); border-radius: 2px;
  transition: background .25s var(--ease);
}
.waveform .bar.played { background: var(--accent); }
.waveform .bar.playhead { background: #fff; }
.player-controls { display: flex; align-items: center; gap: 14px; }
.player-controls .play { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #14130f; display: flex; align-items: center; justify-content: center; }
.player-controls .timecode { font-family: var(--font-mono); font-size: 12px; color: rgba(244,241,234,0.7); }
.lyrics-preview {
  background: var(--bg-2); border-radius: var(--radius); padding: 18px;
  font-size: 14px; line-height: 1.6; color: var(--ink-2);
  border: 1px solid var(--line);
  max-height: 220px; overflow: hidden; position: relative;
}
.lyrics-preview::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 40px;
  background: linear-gradient(to bottom, transparent, var(--bg-2));
}
.lyrics-preview .verse-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); display: block; margin: 8px 0 4px; }
.lyrics-preview .verse-label:first-child { margin-top: 0; }

/* === Hero variant: BIG TYPE === */
.hero-bigtype { display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.hero-bigtype .megaword {
  font-family: var(--font-serif);
  font-size: clamp(80px, 16vw, 200px);
  line-height: 0.92;
  font-style: italic;
  color: var(--accent-ink);
  letter-spacing: -0.04em;
}
.hero-bigtype .megaword .stroke { -webkit-text-stroke: 1.5px var(--accent-ink); color: transparent; }
.hero-bigtype .megawave { display: flex; align-items: end; gap: 4px; height: 80px; margin-top: 18px; }
.hero-bigtype .megawave i { display: block; width: 6px; background: var(--ink); border-radius: 2px; transform-origin: bottom; animation: hwave 1.4s ease-in-out infinite; }
@keyframes hwave { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.hero-bigtype-meta { display: flex; justify-content: space-between; align-items: end; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* === Mini demo (in hero) === */
.demo {
  background: var(--bg-2);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--line);
}
.demo-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.demo-chip {
  padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  font-size: 12.5px; font-family: var(--font-mono); color: var(--ink-2); cursor: pointer;
  transition: all .15s var(--ease);
}
.demo-chip:hover { border-color: var(--ink); }
.demo-chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.demo-input {
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; color: var(--ink);
}
.demo-input .prompt { color: var(--muted); user-select: none; }
.demo-input .caret { width: 1px; height: 16px; background: var(--ink); animation: blink 1s steps(2) infinite; }
.demo-input .typed { color: var(--ink); }
@keyframes blink { 50% { opacity: 0; } }

/* TWO MAIN SERVICES */
.two-up { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.svc-card {
  position: relative;
  padding: 36px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; gap: 24px;
  transition: all .3s var(--ease);
  overflow: hidden;
}
.svc-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.svc-card .icon-wrap {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
}
.svc-card[data-flavor="guide"] .icon-wrap { background: #fef3c7; color: #b45309; }
.svc-card h3 { font-size: 24px; }
.svc-card .feat-list { display: flex; flex-direction: column; gap: 12px; }
.svc-card .feat { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-top: 1px dashed var(--line); }
.svc-card .feat:first-child { border-top: 0; padding-top: 0; }
.svc-card .feat strong { display: block; font-weight: 500; font-size: 14.5px; margin-bottom: 2px; }
.svc-card .feat span { font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.svc-card .feat-icon {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px; background: var(--bg-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.svc-card .footer-cta { margin-top: auto; padding-top: 12px; }

/* 5 STEPS */
.steps-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.step-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 16px; min-height: 220px;
  transition: all .25s var(--ease);
}
.step-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.step-card .step-num {
  width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff;
  font-family: var(--font-mono); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.step-card .step-icon { width: 36px; height: 36px; color: var(--accent-ink); }
.step-card h4 { font-size: 16px; font-weight: 500; }
.step-card p { font-size: 13.5px; color: var(--muted); }

/* KNOWLEDGE BASE 3-COL */
.kb-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.kb-card { padding: 28px; min-height: 260px; display: flex; flex-direction: column; gap: 18px; }
.kb-card .kb-head { display: flex; justify-content: space-between; align-items: center; }
.kb-card .kb-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kb-card h3 { font-size: 22px; }
.kb-list { display: flex; flex-direction: column; gap: 10px; }
.kb-list li { list-style: none; padding: 10px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.kb-list li:first-child { border-top: 0; }
.kb-list li:hover { color: var(--accent-ink); }
.kb-list li .arrow { opacity: 0.4; transition: transform .15s var(--ease), opacity .15s var(--ease); }
.kb-list li:hover .arrow { opacity: 1; transform: translateX(3px); }

/* PERSONAS */
.persona-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.persona {
  padding: 32px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 18px; min-height: 320px;
}
.persona .avatar {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 28px; color: #fff;
  font-style: italic;
}
.persona[data-tone="a"] .avatar { background: linear-gradient(135deg, #a78bfa, #6d28d9); }
.persona[data-tone="b"] .avatar { background: linear-gradient(135deg, #fb923c, #c2410c); }
.persona[data-tone="c"] .avatar { background: linear-gradient(135deg, #34d399, #047857); }
.persona h4 { font-size: 19px; }
.persona .quote { font-family: var(--font-serif); font-style: italic; font-size: 18px; color: var(--ink); line-height: 1.4; }
.persona .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.persona .tag { font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding: 4px 8px; background: var(--bg); border-radius: 999px; border: 1px solid var(--line); }

/* CASES */
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case {
  background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--line);
  padding: 0; overflow: hidden;
  transition: all .25s var(--ease);
}
.case:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.case-cover {
  height: 160px;
  position: relative;
  overflow: hidden;
  display: flex; align-items: end;
  padding: 16px;
  color: #fff;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
}
.case-cover-1 { background: linear-gradient(135deg, #6d28d9, #312e81); }
.case-cover-2 { background: linear-gradient(135deg, #ea580c, #7c2d12); }
.case-cover-3 { background: linear-gradient(135deg, #047857, #064e3b); }
.case-cover svg { position: absolute; right: -10px; top: -10px; opacity: 0.35; }
.case-body { padding: 20px 22px 22px; }
.case-body h4 { font-size: 17px; font-weight: 500; line-height: 1.3; margin-bottom: 10px; }
.case-body .case-meta { display: flex; gap: 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

/* FAQ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border-top: 1px solid var(--line); padding: 4px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 22px 4px; text-align: left; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.faq-q .plus { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-2); display: flex; align-items: center; justify-content: center; transition: transform .25s var(--ease), background .25s var(--ease); flex-shrink: 0; margin-left: 16px; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); background: var(--ink); color: #fff; }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s var(--ease); }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 4px 22px; color: var(--ink-2); font-size: 15px; line-height: 1.6; max-width: 720px; }

/* FINAL CTA */
.final-cta {
  background: var(--ink); color: #fff;
  border-radius: var(--radius-lg);
  padding: 80px 56px;
  text-align: center;
  position: relative; overflow: hidden;
}
.final-cta::before {
  content: ""; position: absolute; inset: -50% -10% auto -10%; height: 320px;
  background: radial-gradient(60% 80% at 50% 30%, rgba(139,92,246,0.45), transparent 70%);
  filter: blur(30px); pointer-events: none;
}
.final-cta h2 { color: #fff; position: relative; max-width: 16ch; margin: 0 auto 16px; }
.final-cta p { color: rgba(255,255,255,0.7); max-width: 50ch; margin: 0 auto 32px; position: relative; }
.final-cta .ctas { display: flex; justify-content: center; gap: 12px; position: relative; flex-wrap: wrap; }
.final-cta .btn-primary { background: #fff; color: var(--ink); }
.final-cta .btn-secondary { background: transparent; color: #fff; border-color: rgba(255,255,255,0.2); }
.final-cta .btn-secondary:hover { border-color: #fff; }

/* === Hero variant switching === */
.hero-variant { display: none; }
body[data-hero="path"] .hero-variant.is-path { display: block; }
body[data-hero="player"] .hero-variant.is-player { display: block; }
body[data-hero="bigtype"] .hero-variant.is-bigtype { display: flex; }
body:not([data-hero]) .hero-variant.is-path { display: block; }

/* lyric pre-line for player */
.lyrics-preview .lyric-block { white-space: pre-line; display: block; }

/* === Typography pair variants === */
body[data-typepair="serif"] h1,
body[data-typepair="serif"] h2 { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.02em; }
body[data-typepair="serif"] .hero h1 .accent { font-style: normal; }

body[data-typepair="mono"] h1,
body[data-typepair="mono"] h2,
body[data-typepair="mono"] h3 { font-family: var(--font-mono); font-weight: 500; letter-spacing: -0.05em; }
body[data-typepair="mono"] h1 { font-size: clamp(38px, 5.2vw, 68px); line-height: 1.0; }
body[data-typepair="mono"] .hero h1 .accent { font-family: var(--font-serif); }

/* === Density === */
body.density-cozy .section { padding: 72px 0; }
body.density-cozy .card { padding: 22px; }
body.density-cozy .svc-card { padding: 28px; }

/* === Logo lab === */
.logo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.logo-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 24px 22px;
  display: flex; flex-direction: column; gap: 16px;
  cursor: pointer;
  transition: all .25s var(--ease);
  position: relative;
}
.logo-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow); }
.logo-card.selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink), var(--shadow); }
.logo-card.selected::after {
  content: "ACTIVE"; position: absolute; top: 14px; right: 14px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
  color: #fff; background: var(--ink); padding: 3px 8px; border-radius: 999px;
}
.logo-stage {
  height: 140px; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
  border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center; gap: 12px;
}
.logo-stage svg { transform: scale(2.1); transform-origin: center; }
.logo-stage .wordmark {
  font-size: 22px; font-weight: 500; letter-spacing: -0.02em;
}
.logo-stage .wordmark em { font-style: normal; color: var(--accent-ink); }
.logo-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.logo-meta strong { font-size: 15px; font-weight: 500; }
.logo-meta .idx { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.08em; }
.logo-desc { font-size: 13px; color: var(--muted); line-height: 1.45; }

@media (max-width: 820px) { .logo-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .logo-grid { grid-template-columns: 1fr; } }

/* MOBILE */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .two-up { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .kb-grid, .persona-grid, .case-grid { grid-template-columns: 1fr; }
  .final-cta { padding: 56px 28px; }
}
@media (max-width: 560px) {
  .steps-grid { grid-template-columns: 1fr; }
}
