html, body { background: #ffffff; }
body { overscroll-behavior-y: none; }

/* Virtual (smoothed) scroll: content is pinned and moved by JS. */
#smooth.is-virtual { position: fixed; top: 0; left: 0; right: 0; will-change: transform; }

/* Navbar: fixed size, glass, adapts tone over dark blocks. */
#nav { background: rgba(255,255,255,.4); color: #0a0a0a; box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
       -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
       transition: background-color .6s ease, color .6s ease, box-shadow .6s ease; }
#nav.dark { background: rgba(28,28,28,.4); color: #fafafa; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
#nav .nav-cta { background: #0a0a0a; color: #fff; transition: background-color .6s ease, color .6s ease, opacity .3s; }
#nav.dark .nav-cta { background: #fafafa; color: #0a0a0a; }
#nav .nav-link { opacity: 1; transition: opacity .3s; }
#nav .nav-link:hover { opacity: .7; }
#nav[data-force-dark] { background: rgba(10,10,10,.9); box-shadow: none; }

/* Content pages: frosted strip behind the navbar once the page scrolls */
#topBlur { position: fixed; top: 0; left: 0; right: 0; height: 120px; z-index: 90; pointer-events: none; opacity: 0;
           background: rgba(240,240,240,.35); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
           -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }

/* Landing blocks: outer gutter shrinks to 0 as the page scrolls (--flush 1 → 0, set by site.js). */
:root { --hero-pad: 10px; }
@media (min-width: 768px) { :root { --hero-pad: 20px; } }
.flush-hero { padding: calc(var(--hero-pad) * var(--flush, 1)); }
#heroBlock { height: calc(100svh - 2 * var(--hero-pad)); }
.flush-x { padding: 0 calc(20px * var(--flush, 1)) calc(20px * var(--flush, 1)); }

/* Hero load: image settles from 1.1 to 1.0 */
#heroLoad { transform: scale(1.1); transition: transform 2.6s cubic-bezier(.16,1,.3,1); }
.loaded #heroLoad { transform: scale(1); }

/* Line / word show-up: plain fade */
.line { display: block; }
.line-in { display: inline-block; opacity: 0; transition: opacity 1s ease; padding-right: .06em; }
.w { display: inline-block; }
.wi { display: inline-block; opacity: 0; transition: opacity 1s ease; }
.in .wi, .in .line-in, .in.line-in { opacity: 1; }

/* Fade to clear */
.rb { opacity: 0; transition: opacity 1s ease; }
.rb.in { opacity: 1; }

/* Fade for tiles */
.rt { opacity: 0; transition: opacity 1s ease; }
.rt.in { opacity: 1; }

.sf { display: inline; }

.tile-zoom { transition: transform 1.4s cubic-bezier(.16,1,.3,1); }
.group:hover .tile-zoom { transform: scale(1.045); }

/* Table of contents */
[data-toc] a { opacity: .45; transition: opacity .35s ease; }
[data-toc] a:hover, [data-toc] a.is-active { opacity: 1; }

