/* Protheus landing. Tokens first; cine.css supplies the floor and the scroll primitives. */
:root {
  --canvas: #f3f8fc; --surface: #ffffff; --ink: #0a2540; --ink-soft: #3a5673;
  --accent: #0ea5e9; --accent-text: #0369a1; --accent-ink: #ffffff; --signal: #e5484d;
  --shadow-tint: 16 62 104;
  --font-display: 'Sora', system-ui, sans-serif; --font-text: 'Sora', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
  --e1: 0 1px 2px rgb(var(--shadow-tint) / .08), inset 0 1px 0 rgb(255 255 255 / .9);
  --e2: 0 10px 30px -12px rgb(var(--shadow-tint) / .22), inset 0 1px 0 rgb(255 255 255 / .9);
  --e3: 0 30px 70px -24px rgb(var(--shadow-tint) / .32), inset 0 1px 0 rgb(255 255 255 / .9);
  --radius: 14px;
  color-scheme: only light;
}
html { scroll-snap-type: y proximity; scroll-padding-top: 0; }
.snap { position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; pointer-events: none; }
.section { scroll-margin-top: 64px; }
body { line-height: 1.6; }
a { color: var(--accent-text); }
::selection { background: var(--accent); color: #fff; }
h1, h2, h3 { letter-spacing: -.028em; line-height: 1.06; }
.mono { font-family: var(--font-mono); font-size: var(--t-xs); letter-spacing: .04em; text-transform: none; color: var(--accent-text); }

/* ---- the world: one canvas behind every act ---- */
#world { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.world-poster { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(90% 70% at 70% 30%, rgb(14 165 233 / .16), transparent 70%),
    radial-gradient(70% 60% at 10% 90%, rgb(56 189 248 / .14), transparent 70%),
    radial-gradient(circle at 1px 1px, rgb(10 37 64 / .13) 1px, transparent 1.6px) 0 0 / 14px 14px, var(--canvas); }
.cine-js:not(.no-world) .world-poster { background: radial-gradient(90% 70% at 72% 26%, rgb(14 165 233 / .13), transparent 70%), radial-gradient(70% 60% at 8% 92%, rgb(56 189 248 / .12), transparent 70%), var(--canvas); }
main, .bar { position: relative; z-index: 2; }

/* ---- top bar ---- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gutter);
  background: rgb(243 248 252 / .78); backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2); box-shadow: 0 1px 0 rgb(var(--shadow-tint) / .07); }
.mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.02em; font-size: 18px; min-height: 44px; }
.bar nav { display: flex; align-items: center; gap: clamp(10px, 2.4vw, 28px); }
.bar nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
@media (hover: hover) and (pointer: fine) { .bar nav a:not(.btn):hover { color: var(--accent-text); } }

.btn { background: var(--ink); color: #fff; clip-path: none; border-radius: 999px; padding: 16px 30px; font-size: 14px; letter-spacing: .01em; text-transform: none; font-weight: 600;
  box-shadow: 0 12px 28px -12px rgb(var(--shadow-tint) / .55), inset 0 1px 0 rgb(255 255 255 / .18); transition: transform var(--dur-ui) var(--ease-out), background var(--dur-ui) var(--ease-out); }
.btn::after { content: ""; width: 8px; height: 8px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); margin-left: 2px; }
.btn--sm { padding: 10px 18px; font-size: 13px; min-height: 44px; }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: var(--accent-text); } }
.link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 5px; }

/* ---- hero ---- */
.hero .cine-stage { align-items: center; }
.hero-copy { align-self: center; padding: 96px var(--gutter) 0; width: min(100%, 980px); display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-5);
  opacity: calc(1 - var(--pd) * 2.4); transform: translate3d(0, calc(var(--pd) * -60px), 0); }
