/* XamAgent site. Rules and the research behind them: apps/site/DESIGN.md. Pages use token names only. */
@font-face { font-family: 'Mona Sans'; font-weight: 200 900; font-display: swap; src: url('fonts/mona-sans-latin-wght-normal.woff2') format('woff2'); }
@font-face { font-family: 'Mona Sans'; font-weight: 200 900; font-display: swap; src: url('fonts/mona-sans-latin-ext-wght-normal.woff2') format('woff2'); unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-weight: 500; font-display: swap; src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'XHindi'; font-weight: 100 900; font-display: swap; src: url('fonts/noto-sans-devanagari-devanagari-wght-normal.woff2') format('woff2'); unicode-range: U+0900-097F, U+1CD0-1CFF, U+200C-200D, U+A8E0-A8FF; }

:root {
  color-scheme: light;
  --bg: #F7F8FA; --surface: #FFFFFF; --surface-2: #EEF0F4; --ink: #0B1026; --ink-2: #4A4F66; --ink-3: #6B7088; --line: rgba(11, 16, 38, .10);
  --blue: #3658E8; --blue-d: #2744C9; --on-blue: #FFFFFF;
  --stage: #0A0C12; --stage-line: rgba(255, 255, 255, .07);
  --shadow: 0 40px 90px -50px rgba(11, 16, 38, .55);
  --head-bg: rgba(247, 248, 250, .8);
  --sans: 'Mona Sans', 'XHindi', 'Segoe UI', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;
  --max: 1200px; --gut: clamp(20px, 4.5vw, 56px); --sec: clamp(88px, 11vw, 140px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #08090C; --surface: #101218; --surface-2: #161922; --ink: #F2F3F7; --ink-2: #A6ABBE; --ink-3: #80869C; --line: rgba(255, 255, 255, .08);
    --blue: #7C95FF; --blue-d: #9AADFF; --on-blue: #08090C; --stage: #0D0F16;
    --shadow: 0 40px 90px -40px rgba(0, 0, 0, .9); --head-bg: rgba(8, 9, 12, .78);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #08090C; --surface: #101218; --surface-2: #161922; --ink: #F2F3F7; --ink-2: #A6ABBE; --ink-3: #80869C; --line: rgba(255, 255, 255, .08);
  --blue: #7C95FF; --blue-d: #9AADFF; --on-blue: #08090C; --stage: #0D0F16;
  --shadow: 0 40px 90px -40px rgba(0, 0, 0, .9); --head-bg: rgba(8, 9, 12, .78);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.6 var(--sans); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
.hi { font-family: 'XHindi', var(--sans); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.wide { max-width: 1320px; }
.narrow { max-width: 820px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.nw { white-space: nowrap; }
.caption { font-size: 13px; line-height: 1.5; color: var(--ink-3); margin: 16px 0 0; max-width: 62em; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: var(--head-bg); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.mark { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 17px; letter-spacing: -.01em; }
.mark img { width: 30px; height: 26px; object-fit: contain; }
.nav { display: flex; align-items: center; gap: 26px; margin-left: auto; font-size: 15px; }
.nav a:not(.btn) { color: var(--ink-2); text-decoration: none; transition: color .2s; }
.nav a:not(.btn):hover, .nav a[aria-current] { color: var(--ink); }
.theme-btn { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; flex: none; }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; } :root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; } :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; } }

/* buttons and links */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; font: 600 16px/1 var(--sans); text-decoration: none; border: 0; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s cubic-bezier(.2, .7, .2, 1); }
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { transform: translateY(-1px); background: var(--blue); color: var(--on-blue); }
.btn.secondary { border: 1px solid var(--line); color: var(--ink); background: transparent; }
.btn.secondary:hover { border-color: var(--ink-3); }
.btn.sm { padding: 10px 18px; font-size: 14px; }
.quiet { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1.5px; text-underline-offset: 5px; transition: text-decoration-color .2s; }
.quiet:hover { text-decoration-color: currentColor; }

