/* Kalpurush — the Bangla face, self-hosted (SIL OFL 1.0, see assets/kalpurush-license.md).
   The unicode-range confines it to the Bengali block, so Latin inside a Bangla
   sentence (Pflegeling, A1, B2, Aufnahmebericht) still renders in the site's
   own faces rather than Kalpurush's weaker Latin. */
@font-face {
  font-family: "Kalpurush";
  src: url("assets/kalpurush.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0980-09FF, U+200C-200D, U+20B9, U+25CC, U+00A0;
}

/* Pflegeling — one stylesheet for the whole site.
   Direction: "Night Ward" — dark-dominant, gold light, Instrument Serif display.
   ponytail: single dark theme on purpose; the design is the theme. */

:root {
  color-scheme: dark;

  --bg:         #070B14;
  --surface:    #0C1220;
  --surface-2:  #10182A;
  --ink:        #E9E5DC;
  --muted:      #A7B2C8;
  --dim:        #8E9AB4;
  --dimmer:     #6E7A92;
  --gold:       #D6B675;
  --gold-soft:  #E8CE96;
  --rule:       rgba(233, 229, 220, .12);
  --rule-soft:  rgba(233, 229, 220, .07);
  --glass:      rgba(233, 229, 220, .05);

  --glow-gold:  0 0 90px -20px rgba(214, 182, 117, .28);
  --shadow:     0 50px 90px -30px rgba(0, 0, 0, .9);

  --r-sm: 10px;
  --r:    18px;
  --r-lg: 26px;

  --wrap: 72rem;

  /* the generator swaps --script per locale (Bengali, Devanagari, Nastaliq …) */
  --script: Georgia;
  --serif: "Instrument Serif", var(--script), Georgia, "Times New Roman", serif;
  --sans: "Public Sans", var(--script), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.68 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-soft); }
::selection { background: var(--gold); color: #0A101D; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0 0 1rem;
  color: #fff;
}
h1 { font-size: clamp(2.6rem, 5.6vw, 5.2rem); }
h2 { font-size: clamp(2rem, 3.8vw, 2.9rem); line-height: 1.06; }
h3 { font-size: 1.4rem; line-height: 1.15; margin-bottom: .45rem; }
p  { margin: 0 0 1.1rem; }
p:last-child { margin-bottom: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 1.5rem; }
.muted { color: var(--muted); }
.lede { font-size: 1.1rem; line-height: 1.7; color: var(--muted); }

.kicker {
  font: 500 .7rem/1 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 1.1rem;
}
.section-head { max-width: 38rem; margin-bottom: 2.75rem; }
section { padding: clamp(3.5rem, 7vw, 5.5rem) 0; }

/* ─────────────────────────── header ─────────────────────────── */

