/*
 * The two landing pages.
 *
 * The audience for these is unusually sensitive to being sold to, and a page
 * that smells like a funnel converts worse here than a page that feels like a
 * threshold. So: generous space, one decision per screen, one motion, and
 * saffron used exactly once per page.
 */

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font: var(--body-weight, 400) clamp(16px, 1.05rem, 18px)/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--display);
  /* Fraunces at 300. The spec asks for 300 and 500; headings take the light
     weight because at display sizes a serif this characterful does not need
     mass to hold the page. */
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 var(--s4);
}

h1 { font-size: clamp(30px, 5.4vw, 46px); }
h2 { font-size: clamp(22px, 3.4vw, 30px); }
h3 { font-size: clamp(18px, 2.4vw, 21px); }

p { margin: 0 0 var(--s4); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-s);
}

.wrap    { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--s5); }
.measure { max-width: var(--measure); }
.center  { margin-left: auto; margin-right: auto; }
.stack > * + * { margin-top: var(--s4); }

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 var(--s3);
}

.lede  { font-size: 1.08em; color: var(--text-muted); }
.small { font-size: 0.86em; color: var(--text-muted); }
.fine  { font-size: 0.8em;  color: var(--text-faint); line-height: 1.5; }

/* The one fact in a block of secondary text that is not secondary — a session
   date inside a description. Lifted out of --text-muted and given its own line. */
.lead-fact { display: block; color: var(--text); }

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 52px;                 /* thumb-reachable on a phone */
  padding: var(--s3) var(--s6);
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 500 1rem/1.2 var(--body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}

.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--brand); color: var(--on-accent); filter: brightness(1.08); }
.btn-primary:active { transform: translateY(1px); }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--edge); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }

.btn-block { width: 100%; }

.linkish {
  background: none; border: 0; padding: 0;
  color: var(--text-muted); font: inherit; font-size: .88em;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.linkish:hover { color: var(--text); }

/* ── quiz ─────────────────────────────────────────────────────────────────── */

.quiz-shell {
  min-height: 100vh;
  /* Minus the consent bar, not just 100dvh: a full-viewport shell plus the
     bar's reserved space is taller than the viewport, and the quiz would open
     with a scrollbar it does not need. --banner-h is 0 once consent is
     answered, which is most visits. */
  min-height: calc(100dvh - var(--banner-h, 0px));
  display: flex;
  flex-direction: column;
}

.quiz-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: var(--s6) 0;
}
@media (min-width: 46rem) { .quiz-main { padding: var(--s7) 0; } }

/* One question per screen. The cross-fade is the only motion on the page. */
.step { display: none; }
.step[data-active] { display: block; animation: fade .2s ease both; }

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .step[data-active] { animation: none; }
  * { transition: none !important; }
}

.q-prompt {
  font-family: var(--display);
  font-size: clamp(25px, 4.6vw, 38px);
  line-height: 1.22;
  margin: 0 0 var(--s6);
}

.options { display: grid; gap: var(--s3); margin: 0; padding: 0; border: 0; }

.option {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--s4) var(--s5);
  min-height: 56px;
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  color: var(--text);
  font: 400 1rem/1.45 var(--body);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.option:hover { border-color: var(--accent-soft); background: var(--raised); }
.option[aria-pressed="true"] { border-color: var(--accent); background: var(--raised); }

/* Three dots, current filled. No percentage — that invites abandonment maths. */
.dots { display: flex; gap: var(--s2); align-items: center; }
.dot  { width: 7px; height: 7px; border-radius: 50%; background: var(--edge); }
.dot[data-on] { background: var(--accent); }
.dot[data-done] { background: var(--accent-soft); }

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s5) 0;
}

.backlink { background: none; border: 0; color: var(--text-muted); font: inherit; font-size: .86em; cursor: pointer; padding: var(--s2) 0; }
.backlink:hover { color: var(--text); }
.backlink[hidden] { display: none; }

/* ── forms ────────────────────────────────────────────────────────────────── */

.field { display: block; margin-bottom: var(--s4); }

.field label {
  display: block;
  font-size: .88em;
  color: var(--text-muted);
  margin-bottom: var(--s2);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"] {
  width: 100%;
  min-height: 52px;
  padding: var(--s3) var(--s4);
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  color: var(--text);
  font: 400 1rem/1.4 var(--body);
}
.field input::placeholder { color: var(--text-faint); }
.field input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.field input[aria-invalid="true"] { border-color: var(--negative); }