/* type */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.03em; color: var(--ink); }
h1 { font-size: clamp(44px, 6.2vw, 82px); line-height: 1.02; letter-spacing: -.04em; }
h2 { font-size: clamp(34px, 4.2vw, 54px); line-height: 1.06; }
h3 { font-size: 24px; line-height: 1.25; letter-spacing: -.02em; }
.lead { font-size: clamp(18px, 1.55vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 36em; margin: 0; }
.w { display: inline-block; }   /* a word wrapped by main.js for the one headline reveal */

/* hero */
.hero { padding: clamp(56px, 8vw, 112px) 0 clamp(64px, 8vw, 110px); }
.hero h1 { max-width: 13em; }
.hero-row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px 48px; margin: 30px 0 clamp(40px, 5vw, 64px); }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* the drifting smoke (smoke.js): a canvas behind the hero and Founding 50, faded out at every edge by its shader.
   No isolation on purpose: in light themes it multiplies onto the page colour, or the pale wisps wash out. */
.smoke { position: absolute; z-index: 0; left: 0; width: 100%; display: block; pointer-events: none; filter: blur(28px) saturate(1.15); }
.hero { position: relative; }
.hero > .smoke { top: -64px; height: min(1000px, 115vh); }   /* up under the translucent header */
.has-smoke > .smoke { top: 0; height: 100%; }
.hero > :not(.smoke), .has-smoke > :not(.smoke) { position: relative; z-index: 1; }
:root[data-theme="light"] .smoke { mix-blend-mode: multiply; opacity: .6; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .smoke { mix-blend-mode: multiply; opacity: .6; } }