.site-head {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 11, 20, .72);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.site-head .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 70px; }
.brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--serif); font-size: 1.4rem; font-weight: 400;
  color: #fff; text-decoration: none; letter-spacing: .005em;
}
.brand img { width: 30px; height: 30px; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text small { margin-top: .2rem; font: 700 .8rem/1.3 var(--sans); color: var(--gold-soft); letter-spacing: .03em; }
.site-head nav { display: flex; gap: 1.5rem; align-items: center; margin-inline-start: auto; }
.site-head nav a { color: var(--dim); text-decoration: none; font-size: .94rem; white-space: nowrap; }
.site-head nav a:hover, .site-head nav a[aria-current] { color: var(--ink); }

.langs { display: flex; gap: .2rem; align-items: center; }
.langs a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.2rem; height: 1.9rem; padding-inline: .5rem;
  border-radius: 999px; font: 500 .72rem/1 var(--mono); letter-spacing: .04em;
  color: var(--dim); text-decoration: none; border: 1px solid transparent;
}
.langs a:hover { color: var(--ink); border-color: var(--rule); }
.langs a[aria-current] { background: var(--gold); color: #070B14; }

@media (max-width: 1080px) { .site-head nav .anchor { display: none; } }
@media (max-width: 640px) {
  .site-head .wrap { flex-wrap: wrap; gap: .5rem 1rem; padding-block: .7rem; min-height: 0; }
  .site-head nav { margin-inline-start: auto; gap: 1.1rem; }
  .langs { width: 100%; order: 3; }
}

/* ─────────────────────────── buttons ─────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.7rem; border-radius: 999px;
  font: 600 .97rem/1 var(--sans); text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary, .btn-gold { background: var(--gold); color: #0A101D; }
.btn-primary:hover, .btn-gold:hover { background: var(--gold-soft); color: #0A101D; }
.btn-ghost, .btn-ghost-dark { border-color: rgba(233,229,220,.26); color: var(--ink); }
.btn-ghost:hover, .btn-ghost-dark:hover { border-color: var(--gold); color: #fff; }
.btn-sm { padding: .55rem 1.15rem; font-size: .86rem; }
@media (max-width: 480px) { .btn-head { display: none; } }

/* ─────────────────────────── hero ─────────────────────────── */

.hero {
  position: relative;
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  overflow: hidden;
  background:
    radial-gradient(900px 520px at 78% 6%, rgba(214,182,117,.16), transparent 62%),
    radial-gradient(760px 520px at 2% 74%, rgba(44,70,124,.55), transparent 66%),
    linear-gradient(180deg, #070B14 0%, #0A101D 62%, #070B14 100%);
}
.hero > .wrap { position: relative; display: grid; gap: clamp(2rem, 4vw, 3.5rem);
  grid-template-columns: 1.08fr .92fr; align-items: center; }

/* the eyebrow becomes a lit badge in this direction */
.hero .kicker {
  display: inline-flex; align-items: center; gap: .6rem;
  border: 1px solid rgba(214,182,117,.4); border-radius: 999px;
  padding: .5rem 1rem; margin-bottom: 1.9rem;
}
.hero .kicker::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 10px 1px rgba(214,182,117,.8);
}
.hero h1 { margin-bottom: 1.6rem; }
.hero h1 .hl { color: var(--gold); font-style: italic; }
.hero p.lede { max-width: 33rem; }
.hero-cta { display: flex; gap: .75rem; flex-wrap: wrap; margin: 2rem 0 1rem; }

/* Store buttons — black pills per Apple/Google badge colour rules, gold ring on focus/hover. */
.stores { display: flex; gap: .75rem; flex-wrap: wrap; }
.cta .stores { justify-content: center; margin: 1.9rem 0 1rem; }
.store {
  display: inline-flex; align-items: center; gap: .65rem;
  padding: .6rem 1.2rem .6rem 1rem; min-height: 3.25rem;
  background: #000; color: #fff; text-decoration: none;
  border: 1px solid rgba(233,229,220,.34); border-radius: var(--r-sm);
  transition: border-color .15s, transform .15s;
}
.store:hover { border-color: var(--gold); transform: translateY(-1px); color: #fff; }
.store:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.store span { display: flex; flex-direction: column; line-height: 1.1; text-align: start; }
.store small { font-size: .68rem; letter-spacing: .02em; opacity: .85; }
.store b { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
@media (prefers-reduced-motion: reduce) { .store { transition: none; } .store:hover { transform: none; } }
.hero-note { font-size: .84rem; color: var(--dimmer); margin: 0; }

.ribbon { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.7rem; }
.chip {
  display: inline-flex; align-items: baseline; gap: .45rem;
  padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--glass);
  font-size: .82rem; color: var(--muted);
}
.chip b { font: 500 .78rem/1 var(--mono); color: var(--gold); letter-spacing: .05em; }

.phones { display: flex; justify-content: center; gap: 1.4rem; align-items: flex-start; }
.phones img {
  width: 47%; max-width: 250px; border-radius: var(--r-lg);
  border: 1px solid rgba(233,229,220,.16);
  box-shadow: var(--shadow), var(--glow-gold);
}
.phones img:last-child { margin-top: 3.4rem; box-shadow: var(--shadow); }
@media (max-width: 900px) {
  .hero > .wrap { grid-template-columns: 1fr; }
  .phones { justify-content: flex-start; }
}

/* ─────────────────────────── stats rail ─────────────────────────── */

.stats { padding: 0; }
.stats .wrap {
  display: flex; align-items: center; gap: 2.6rem; flex-wrap: wrap;
  padding-block: 1.5rem;
  border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.stat { display: flex; align-items: baseline; gap: .6rem; font-size: .95rem; color: var(--dim); }
.stat b { font: 400 1.9rem/1 var(--serif); color: var(--gold); }
@media (max-width: 720px) { .stats .wrap { gap: 1.1rem 2rem; } .stat { font-size: .88rem; } }

/* ─────────────────────────── cards & grids ─────────────────────────── */

.grid-4 { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.grid-3 { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.card {
  background: var(--glass); border: 1px solid var(--rule); border-radius: var(--r);
  padding: 1.5rem;
}
.card .de {
  font: 500 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 .9rem;
}
.card h3 { font-size: 1.5rem; margin-bottom: .5rem; }
.card p { font-size: .95rem; line-height: 1.62; color: var(--muted); }

/* ─────────────────────────── pricing ─────────────────────────── */

.plans { align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; }
.plan .price { font: 400 2.9rem/1 var(--serif); color: var(--ink); margin: .2rem 0 .7rem; }
.plan .rate { color: var(--gold-soft); }
.plan .trial {
  margin-top: auto; padding-top: 1rem; font: 500 .72rem/1.5 var(--mono);
  letter-spacing: .04em; color: var(--gold);
}
.plan-best { border-color: rgba(214,182,117,.55); background: linear-gradient(180deg, rgba(214,182,117,.1), var(--glass)); }
.plan .badge {
  position: absolute; inset-block-start: -.75rem; inset-inline-start: 1.5rem; margin: 0;
  padding: .3rem .7rem; border-radius: 999px; background: var(--gold); color: #070B14;
  font: 600 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.plan-includes { margin-top: 2.5rem; }
.plan-includes h3 { font-size: 1.5rem; margin-bottom: .9rem; }
.plan-includes ul {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: .6rem 2rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.plan-includes li { color: var(--muted); padding-inline-start: 1.6rem; position: relative; }
.plan-includes li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--gold); }
.pricing .fine { max-width: 46rem; margin-top: 1.2rem; font-size: .82rem; line-height: 1.6; color: var(--dim); }

/* ─────────────────────────── AI feedback ─────────────────────────── */

.feedback { background: var(--surface); border-block: 1px solid var(--rule); }
.feedback .wrap { display: grid; gap: clamp(2rem, 5vw, 3.5rem);
  grid-template-columns: 1fr 1fr; align-items: center; }
@media (max-width: 900px) { .feedback .wrap { grid-template-columns: 1fr; } }

.grade {
  background: var(--surface-2); border: 1px solid var(--rule);
  border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow);
}
.grade-top {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .95rem 1.3rem; border-bottom: 1px solid var(--rule);
}
.grade-top span { font: 500 .7rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.grade-top b { font: 400 1.35rem/1 var(--serif); color: var(--gold); }
.grade-body { padding: 1.4rem; display: grid; gap: 1.3rem; }
.grade h4 {
  font: 500 .68rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 .7rem; color: var(--dim);
}
.grade ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.grade li { position: relative; padding-inline-start: 1.6rem; font-size: .93rem; line-height: 1.55; color: var(--ink); }
.grade li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: -.05em;
  font-size: .9rem; color: #5FBF98;
}
.grade .fix li::before { content: "→"; color: var(--gold); }
.correction {
  font-family: var(--serif); font-size: 1.15rem; line-height: 1.75;
  background: rgba(0,0,0,.28); border: 1px dashed var(--rule);
  border-radius: var(--r-sm); padding: .9rem 1rem; color: var(--ink);
}
.correction del { color: #E38578; text-decoration-thickness: 1px; margin-inline-end: .3rem; }
.correction ins { color: #6FCBA3; text-decoration: none; }

/* ─────────────────────────── path ─────────────────────────── */

.path-list { display: grid; }
.step {
  display: grid; grid-template-columns: 6rem 1fr; gap: 1.6rem; align-items: baseline;
  padding: 1.7rem 0; border-top: 1px solid var(--rule);
}
.step:last-child { border-bottom: 1px solid var(--rule); }
.step p.step-badge {
  font: 400 2.1rem/1 var(--serif); color: var(--gold);
  display: flex; align-items: baseline; gap: .6rem; margin: 0;
}
.step-badge i {
  width: 8px; height: 8px; border-radius: 50%; align-self: center; flex: none;
  background: var(--gold); box-shadow: 0 0 12px rgba(214,182,117,.8);
}
.step h3 { margin-bottom: .35rem; }
.step p { color: var(--muted); font-size: .96rem; margin: 0; }
@media (max-width: 560px) { .step { grid-template-columns: 1fr; gap: .4rem; } }

/* ─────────────────────────── screens ─────────────────────────── */

.shots { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.shot { margin: 0; }
.shot img {
  border-radius: 22px; border: 1px solid rgba(233,229,220,.14);
  box-shadow: var(--shadow);
}
.shot p { margin: 1.1rem 0 0; font-size: .93rem; color: var(--muted); }

/* ─────────────────────────── languages ─────────────────────────── */

.langband { background: var(--surface); border-block: 1px solid var(--rule); }
.scripts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 2rem; }
.scripts a {
  display: inline-flex; align-items: center; padding: .65rem 1.2rem;
  border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: 1rem;
}
.scripts a:hover { border-color: var(--gold); color: #fff; }
.scripts a[aria-current] { background: var(--gold); color: #070B14; border-color: var(--gold); }

/* ─────────────────────────── FAQ ─────────────────────────── */

.faq { max-width: 46rem; margin-inline: auto; }
.faq h2 { margin-bottom: 2rem; }
.faq details { border-top: 1px solid var(--rule); padding: 1.2rem 0; }
.faq details:last-of-type { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; gap: 1rem; align-items: baseline;
  font-family: var(--serif); font-size: 1.35rem; color: #fff;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-inline-start: auto; color: var(--gold);
  font: 400 1.5rem/1 var(--sans);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: .9rem 0 0; color: var(--muted); font-size: .97rem; }

/* ─────────────────────────── final CTA ─────────────────────────── */

.cta {
  text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(44rem 24rem at 50% 118%, rgba(214,182,117,.22), transparent 65%), #05080F;
}
.cta .wrap { position: relative; max-width: 44rem; }
.cta p { color: var(--muted); }
.cta .btn { margin: 1.9rem 0 1rem; font-family: var(--mono); font-size: .92rem; letter-spacing: .02em; }
.cta .note { font-size: .84rem; color: var(--dimmer); }

/* ─────────────────────────── footer ─────────────────────────── */

.site-foot { border-top: 1px solid var(--rule); padding: 3rem 0 3.5rem; font-size: .92rem; color: var(--dim); }
.site-foot .wrap { display: grid; gap: 2rem; grid-template-columns: 1.3fr 1fr; align-items: start; }
.site-foot .brand { font-size: 1.2rem; margin-bottom: .7rem; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin-bottom: 1rem; }
.site-foot a { color: var(--dim); text-decoration: none; }
.site-foot a:hover { color: var(--ink); text-decoration: underline; }
.site-foot .fine { font-size: .81rem; line-height: 1.65; color: var(--dimmer); }
@media (max-width: 720px) { .site-foot .wrap { grid-template-columns: 1fr; } }

/* ─────────────────── prose (blog + legal) ───────────────────
   Long-form on near-black is the one real cost of this direction, so reading
   pages sit on the lighter surface with a tighter measure and looser leading. */

body.reading { background: var(--surface); }
.prose {
  max-width: 42rem; margin-inline: auto; padding: 3.5rem 1.5rem 4.5rem;
  font-size: 1.04rem; line-height: 1.78; color: #DCD9D0;
}
.prose h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); line-height: 1.04; margin-bottom: 1.4rem; }
.prose h2 { font-size: 1.75rem; margin: 2.8rem 0 .8rem; }
.prose h3 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.prose ul, .prose ol { padding-inline-start: 1.3rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: .6rem; }
.prose strong { color: #fff; font-weight: 600; }
.prose code {
  background: rgba(233,229,220,.08); padding: .12em .4em; border-radius: .3rem;
  font: .86em var(--mono); color: var(--gold-soft);
}
.prose blockquote {
  margin: 1.9rem 0; padding: 1rem 1.3rem;
  border-inline-start: 2px solid var(--gold); background: rgba(233,229,220,.04);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--muted);
}
.prose blockquote p { font-size: .99rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.9rem 0; font-size: .95rem; }
.prose th, .prose td { text-align: start; padding: .75rem .6rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
.prose th { font-family: var(--serif); font-size: 1.05rem; color: #fff; font-weight: 400; }
.table-scroll { overflow-x: auto; }
.meta {
  color: var(--gold); font: 500 .74rem/1 var(--mono); letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: 1.5rem;
}

.posts { display: grid; gap: 1rem; }
.post-link { display: block; text-decoration: none; color: inherit; }
.post-link .card { transition: transform .15s ease, border-color .15s ease; }
.post-link:hover .card { border-color: var(--gold); transform: translateY(-2px); }
.post-link h3 { font-size: 1.45rem; }
.post-link .card p { color: var(--muted); }

/* ─────────────── scripts that need more room than the Latin defaults ─────────────── */

html[lang="bn"] { font-size: 108%; }          /* Kalpurush runs small next to Latin */
/* Bangla sets wider than Latin at the same size, so the display sizes come down
   a step to keep the hero from running to six lines. */
html[lang="bn"] h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
html[lang="bn"] h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
html[lang="bn"] .faq summary { font-size: 1.15rem; }
html[lang="bn"] h1, html[lang="hi"] h1 { line-height: 1.3; }
html[lang="bn"] h2, html[lang="hi"] h2,
html[lang="bn"] h3, html[lang="hi"] h3 { line-height: 1.36; }
html[lang="bn"] .kicker, html[lang="hi"] .kicker { letter-spacing: .06em; }

/* Nastaliq sits on a steep baseline: it needs roughly double leading, no tracking,
   and a smaller display size than a Latin face at the same optical weight. */
html[lang="ur"] body { line-height: 2.05; }
html[lang="ur"] h1 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); line-height: 2; letter-spacing: 0; }
html[lang="ur"] h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); line-height: 1.95; letter-spacing: 0; }
html[lang="ur"] h3 { font-size: 1.25rem; line-height: 1.9; letter-spacing: 0; }
html[lang="ur"] .kicker { font-family: var(--sans); letter-spacing: .04em; }
html[lang="ur"] .plan .trial, html[lang="ur"] .plan .badge { font-family: var(--sans); letter-spacing: 0; }
html[lang="ur"] .faq summary { font-size: 1.15rem; line-height: 1.9; }
html[lang="ur"] .grade li { line-height: 1.95; }
html[lang="ur"] .step-badge, html[lang="ur"] .stat b { font-family: "Public Sans", sans-serif; font-weight: 600; }

/* ─────────────────────────── RTL ─────────────────────────── */

[dir="rtl"] .correction { direction: ltr; text-align: start; }
[dir="rtl"] .chip b, [dir="rtl"] .step-badge { direction: ltr; }

/* Instrument Serif's italic has no counterpart in the script faces — a synthesised
   slant on Bengali, Devanagari or Nastaliq looks broken, so those locales stay upright. */
html[lang="bn"] .hero h1 .hl,
html[lang="hi"] .hero h1 .hl,
html[lang="ur"] .hero h1 .hl { font-style: normal; }

/* ─────────────────────────── ambient pieces ─────────────────────────── */

/* score meter under the grade header: 13 / 15 */
.grade-top::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -1px;
  width: 86.67%; height: 2px; background: linear-gradient(90deg, #5FBF98, var(--gold));
}
[dir="rtl"] .grade-top::after { background: linear-gradient(270deg, #5FBF98, var(--gold)); }

/* hero atmosphere: drifting light, a few stars, a heart-monitor trace */
.hero > .wrap { z-index: 1; }
/* Clip horizontal overflow on the root, NOT on main.
   Putting overflow-x: clip on main alone can force overflow-y to compute to auto,
   making main a scroll container. That breaks animation-timeline: view() and leaves
   sections stuck at opacity:0 (fill-mode: both). */
html { overflow-x: clip; }
main { overflow-x: visible; }
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; }
.hero::before {
  inset: -25%;
  background:
    radial-gradient(28% 26% at 68% 22%, rgba(214,182,117,.13), transparent 70%),
    radial-gradient(26% 30% at 22% 68%, rgba(70,104,176,.26), transparent 70%);
}
.hero::after {
  inset: 0; opacity: .55;
  background-image:
    radial-gradient(1.2px 1.2px at 8% 18%,  #fff, transparent),
    radial-gradient(1px 1px     at 23% 8%,  #fff, transparent),
    radial-gradient(1.4px 1.4px at 41% 26%, #fff, transparent),
    radial-gradient(1px 1px     at 57% 6%,  #fff, transparent),
    radial-gradient(1.2px 1.2px at 88% 14%, #fff, transparent),
    radial-gradient(1px 1px     at 94% 48%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 4% 58%,  #fff, transparent),
    radial-gradient(1px 1px     at 33% 88%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 72% 92%, #fff, transparent);
}
.ecg { position: absolute; inset-inline: 0; bottom: -2rem; width: 100%; height: 110px; pointer-events: none; }
.ecg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ecg .trace { stroke: rgba(214,182,117,.12); stroke-width: 1.2; }
.ecg .pulse { stroke: var(--gold); stroke-width: 2; stroke-dasharray: 0 1000; filter: drop-shadow(0 0 6px rgba(214,182,117,.8)); }

.ticker {
  overflow: hidden; padding: 1.4rem 0; direction: ltr;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.ticker-track { display: flex; width: max-content; }
.ticker span {
  display: flex; align-items: center; gap: 2.4rem; padding-inline-end: 2.4rem;
  font: italic 400 clamp(1.3rem, 2.4vw, 1.9rem)/1 "Instrument Serif", Georgia, serif;
  color: var(--dim); white-space: nowrap;
}
.ticker span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: .7; }

/* ─────────────────────────── motion ───────────────────────────
   CSS only — the site still ships no JavaScript. Load-in and ambient loops run
   everywhere; scroll-linked reveals use scroll-driven animations where the
   browser has them and the content simply sits still where it doesn't.
   Nothing here runs for visitors who ask for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  @keyframes rise    { from { opacity: 0; translate: 0 26px; } }
  @keyframes drift   { 50% { translate: 3% -4%; rotate: 5deg; scale: 1.08; } }
  @keyframes twinkle { 50% { opacity: .2; } }
  @keyframes float   { 50% { translate: 0 -14px; } }
  @keyframes shimmer { 0% { background-position: 100% 0; } 40%, 100% { background-position: 0 0; } }
  @keyframes beat    { 0% { box-shadow: 0 0 0 0 rgba(214,182,117,.75); } 70%, 100% { box-shadow: 0 0 0 10px rgba(214,182,117,0); } }
  @keyframes ecg     { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }
  @keyframes marquee { to { translate: -50% 0; } }
  @keyframes breathe { 50% { opacity: .5; scale: 1.18; } }

  .hero::before { animation: drift 26s ease-in-out infinite; }
  .hero::after  { animation: twinkle 7s ease-in-out infinite; }
  .ecg .pulse   { stroke-dasharray: 90 910; animation: ecg 5s linear infinite; }

  /* hero copy arrives line by line */
  .hero > .wrap > div:first-child > * { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
  .hero > .wrap > div:first-child > :nth-child(2) { animation-delay: .12s; }
  .hero > .wrap > div:first-child > :nth-child(3) { animation-delay: .26s; }
  .hero > .wrap > div:first-child > :nth-child(4) { animation-delay: .38s; }
  .hero > .wrap > div:first-child > :nth-child(5) { animation-delay: .5s; }
  .hero > .wrap > div:first-child > :nth-child(6) { animation-delay: .62s; }
  .hero .kicker::before { animation: beat 1.6s ease-out infinite; }

  /* rise and float both drive `translate`; float starts after rise has settled at 0 */
  .phones img { animation: rise 1.1s .35s cubic-bezier(.2,.7,.2,1) both, float 7s 1.5s ease-in-out infinite; }
  .phones img:last-child { animation-delay: .55s, 2.3s; }

  .hero h1 .hl {
    background: linear-gradient(100deg, var(--gold) 42%, #FFF4DA 50%, var(--gold) 58%) 0 0 / 250% 100%;
    -webkit-background-clip: text; background-clip: text; color: transparent;
    padding-inline-end: .1em; animation: shimmer 6s 1.4s linear infinite;
  }

  .ticker-track { animation: marquee 55s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }

  .step-badge i { animation: beat 2.4s ease-out infinite; }

  .card { transition: transform .35s cubic-bezier(.2,.7,.2,1), border-color .35s, background .35s, box-shadow .35s; }
  .grid-4 .card:hover {
    transform: translateY(-6px); border-color: rgba(214,182,117,.45);
    background: linear-gradient(180deg, rgba(214,182,117,.08), var(--glass));
    box-shadow: 0 30px 60px -30px rgba(0,0,0,.8), var(--glow-gold);
  }

  /* a light sweep across the store badges */
  .store { position: relative; overflow: hidden; }
  .store::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.2) 50%, transparent 65%);
    translate: -120% 0; transition: translate .7s ease;
  }
  .store:hover::after { translate: 120% 0; }

  .cta::before {
    content: ""; position: absolute; left: 50%; bottom: -16rem; width: 54rem; height: 30rem;
    translate: -50% 0; border-radius: 50%; pointer-events: none;
    background: radial-gradient(closest-side, rgba(214,182,117,.26), transparent);
    animation: breathe 8s ease-in-out infinite;
  }

  /* ── scroll-linked ── */
  @supports (animation-timeline: scroll()) {
    @keyframes solid    { to { background: rgba(7,11,20,.93); box-shadow: 0 12px 30px -14px rgba(0,0,0,.9); } }
    @keyframes progress { from { scale: 0 1; } }

    .site-head { animation: solid linear forwards; animation-timeline: scroll(root); animation-range: 0 240px; }
    .site-head::after {
      content: ""; position: absolute; inset-inline: 0; bottom: -1px; height: 2px;
      background: linear-gradient(90deg, transparent, var(--gold) 70%, var(--gold-soft));
      transform-origin: left; animation: progress linear forwards; animation-timeline: scroll(root);
    }
    [dir="rtl"] .site-head::after { transform-origin: right; background: linear-gradient(270deg, transparent, var(--gold) 70%, var(--gold-soft)); }
  }

  @supports (animation-timeline: view()) {
    @keyframes reveal { from { opacity: 0; translate: 0 44px; } }
    @keyframes tilt-l { from { opacity: 0; translate: 0 70px; rotate: -4deg; } }
    @keyframes tilt-r { from { opacity: 0; translate: 0 70px; rotate: 4deg; } }
    @keyframes draw   { from { scale: 0 1; } }
    @keyframes lit    { from { color: var(--dimmer); } }
    @keyframes strike { from { background-size: 0 1.5px; } }
    @keyframes appear { from { opacity: 0; filter: blur(5px); } }

    .section-head, .stat, .card, .feedback .wrap > div:first-child, .grade, .grade li,
    .step > div, .scripts, .faq h2, .faq details, .cta .wrap > * {
      animation: reveal linear forwards; animation-timeline: view(); animation-range: entry 0% cover 30%;
    }
    /* siblings in one row reach the viewport together, so later ones finish later */
    .stat:nth-child(2), .grid-4 .card:nth-child(2), .grade li:nth-child(2) { animation-range: entry 15% cover 35%; }
    .stat:nth-child(3), .grid-4 .card:nth-child(3) { animation-range: entry 30% cover 40%; }
    .stat:nth-child(4), .grid-4 .card:nth-child(4) { animation-range: entry 45% cover 45%; }

    .shot { animation: tilt-l linear forwards; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    .shot:nth-child(2) { animation-name: reveal; animation-range: entry 15% cover 40%; }
    .shot:nth-child(3) { animation-name: tilt-r; animation-range: entry 30% cover 45%; }

    /* the path: each rule draws itself in and its level lights up */
    .step { position: relative; border-top-color: transparent; }
    .step::before {
      content: ""; position: absolute; inset-inline: 0; top: -1px; height: 1px;
      background: linear-gradient(90deg, var(--gold), var(--rule) 55%);
      transform-origin: left; animation: draw linear forwards; animation-timeline: view(); animation-range: entry 0% cover 40%;
    }
    [dir="rtl"] .step::before { transform-origin: right; background: linear-gradient(270deg, var(--gold), var(--rule) 55%); }
    .step p.step-badge { animation: lit linear forwards; animation-timeline: view(); animation-range: entry 30% cover 45%; }

    /* the grade card fills its meter, strikes the mistakes and writes in the fixes */
    .grade { view-timeline: --grade block; }
    .grade-top::after { transform-origin: left; animation: draw linear forwards; animation-timeline: --grade; animation-range: entry 40% cover 45%; }
    [dir="rtl"] .grade-top::after { transform-origin: right; }
    .correction del {
      text-decoration: none;
      background: linear-gradient(currentColor, currentColor) no-repeat 0 58% / 100% 1.5px;
      animation: strike linear forwards; animation-timeline: --grade; animation-range: cover 30% cover 50%;
    }
    .correction ins { display: inline-block; animation: appear linear forwards; animation-timeline: --grade; animation-range: cover 42% cover 58%; }
  }
}