.error { color: var(--negative); font-size: .86em; margin-top: var(--s2); }
.error:empty { display: none; }

.check { display: flex; gap: var(--s3); align-items: flex-start; margin-bottom: var(--s4); }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.check label { font-size: .92em; color: var(--text); line-height: 1.5; }

/* Honeypot. Off-screen rather than display:none — some bots skip hidden fields
   but fill anything focusable, and this catches those too. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ── result page ──────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  padding: var(--s5);
}
@media (min-width: 46rem) { .card { padding: var(--s6); } }

.card-primary { border-color: var(--accent-soft); }

.price {
  font-family: var(--mono);
  font-size: clamp(23px, 3.4vw, 30px);
  font-weight: 600;
  color: var(--positive);         /* the one saffron on the page */
  letter-spacing: -0.02em;
}

.ladder { list-style: none; margin: 0; padding: 0; }

.rung {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  gap: var(--s4);
  align-items: baseline;
  padding: var(--s4) 0;
  border-top: 1px solid var(--edge);
}
.rung:first-child { border-top: 0; }

.rung-n {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--text-faint);
}
.rung-name { font-weight: 500; }
.rung-price { font-family: var(--mono); font-size: .9em; color: var(--text-muted); white-space: nowrap; }

.rung[data-you] .rung-name { color: var(--positive); }
.rung[data-you] .rung-n { color: var(--positive); }

.tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

/* Vertical rhythm is generous by design, but a phone's fold is ~640px and the
   full desktop spacing spends a quarter of it on nothing. Tighter below 46rem. */
.section { padding: var(--s6) 0; border-top: 1px solid var(--edge); }
@media (min-width: 46rem) { .section { padding: var(--s8) 0; } }
.section:first-of-type { border-top: 0; }

.blocks { display: grid; gap: var(--s5); }
@media (min-width: 40rem) { .blocks-3 { grid-template-columns: repeat(3, 1fr); } }

/* The subdomain root: two entry points, side by side once there is room.
   On a phone they stack, and BOTH still have to clear the fold — a ~650px
   viewport minus the consent bar leaves about 500px for two cards and a
   heading, so the mobile card is deliberately tighter than the desktop one
   rather than being the same card at a smaller width. */
.entries { display: grid; gap: var(--s3); }
@media (min-width: 52rem) { .entries { grid-template-columns: 1fr 1fr; gap: var(--s4); align-items: stretch; } }

.entry { display: flex; flex-direction: column; padding: var(--s4); }
.entry h2 { font-size: 20px; }
.entry p { flex: 1; }
/* 48px, not the 52px the rest of the site uses. Still well clear of the 44px
   tap-target floor, and across two stacked cards the 8px buys back a line. */
.entry .btn { align-self: stretch; min-height: 48px; }

@media (min-width: 52rem) {
  .entry { padding: var(--s6); }
  .entry h2 { font-size: clamp(22px, 3.4vw, 30px); }
  .entry .btn { align-self: flex-start; min-height: 52px; }
}

/* 16px between everything in a card is desktop rhythm; on a phone it is three
   wasted lines across two cards. */
.entry.stack > * + * { margin-top: var(--s3); }
@media (min-width: 52rem) { .entry.stack > * + * { margin-top: var(--s4); } }

/* This is the subdomain root, not an ad destination — nobody arrives here to
   read a headline, they arrive to pick one of two doors. The heading earns a
   small share of a phone's fold, and the doors get the rest. */
.home-hero { padding-top: var(--s4); }
.home-hero h1 { margin-bottom: var(--s2); }
.home-hero .entries { margin-top: var(--s4); }
@media (min-width: 46rem) {
  .home-hero { padding-top: var(--s8); }
  .home-hero h1 { margin-bottom: var(--s4); }
  .home-hero .entries { margin-top: var(--s5); }
}

.quote {
  margin: 0;
  padding-left: var(--s5);
  border-left: 2px solid var(--accent-soft);
  font-family: var(--display);
  font-size: 1.05em;
  line-height: 1.5;
}
.quote cite { display: block; margin-top: var(--s3); font: 400 .8em/1.4 var(--mono); color: var(--text-faint); font-style: normal; letter-spacing: .06em; }

/* ── webinar ──────────────────────────────────────────────────────────────── */

.when {
  font-family: var(--display);
  font-size: clamp(22px, 3.6vw, 30px);
  color: var(--positive);
  margin: 0 0 var(--s2);
}

.when-local { font-size: .9rem; color: var(--text-muted); font-family: var(--body); min-height: 1.4em; }