/* the stage: the product in depth, over the field of past questions (field.js) */
.stage { position: relative; height: clamp(600px, 50vw, 700px); border-radius: 28px; background: var(--stage); overflow: hidden; perspective: 1600px; isolation: isolate; box-shadow: var(--shadow); border: 1px solid var(--stage-line); }
.field { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage-in { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(16deg) scale(.95); transform-origin: 50% 70%; }
.layer { position: absolute; transform-style: preserve-3d; }
/* layers are centred with flex, never transform: main.js moves them with the pointer */
.layer { top: 0; bottom: 0; display: flex; align-items: center; }
.layer.l-web { left: 4.5%; }
.layer.l-app { right: 4.5%; }

/* the web app in a browser window: the real desktop layout (sidebar, plan, side column), sample content */
.browser { width: 880px; height: 580px; border-radius: 14px; overflow: hidden; background: #0F1118; border: 1px solid rgba(255, 255, 255, .1); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9); transform: translateZ(20px); display: flex; flex-direction: column; }
.b-bar { flex: none; height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 14px; background: #171A24; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.b-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2E3342; }
.b-url { margin: 0 auto; transform: translateX(-24px); font: 500 12px var(--sans); color: #8C92AA; background: #0F1118; border-radius: 7px; padding: 4px 40px; }
.web { flex: 1; min-height: 0; display: grid; grid-template-columns: 170px minmax(0, 1fr) 210px; color: #F1F2F7; font: 400 13px/1.45 var(--sans); }
.w-rail { border-right: 1px solid rgba(255, 255, 255, .07); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.w-mark { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; margin: 0 6px 16px; }
.w-nav { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #A3A8BD; }
.w-nav svg { width: 15px; height: 15px; flex: none; }
.w-nav.on { background: #1C2030; color: #F1F2F7; }
.w-foot { margin-top: auto; }
.w-main { padding: 22px 24px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.w-main h5 { margin: 0; font: 650 24px/1.15 var(--sans); letter-spacing: -.02em; color: #F1F2F7; }
.w-ev { margin: 0 0 4px; color: #A3A8BD; font-size: 12.5px; }
.w-next { border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; background: #151822; }
.w-next b { font-size: 16px; letter-spacing: -.01em; }
.w-meta { font-size: 11.5px; color: #A3A8BD; }
.w-next p { margin: 0; font-size: 12.5px; color: #C9CCDA; }
.w-go { justify-self: start; margin-top: 4px; background: #9FB0FF; color: #0F1430; font-weight: 650; font-size: 12px; padding: 7px 12px; border-radius: 8px; }
.w-plan-h { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.w-plan-h span { font-size: 11.5px; color: #A3A8BD; font-weight: 600; }
.w-plan { list-style: none; margin: 0; padding: 0; }
.w-plan li { display: grid; grid-template-columns: 20px 1fr; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .07); }
.w-plan .n { color: #8C92AA; font-size: 12px; }
.w-plan b { display: block; font-weight: 500; font-size: 13px; }
.w-plan small { color: #8C92AA; font-size: 11px; }
.w-sum { margin: 0; color: #8C92AA; font-size: 11.5px; }
.w-side { border-left: 1px solid rgba(255, 255, 255, .07); padding: 22px 18px; display: flex; flex-direction: column; gap: 16px; }
.w-side > div { padding-bottom: 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.w-side b { font-size: 13px; }
.w-side p { margin: 6px 0 0; color: #A3A8BD; font-size: 12px; }
.w-side ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.w-side li { display: flex; justify-content: space-between; gap: 8px; color: #C9CCDA; font-size: 12px; }
.w-side li span:last-child { font: 500 11px/1.6 var(--mono); color: #8C92AA; white-space: nowrap; }
.w-side li .now { color: #9FB0FF; }
.web .hi { font-family: 'XHindi', var(--sans); }

/* the phone: the app in HTML, dark like the app (main.js plays it) */
.device { width: 340px; border-radius: 40px; padding: 9px; background: linear-gradient(160deg, #2A3048, #0B0E18 55%); box-shadow: 0 50px 90px -30px rgba(0, 0, 0, .85), inset 0 0 0 1px rgba(255, 255, 255, .1); transform: translateZ(80px); }
.app { --a-bg: #0F1118; --a-card: #171A24; --a-line: rgba(255, 255, 255, .08); --a-ink: #F1F2F7; --a-ink-2: #A3A8BD; --a-acc: #9FB0FF; --a-bad: #FF8A8A; --a-ok: #7EE0A8;
  position: relative; border-radius: 32px; background: var(--a-bg); color: var(--a-ink); padding: 18px 16px 12px; font: 400 14px/1.45 var(--sans); overflow: hidden; height: 590px; display: flex; flex-direction: column; gap: 12px; }
.app-top { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14px; }
.app-top img { width: 22px; height: 19px; }
.app-lang { margin-left: auto; display: flex; border: 1px solid var(--a-line); border-radius: 8px; overflow: hidden; font: 600 11px var(--sans); }
.app-lang span { padding: 4px 9px; color: var(--a-ink-2); transition: background .3s, color .3s; }
.app-lang span.on { background: #2A2E3B; color: var(--a-ink); }
.app h4 { font: 650 24px/1.2 var(--sans); letter-spacing: -.02em; color: var(--a-ink); margin-top: 6px; }
.app .ev { color: var(--a-ink-2); font-size: 13px; margin: -6px 0 2px; }
.app .a-lbl { font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--a-ink-2); }
.app-next { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 16px; padding: 14px; display: grid; gap: 6px; }
.app-next .t { font: 650 17px/1.25 var(--sans); }
.app-next .m { color: var(--a-ink-2); font-size: 12px; }
.app-go { justify-self: start; margin-top: 4px; background: var(--a-acc); color: #0F1430; font: 650 13px var(--sans); padding: 8px 14px; border-radius: 10px; }
.app-card { perspective: 900px; }
.app-card .in { position: relative; height: 96px; transform-style: preserve-3d; transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.app-card.flipped .in { transform: rotateY(180deg); }
.app-card .f, .app-card .b { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 14px; padding: 12px 14px; display: grid; align-content: center; gap: 4px; border: 1px solid var(--a-line); }
.app-card .f { background: var(--a-card); }
.app-card .b { background: #1A2035; transform: rotateY(180deg); border-color: rgba(159, 176, 255, .35); }
.app-card small { font: 500 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--a-ink-2); }
.app-card b { font-weight: 600; font-size: 14px; line-height: 1.35; }
.app-stats { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; background: var(--a-card); border: 1px solid var(--a-line); border-radius: 16px; padding: 12px 14px; }
.ring { position: relative; width: 62px; height: 62px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 7; }
.ring .bgc { stroke: #2A2E3B; }
.ring .fg { stroke: var(--a-acc); stroke-linecap: round; stroke-dasharray: 163.4; stroke-dashoffset: 45.75; }   /* 72%, the still state */
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 650 15px var(--sans); }
.app-stats .k { font-size: 12px; color: var(--a-ink-2); }
.app-stats .v { font-weight: 650; }
.app-tabs { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; border-top: 1px solid var(--a-line); padding-top: 10px; font: 600 11px var(--sans); color: var(--a-ink-2); }
.app-tabs .on { color: var(--a-ink); }
.app .hi { font-family: 'XHindi', var(--sans); }
.live .l-hi { display: none; }   /* main.js toggles .in-hi on both screens to play the language switch */
.live.in-hi .l-en { display: none; } .live.in-hi .l-hi { display: inline; }

/* story screens: one per agent step, shown by [data-state] on .story-app */
.story-app .scr { position: absolute; inset: 18px 16px 52px; display: flex; flex-direction: column; gap: 12px; opacity: 0; transform: translateY(14px) scale(.98); transition: opacity .5s, transform .6s cubic-bezier(.2, .7, .2, 1); pointer-events: none; }
.story-app[data-state="0"] .scr[data-s="0"], .story-app[data-state="1"] .scr[data-s="1"], .story-app[data-state="2"] .scr[data-s="2"], .story-app[data-state="3"] .scr[data-s="3"] { opacity: 1; transform: none; }
.story-app .app-tabs { position: absolute; left: 16px; right: 16px; bottom: 12px; }
.scr .q { font: 600 17px/1.35 var(--sans); }
.opts { display: grid; gap: 8px; }
.opts span { border: 1px solid var(--a-line); border-radius: 12px; padding: 10px 12px; background: var(--a-card); color: var(--a-ink-2); }
.opts .picked { border-color: rgba(255, 138, 138, .55); color: var(--a-ink); background: rgba(255, 138, 138, .08); }
.opts .right { border-color: rgba(126, 224, 168, .45); color: var(--a-ink); }
.conf { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12px; text-align: center; }
.conf span { border: 1px solid var(--a-line); border-radius: 10px; padding: 7px 4px; color: var(--a-ink-2); }
.conf .on { background: #2A2E3B; color: var(--a-ink); border-color: rgba(255, 255, 255, .18); }
.verdict { border-radius: 12px; padding: 10px 12px; background: rgba(255, 138, 138, .1); color: #FFC2C2; font-size: 13px; }
.verdict b { color: var(--a-bad); }
.plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plan li { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 14px; padding: 12px 14px; display: grid; grid-template-columns: 22px 1fr auto; gap: 2px 10px; }
.plan .n { font: 500 12px/1.7 var(--mono); color: var(--a-ink-2); grid-row: span 2; }
.plan .t { font-weight: 600; }
.plan .d { font: 500 12px/1.7 var(--mono); color: var(--a-acc); }
.plan .why { grid-column: 2 / 4; color: var(--a-ink-2); font-size: 12px; }
.sched { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sched li { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; background: var(--a-card); border: 1px solid var(--a-line); border-radius: 14px; padding: 11px 14px; }
.sched .r { font: 500 11px var(--mono); color: var(--a-ink-2); }
.sched .when { font: 500 12px/1.6 var(--mono); color: var(--a-acc); grid-row: span 2; align-self: center; }
.sched .again .when { color: var(--a-bad); }
.note-a { font-size: 12px; color: var(--a-ink-2); border-top: 1px solid var(--a-line); padding-top: 10px; }
.depth { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--a-line); border-radius: 10px; overflow: hidden; font: 600 12px var(--sans); text-align: center; }
.depth span { padding: 8px; color: var(--a-ink-2); } .depth .on { background: #2A2E3B; color: var(--a-ink); }
.lesson { background: var(--a-card); border: 1px solid var(--a-line); border-radius: 14px; padding: 14px; color: #D5D8E4; font-size: 13.5px; line-height: 1.55; }
.lesson b { color: var(--a-ink); }
.feel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 12px; text-align: center; }
.feel span { border: 1px solid var(--a-line); border-radius: 10px; padding: 7px 4px; color: var(--a-ink-2); }

/* sections */
.sec { padding: var(--sec) 0; position: relative; }
.sec-head { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 24px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.statement { padding-bottom: 0; }
.big { font-size: clamp(30px, 3.6vw, 48px); line-height: 1.18; letter-spacing: -.03em; font-weight: 600; margin: 0; max-width: 24em; }
.big span { color: var(--ink-3); }

/* the agent story: steps left, the phone sticky right */
.story { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: clamp(32px, 6vw, 96px); }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { min-height: 78vh; display: flex; flex-direction: column; justify-content: center; max-width: 30em; opacity: .3; transition: opacity .5s; }
.steps li.on { opacity: 1; }
.steps li:first-child { min-height: 60vh; justify-content: flex-start; padding-top: 12vh; }
.steps .k { font: 600 15px var(--sans); color: var(--blue); margin-bottom: 14px; }
.steps h3 { font-size: clamp(30px, 3vw, 40px); letter-spacing: -.03em; margin-bottom: 14px; }
.steps p { margin: 0; color: var(--ink-2); font-size: 19px; }
.story-stage { position: sticky; top: calc(50vh - 315px); height: 630px; display: grid; place-items: center; }
.story-stage .device { transform: none; }

/* built on the real exam */
.basis { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.basis li { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 8px 40px; padding: 26px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.basis b { font-size: clamp(34px, 3.6vw, 48px); font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.basis span { color: var(--ink-2); font-size: 19px; }

/* forgetting curve */
.curve { position: relative; margin: 0; }
.curve svg { width: 100%; height: auto; display: block; overflow: visible; }
.curve .grid line { stroke: var(--line); stroke-width: 1; }
.curve .axis text { font: 500 12px var(--mono); fill: var(--ink-3); }
.curve .forget { fill: none; stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 3 6; }
.curve .keep { fill: none; stroke: var(--blue); stroke-width: 2.6; stroke-linejoin: round; }
.curve .dot circle { fill: var(--bg); stroke: var(--blue); stroke-width: 2.5; }
.curve .dot text { font: 600 18px var(--sans); fill: var(--ink); }
.curve .tag { font: 500 12px var(--mono); fill: var(--ink-2); }

/* 3D books: a real box with cover, spine, page block (home and book pages) */
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 5vw, 80px); }
.book { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 36px; align-items: center; color: inherit; text-decoration: none; }
.book-meta h3 { margin-bottom: 4px; }
.book-meta h3 .hi { display: block; font-size: 17px; font-weight: 500; color: var(--ink-2); letter-spacing: 0; margin-top: 2px; }
.book-meta p { color: var(--ink-2); font-size: 16px; margin: 14px 0 16px; }
.book-meta p b { color: var(--ink); font-size: 22px; letter-spacing: -.02em; display: block; }
.scene { perspective: 1400px; padding: 10px 26px 26px 6px; }
.book3d { --w: 180px; --h: calc(var(--w) * 1.414); --d: 30px; position: relative; width: var(--w); height: var(--h); transform-style: preserve-3d; transform: rotateY(calc(var(--turn) + var(--hov))) rotateX(8deg); transition: --hov .8s cubic-bezier(.2, .7, .2, 1); }
@property --hov { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@property --turn { syntax: '<angle>'; inherits: false; initial-value: -32deg; }
.book:hover .book3d, .book:focus-visible .book3d { --hov: 22deg; }   /* --turn is scrubbed by main.js as the book scrolls past */
.book3d > span { position: absolute; display: block; }
.book3d .f { inset: 0; transform: translateZ(calc(var(--d) / 2)); border-radius: 2px 4px 4px 2px; overflow: hidden; box-shadow: inset 4px 0 6px -3px rgba(0, 0, 0, .5); }
.book3d .f img { width: 100%; height: 100%; object-fit: cover; }
.book3d .bk { inset: 0; transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); background: var(--spine, #14080B); border-radius: 4px 2px 2px 4px; }
.book3d .sp { top: 0; left: calc(50% - var(--d) / 2); width: var(--d); height: 100%; transform: rotateY(-90deg) translateZ(calc(var(--w) / 2)); background: linear-gradient(90deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .25)), var(--spine, #14080B); }
.book3d .pg { top: 3px; left: calc(50% - var(--d) / 2 + 1px); width: calc(var(--d) - 2px); height: calc(100% - 6px); transform: rotateY(90deg) translateZ(calc(var(--w) / 2 - 3px)); background: repeating-linear-gradient(90deg, #F6F2E8 0 1px, #DCD5C4 1px 2px); }
.book3d .tp { left: 3px; top: calc(50% - var(--d) / 2); width: calc(100% - 6px); height: var(--d); transform: rotateX(90deg) translateZ(calc(var(--h) / 2 - 3px)); background: repeating-linear-gradient(0deg, #F6F2E8 0 1px, #DCD5C4 1px 2px); }
.book3d::after { content: ''; position: absolute; left: 10%; right: -20%; bottom: -24px; height: 30px; background: radial-gradient(closest-side, rgba(0, 0, 0, .4), transparent); transform: rotateX(90deg) translateZ(-12px); filter: blur(4px); }

/* Founding 50 */
.access { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 32px clamp(32px, 6vw, 96px); align-items: start; padding: clamp(28px, 4vw, 56px); border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.access .lead { margin-top: 20px; }
.wl { display: grid; gap: 14px; }
.wl label { display: grid; gap: 6px; font: 500 14px var(--sans); color: var(--ink-2); }
.wl input:not([type=radio]), .wl select { font: 400 17px var(--sans); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 48px; width: 100%; transition: border-color .2s; }
.wl input:focus, .wl select:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 1px; }
.wl .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wl fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.wl legend { font: 500 14px var(--sans); color: var(--ink-2); padding: 0; margin-bottom: 6px; width: 100%; }
.wl .r { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; color: var(--ink); font-size: 16px; }
.wl .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl .btn { justify-self: start; }
.wl .btn[disabled] { opacity: .5; cursor: wait; }
.wl .fine { margin: 0; font-size: 13px; color: var(--ink-3); }
.wl .msg { margin: 0; font-weight: 600; min-height: 1.5em; }
.wl .msg.ok { color: #2E9E68; } .wl .msg.err { color: #E5484D; }

/* footer */
footer { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 14px; color: var(--ink-3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 36px; align-items: center; }
footer nav { display: flex; flex-wrap: wrap; gap: 22px; margin-left: auto; }
footer a { color: var(--ink-2); text-decoration: none; } footer a:hover { color: var(--ink); }
.theme-pick { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; }
.theme-pick button { font: 500 13px var(--sans); color: var(--ink-2); background: none; border: 0; border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.theme-pick button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }

/* ---------- book pages (gen.py) ---------- */
.bookhero { padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 96px); }
.bookhero > .wrap { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.bookhero.solo > .wrap { display: block; }
.bookhero .kicker { color: var(--ink-3); font-size: 15px; margin: 0 0 14px; }
.bookhero h1 { font-size: clamp(44px, 6vw, 76px); margin: 0 0 20px; }
.bookhero h1 .hi { display: block; font: 500 .42em/1.4 'XHindi', var(--sans); letter-spacing: 0; color: var(--ink-2); margin-top: 8px; }
.bookhero .lead { margin: 0 0 14px; }
.who { color: var(--ink-2); margin: 0 0 26px; font-size: 16px; }
.proofline { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.proofline b { font-size: clamp(34px, 3.6vw, 46px); font-weight: 600; letter-spacing: -.035em; line-height: 1; }
.proofline span { color: var(--ink-2); font-size: 15px; max-width: 24em; }
.bookhero .fine { font-size: 14px; color: var(--ink-3); margin: 16px 0 0; }
.bookhero .scene { justify-self: center; }
.bookhero .book3d { --w: min(280px, 56vw); --d: 40px; }
.size { font: 500 12px var(--mono); opacity: .75; }
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts .wrap { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.facts .wrap > div { padding: 26px 18px; border-left: 1px solid var(--line); }
.facts .wrap > div:first-child { border-left: 0; padding-left: 0; }
.facts b { display: block; font-size: clamp(30px, 3.4vw, 44px); font-weight: 600; letter-spacing: -.035em; line-height: 1.1; }
.facts span { font-size: 14px; color: var(--ink-3); }
.eng { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px clamp(32px, 5vw, 80px); padding: 48px 0; border-top: 1px solid var(--line); }
.eng-h h3 { font-size: 28px; }
.eng-h p { color: var(--ink-3); margin: 8px 0 0; font-size: 16px; }
.eng ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 44px; }
.eng h4 { font-size: 18px; line-height: 1.3; letter-spacing: -.01em; margin: 0 0 8px; }
.eng p { margin: 0 0 8px; color: var(--ink-2); font-size: 16px; }
.eng p.why { color: var(--ink); font-weight: 500; }
.reader { background: var(--surface-2); }
.reader .note-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; color: var(--ink-3); font-size: 15px; }
.lang-t { font: 500 14px var(--sans); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.reader h2 { margin-bottom: 18px; }
.reader p, .reader li { font-size: 18px; color: var(--ink-2); }
.reader b { color: var(--ink); }
.reader ul { padding-left: 22px; margin: 0 0 18px; }
.reader li { margin-bottom: 6px; }
.reader .sig { font-weight: 650; color: var(--ink); }
.chapters { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 48px; }
.chapters li { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 4px 12px; padding: 14px 0; border-top: 1px solid var(--line); break-inside: avoid; }
.chapters .no { font: 500 14px/1.6 var(--mono); color: var(--ink-3); }
.chapters .t { font-weight: 560; }
.chapters .t .hi { display: block; font-weight: 400; color: var(--ink-2); font-size: 15px; }
.chapters .m { grid-column: 2; font-size: 13px; color: var(--ink-3); }
.band { background: var(--stage); color: #F1F2F7; }
.band h2 { color: #fff; }
.band .cta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 28px; }
.band .btn.primary { background: #fff; color: #0A0C12; } .band .btn.primary:hover { background: #9FB0FF; }
.band .btn.secondary { border-color: rgba(255, 255, 255, .3); color: #fff; }

/* look inside: the page-turning reader (flip.js) */
.inside { background: var(--stage); color: #F1F2F7; overflow: hidden; }
.inside h2 { color: #fff; }
.inside .lead { color: #A6ABBE; }
.inside .sec-head { margin-bottom: 48px; }
.flip { --w: min(520px, 44vw); --h: calc(var(--w) * 297 / 210); width: calc(var(--w) * 2); margin: 0 auto; }
.fbook { position: relative; width: var(--w); height: var(--h); margin-left: calc(var(--w) / 2); perspective: 2600px; transition: margin-left .9s cubic-bezier(.2, .7, .2, 1); cursor: pointer; touch-action: pan-y; user-select: none; }
.flip.open .fbook { margin-left: var(--w); }
.fbook::before { content: ''; position: absolute; left: -8%; right: -8%; bottom: -30px; height: 44px; background: radial-gradient(closest-side, rgba(0, 0, 0, .7), transparent); filter: blur(8px); transition: left .9s; }
.flip.open .fbook::before { left: -108%; }
.fbook::after { content: ''; position: absolute; top: 3px; bottom: 3px; right: -8px; width: 8px; border-radius: 0 3px 3px 0; background: repeating-linear-gradient(90deg, #FBF8F0 0 1px, #D8D0BE 1px 2px); }
.fend { position: absolute; inset: 0; display: grid; place-content: center; gap: 18px; padding: 24px; text-align: center; background: #151822; border-radius: 0 4px 4px 0; color: #C9CCDA; }
.fend .btn.primary { background: #fff; color: #0A0C12; }
.leaf { position: absolute; inset: 0; transform-origin: left center; transform-style: preserve-3d; transition: transform 1s cubic-bezier(.3, .6, .2, 1); }
.leaf.turned { transform: rotateY(-180deg); }
.flip:not(.open) .leaf[data-i="0"] { transform: rotateY(-12deg); }
.flip:not(.open):hover .leaf[data-i="0"] { transform: rotateY(-24deg); }
.face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fff; overflow: hidden; border-radius: 0 4px 4px 0; }
.face img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.face.back { transform: rotateY(180deg); border-radius: 4px 0 0 4px; }
.face::after { content: ''; position: absolute; inset: 0; pointer-events: none; }
.face.front::after { background: linear-gradient(90deg, rgba(11, 16, 38, .18), rgba(11, 16, 38, 0) 6%); }
.face.back::after { background: linear-gradient(270deg, rgba(11, 16, 38, .18), rgba(11, 16, 38, 0) 6%); }
.leaf.moving .face::after { background: linear-gradient(90deg, rgba(0, 0, 0, .25), rgba(0, 0, 0, 0) 40%, rgba(255, 255, 255, .12) 60%, rgba(0, 0, 0, .1)); }
.fctl { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 40px; flex-wrap: wrap; }
.fctl button { height: 44px; min-width: 44px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #F1F2F7; font: 500 16px var(--sans); cursor: pointer; padding: 0 16px; }
.fctl button:hover:not(:disabled) { border-color: rgba(255, 255, 255, .5); }
.fctl button:disabled { opacity: .3; cursor: default; }
.fctl .fread { background: #fff; color: #0A0C12; border-color: #fff; font-weight: 600; }
.fpage { min-width: 15em; text-align: center; font-size: 14px; color: #A6ABBE; }

/* full-size page reader */
.preader { width: min(960px, 100vw); max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0 auto; padding: 0; border: 0; background: #0A0C12; color: #F1F2F7; }
.preader::backdrop { background: rgba(4, 5, 8, .86); }
.preader .bar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: rgba(10, 12, 18, .94); border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 14px; color: #A6ABBE; }
.preader .bar button { height: 40px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #fff; font: 600 14px var(--sans); padding: 0 16px; cursor: pointer; }
.preader .pages { display: grid; gap: 16px; padding: 16px; }
.preader figure { margin: 0; }
.preader figure img { width: 100%; height: auto; background: #fff; border-radius: 4px; }
.preader figcaption { font-size: 13px; color: #80869C; margin-top: 6px; }

/* reduced motion: still, final states */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .stage-in { transform: none; }
}

/* tablets and phones */
@media (max-width: 1240px) {
  .layer.l-web { left: 2.5%; } .l-web .browser { zoom: .86; }
  .layer.l-app { right: 2.5%; }
}
@media (max-width: 1040px) {
  .l-web .browser { zoom: .7; }
  .l-app .device { zoom: .86; }
}
@media (max-width: 760px) {
  .layer.l-web { display: none; }
  .layer.l-app { left: 0; right: 0; justify-content: center; }
  .l-app .device { zoom: 1; }
}
@media (max-width: 960px) {
  .sec-head, .access, .bookhero > .wrap, .eng, .basis li { grid-template-columns: minmax(0, 1fr); }
  .shelf, .eng ol { grid-template-columns: minmax(0, 1fr); }
  .facts .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts .wrap > div:nth-child(odd) { border-left: 0; padding-left: 0; }
  .chapters { columns: 1; }
  .nav a:not(.btn) { display: none; }
  /* the story: the phone stays at the top while the steps scroll under it */
  .story { display: flex; flex-direction: column; }
  .story-stage { order: -1; top: 64px; height: 400px; z-index: 2; background: var(--bg); margin: 0 calc(-1 * var(--gut)); }
  .story-stage .device { transform: scale(.62); transform-origin: 50% 50%; }
  .steps li, .steps li:first-child { min-height: 64vh; padding-top: 24px; justify-content: flex-start; }
  .bookhero .scene { order: -1; }
}
@media (max-width: 620px) {
  .stage { height: 600px; border-radius: 20px; }
  .l-app .device { zoom: .88; }
  .book { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .book3d { --w: 150px; }
  .wl .two { grid-template-columns: 1fr; } .wl .btn { justify-self: stretch; justify-content: center; }
  .top .wrap { gap: 10px; } .nav { gap: 10px; }
  .nav .btn.sm { padding: 10px 14px; }
  footer nav { margin-left: 0; }
  .flip { --w: 44vw; }
  .fpage { min-width: 0; order: -1; width: 100%; }
}
