/* Home page. Shared tokens, header and footer come from style.css. */
:root {
  --high: #c62d27;
  --low: #9c5c0c;
  --normal: #197a4b;
  --tint: #e3f3f3;
  --skin: #c68a66;
  --skin-2: #a8714f;
  --paper: #ffffff;
  --shadow: 0 18px 50px rgba(8, 84, 102, .16);
}
@media (prefers-color-scheme: dark) {
  :root {
    --high: #f0716b;
    --low: #f2a54a;
    --normal: #47c48a;
    --tint: #12302f;
    --paper: #1d2a2e;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  }
}

.home main { overflow-x: clip; }
.section { padding: 72px 0; }
.section.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.section h2 { font-size: clamp(28px, 4.4vw, 38px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 18px; max-width: 620px; margin: 0; }
.center { text-align: center; }
.center .lead { margin: 0 auto; }
.wide { max-width: 1120px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font: inherit; font-size: 16px; font-weight: 600;
       text-decoration: none; border: 1px solid transparent; cursor: pointer; }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn:focus-visible, .player button:focus-visible, .chapters button:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.soon { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.soon i { width: 8px; height: 8px; border-radius: 50%; background: var(--normal); box-shadow: 0 0 0 4px color-mix(in srgb, var(--normal) 25%, transparent); }

/* ---------- hero ---------- */
.hero2 { padding: 40px 0 56px; }
.hero2 .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero2 h1 { font-size: clamp(36px, 6vw, 58px); line-height: 1.05; letter-spacing: -.03em; margin: 14px 0 18px; }
.hero2 h1 em { font-style: normal; color: var(--brand); }
.hero2 .lead { font-size: 19px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 18px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; padding: 0; margin: 0; list-style: none; }
.trust li { display: flex; align-items: center; gap: 6px; }
.trust svg { width: 16px; height: 16px; color: var(--brand); }

/* phone mockup */
.phone-stage { position: relative; display: grid; place-items: center; min-height: 560px; }
.blob { position: absolute; width: 440px; height: 440px; border-radius: 50%; filter: blur(10px);
        background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--brand) 30%, transparent), transparent 65%),
                    radial-gradient(circle at 70% 70%, color-mix(in srgb, var(--low) 18%, transparent), transparent 60%); }