.countdown {
  font-family: var(--mono);
  font-size: .84em;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--info);
}

.bullets { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.bullets li { padding-left: var(--s5); position: relative; }
.bullets li::before {
  content: "";
  position: absolute; left: 0; top: .62em;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-soft);
}
.bullets strong { color: var(--text); font-weight: 600; }

/* ── footer, banner ───────────────────────────────────────────────────────── */

.site-foot {
  border-top: 1px solid var(--edge);
  padding: var(--s6) 0 var(--s7);
  color: var(--text-faint);
  font-size: .82em;
  line-height: 1.6;
}
.site-foot a { color: var(--text-muted); }
.site-foot a:hover { color: var(--text); }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: 0 0 var(--s3); padding: 0; list-style: none; }

/* A full-bleed bar pinned to the bottom edge, NOT a floating card.
   As a card it stood ~500px tall on a phone and buried the second entry point
   completely — on an ad destination, a consent notice that covers the call to
   action is a consent notice that costs the click. As a bar it is two lines
   and a button row, and `body[data-banner]` below reserves exactly its height
   so it never sits on top of anything. */
.banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: var(--s4) 0;
  background: var(--raised);
  border-top: 1px solid var(--edge);
  box-shadow: 0 -8px 30px rgba(0,0,0,.4);
}
.banner[hidden] { display: none; }

.banner-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--s5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s5);
}
.banner p { margin: 0; font-size: .82rem; line-height: 1.5; color: var(--text-muted); flex: 1 1 20rem; }

/* Accept is the dominant button by design. A grey Accept beside a bright
   Reject costs 30–40% of the measurement signal. Reject is still one tap, the
   same height, side by side, and plainly labelled — it is a real choice, it is
   just not disguised as the safer-looking one. */
.banner-actions { display: flex; gap: var(--s3); flex: 0 0 auto; }
.banner .btn { min-height: 44px; padding: var(--s2) var(--s5); font-size: .92rem; }
.banner .btn-ghost { color: var(--text-muted); }

/* Set from JS to the bar's measured height, so the footer and the last card
   clear it. Removed the moment consent is answered. */
body[data-banner] { padding-bottom: var(--banner-h, 0px); }

.skip-link {
  position: absolute; left: -9999px;
  background: var(--accent); color: var(--on-accent); padding: var(--s3) var(--s4); border-radius: var(--radius-s);
}
.skip-link:focus { left: var(--s4); top: var(--s4); z-index: 60; }

.noscript {
  padding: var(--s5);
  background: var(--surface);
  border: 1px solid var(--edge);
  border-radius: var(--radius);
  margin-bottom: var(--s5);
}

/* ── brand lockup and theme toggle ────────────────────────────────────────── */

/*
 * Not navigation. Spec 00 §10 still stands — one page, one decision — so this
 * is a mark, a wordmark and one control, and nothing that offers a way out.
 */
.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s4) 0;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  color: var(--text);
  text-decoration: none;
}
.lockup:hover { color: var(--text); }

/* The mark is drawn in currentColor, so this one line themes it. */
.lockup .mark { color: var(--accent); flex: none; }

.wordmark {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.theme-form { margin: 0; }

.theme-btn {
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;          /* 40px is under the 44px tap floor for a
                                         primary action, but this is a
                                         preference control, not a path
                                         through the funnel */
  padding: 0;
  background: transparent;
  border: 1px solid var(--edge);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
}
.theme-btn:hover { color: var(--text); border-color: var(--accent-soft); }

/* Both icons ship; CSS picks. Swapping them in script would leave the no-JS
   button with no icon at all. */
.icon-sun  { display: block; }
.icon-moon { display: none; }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .icon-sun  { display: none; }
  :root:not([data-theme="dark"]) .icon-moon { display: block; }
}
:root[data-theme="light"] .icon-sun  { display: none; }
:root[data-theme="light"] .icon-moon { display: block; }
:root[data-theme="dark"]  .icon-sun  { display: block; }
:root[data-theme="dark"]  .icon-moon { display: none; }

/* ── the session runsheet ─────────────────────────────────────────────────── */

.runsheet { list-style: none; margin: 0; padding: 0; }

.runsheet li {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: var(--s4);
  padding: var(--s4) 0;
  border-top: 1px solid var(--edge);
}
.runsheet li:first-child { border-top: 0; }

.run-time {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: .28em;
}
.run-body strong { color: var(--text); font-weight: 600; }
.run-body { color: var(--text-muted); font-size: .92em; line-height: 1.6; }