.hero-copy::before { content: ""; position: absolute; inset: -10% 30% -10% -10%; z-index: -1; background: radial-gradient(60% 60% at 30% 50%, rgb(243 248 252 / .96), rgb(243 248 252 / 0) 72%); }
.hero h1 { font-size: clamp(2.1rem, 4.1vw, 3.7rem); max-width: 22ch; }
.lede { font-size: clamp(1rem, 1.35vw, 1.2rem); color: var(--ink-soft); max-width: 44ch; }
.tag { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; color: var(--accent-text); padding: 7px 12px; border-radius: 999px; background: rgb(255 255 255 / .8); box-shadow: var(--e1); }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgb(14 165 233 / .5); animation: ping 2.4s var(--ease-out) infinite; }
@keyframes ping { to { box-shadow: 0 0 0 10px rgb(14 165 233 / 0); } }
.readout { align-self: end; justify-self: end; display: flex; gap: clamp(18px, 3vw, 44px); padding: 0 var(--gutter) 6vh; opacity: calc(1 - var(--pd) * 3); }
.readout dt { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }
.readout dd { font-size: clamp(1.3rem, 2.2vw, 2rem); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.readout div { display: flex; flex-direction: column-reverse; padding-left: 14px; border-left: 2px solid var(--accent); }

/* ---- pinned acts with a caption ---- */
.cap { position: absolute; top: 50%; transform: translateY(-50%); z-index: 6; display: flex; flex-direction: column; gap: var(--s-4); width: min(36vw, 460px);
  padding: clamp(20px, 2.4vw, 32px); border-radius: var(--radius); background: rgb(255 255 255 / .86); box-shadow: var(--e3); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cap[data-cine-cue] { transform: translateY(calc(-50% + (1 - var(--cue)) * 30px)); }
.cap--right { right: var(--gutter); } .cap--left { left: var(--gutter); }
.cap h2 { font-size: clamp(1.6rem, 2.7vw, 2.5rem); }
.cap p { color: var(--ink-soft); font-size: var(--t-md); }
.verdict { color: var(--ink) !important; font-weight: 600; }
.verdict .mono { display: inline-block; margin-right: 8px; padding: 4px 9px; border-radius: 6px; background: rgb(14 165 233 / .12); }

/* ---- contents ---- */
.contents, .next { background: linear-gradient(180deg, rgb(243 248 252 / 0), rgb(243 248 252 / .975) 10%, rgb(243 248 252 / .975) 90%, rgb(243 248 252 / 0)); }
.lead p, .note { color: var(--ink-soft); margin-top: var(--s-4); }
.figures { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 0; margin-top: var(--s-8); border-top: 1px solid var(--line); }
.figures > div { padding: var(--s-6) var(--s-5) var(--s-6) 0; border-right: 1px solid var(--line); }
.figures > div + div { padding-left: var(--s-5); } .figures > div:last-child { border-right: 0; }
.figures dd { font-size: clamp(2rem, 4.4vw, 3.9rem); font-weight: 700; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.figures > div:first-child dd { color: var(--accent-text); }
.figures dt { margin-top: var(--s-3); color: var(--ink-soft); font-size: var(--t-sm); max-width: 20ch; }
.sources { margin-top: var(--s-9); display: grid; grid-template-columns: minmax(140px, 1fr) 3fr; gap: var(--s-6); }
.sources h3 { font-size: var(--t-lg); }
.sources ul { list-style: none; padding: 0; }
.sources li { display: grid; grid-template-columns: 1.6fr 1fr auto; gap: var(--s-5); align-items: baseline; padding: var(--s-4) 0; border-top: 1px solid var(--line); max-width: none; }
.sources li:last-child { border-bottom: 1px solid var(--line); }
.sources b { font-weight: 600; } .sources small { display: block; color: var(--ink-soft); font-size: var(--t-sm); }
.sources .lic { color: var(--ink-soft); font-size: var(--t-sm); }
.sources .n { font-family: var(--font-mono); font-size: var(--t-sm); color: var(--accent-text); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- API act ---- */
.api-grid { align-self: center; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(24px, 5vw, 80px); align-items: center; padding: 0 var(--gutter); width: min(100%, 1320px); margin-inline: auto; }
.api-copy { display: flex; flex-direction: column; gap: var(--s-5); align-items: flex-start; }
.api-copy p { color: var(--ink-soft); }
.term { border-radius: var(--radius); background: #072138; color: #d7ecfb; box-shadow: var(--e3); overflow: hidden; transform: perspective(1400px) rotateY(calc((1 - var(--pd)) * -7deg)) translate3d(0, calc((.5 - var(--pd)) * 40px), 0); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; background: #0b2c49; font-family: var(--font-mono); font-size: 12px; color: #8fb7d6; }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: #25527a; } .term-bar span { margin-left: 10px; }
.term pre { margin: 0; padding: 16px 18px; font-family: var(--font-mono); font-size: clamp(11px, 1vw, 13.5px); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.term-req { color: #7dd3fc; border-bottom: 1px solid #12395c; }
.term-res { max-height: 46vh; overflow: hidden; }
.cine-js .term-req code { clip-path: inset(0 calc((1 - clamp(0, var(--pd) * 4, 1)) * 100%) 0 0); display: block; }
.cine-js .term-res { clip-path: inset(0 0 calc((1 - clamp(0, (var(--pd) - .26) * 3.2, 1)) * 100%) 0); }
.cine-reduced .term, .cine-reduced .term-req code, .cine-reduced .term-res { transform: none; clip-path: none; }

/* ---- building now ---- */
.road { list-style: none; padding: 0; margin-top: var(--s-7); counter-reset: r; display: grid; gap: 0; }
.road li { counter-increment: r; display: grid; grid-template-columns: 56px minmax(0, 1.1fr) minmax(0, 1.4fr); gap: var(--s-5); padding: var(--s-5) 0; border-top: 1px dashed color-mix(in oklab, var(--accent) 55%, transparent); max-width: none; align-items: baseline; }
.road li::before { content: counter(r, decimal-leading-zero); font-family: var(--font-mono); font-size: var(--t-sm); color: var(--accent-text); }
.road b { font-size: var(--t-lg); font-weight: 600; letter-spacing: -.015em; } .road span { color: var(--ink-soft); }

/* ---- capabilities ---- */
.caps, .how { background: linear-gradient(180deg, rgb(243 248 252 / 0), rgb(243 248 252 / .975) 10%, rgb(243 248 252 / .975) 90%, rgb(243 248 252 / 0)); }
.capgrid { margin-top: var(--s-8); display: grid; grid-template-columns: 1fr 1fr; gap: 0 clamp(24px, 5vw, 80px); }
.capgrid > div { padding: var(--s-6) 0; border-top: 1px solid var(--line); }
.capgrid > div:nth-child(1), .capgrid > div:nth-child(2) { border-top: 2px solid var(--ink); }
.capgrid dt { font-size: var(--t-lg); font-weight: 600; letter-spacing: -.02em; }
.capgrid dd { margin-top: var(--s-3); color: var(--ink-soft); max-width: 52ch; }
.fact { display: block; margin-top: var(--s-3); font-family: var(--font-mono); font-size: var(--t-xs); color: var(--accent-text); font-variant-numeric: tabular-nums; }
.how h2 { margin-bottom: var(--s-2); }
.road--plain li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); align-self: center; }

/* ---- close ---- */
.finale { min-height: 82vh; min-height: 82svh; display: grid; place-items: center; padding: var(--section) var(--gutter); background: linear-gradient(180deg, rgb(243 248 252 / 0), rgb(243 248 252 / .9) 40%); scroll-snap-align: end; }
.finale-copy { display: flex; flex-direction: column; align-items: center; gap: var(--s-5); text-align: center; }
.word { font-size: clamp(3.4rem, 14vw, 12rem); letter-spacing: -.06em; line-height: .9; color: var(--ink); }
.finale-copy p { color: var(--ink-soft); }
.foot { position: relative; z-index: 2; background: var(--canvas); border-top: 1px solid var(--line); padding: 22px var(--gutter) calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 12px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 600; min-height: 40px; display: inline-flex; align-items: center; }
.foot p { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); max-width: none; }
@media (hover: hover) and (pointer: fine) { .foot nav a:hover { color: var(--accent-text); } }

/* ---- phone: art-directed, not shrunk ---- */
@media (max-width: 860px) {
  .hero-copy { align-self: start; padding-top: 104px; gap: var(--s-4); }
  .hero-copy::before { inset: -6% -10% -30% -10%; background: linear-gradient(180deg, rgb(243 248 252 / .96) 55%, rgb(243 248 252 / 0)); }
  .readout { justify-self: stretch; justify-content: space-between; gap: 10px; padding-bottom: 4vh; }
  .readout div { padding-left: 9px; } .readout dd { font-size: 1.15rem; } .readout dt { font-size: 10px; }
  .readout .wide { display: none; }
  .cap { top: auto; bottom: 4vh; left: 12px; right: 12px; width: auto; transform: none; padding: 18px; }
  .cap[data-cine-cue] { transform: translateY(calc((1 - var(--cue)) * 24px)); }
  .figures { grid-template-columns: 1fr 1fr; } .figures > div { padding: var(--s-5) var(--s-3) var(--s-5) 0; } .figures > div:nth-child(2) { border-right: 0; }
  .figures > div:nth-child(n+3) { border-top: 1px solid var(--line); } .figures > div:nth-child(3) { padding-left: 0; }
  .sources { grid-template-columns: 1fr; } .sources li { grid-template-columns: 1fr auto; } .sources .lic { grid-column: 1 / -1; grid-row: 2; }
  .api-grid { grid-template-columns: 1fr; gap: 22px; align-self: center; padding-top: 70px; }
  .api-copy { gap: var(--s-3); } .term { transform: none; } .term-res { max-height: 34vh; }
  .road li { grid-template-columns: 34px 1fr; } .road span { grid-column: 2; }
  .capgrid { grid-template-columns: 1fr; } .capgrid > div:nth-child(2) { border-top: 1px solid var(--line); }
  .hero h1 { font-size: clamp(1.6rem, 7.4vw, 2.15rem); max-width: none; }
  .bar nav a:not(.btn) { display: none; }
}
html:not(.cine-js) .hero-copy, html:not(.cine-js) .readout { opacity: 1; transform: none; }