.phone { position: relative; width: 280px; height: 570px; border-radius: 46px; background: #0f1a1c; padding: 12px; box-shadow: var(--shadow); }
.phone::before { content: ""; position: absolute; top: 20px; left: 50%; translate: -50% 0; width: 90px; height: 26px; border-radius: 20px; background: #0f1a1c; z-index: 3; }
.screen { position: relative; height: 100%; border-radius: 35px; overflow: hidden; background: var(--bg); }
.scr { position: absolute; inset: 0; padding: 56px 16px 16px; opacity: 0; animation: screens 15s infinite; }
.scr:nth-child(2) { animation-delay: 5s; }
.scr:nth-child(3) { animation-delay: 10s; }
@keyframes screens { 0% { opacity: 0; transform: translateY(14px); } 4%, 30% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; transform: translateY(-10px); } }
.scr .scr-title { margin: 0 0 4px; font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
.scr .sub { color: var(--muted); font-size: 12px; margin-bottom: 12px; }
.row { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 13px; }
.row b { display: block; font-size: 13px; }
.row small { color: var(--muted); font-size: 11px; }
.row .ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--tint); color: var(--brand); flex: none; }
.row .ic svg { width: 16px; height: 16px; }
.row .v { margin-left: auto; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; color: #fff; white-space: nowrap; }
.chip.h { background: var(--high); } .chip.l { background: var(--low); } .chip.n { background: var(--normal); }
.ai-card { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; border-radius: 14px; padding: 12px; font-size: 12px; line-height: 1.45; margin-top: 10px; }
.ai-card b { display: flex; align-items: center; gap: 6px; font-size: 12px; margin-bottom: 4px; }
.mini-chart { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.mini-chart svg { width: 100%; height: auto; display: block; }
.scr .note { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* floating badges around the phone */
.float { position: absolute; display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
         padding: 10px 14px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); animation: bob 6s ease-in-out infinite; }
.float svg { width: 18px; height: 18px; color: var(--brand); }
.float.f1 { top: 34px; left: -44px; }
.float.f2 { bottom: 110px; right: -10px; animation-delay: -2s; }
.float.f3 { bottom: 30px; left: 20px; animation-delay: -4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- intro player ---------- */
.player { margin: 36px auto 0; max-width: 880px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; box-shadow: var(--shadow); }
.stage { position: relative; aspect-ratio: 16 / 9; background: var(--tint); }
.stage svg.scene { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s ease; }
.stage svg.scene.on { opacity: 1; }
.scene-title { position: absolute; top: 16px; left: 18px; font-size: 13px; font-weight: 700; color: var(--brand-deep); background: color-mix(in srgb, var(--card) 85%, transparent);
               padding: 5px 10px; border-radius: 999px; }
.big-play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer;
            display: grid; place-items: center; box-shadow: 0 10px 30px rgba(8, 84, 102, .35); transition: transform .2s; }
.big-play:hover { transform: scale(1.06); }
.big-play svg { width: 34px; height: 34px; margin-left: 4px; }
.big-play[hidden] { display: none; }
.caption { min-height: 76px; margin: 0; padding: 16px 22px 6px; font-size: 17px; line-height: 1.5; }
.controls { display: flex; align-items: center; gap: 14px; padding: 8px 18px 16px; }
.controls button { border: 0; background: none; color: var(--ink); cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.controls button svg { width: 22px; height: 22px; }
.chapters { display: flex; gap: 6px; flex: 1; }
.chapters button { flex: 1; height: 6px; border-radius: 3px; background: var(--line); padding: 0; border: 0; cursor: pointer; overflow: hidden; position: relative; }
.chapters button i { position: absolute; inset: 0; width: 0; background: var(--brand); }
.chapters button.done i { width: 100%; }
.time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }

/* scene animations: elements rest in their final state; the animation only runs while the scene is on */
.scene .pop, .scene .rise, .scene .fly, .scene .draw, .scene .fade { animation-fill-mode: both; animation-timing-function: cubic-bezier(.2, .8, .2, 1); }
.scene.on .pop { animation-name: pop; animation-duration: .6s; }
.scene.on .rise { animation-name: rise; animation-duration: .8s; }
.scene.on .fade { animation-name: fade; animation-duration: .8s; }
.scene.on .fly { animation-name: fly; animation-duration: 1.6s; }
.scene.on .draw { animation-name: draw; animation-duration: 2.4s; animation-timing-function: ease-in-out; }
.scene.on .bob { animation: bob 3s ease-in-out infinite; }
.scene.on .scan { animation: scan 1.8s ease-in-out .9s 2 both; }
.scene .d1 { animation-delay: .3s; } .scene .d2 { animation-delay: .9s; } .scene .d3 { animation-delay: 1.5s; }
.scene .d4 { animation-delay: 2.1s; } .scene .d5 { animation-delay: 2.7s; } .scene .d6 { animation-delay: 3.3s; }
.scene .pop, .scene .bob { transform-box: fill-box; transform-origin: center; }
@keyframes pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fly { 0% { opacity: 0; transform: translate(-60px, 30px) rotate(-12deg); } 30% { opacity: 1; } 75% { opacity: 1; transform: translate(150px, -10px) rotate(4deg) scale(.7); } 100% { opacity: 0; transform: translate(190px, -14px) scale(.4); } }
@keyframes draw { from { stroke-dashoffset: 600; } to { stroke-dashoffset: 0; } }
@keyframes scan { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { transform: translateY(150px); opacity: 0; } }
.scene .draw { stroke-dasharray: 600; }

/* ---------- problem strip ---------- */
.pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.pain { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.pain .q { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.pain .q svg { width: 24px; height: 24px; }
.pain:hover .q svg { animation: bob 1.6s ease-in-out infinite; }
.q.tone-orange { background: color-mix(in srgb, #ff9500 16%, transparent); color: #b36800; }
.q.tone-purple { background: color-mix(in srgb, #af52de 15%, transparent); color: #8a35b8; }
.q.tone-teal { background: var(--tint); color: var(--brand); }
@media (prefers-color-scheme: dark) { .q.tone-orange { color: #ffb340; } .q.tone-purple { color: #d59cf5; } }
.pain h3 { margin: 0 0 6px; font-size: 18px; }
.pain p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- features ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.feature { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 22px; transition: transform .25s, border-color .25s, box-shadow .25s; }
.feature:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); box-shadow: var(--shadow); }
.feature .fi { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--brand); margin-bottom: 14px; }
.feature .fi svg { width: 22px; height: 22px; }
.feature h3 { margin: 0 0 6px; font-size: 17px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.tag { position: absolute; top: 16px; right: 16px; font-size: 12px; font-weight: 700; color: var(--brand); background: var(--tint); padding: 3px 8px; border-radius: 999px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; counter-reset: step; position: relative; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px; position: relative; }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
                background: var(--brand); color: var(--on-brand); font-weight: 700; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; font-size: 18px; }
.step p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- trend demo ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.chart-card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }
.chart-card .top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.chart-card .top b { font-size: 17px; }
.chart-card .top span { font-size: 13px; color: var(--muted); }
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-card .line { stroke-dasharray: 700; stroke-dashoffset: 0; }
.chart-card.pending .line { stroke-dashoffset: 700; }
.chart-card.go .line { transition: stroke-dashoffset 2.2s ease-in-out; }
.chart-card .pt { transition: opacity .4s, transform .4s; transform-box: fill-box; transform-origin: center; }
.chart-card.pending .pt { opacity: 0; transform: scale(.3); }
.checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks svg { width: 22px; height: 22px; color: var(--normal); flex: none; margin-top: 2px; }

/* ---------- privacy ---------- */
.privacy-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.pv { display: flex; gap: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.pv svg { width: 26px; height: 26px; color: var(--brand); flex: none; }
.pv h3 { margin: 0 0 4px; font-size: 16px; }
.pv p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 760px; margin: 32px auto 0; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 26px; }
.plan.pro { border: 2px solid var(--brand); position: relative; }
.plan.pro .ribbon { position: absolute; top: -12px; left: 24px; background: var(--brand); color: var(--on-brand); font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.plan h3 { margin: 0 0 4px; font-size: 22px; }
.plan .big { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 15px; }
.plan li { display: flex; gap: 10px; }
.plan li svg { width: 20px; height: 20px; color: var(--brand); flex: none; margin-top: 2px; }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin: 28px auto 0; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0 0 16px; color: var(--muted); }

/* ---------- final cta ---------- */
.final { text-align: center; background: linear-gradient(135deg, #0c787b, #085466); color: #fff; border-radius: 28px; padding: 54px 24px; margin: 0 0 72px; }
.final h2 { color: #fff; }
.final p { color: #fff; font-size: 18px; margin: 0 auto 24px; max-width: 520px; }
.final .btn.primary { background: #fff; color: #085466; }
.disclaimer { font-size: 13px; color: var(--muted); text-align: center; max-width: 640px; margin: -40px auto 48px; }

/* ---------- scroll reveal (only for content that starts below the fold) ---------- */
.reveal.pending { opacity: 0; transform: translateY(26px); }
.reveal.shown { transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero2 .wrap, .split { grid-template-columns: 1fr; }
  .hero2 { text-align: center; }
  .hero2 .lead { margin: 0 auto; }
  .cta-row, .trust { justify-content: center; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .privacy-grid, .pains { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .features, .steps, .plans { grid-template-columns: 1fr; }
  .phone-stage { min-height: 520px; }
  .phone { width: 250px; height: 510px; }
  .float.f1 { left: 0; top: 18px; } .float.f2 { right: 0; }
  .big-play { width: 64px; height: 64px; } .big-play svg { width: 26px; height: 26px; }
  .caption { font-size: 15px; min-height: 92px; }
  nav a { margin-left: 12px; }
  .hide-sm { display: none; }
}

/* ---------- reduced motion: everything shows in its final state ---------- */
@media (prefers-reduced-motion: reduce) {
  .scr, .float, .scene * { animation: none !important; }
  .scr { opacity: 0; } .scr:nth-child(2) { opacity: 1; }
  .reveal.pending { opacity: 1; transform: none; }
  .chart-card.pending .line { stroke-dashoffset: 0; }
  .chart-card.pending .pt { opacity: 1; transform: none; }
  .stage svg.scene { transition: none; }
}

/* ---------- helpers and illustration colours (adapt to dark mode) ---------- */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
[data-left] { text-align: left; }
.mt10 { margin-top: 10px; } .mt22 { margin-top: 22px; }
.s-shadow { fill: var(--brand); opacity: .1; }
.s-table { fill: color-mix(in srgb, var(--brand) 35%, var(--card)); }
.s-card { fill: var(--card); }
.s-bg { fill: var(--bg); }
.s-paper { fill: var(--paper); }
.s-ink-t { fill: var(--ink); }
.s-muted-t { fill: var(--muted); }
.chart-card svg { color: var(--ink); }

/* web app links */
nav a.nav-cta { color: var(--on-brand); background: var(--brand); padding: 6px 12px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
nav a.nav-cta:hover { color: var(--on-brand); filter: brightness(1.06); }
.final-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.final .btn.on-dark { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .45); }
.final .btn.on-dark:hover { background: rgba(255, 255, 255, .22); }
.row .v { white-space: nowrap; }

/* test guide links */
.guide-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 24px 0 26px; }
.guide-links a { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 7px 16px; text-decoration: none; font-weight: 600; transition: border-color .2s, transform .2s; }
.guide-links a:hover { border-color: var(--brand); transform: translateY(-2px); }
