/* scinix.com — AI in a Beaker */
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Instrument Sans"; src: url("../fonts/instrument-sans.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --glass: #EEF2F6;      /* borosilicate page */
  --paper: #FAFBFC;      /* chart surface */
  --ink: #132238;        /* Prussian ink */
  --ink-2: #44546B;
  --ink-3: #6B7A90;
  --rule: #D5DDE7;
  --deep: #0E1C30;
  --ferriin: #2C5FB5;    /* oxidized indicator, blue */
  --ferroin: #B4233F;    /* reduced indicator, red */
  --amber: #B07A0E;
  --pale: #C9D7EA;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--glass); color: var(--ink); font: 400 1.0625rem/1.6 var(--sans); }
img, svg { max-width: 100%; display: block; }
a { color: var(--ferriin); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--ferroin); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { margin: 0; }
h2 { font: 400 clamp(2.1rem, 4.4vw, 3.4rem)/1.05 var(--serif); letter-spacing: -0.01em; max-width: 18ch; }
h3 { font: 600 1.06rem/1.3 var(--sans); }
p { margin: 0 0 1em; max-width: 62ch; }
sub, sup { font-size: .7em; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; border-radius: 6px; }
.skip:focus { left: 16px; }
section { padding-block: clamp(72px, 10vw, 136px); }
.section-lede { font-size: 1.15rem; color: var(--ink-2); margin-top: 20px; }

