/* =========================================================
   PRAEVA 1.0 — The Operating Layer for Autonomous IT
   ========================================================= */

/* Display face: drop BubbledotICG-FinePos files into assets/fonts/ to activate.
   Falls back to Doto (Google Fonts dot-matrix) until then. */
/* Fujitsu Infinity Pro — the approved Fujitsu brand typeface (self-hosted copies of the files in Fujitsu's brand library — the library sends no CORS header).
   Only Regular (400) and ExtraBold (800) are published; other weights fall back to the nearest of the two.
   Inter, then the system UI font, are the fallbacks while it loads or if it can't. */
@font-face {
  font-family: 'Fujitsuinfinitypro';
  src: url('../assets/fonts/FujitsuInfinityPro_ExtraBold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fujitsuinfinitypro';
  src: url('../assets/fonts/FujitsuInfinityPro_Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'BubbledotICG-FinePos';
  src: local('BubbledotICG-FinePos'), local('Bubbledot ICG FinePos'),
       url('../assets/fonts/BubbledotICG-FinePos.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg: #000;
  --bg-2: #05070a;
  --fg: #fff;
  --fg-2: rgba(255, 255, 255, .72);
  --fg-3: rgba(255, 255, 255, .5);
  --line: rgba(255, 255, 255, .12);
  --line-2: rgba(255, 255, 255, .22);
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .08);
  --blue: #3d8bff;
  --cyan: #2fd9f4;
  --emerald: #2ee59d;
  --amber: #ffc857;
  --red: #ff4d61;
  --font-ui: 'Fujitsuinfinitypro', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'BubbledotICG-FinePos', 'Doto', 'Inter', monospace;
  --font-mono: ui-monospace, 'SFMono-Regular', 'Cascadia Code', Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --radius: 18px;
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
em { font-style: normal; color: var(--fg-3); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-3); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: #fff; color: #000; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; transition: top .3s var(--ease); }
.skip-link:focus { top: 16px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.section { position: relative; padding: clamp(96px, 14vw, 180px) 0; }

/* ---------- Typography ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: .95;
  color: #fff;
}
.h2 { font-size: clamp(34px, 5.4vw, 76px); font-weight: 600; letter-spacing: -.035em; line-height: 1.02; }
.h3 { font-size: clamp(26px, 3.2vw, 44px); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; }
.lede { color: var(--fg-2); font-size: clamp(16px, 1.35vw, 19px); max-width: 640px; margin-top: 24px; font-weight: 400; }
.lede.sm { font-size: 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); margin-bottom: 24px; font-weight: 500; }
.eyebrow .idx { font-family: var(--font-mono); color: var(--cyan); }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 12px var(--emerald); }
.section-head.center { text-align: center; margin: 0 auto; }
.section-head.center .lede { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 24px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 500; font-size: 15px; text-decoration: none;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .3s var(--ease), color .3s var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn--light { background: #fff; color: #000; }
.btn--light:hover { background: #dfe9f5; }
.btn--ghost { border-color: var(--line-2); background: rgba(0,0,0,.2); }
.btn--ghost:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn--glass { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.16); backdrop-filter: blur(12px); }
.btn--glass:hover { background: rgba(255,255,255,.16); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 14px; }
.btn:active { transform: scale(.98); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(0,0,0,.35); backdrop-filter: blur(10px); transition: border-color .3s; }
.icon-btn:hover { border-color: #fff; }
.icon-btn svg { width: 18px; height: 18px; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-family: var(--font-mono); }
.tag--muted { border: 1px solid var(--line); color: var(--fg-3); }

.glass {
  background: linear-gradient(160deg, rgba(255,255,255,.07), rgba(255,255,255,.02));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 30px 80px -40px rgba(0,0,0,.8);
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; z-index: 50; top: 16px; left: 0; right: 0; margin: 0 auto;
  width: min(calc(100% - 32px), 1180px); height: 64px; padding: 0 10px 0 22px;
  display: flex; align-items: center; gap: 24px;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(10, 12, 16, .42); backdrop-filter: blur(20px) saturate(150%); -webkit-backdrop-filter: blur(20px) saturate(150%);
  transition: background .4s var(--ease), transform .6s var(--ease);
}
.nav.is-scrolled { background: rgba(6, 8, 12, .72); }
.nav.is-hidden { transform: translateY(-130%); }
/* Original logo (root PNG) shown unaltered on a light plate; .logo-crop trims the file's transparent padding. */
.logo-plate { display: inline-flex; align-items: center; background: #fff; border-radius: 999px; padding: 6px 14px; box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 8px 30px -10px rgba(47,217,244,.45); }
.logo-crop { position: relative; display: block; aspect-ratio: 4760 / 1830; overflow: hidden; }
.logo-crop img { position: absolute; max-width: none; width: 109.96%; height: auto; left: -4.83%; top: -11.48%; }
.logo-plate--nav { padding: 8px 16px; box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 6px 24px -8px rgba(47,217,244,.5); }
.logo-plate--nav .logo-crop { height: 24px; }
/* Wordmark-only crop (no tagline) for small placements like the nav. */
.logo-crop--mark { aspect-ratio: 4760 / 1190; }
.logo-crop--mark img { top: -19.33%; }
.logo-plate--footer .logo-crop { height: 40px; }
.closing__logo.logo-plate { padding: 14px 28px; border-radius: 22px; }
.closing__logo .logo-crop { width: min(300px, 60vw); }
.nav__links { display: flex; gap: 4px; margin: 0 auto; }
.nav__links a { text-decoration: none; font-size: 14px; color: var(--fg-2); padding: 10px 14px; border-radius: 999px; transition: color .25s, background .25s; }
.nav__links a:hover, .nav__links a.is-active { color: #fff; background: rgba(255,255,255,.07); }
.nav__cta { margin-left: auto; min-height: 44px; }
.nav__links + .nav__cta { margin-left: 0; }
.nav__menu { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; position: relative; }
.nav__menu span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: #fff; transition: transform .4s var(--ease); }
.nav__menu span:first-child { top: 18px; } .nav__menu span:last-child { top: 25px; }
.nav__menu[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__menu[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu { position: fixed; z-index: 49; inset: 0; background: rgba(0,0,0,.92); backdrop-filter: blur(20px); display: flex; flex-direction: column; justify-content: center; padding: 96px 32px 32px; gap: 4px; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { font-size: 30px; font-weight: 600; letter-spacing: -.03em; text-decoration: none; padding: 8px 0; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 60% 40%, #0a1a2c 0%, #000 65%); }
.hero__video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero__video.is-ready { opacity: .62; }
/* Scrim keeps the headline legible over busy footage: dark text column on the left, fading to the right. */
.hero__shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(0,0,0,.9) 0%, rgba(0,0,0,.78) 38%, rgba(0,0,0,.35) 68%, rgba(0,0,0,.1) 100%),
  linear-gradient(180deg, rgba(0,0,0,.6) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 60%, rgba(0,0,0,.95) 100%); }
.hero__title { text-shadow: 0 2px 24px rgba(0,0,0,.6); }
.grid-overlay { position: absolute; inset: 0; opacity: .22; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.55) 1px, transparent 1px); background-size: 4px 4px;
  mask-image: linear-gradient(180deg, transparent, #000 60%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%, transparent); mix-blend-mode: overlay; }
.hero__content { padding: 0 var(--gutter); max-width: var(--maxw); width: 100%; margin: 0 auto; padding-bottom: 32px; }
.hero__title { font-size: clamp(40px, 6vw, 104px); max-width: 13em; margin-bottom: 20px; line-height: 1.02; }
.hero__title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .04em; }
.hero__title .c { display: inline-block; will-change: transform, opacity; }
.hero__lede { color: var(--fg-2); max-width: 520px; font-size: clamp(15px, 1.1vw, 17px); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero__footer { display: flex; align-items: center; gap: 20px; padding: 24px var(--gutter) 32px; max-width: var(--maxw); width: 100%; margin: 0 auto; }
.media-ctl { display: inline-flex; gap: 8px; }
.media-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0,0,0,.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-size: 13px; font-weight: 500; color: #fff; transition: border-color .3s var(--ease), background .3s var(--ease); }
.media-btn:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.media-btn svg { width: 18px; height: 18px; flex: none; }
.media-btn[aria-pressed="true"] { border-color: var(--cyan); }
.media-btn .on, .media-btn[aria-pressed="true"] .off { display: none; }
.media-btn[aria-pressed="true"] .on { display: block; }
.hero__footer .i-play { display: none; }
.hero__footer [aria-pressed="true"] .i-play { display: block; }
.hero__footer [aria-pressed="true"] .i-pause { display: none; }
.hero__meta { margin-left: auto; }
.scroll-cue { display: inline-flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.scroll-cue span { width: 1px; height: 36px; background: linear-gradient(var(--fg-3), transparent); position: relative; overflow: hidden; }
.scroll-cue span::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }

/* ---------- GL hosts ---------- */
.gl-host { position: absolute; inset: 0; }
.gl-host canvas { width: 100% !important; height: 100% !important; display: block; }
.gl-fallback { width: 100%; height: 100%; }
.gl-fallback line { stroke: rgba(47, 217, 244, .25); }
.gl-fallback circle { fill: #fff; }

/* ---------- 2. Evolution ---------- */
.evolution { position: relative; height: 420vh; background: #000; }
.evolution__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.evolution__ui { position: relative; z-index: 2; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; padding: 120px var(--gutter) 40px; max-width: var(--maxw); margin: 0 auto; pointer-events: none; }
.evolution__ui .section-head { grid-column: 1 / 2; }
.evolution__ui .h2 { font-size: clamp(30px, 3.8vw, 56px); }
.evo-stages { grid-column: 1 / 2; grid-row: 2; align-self: end; list-style: none; margin: 0; padding: 0; position: relative; min-height: 190px; }
.evo-stage { position: absolute; left: 0; bottom: 0; max-width: 460px; opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.evo-stage.is-active { opacity: 1; transform: none; }
.evo-stage h3 { font-family: var(--font-display); font-size: clamp(38px, 5vw, 76px); font-weight: 700; line-height: 1; margin: 8px 0 14px; }
.evo-stage p { color: var(--fg-2); }
.evo-nav { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 32px; pointer-events: auto; position: relative; padding-top: 18px; }
.evo-nav button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.4); font-size: 13px; color: var(--fg-2); transition: all .3s var(--ease); }
.evo-nav button.is-active { color: #000; background: #fff; border-color: #fff; }
.evo-nav__bar { position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--line); }
.evo-nav__bar span { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, var(--blue), var(--cyan), var(--emerald)); }

/* ---------- 3. Operating layer / digital twin ---------- */
.operating { background: radial-gradient(ellipse at 50% 70%, #04111d 0%, #000 60%); padding-bottom: 0; }
.twin { position: relative; height: min(92svh, 900px); min-height: 560px; margin-top: 24px; }
.twin__canvas { cursor: grab; }
.twin__canvas.is-pointer { cursor: pointer; }
.twin__labels, .agents__labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.gl-label { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); white-space: nowrap; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-family: var(--font-mono); color: var(--fg-2); padding: 5px 9px; border-radius: 999px; background: rgba(0,0,0,.5); border: 1px solid var(--line); transition: color .3s, border-color .3s, opacity .3s; will-change: transform; }
.gl-label.is-hot { color: #fff; border-color: var(--cyan); box-shadow: 0 0 16px rgba(47,217,244,.35); }
.gl-label.is-core { color: #fff; border-color: rgba(46,229,157,.6); }
.twin__panel { position: absolute; right: var(--gutter); top: 24px; width: min(360px, calc(100% - 32px)); padding: 24px; }
.twin__kicker { color: var(--cyan); margin-bottom: 10px; }
.twin__title { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 8px; }
.twin__desc { color: var(--fg-2); font-size: 15px; }
.twin__reset { margin-top: 16px; }
.twin__systems { position: absolute; left: 0; right: 0; bottom: 24px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 var(--gutter); }
.twin__systems button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(0,0,0,.55); backdrop-filter: blur(10px); font-size: 13px; color: var(--fg-2); transition: all .3s var(--ease); }
.twin__systems button:hover, .twin__systems button.is-active { color: #fff; border-color: var(--cyan); }

/* ---------- 4. Unified ---------- */
.unified__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: center; margin-top: 72px; }
.unified__viz { aspect-ratio: 1; padding: 12px; }
.unified__viz svg { width: 100%; height: 100%; overflow: visible; }
.unified__detail h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -.03em; margin: 12px 0; }
.unified__detail > p:not(.mono) { color: var(--fg-2); min-height: 5.2em; }
.unified__keys { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.unified__keys button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 13px; color: var(--fg-2); display: inline-flex; align-items: center; gap: 8px; transition: all .3s var(--ease); }
.unified__keys button i { width: 8px; height: 8px; border-radius: 50%; }
.unified__keys button:hover, .unified__keys button.is-active { color: #fff; border-color: var(--line-2); background: rgba(255,255,255,.05); }
.u-node text { font-family: var(--font-ui); fill: var(--fg-2); font-size: 11px; letter-spacing: .06em; }
.u-node.is-dim, .u-link.is-dim { opacity: .15; }
.u-node, .u-link { transition: opacity .4s var(--ease); }
.u-link { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1; }
.u-pillar { cursor: pointer; }

.loop { margin-top: clamp(96px, 12vw, 160px); display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1.35fr); gap: 48px; align-items: center; }
.loop__body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 32px; align-items: center; }
.loop__viz svg { width: 100%; height: auto; overflow: visible; }
.loop__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.loop__steps li { padding: 14px 16px; border-radius: 12px; border: 1px solid transparent; transition: all .5s var(--ease); }
.loop__steps li strong { display: block; font-family: var(--font-display); font-size: 22px; letter-spacing: .02em; color: var(--fg-3); transition: color .5s; }
.loop__steps li span { display: block; font-size: 14px; color: var(--fg-3); max-height: 0; overflow: hidden; transition: max-height .6s var(--ease), color .5s; }
.loop__steps li.is-active { border-color: var(--line); background: var(--glass); }
.loop__steps li.is-active strong { color: #fff; }
.loop__steps li.is-active span { max-height: 80px; color: var(--fg-2); margin-top: 4px; }

/* ---------- 5. Agents ---------- */
.agents { background: radial-gradient(ellipse at 40% 60%, #071322 0%, #000 60%); padding-bottom: 80px; }
.agents__stage { position: relative; height: min(88svh, 860px); min-height: 600px; margin-top: 32px; }
.agents__console { position: absolute; right: var(--gutter); top: 20px; bottom: 20px; width: min(420px, 42%); padding: 20px; display: flex; flex-direction: column; }
.console__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.console__log { list-style: none; margin: 0; padding: 12px 0; flex: 1; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; mask-image: linear-gradient(180deg, transparent, #000 30%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%); }
.console__log li { display: grid; grid-template-columns: 82px 1fr; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--fg-2); animation: logIn .6s var(--ease) both; }
.console__log li b { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; font-weight: 500; padding-top: 2px; }
.console__log li em { color: #fff; }
@keyframes logIn { from { opacity: 0; transform: translateY(8px); } }
.console__controls { display: flex; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.t-delegate { color: var(--blue); } .t-tool, .t-data { color: var(--cyan); } .t-approve { color: var(--amber); } .t-verify, .t-validate, .t-learn { color: var(--emerald); } .t-signal { color: var(--red); } .t-exec { color: #fff; }
.agents__legend { position: absolute; left: var(--gutter); bottom: 20px; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 18px; font-size: 12px; color: var(--fg-3); }
.agents__legend li { display: inline-flex; align-items: center; gap: 8px; }
.k { width: 18px; height: 2px; border-radius: 2px; display: inline-block; }
.k--delegate { background: var(--blue); } .k--tool { background: var(--cyan); } .k--approve { background: var(--amber); } .k--verify { background: var(--emerald); } .k--exec { background: #fff; }

/* ---------- 6. Incident ---------- */
.incident { margin-top: 56px; padding: 12px; overflow: hidden; }
.incident__tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; scrollbar-width: none; }
.incident__tabs::-webkit-scrollbar { display: none; }
.incident__tabs button { flex: 1 0 auto; min-height: 44px; padding: 0 16px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--fg-3); font-size: 13px; display: inline-flex; align-items: center; gap: 8px; position: relative; transition: all .35s var(--ease); }
.incident__tabs button span { font-family: var(--font-mono); font-size: 11px; }
.incident__tabs button[aria-selected="true"] { color: #fff; background: rgba(255,255,255,.07); border-color: var(--line); }
.incident__tabs button.is-done { color: var(--fg-2); }
.incident__tabs button.is-done span { color: var(--emerald); }
.incident__body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.incident__viz { border-radius: 14px; background: rgba(0,0,0,.4); border: 1px solid var(--line); aspect-ratio: 16 / 10; position: relative; overflow: hidden; }
.incident__viz svg { width: 100%; height: 100%; }
.incident__panel { padding: 24px; display: flex; flex-direction: column; }
.incident__title { font-family: var(--font-display); font-size: clamp(40px, 4.4vw, 64px); line-height: 1; margin: 12px 0 16px; }
.incident__text { color: var(--fg-2); }
.incident__facts { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.incident__facts li { font-family: var(--font-mono); font-size: 12.5px; color: var(--fg-2); padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.035); border: 1px solid var(--line); animation: logIn .6s var(--ease) both; }
.incident__facts li b { color: var(--cyan); font-weight: 500; margin-right: 6px; }
.incident__controls { margin-top: auto; padding-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.i-node rect { fill: rgba(8, 12, 18, .92); stroke: rgba(255,255,255,.2); transition: stroke .5s, fill .5s; }
.i-node text { fill: var(--fg-2); font-size: 12px; font-family: var(--font-ui); }
.i-node .sub { fill: var(--fg-3); font-size: 9.5px; font-family: var(--font-mono); letter-spacing: .08em; }
.i-node.alert rect { stroke: var(--red); fill: rgba(255, 77, 97, .12); }
.i-node.cause rect { stroke: var(--amber); fill: rgba(255, 200, 87, .12); }
.i-node.path rect { stroke: var(--cyan); }
.i-node.ok rect { stroke: var(--emerald); fill: rgba(46, 229, 157, .08); }
.i-link { fill: none; stroke: rgba(255,255,255,.14); stroke-width: 1.2; transition: stroke .5s; }
.i-link.flow { stroke: var(--cyan); stroke-dasharray: 4 6; animation: dash 1s linear infinite; }
.i-link.alert { stroke: var(--red); stroke-dasharray: 4 6; animation: dash .8s linear infinite; }
.i-link.ok { stroke: rgba(46,229,157,.55); }
@keyframes dash { to { stroke-dashoffset: -20; } }

/* ---------- 7. Lifecycle ---------- */
.lifecycle__wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.lifecycle__intro { position: sticky; top: 140px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 48px; position: relative; display: grid; gap: 56px; }
.timeline__line { position: absolute; left: 11px; top: 8px; height: calc(100% - 16px); width: 2px; overflow: visible; }
#unified-viz circle.is-dim { opacity: .1 !important; }
.timeline__line line { stroke: var(--cyan); stroke-width: 2; vector-effect: non-scaling-stroke; }
.timeline::before { content: ''; position: absolute; left: 11.5px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
.tl-item { position: relative; }
.tl-node { position: absolute; left: -43px; top: 6px; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line-2); background: #000; transition: all .6s var(--ease); }
.tl-item.is-lit .tl-node { border-color: var(--cyan); background: var(--cyan); box-shadow: 0 0 0 6px rgba(47,217,244,.12), 0 0 24px var(--cyan); }
.tl-item h3 { font-size: clamp(22px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.02em; margin: 8px 0 8px; transition: color .6s; color: var(--fg-3); }
.tl-item.is-lit h3 { color: #fff; }
.tl-item p { color: var(--fg-2); max-width: 460px; }

/* ---------- 8. Governance ---------- */
.gov { margin-top: 56px; padding: clamp(20px, 3vw, 36px); }
.gov__controls { display: flex; flex-wrap: wrap; gap: 20px 28px; align-items: flex-end; }
.seg { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.seg legend { margin-bottom: 10px; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--fg-2); transition: all .3s var(--ease); }
.seg input:checked + span { background: #fff; color: #000; border-color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 3px; }
#gov-run { margin-left: auto; }
.gov__pipeline { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; position: relative; }
.gate { position: relative; padding: 16px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(0,0,0,.35); min-height: 112px; transition: all .5s var(--ease); }
.gate::after { content: ''; position: absolute; right: -8px; top: 50%; width: 8px; height: 1px; background: var(--line-2); }
.gate:last-child::after { display: none; }
.gate .mono { font-size: 10px; }
.gate strong { display: block; font-size: 14px; font-weight: 600; margin: 8px 0 4px; letter-spacing: -.01em; }
.gate small { display: block; font-size: 12px; color: var(--fg-3); line-height: 1.35; }
.gate.is-active { border-color: var(--cyan); box-shadow: 0 0 0 1px var(--cyan), 0 0 32px -6px var(--cyan); }
.gate.is-pass { border-color: rgba(46,229,157,.5); }
.gate.is-pass .mono { color: var(--emerald); }
.gate.is-human { border-color: rgba(255,200,87,.6); }
.gate.is-human .mono { color: var(--amber); }
.gate.is-skip { opacity: .3; }
.gate.is-stop { border-color: var(--line-2); }
.gov__bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 28px; align-items: start; }
.gov__verdict { font-size: clamp(18px, 1.6vw, 22px); letter-spacing: -.01em; font-weight: 500; }
.gov__audit { border-radius: 12px; background: rgba(0,0,0,.4); border: 1px solid var(--line); padding: 14px 16px; min-height: 160px; }
.gov__audit ol { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-family: var(--font-mono); font-size: 12px; color: var(--fg-2); max-height: 180px; overflow: auto; }
.gov__audit li { animation: logIn .5s var(--ease) both; }
.gov__audit li b { color: var(--emerald); font-weight: 500; }

/* ---------- 9. Capabilities ---------- */
.cap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 64px; }
.cap { padding: 32px; transition: border-color .4s var(--ease), transform .6s var(--ease); }
.cap:hover { border-color: var(--line-2); }
.cap h3 { font-size: 22px; font-weight: 600; letter-spacing: -.02em; margin: 28px 0 10px; }
.cap p { color: var(--fg-2); font-size: 15px; }
.cap__icon { width: 44px; height: 44px; fill: none; stroke: var(--cyan); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.cap--wide { grid-column: span 3; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 32px; align-items: center; }
.router svg { width: 100%; height: auto; overflow: visible; }
.router text { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; fill: var(--fg-2); text-transform: uppercase; }

/* ---------- 10. Use cases ---------- */
.uc { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 24px; }
.uc__tabs { display: flex; flex-direction: column; gap: 4px; }
.uc__tabs button { min-height: 52px; text-align: left; padding: 0 18px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: var(--fg-3); font-size: 16px; font-weight: 500; display: flex; align-items: center; gap: 14px; transition: all .35s var(--ease); }
.uc__tabs button span { font-family: var(--font-mono); font-size: 11px; color: var(--fg-3); }
.uc__tabs button:hover { color: #fff; }
.uc__tabs button[aria-selected="true"] { color: #fff; background: var(--glass); border-color: var(--line); }
.uc__tabs button[aria-selected="true"] span { color: var(--cyan); }
.uc__panel { padding: clamp(24px, 3.5vw, 48px); min-height: 440px; }
.uc__panel h3 { font-size: clamp(30px, 3.6vw, 48px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; margin: 12px 0 16px; }
.uc__panel > p { color: var(--fg-2); max-width: 640px; }
.uc__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-top: 36px; }
.uc__cols ul { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.uc__cols li { display: flex; gap: 10px; color: var(--fg-2); font-size: 15px; }
.uc__cols li::before { content: ''; flex: none; width: 6px; height: 6px; margin-top: 9px; border-radius: 50%; background: var(--emerald); }
.uc__flow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.uc__flow span { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .06em; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); color: var(--fg-2); }
.uc__flow i { width: 14px; height: 1px; background: var(--cyan); }
.uc-anim > * { animation: logIn .6s var(--ease) both; }
.uc-anim > *:nth-child(2) { animation-delay: .06s; } .uc-anim > *:nth-child(3) { animation-delay: .12s; } .uc-anim > *:nth-child(4) { animation-delay: .18s; }

/* ---------- 11. Closing ---------- */
.closing { position: relative; height: 260vh; background: #000; }
.closing__sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; }
.closing__content { position: relative; z-index: 2; text-align: center; padding: 0 var(--gutter); display: flex; flex-direction: column; align-items: center; }
.closing__logo { margin-bottom: 40px; }
.closing__title { font-size: clamp(40px, 7.4vw, 124px); max-width: 14ch; }
.closing__sub { margin: 28px 0 36px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 48px 0 56px; color: var(--fg-3); font-size: 14px; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }

.footer__note { flex-basis: 100%; font-size: 13px; max-width: 760px; }

/* ---------- Teaser modal ---------- */
.teaser { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; }
.teaser::backdrop { background: rgba(0,0,0,.88); backdrop-filter: blur(16px); }
.teaser__frame { position: absolute; inset: 0; display: grid; place-items: center; padding: 64px var(--gutter); }
.teaser video { width: min(1280px, 100%); max-height: 100%; aspect-ratio: 16 / 9; border-radius: 16px; background: #000; box-shadow: 0 40px 120px rgba(0,0,0,.8); }
.teaser__close { position: absolute; top: 16px; right: 16px; }

/* ---------- Reveal base state (JS enables) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(40px); }
.js [data-hero-fade] { opacity: 0; transform: translateY(24px); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__links { display: none; }
  .nav__menu { display: block; }
  /* Text spans the full width here, so the scrim covers the whole frame. */
  .hero__shade { background: linear-gradient(180deg, rgba(0,0,0,.7) 0%, rgba(0,0,0,.72) 40%, rgba(0,0,0,.8) 70%, rgba(0,0,0,.96) 100%); }
  .hero__video.is-ready { opacity: .55; }
  .nav__cta { margin-left: auto; }
  .unified__grid, .loop, .lifecycle__wrap { grid-template-columns: minmax(0, 1fr); }
  .lifecycle__intro { position: static; }
  .gov__pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gate::after { display: none; }
  .cap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap--wide { grid-column: span 2; }
  .incident__body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav { height: 58px; top: 10px; padding-left: 16px; gap: 10px; }
  .logo-plate--nav .logo-crop { height: 20px; } .logo-plate--nav { padding: 7px 12px; }
  .nav__cta span { display: none; }
  .nav__cta { padding: 0 14px; }
  .hero__meta { display: none; }
  .hero__title { font-size: 10.6vw; }
  .hero__title .w { white-space: nowrap; }
  .twin { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .twin__canvas { position: relative; height: 62svh; flex: none; }
  .twin__labels { height: 62svh; bottom: auto; }
  .twin__systems { position: static; order: 2; padding: 12px 16px 0; }
  .twin__panel { position: static; order: 3; width: auto; margin: 12px 16px 0; }
  .evolution__ui { grid-template-columns: minmax(0, 1fr); padding-top: 96px; }
  .evo-stages { min-height: 230px; }


  .twin__desc { font-size: 14px; }
  .twin__systems { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .twin__systems button { flex: none; }
  .agents__stage { height: auto; min-height: 0; display: flex; flex-direction: column; }
  .agents__canvas, .agents__labels { position: relative; height: 62svh; }
  .agents__labels { position: absolute; top: 0; height: 62svh; }
  .agents__console { position: relative; inset: auto; width: auto; margin: 16px; height: 360px; }
  .agents__legend { position: static; padding: 0 16px; }
  .loop__body { grid-template-columns: minmax(0, 1fr); }
  .gov__pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gov__bottom { grid-template-columns: minmax(0, 1fr); }
  #gov-run { margin-left: 0; width: 100%; justify-content: center; }
  .cap-grid { grid-template-columns: minmax(0, 1fr); }
  .cap--wide { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .uc { grid-template-columns: minmax(0, 1fr); }
  .uc__tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .uc__tabs button { flex: none; }
  .uc__cols { grid-template-columns: minmax(0, 1fr); }
  .incident__viz { aspect-ratio: 4 / 5; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal], .js [data-hero-fade] { opacity: 1; transform: none; }
  .evolution { height: auto; }
  .evolution__sticky { position: relative; height: auto; min-height: 100svh; }
  .evo-stages { min-height: 0; display: grid; gap: 28px; }
  .evo-stage { position: static; opacity: 1; transform: none; }
  .evo-nav { display: none; }
  .closing { height: auto; }
  .closing__sticky { position: relative; min-height: 100svh; }
}

/* ---------- Intro loader (color logo + neuron animation) ---------- */
html.is-loading { overflow: hidden; }
.loader { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; color: #22313f;
  background: radial-gradient(ellipse at 50% 42%, #ffffff 0%, #f1f5f8 55%, #dde6ec 100%);
  clip-path: inset(0 0 0 0); transition: clip-path 1.1s cubic-bezier(.77, 0, .18, 1); }
.loader.is-leaving { clip-path: inset(0 0 100% 0); }
.loader__inner { width: min(860px, 88vw); display: grid; gap: 28px; transition: transform 1s var(--ease), opacity .7s var(--ease); }
.loader.is-leaving .loader__inner { transform: translateY(-48px) scale(.97); opacity: 0; }
.loader__logo { position: relative; }
.loader__logo .logo-crop { width: 100%; }
.loader__neurons { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.loader__meta { display: flex; justify-content: space-between; align-items: center; }
.loader__meta .mono { color: #4d6070; }
.loader__bar { height: 2px; background: rgba(20, 50, 80, .12); overflow: hidden; border-radius: 2px; }
.loader__bar span { display: block; height: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #46b04a, #2fb8a8, #1f6fb5); transition: transform .3s linear; }
@media (prefers-reduced-motion: reduce) { .loader { transition: opacity .3s; } .loader.is-leaving { clip-path: none; opacity: 0; } }