/* Long-form document (plain markdown look) */
.doc { font-size: 16.5px; line-height: 1.75; color: #404040; }
.doc > * + * { margin-top: 1em; }
.doc > p:first-child { margin-top: 0; }
.doc h2 { font-family: Outfit, sans-serif; font-weight: 400; font-size: 28px; letter-spacing: -.02em; line-height: 1.2; color: #0a0a0a; margin-top: 2.2em; }
.doc a { color: #0a0a0a; text-decoration: underline; text-decoration-color: #d4d4d4; text-underline-offset: 4px; }
.doc a:hover { text-decoration-color: #0a0a0a; }
.doc strong { color: #0a0a0a; font-weight: 600; }
.doc code { font-family: inherit; font-weight: 600; color: #0a0a0a; background: #f2f2f2; padding: .1em .4em; border-radius: 6px; font-size: .94em; }
.doc ul { list-style: disc; padding-left: 1.3em; }
.doc ol { list-style: decimal; padding-left: 1.3em; }
.doc li + li { margin-top: .5em; }
.doc .contact { background: #f5f5f5; border-radius: 20px; padding: 24px; }
.doc .contact p { margin: 4px 0; }
.doc a.cta { display: inline-flex; margin-top: 14px; height: 48px; align-items: center; padding: 0 24px; border-radius: 999px; background: #0a0a0a; color: #fff; text-decoration: none; font-weight: 600; font-size: 15px; }
.doc details { background: #f5f5f5; border-radius: 16px; padding: 14px 20px; margin-top: 8px; }
.doc summary { cursor: pointer; font-weight: 600; color: #0a0a0a; }
.doc details p { margin: 8px 0 0; }

@media (prefers-reduced-motion: reduce) {
  #heroLoad, .line-in, .wi, .rb, .rt { opacity: 1 !important; filter: none !important; transition: none !important; }
}

/* ---------- Blueprint layer: blue accent, mono labels, iso scenes (landing only) ---------- */
:root { --blue: #1F4BFF; --blue-d: #0B2BB0; --blue-50: #F4F7FF; --blue-100: #E7EDFF; --bp-line: #DCE3F5; --bp-line-2: #C2CEF0;
        --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace; }
.eyebrow { font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.eyebrow.w { color: rgba(255,255,255,.8); }

/* Blueprint frame: grid paper, inset corner brackets, HUD readouts */
.bp { position: relative; background:
        linear-gradient(var(--blue-50) 1px, transparent 1px) 0 0 / 24px 24px,
        linear-gradient(90deg, var(--blue-50) 1px, transparent 1px) 0 0 / 24px 24px, #fff;
      box-shadow: inset 0 0 0 1px var(--bp-line); }
.bk { position: absolute; width: 12px; height: 12px; border: 0 solid var(--blue); pointer-events: none; }
.bk.tl { top: 14px; left: 14px; border-top-width: 2px; border-left-width: 2px; }
.bk.tr { top: 14px; right: 14px; border-top-width: 2px; border-right-width: 2px; }
.bk.bl { bottom: 14px; left: 14px; border-bottom-width: 2px; border-left-width: 2px; }
.bk.br { bottom: 14px; right: 14px; border-bottom-width: 2px; border-right-width: 2px; }
.bk.w { border-color: #fff; }
.hud { position: absolute; z-index: 1; font: 500 10px/1.5 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: #5B6787; pointer-events: none; }
.hud b { color: var(--blue); font-weight: 600; }
.hud.tl { top: 22px; left: 34px; } .hud.tr { top: 22px; right: 34px; text-align: right; }
.hud.bl { bottom: 22px; left: 34px; } .hud.br { bottom: 22px; right: 34px; text-align: right; }
.hud.w { color: rgba(255,255,255,.7); } .hud.w b { color: #fff; }
@media (max-width: 640px) { .hud.tr, .hud.br { display: none; } }

/* Iso SVG scenes (drawn by iso.js) */
svg.iso { display: block; width: 100%; height: 100%; overflow: visible; }
.march { animation: march 1.4s linear infinite; }
@keyframes march { to { stroke-dashoffset: -20; } }
.g-grid { stroke: var(--bp-line); stroke-width: 1; }
.g-grid.major { stroke: var(--bp-line-2); }
.axis { stroke: var(--blue); stroke-width: 1; stroke-dasharray: 3 5; opacity: .55; }
.flow { fill: none; stroke: var(--blue); stroke-width: 1.3; stroke-dasharray: 4 4; opacity: .6; }
.lead { stroke: #0a0a0a; stroke-width: .8; opacity: .55; }
.t-lbl { font: 600 10px var(--mono); letter-spacing: .1em; fill: #0a0a0a; }
.t-sub { font: 400 9.5px var(--mono); letter-spacing: .06em; fill: #5B6787; }
.t-blue { fill: var(--blue); }
.t-tick { font: 500 9px var(--mono); fill: var(--blue); letter-spacing: .04em; }
.t-aa { font: 300 30px Outfit, sans-serif; letter-spacing: -.03em; fill: #0a0a0a; }

/* Blueprint sections: full-bleed, square-cornered, ruled with hairlines, between the rounded sheets */
.xs { --xg: clamp(16px, 3vw, 32px); background: #fff; color: #0A1433; border-top: 1px solid var(--bp-line); border-bottom: 1px solid var(--bp-line); }
.xs + .xs { border-top: 0; }
.xw { max-width: 1360px; margin: 0 auto; border-left: 1px solid var(--bp-line); border-right: 1px solid var(--bp-line); }
.x-mute { color: #5B6787; }
.x-h { font-family: Outfit, sans-serif; font-weight: 300; font-size: clamp(34px, 4.6vw, 68px); line-height: 1; letter-spacing: -.035em; }
.x-h em { font-style: normal; color: var(--blue); }

.x-head { display: grid; grid-template-columns: 240px 1fr; border-bottom: 1px solid var(--bp-line); }
.x-head .idx { padding: 32px var(--xg); border-right: 1px solid var(--bp-line); font: 500 11px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #5B6787; }
.x-head .idx b { display: block; margin-bottom: 10px; font: 200 56px/1 Outfit, sans-serif; letter-spacing: -.04em; color: var(--blue); }
.x-head .ttl { padding: 40px var(--xg); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.x-head .ttl p { max-width: 560px; font-size: 16px; line-height: 1.6; }

.x-split { display: grid; grid-template-columns: 7fr 5fr; }
.x-split > .l { padding: 24px; border-right: 1px solid var(--bp-line); }
.x-split > .r { display: flex; flex-direction: column; }
.x-frame { height: 100%; min-height: 560px; }
.x-stage { position: absolute; inset: 64px 28px; }

.x-tag { display: inline-block; padding: 4px 7px; border: 1px solid var(--blue); background: #fff; color: var(--blue); font: 600 10px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.x-tag.fill { background: var(--blue); color: #fff; }

.x-legend { display: grid; grid-template-columns: repeat(5, 1fr); }
.x-legend .cell { display: flex; align-items: center; gap: 14px; padding: 20px var(--xg); border-right: 1px solid var(--bp-line); }
.x-legend .cell:last-child { border-right: 0; }
.x-legend svg { width: 40px; height: 44px; flex: none; }
.x-legend b { display: block; font: 600 11px/1.3 var(--mono); letter-spacing: .12em; color: var(--blue); }
.x-legend span { font-size: 13px; line-height: 1.35; color: #5B6787; }

.x-intro { padding: 32px var(--xg); border-bottom: 1px solid var(--bp-line); display: flex; flex-direction: column; gap: 12px; }
.x-intro h3 { font: 300 clamp(24px, 2.2vw, 32px)/1.15 Outfit, sans-serif; letter-spacing: -.02em; }
.x-log { list-style: none; }
.x-log li { display: grid; grid-template-columns: 1fr auto; gap: 6px 14px; padding: 18px var(--xg); border-bottom: 1px solid var(--bp-line); transition: background-color .4s; }
.x-log li:last-child { border-bottom: 0; }
.x-log li.hot { background: var(--blue-50); }
.x-log q { quotes: none; font-size: 15px; }
.x-log small { grid-column: 1; font: 500 11px/1.5 var(--mono); letter-spacing: .04em; color: var(--blue); }
.x-log .x-tag { grid-row: 1 / 3; grid-column: 2; align-self: center; }

.x-cards { display: grid; grid-template-columns: repeat(3, 1fr); }
.x-card { display: flex; flex-direction: column; border-right: 1px solid var(--bp-line); }
.x-card:last-child { border-right: 0; }
.x-card .vis { position: relative; aspect-ratio: 7 / 5; padding: 36px 12px 6px; background: var(--blue-50); border-bottom: 1px solid var(--bp-line); }
.x-card .vis .hud { top: 14px; left: 16px; }
.x-card .body { display: flex; flex-direction: column; gap: 10px; padding: 26px var(--xg) 34px; }
.x-card .num { font: 600 11px/1 var(--mono); letter-spacing: .14em; color: var(--blue); }
.x-card h3 { font: 400 26px/1.15 Outfit, sans-serif; letter-spacing: -.02em; }
.x-card p { font-size: 15px; line-height: 1.6; color: #5B6787; }

.x-layers { list-style: none; }
.x-layers li { display: grid; grid-template-columns: 52px 1fr; gap: 16px; align-items: start; padding: 24px var(--xg); border-bottom: 1px solid var(--bp-line); flex: 1; transition: background-color .4s; }
.x-layers li:last-child { border-bottom: 0; }
.x-layers .n { padding: 6px; border: 1px solid var(--blue); text-align: center; font: 600 12px/1 var(--mono); color: var(--blue); transition: background-color .3s, color .3s; }
.x-layers li.on { background: var(--blue-50); }
.x-layers li.on .n { background: var(--blue); color: #fff; }
.x-layers h4 { margin-bottom: 4px; font: 400 20px/1.2 Outfit, sans-serif; letter-spacing: -.01em; }
.x-layers p { font-size: 14px; line-height: 1.5; color: #5B6787; }

.x-cta { background: var(--blue); color: #fff; border: 0; }
.x-cta .xw { display: grid; grid-template-columns: 1fr 1fr; border-color: rgba(255,255,255,.2); }
.x-cta .copy { display: flex; flex-direction: column; gap: 24px; padding: 88px var(--xg); border-right: 1px solid rgba(255,255,255,.2); }
.x-cta .copy p { max-width: 440px; font-size: 17px; line-height: 1.6; color: #D6DFFF; }
.x-cta .vis { display: flex; align-items: center; padding: 32px; }
.x-cta .vis svg { height: auto; }

/* Square mono buttons used inside blueprint sections */
.x-btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 20px; border: 1px solid #0a0a0a; background: #0a0a0a; color: #fff; font: 500 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; transition: background-color .2s, color .2s; }
.x-btn:hover { background: #262626; }
.x-btn.white { background: #fff; color: #0a0a0a; border-color: #fff; }
.x-btn.white:hover { background: #E7EDFF; }
.x-btn.ghost-w { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.x-btn.ghost-w:hover { background: rgba(255,255,255,.1); }

@media (max-width: 1000px) {
  .x-split, .x-cta .xw { grid-template-columns: 1fr; }
  .x-split > .l { border-right: 0; border-bottom: 1px solid var(--bp-line); }
  .x-cta .copy { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.2); }
  .x-cards { grid-template-columns: 1fr; }
  .x-card { border-right: 0; border-bottom: 1px solid var(--bp-line); }
  .x-card:last-child { border-bottom: 0; }
  .x-legend { grid-template-columns: repeat(2, 1fr); }
  .x-legend .cell { border-bottom: 1px solid var(--bp-line); }
  .x-legend .cell:nth-child(2n) { border-right: 0; }
  .x-legend .cell:last-child { grid-column: 1 / -1; border-bottom: 0; }
}
@media (max-width: 640px) {
  .x-head { grid-template-columns: 1fr; }
  .x-head .idx { border-right: 0; border-bottom: 1px solid var(--bp-line); padding-top: 24px; padding-bottom: 20px; }
  .x-head .idx b { font-size: 40px; }
  .x-split > .l { padding: 12px; }
  .x-frame { min-height: 0; aspect-ratio: 1; }
  .x-stage { inset: 52px 8px; }
  .x-cta .copy { padding-top: 64px; padding-bottom: 56px; }
  .x-cta .vis { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) { .march { animation: none; } }