/* The configuration line — the factual hook. Monospace because it is data:
   a phase, a degree, a sign, a ruling planet. It reads as an instrument
   reading rather than as a claim, which is exactly the register that keeps it
   compliant. */
.config {
  font-family: var(--mono);
  font-size: .82rem;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin: var(--s3) 0 0;
}

/* ── teacher blocks ───────────────────────────────────────────────────────── */

/* Side by side once there is room. The contrast between the two kinds of
   authority is the product — see partials/teachers.php — and stacking them
   makes one look like a footnote to the other. */
.teachers { display: grid; gap: var(--s5); }
@media (min-width: 44rem) { .teachers { grid-template-columns: 1fr 1fr; } }

.teacher h3 {
  font-size: 18px;
  margin: 0 0 var(--s2);
  color: var(--accent);
}
.teacher p { margin: 0; }

/* ── the hero logo, discovery session only ────────────────────────────────── */

/* 120px. NEVER below 96 — logo.png is a photographic illustration that is a
   blur at 48 and an unrecognisable smudge at 32. Anything smaller gets the
   mark instead. Clear space is 25% of the diameter because the artwork is busy
   and needs air; no drop shadow, because the transparent gap already does
   that job. */
.hero-logo {
  display: block;
  width: 120px; height: 120px;
  margin: 0 auto var(--s5);
}

/* The quiz's header carries the mark and nothing else — no wordmark, no
   toggle. Spec 06 §7: the quiz needs focus on the question, not decoration. */
.quiz-mark { color: var(--accent); display: inline-flex; }
.quiz-head .wrap { justify-content: space-between; }

/* The header logo, on instruction, in place of the mark. Rendered at 40px from
   a 96px source — under the spec's 64px legibility floor, so it is given a
   round mask and no border to keep the silhouette as clean as possible at
   this size. */
.lockup-logo { display: block; flex: none; border-radius: 50%; }
.quiz-logo   { display: block; flex: none; border-radius: 50%; }

/* A live strike-through and its saving. Only rendered where the discount is
   genuinely running on the product page — see Product::isOnSale(). */
.price-was {
  font-family: var(--mono);
  font-size: .5em;
  font-weight: 400;
  color: var(--text-faint);
  text-decoration: line-through;
  margin-left: var(--s3);
  vertical-align: middle;
}
.price-off {
  font-family: var(--mono);
  font-size: .38em;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--positive);
  margin-left: var(--s2);
  vertical-align: middle;
  white-space: nowrap;
}

/* ── the catalogue ────────────────────────────────────────────────────────── */

/* One row per product. Grid rather than flex so the price column is the same
   width down the whole list and the names align — a ragged right edge on 25
   rows reads as a bug even when nobody can say why. */
.courses { list-style: none; margin: var(--s5) 0 0; padding: 0; }

.course {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--s3) var(--s4);
  align-items: baseline;
  padding: var(--s4) 0;
  border-top: 1px solid var(--edge);
}
.course:first-child { border-top: 0; }

.course-name {
  font-size: 1.02rem;
  line-height: 1.35;
  margin: 0 0 var(--s2);
  font-weight: 600;
}
.course-name a { color: var(--text); text-decoration: none; }
.course-name a:hover { color: var(--accent); text-decoration: underline; }

.course-teaches { margin: 0; }

.course-price {
  margin: 0;
  font-family: var(--mono);
  font-size: .92rem;
  color: var(--positive);
  white-space: nowrap;
  text-align: right;
}
.course-price .price-was { font-size: .85em; margin-left: var(--s2); display: block; text-align: right; }

/* The price sits under the name on a phone: at 320px a nowrap "from ₹14,850"
   column leaves about 150px for a course title, which wraps every one of them
   to four lines. */
@media (max-width: 30rem) {
  .course { grid-template-columns: 1fr; }
  .course-price { text-align: left; }
  .course-price .price-was { display: inline; text-align: left; }
}

/* A prerequisite that decides whether a course can be used at all — not a
   "next step". Sits above the button on a product page and under the group
   heading on the index, and is deliberately louder than .fine: a cheap rung 1
   on an advanced pathway looks like an entry point, and this is the only thing
   on the page saying it is not. */
.requires {
  margin: 0;
  padding: var(--s3) var(--s4);
  border-left: 2px solid var(--accent);
  background: var(--raised);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--text);
}
.requires-label {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s1);
}
.courses + .requires, .requires + .courses { margin-top: var(--s4); }