/* ---------- nav ---------- */
.nav { position: absolute; inset: 0 0 auto 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px clamp(16px, 4vw, 48px); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 600 1.4rem/1 var(--sans); letter-spacing: -0.02em; }
.brand svg { width: 30px; height: 30px; }
.nav nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); }
.nav nav a { color: rgba(255,255,255,.86); text-decoration: none; font-size: .95rem; }
.nav nav a:hover { color: #fff; }
.nav .nav-cta { border: 1px solid rgba(255,255,255,.5); padding: 7px 16px; border-radius: 999px; color: #fff; }
.nav .nav-cta:hover { background: rgba(255,255,255,.12); }
@media (max-width: 760px) { .nav nav a:not(.nav-cta) { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(100svh, 920px); padding: 0; background: var(--deep) url("../img/hero.jpg") center/cover no-repeat; color: #fff; display: flex; align-items: flex-end; overflow: hidden; }
#rd { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; cursor: crosshair; }
.hero-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(14,28,48,.78) 0%, rgba(14,28,48,0) 160px),
              linear-gradient(90deg, rgba(14,28,48,.92) 0%, rgba(14,28,48,.72) 38%, rgba(14,28,48,.12) 75%),
              linear-gradient(0deg, rgba(14,28,48,.85) 0%, rgba(14,28,48,0) 45%); }
.hero-copy { position: relative; z-index: 2; padding: 0 clamp(16px, 4vw, 48px) clamp(64px, 10vh, 120px); max-width: 860px; pointer-events: none; }
.hero-copy a { pointer-events: auto; }
.hero h1 { font: 400 clamp(4rem, 13vw, 10.5rem)/.86 var(--serif); letter-spacing: -0.035em; margin-bottom: 28px; text-wrap: balance; }
.lede { font-size: clamp(1.1rem, 1.8vw, 1.35rem); line-height: 1.5; color: rgba(255,255,255,.9); max-width: 34em; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-note { position: absolute; right: clamp(16px, 4vw, 48px); bottom: 24px; z-index: 2; margin: 0; font-size: .82rem; color: rgba(255,255,255,.7); max-width: 26em; text-align: right; pointer-events: none; }
@media (max-width: 760px) { .hero-note { display: none; } .hero { min-height: 92svh; } }

.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 12px 24px; border-radius: 999px; font: 600 1rem/1 var(--sans); text-decoration: none; transition: background-color .2s, color .2s; }
.btn-solid { background: var(--ferroin); color: #fff; }
.btn-solid:hover { background: #971B33; }
.btn-ghost { color: #fff; border: 1px solid rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- statement ---------- */
.statement { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.big { font: 400 clamp(1.8rem, 3.4vw, 2.75rem)/1.18 var(--serif); max-width: 22ch; margin-bottom: 32px; letter-spacing: -0.005em; }
.statement-text p:not(.big) { font-size: 1.15rem; color: var(--ink-2); }
.beaker { margin: 0; }
.beaker svg { width: 100%; max-width: 380px; margin-inline: auto; }
.beaker figcaption, .gallery figcaption span, .network figcaption { color: var(--ink-3); font-size: .88rem; }
.beaker figcaption { text-align: center; margin-top: 12px; max-width: 30ch; margin-inline: auto; }
@media (max-width: 860px) { .statement { grid-template-columns: 1fr; } }

/* ---------- how ---------- */
.how { background: #fff; border-block: 1px solid var(--rule); }
.how-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); margin-top: 56px; align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 28px 64px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: -6px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font: 400 1.5rem/1 var(--serif); color: var(--ferriin); border: 1.5px solid var(--pale); background: var(--glass); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 42px; bottom: 2px; width: 1.5px; background: var(--pale); }
.steps p { color: var(--ink-2); margin: 6px 0 0; }
.network { margin: 0; }
.network img { width: 100%; height: auto; }
.network figcaption { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; margin-top: 8px; }
.key { display: inline-flex; align-items: center; gap: 8px; }
.dot, .sq { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dot.in { background: var(--ferroin); } .dot.out { background: var(--ferriin); }
.dot.hid { background: var(--pale); box-shadow: inset 0 0 0 1.5px var(--ferriin); }
.sq { border-radius: 2px; width: 8px; height: 8px; background: var(--ink); }
@media (max-width: 900px) { .how-grid { grid-template-columns: 1fr; } }

/* ---------- split sections + charts ---------- */
.split { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.split.reverse { grid-template-columns: 1.15fr .85fr; }
.split h2 { margin-bottom: 28px; }
.split p { color: var(--ink-2); }
.split strong { color: var(--ink); font-weight: 600; }
@media (max-width: 960px) { .split, .split.reverse { grid-template-columns: 1fr; } .split.reverse > figure { order: 2; } }
.eq { font: italic 400 1.45rem/1.3 var(--serif); color: var(--ink); margin-top: 28px; padding-left: 18px; border-left: 2px solid var(--ferroin); }
.eq i { font-style: italic; }

.chart-card { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 22px 22px 14px; box-shadow: 0 1px 0 rgba(19,34,56,.04), 0 18px 40px -24px rgba(19,34,56,.25); min-width: 0; }
.chart-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.chart-title { font-weight: 600; font-size: 1rem; }
.chart-sub { color: var(--ink-3); font-size: .86rem; }
.chart { position: relative; width: 100%; aspect-ratio: 16 / 9.5; min-height: 240px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: #E6EBF1; stroke-width: 1; shape-rendering: crispEdges; }
.chart .axis text { fill: var(--ink-3); font: 12px var(--sans); }
.chart .axis-title { fill: var(--ink-3); font: 12px var(--sans); }
.chart .series path { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .cross { stroke: var(--ink-3); stroke-width: 1; }
.chart .hover-dot { stroke: var(--paper); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 4px 0 6px; font-size: .86rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.legend i.dashed { background: none !important; border-top: 2.5px dashed currentColor; height: 0; }
.tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: .8rem; line-height: 1.45; padding: 8px 11px; border-radius: 8px; white-space: nowrap; transform: translate(-50%, calc(-100% - 12px)); opacity: 0; transition: opacity .12s; z-index: 3; }
.tip b { font-weight: 600; }
.tip .sw { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.table-view { margin-top: 6px; font-size: .86rem; color: var(--ink-2); }
.table-view summary { cursor: pointer; color: var(--ink-3); padding: 6px 0; }
.table-view .scroll { max-height: 240px; overflow: auto; border: 1px solid var(--rule); border-radius: 8px; }
.table-view table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { padding: 4px 10px; text-align: right; border-bottom: 1px solid #EEF1F5; }
.table-view th { position: sticky; top: 0; background: var(--paper); font-weight: 600; color: var(--ink); }

/* ---------- patterns ---------- */
.patterns { background: var(--deep); color: #fff; }
.patterns .section-lede { color: rgba(255,255,255,.75); }
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 52px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.gallery figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; }
.gallery figcaption b { font-weight: 600; }
.gallery figcaption span { color: rgba(255,255,255,.62); font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

/* ---------- learning stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--rule); }
.stats div { margin: 0; }
.stats div { display: flex; flex-direction: column; }
.stats dt { font-size: .85rem; color: var(--ink-3); line-height: 1.35; }
.stats dd { margin: 0 0 6px; font: 400 2.8rem/1 var(--serif); color: var(--ink); order: -1; }

/* ---------- engine ---------- */
.engine { background: linear-gradient(180deg, #102340 0%, var(--deep) 100%); color: #fff; position: relative; overflow: hidden; }
.engine::before { content: ""; position: absolute; right: -160px; top: 50%; width: 760px; height: 760px; transform: translateY(-50%); background: url("../img/gs-maze.jpg") center / cover no-repeat; opacity: .16; border-radius: 50%; mask-image: radial-gradient(closest-side, #000 35%, transparent 100%); -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent 100%); pointer-events: none; }
.engine .wrap { position: relative; }
.engine-top { max-width: 820px; }
.engine h2 { max-width: 20ch; margin-bottom: 28px; }
.engine-top p { font-size: 1.15rem; color: rgba(255,255,255,.82); }
.engine a { color: #9DBBF0; }
.engine-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 88px); margin-top: 64px; align-items: start; }
.citations { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.cite-num { font: 400 clamp(5rem, 11vw, 8.5rem)/.85 var(--serif); letter-spacing: -0.03em; color: #fff; }
.cite-label { color: rgba(255,255,255,.72); max-width: 26ch; font-size: 1.02rem; }
.capabilities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 36px 40px; }
.capabilities li { border-top: 1px solid rgba(255,255,255,.18); padding-top: 18px; }
.capabilities p { color: rgba(255,255,255,.72); margin: 8px 0 0; font-size: .98rem; }
@media (max-width: 900px) { .engine-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .capabilities { grid-template-columns: 1fr; } }

/* ---------- applications ---------- */
.apps h2 { margin-bottom: 48px; }
.apps-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.apps-list div { border-top: 2px solid var(--ink); padding-top: 18px; }
.apps-list div:nth-child(odd) { border-top-color: var(--ferroin); }
.apps-list div:nth-child(even) { border-top-color: var(--ferriin); }
.apps-list p { color: var(--ink-2); margin-top: 8px; font-size: .98rem; }
@media (max-width: 900px) { .apps-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .apps-list { grid-template-columns: 1fr; } }

/* ---------- contact + footer ---------- */
.contact { background: #fff; border-top: 1px solid var(--rule); }
.contact-inner { display: flex; flex-direction: column; align-items: flex-start; }
.contact h2 { max-width: 16ch; margin-bottom: 20px; }
.contact p { color: var(--ink-2); font-size: 1.15rem; margin-bottom: 32px; }
.foot { background: var(--deep); color: rgba(255,255,255,.62); font-size: .86rem; padding: 32px 0; }
.foot-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px; }
.foot p { margin: 0; }

@media (forced-colors: active) { .btn { border: 1px solid ButtonText; } }

/* ---------- power ---------- */
.power { padding-top: 0; }
.power-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: center; border-top: 1px solid var(--rule); padding-top: clamp(64px, 8vw, 112px); }
.power h2 { margin-bottom: 28px; max-width: 16ch; }
.power p { color: var(--ink-2); }
.power-chart { margin: 0; background: var(--paper); border: 1px solid var(--rule); border-radius: 14px; padding: 22px; box-shadow: 0 18px 40px -24px rgba(19,34,56,.25); }
.pbars { position: relative; display: grid; gap: 18px; margin-top: 14px; padding-bottom: 28px; }
.pbar { display: grid; grid-template-columns: 1fr; gap: 6px; }
.pname { font-size: .9rem; color: var(--ink); font-weight: 500; }
.ptrack { position: relative; height: 22px; background: linear-gradient(90deg, #DCE3EC 1px, transparent 1px) 0 0 / calc(100% / 9) 100% repeat-x; border-right: 1px solid #DCE3EC; }
.ptrack i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); background: var(--ferriin); border-radius: 0 4px 4px 0; }
.brain .ptrack i { background: var(--ferroin); }
.pval { font-size: .86rem; color: var(--ink-2); font-variant-numeric: tabular-nums; margin-top: -4px; }
.paxis { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; font-size: .78rem; color: var(--ink-3); }
.paxis span { position: absolute; transform: translateX(-50%); }
.paxis span:nth-child(1) { left: 0; transform: none; }
.paxis span:nth-child(2) { left: 33.33%; }
.paxis span:nth-child(3) { left: 66.67%; }
.paxis span:nth-child(4) { right: 0; transform: none; }
.ratio { margin: 22px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: .95rem; }
.ratio span { display: block; font: 400 clamp(2.6rem, 5vw, 3.6rem)/1 var(--serif); color: var(--ferroin); margin-bottom: 6px; letter-spacing: -0.02em; }
@media (max-width: 900px) { .power-grid { grid-template-columns: 1fr; } }
a.cite-num { text-decoration: none; color: #fff; }
a.cite-num:hover { color: #9DBBF0; }
.contact-mail { margin-top: -12px; }
