/* Sentinel: the story site. No external fonts, scripts or images (CSP: 'self' only). */
:root {
  --navy-950: #0b1220;
  --navy-900: #111a2e;
  --navy-800: #1a2540;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --paper: #ffffff;
  --tint: #f5f7fb;
  --blue: #0284c7;
  --blue-600: #0369a1;
  --sky: #38bdf8;
  --orange: #d97706;
  --orange-ink: #9a3412;
  --orange-tint: #fff7ed;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --bar-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); color: var(--text); background: var(--paper); line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: var(--blue-600); }
h1, h2, h3 { color: var(--ink); line-height: 1.15; margin: 0; }
p { margin: 0; }
strong { color: var(--ink); }
.nowrap { white-space: nowrap; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--paper); color: var(--ink); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 15px/1 var(--sans); text-decoration: none; border-radius: 999px;
  padding: 11px 20px; border: 1px solid transparent; transition: background .2s, border-color .2s, transform .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: #0ea5e9; }
.btn--ghost { color: #e2e8f0; border-color: rgba(226, 232, 240, 0.35); }
.btn--ghost:hover { border-color: #e2e8f0; }
.btn--lg { padding: 15px 26px; font-size: 16px; }

/* ── Header ──────────────────────────────────────────────────────────────── */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--bar-h);
  background: rgba(11, 18, 32, 0.82); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}
.bar__inner { max-width: 1160px; height: 100%; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 10px; color: #e2e8f0; text-decoration: none; font-size: 17px; letter-spacing: .01em; }
.brand b { color: #fff; font-weight: 700; }
.brand__mark { width: 26px; height: 26px; color: var(--sky); }
.nav { display: flex; gap: 22px; margin-right: auto; }
.nav a { color: #94a3b8; text-decoration: none; font-size: 14.5px; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="true"] { color: #fff; border-bottom-color: var(--sky); }
.bar__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.menu { display: none; width: 42px; height: 42px; border: 1px solid rgba(148, 163, 184, 0.3); border-radius: 10px; background: transparent; cursor: pointer; padding: 0; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu span { display: block; width: 18px; height: 2px; background: #e2e8f0; border-radius: 2px; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center;
  padding: calc(var(--bar-h) + 48px) 0 72px; color: #cbd5e1; text-align: center;
  background: linear-gradient(180deg, rgba(11, 18, 32, 0.35), rgba(11, 18, 32, 0.9)), url("hero.webp") center / cover no-repeat, var(--navy-950);
}
.hero__inner { max-width: 1000px; margin: 0 auto; padding: 0 24px; }
.hero h1 { color: #fff; font-size: clamp(38px, 6.4vw, 76px); font-weight: 700; letter-spacing: -0.02em; margin: 18px 0 22px; }
.hero__lead { font-size: clamp(18px, 2.2vw, 24px); color: #e2e8f0; }
.hero__sub { max-width: 660px; margin: 16px auto 0; font-size: 17px; color: #94a3b8; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 36px; }
.hero__note { margin-top: 28px; font-size: 14px; color: #7c8aa5; }

.eyebrow { font: 500 14px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.eyebrow--sky { color: var(--sky); font-size: clamp(13px, 1.6vw, 17px); }

/* ── Sections ────────────────────────────────────────────────────────────── */
.section { padding: 104px 0; }
.section--tint { background: var(--tint); }
.section h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 700; letter-spacing: -0.015em; margin: 14px 0 20px; }
.lead { max-width: 900px; font-size: clamp(17px, 1.6vw, 20px); color: var(--text); }

/* Posture */
.posture { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; margin-top: 56px; align-items: start; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.point { display: grid; grid-template-columns: 48px 1fr; gap: 18px; }
.point h3 { font-size: 19px; margin-bottom: 4px; }
.point__icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; }
.point__icon--blue { background: #e0f2fe; color: var(--blue); }
.point__icon--orange { background: var(--orange-tint); color: var(--orange); }
.point__icon svg, .card__icon svg, .pipe__icon svg, .card__rule svg {
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.point__icon svg { width: 26px; height: 26px; }
.dot { fill: currentColor; stroke: none; }

.flow { list-style: none; margin: 0; padding: 28px; display: grid; gap: 30px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); counter-reset: none; }
.flow__step {
  position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 20px;
  background: var(--navy-900); color: #fff; font-weight: 600; font-size: 17px; border-radius: 12px;
}
.flow__step span { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, 0.12); font-size: 14px; }
.flow__step + .flow__step::before {
  content: ""; position: absolute; left: 50%; top: -24px; width: 2px; height: 18px; background: #94a3b8;
}
.flow__step + .flow__step::after {
  content: ""; position: absolute; left: calc(50% - 5px); top: -12px; width: 8px; height: 8px;
  border-right: 2px solid #94a3b8; border-bottom: 2px solid #94a3b8; transform: rotate(45deg);
}
.flow__step--human { background: var(--blue); }

/* Cards */
.cards { display: grid; gap: 22px; margin-top: 48px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--2 { grid-template-columns: repeat(2, 1fr); max-width: 1000px; margin-left: auto; margin-right: auto; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
.card h3 { font-size: 19px; margin-top: 10px; }
.card p { color: var(--muted); }
.card__icon { width: 44px; height: 44px; color: var(--blue); }
.card__icon svg { width: 40px; height: 40px; }
.card__rule {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; color: var(--ink) !important;
}
.card__rule svg { width: 18px; height: 18px; flex: none; color: #64748b; }
.card--critic { background: var(--orange-tint); border-color: #fed7aa; }
.card--critic .card__icon, .card--critic .card__rule svg { color: var(--orange); }
.card--critic h3, .card--critic p { color: var(--orange-ink) !important; }
.card--critic .card__rule { border-top-color: #fdba74; }
.card--row { flex-direction: row; align-items: center; gap: 22px; padding: 30px; }
.card--row .card__icon { flex: none; width: 52px; height: 52px; }
.card--row .card__icon svg { width: 48px; height: 48px; }
.card--row h3 { margin: 0 0 4px; }

.callout { margin-top: 36px; font-size: 17px; }

/* Layer 3 pipeline */
.pipe {
  margin-top: 48px; padding: 44px 32px; background: var(--paper); border: 1px solid var(--line); border-radius: 20px;
  display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 16px; box-shadow: var(--shadow);
}
.pipe__node { display: flex; flex-direction: column; align-items: center; gap: 14px; font-weight: 600; color: var(--ink); text-align: center; }
.pipe__icon { width: 84px; height: 84px; border-radius: 22px; display: grid; place-items: center; background: #f1f5f9; color: #475569; }
.pipe__icon svg { width: 40px; height: 40px; }
.pipe__node--gate .pipe__icon { background: var(--navy-900); color: var(--sky); box-shadow: 0 10px 30px rgba(2, 132, 199, 0.28); }
.pipe__arrow { width: 72px; height: 2px; background: #94a3b8; position: relative; }
.pipe__arrow::after { content: ""; position: absolute; right: -1px; top: -5px; width: 10px; height: 10px; border-right: 2px solid #94a3b8; border-top: 2px solid #94a3b8; transform: rotate(45deg); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; margin-top: 48px; }
.pillar__num { font: 700 18px/1.3 var(--mono); color: var(--ink); margin-bottom: 10px; }
.pillar p:last-child { color: var(--muted); }

/* Layer 4 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-top: 48px; }
.panel {
  background: #f8fafc; border-radius: var(--radius); border-top: 6px solid #94a3b8; padding: 40px 40px 36px;
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.panel h3 { font-size: 26px; text-transform: uppercase; letter-spacing: .01em; }
.panel__domain { margin: 10px 0 26px; font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: #64748b; }
.panel__tag { align-self: flex-start; margin-top: auto; padding: 12px 22px; border-radius: 10px; background: #e2e8f0; color: #334155; font-weight: 600; font-size: 15px; }
.panel--human { background: var(--orange-tint); border-top-color: var(--orange); }
.panel--human .panel__domain { color: var(--orange); }
.panel--human .panel__tag { background: #ffedd5; color: var(--orange-ink); }
.arrows { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.panel .arrows { margin-bottom: 30px; }
.arrows li { position: relative; padding-left: 34px; color: #64748b; font-weight: 600; }
.arrows li::before { content: "\2192"; position: absolute; left: 0; top: -1px; color: #94a3b8; font-size: 20px; line-height: 1.3; }
.panel--human .arrows li { color: #b45309; }
.panel--human .arrows li::before { color: var(--orange); }
.banner {
  margin-top: 28px; padding: 18px 24px; border-radius: 12px; background: #dbeef6; color: var(--ink);
  font-size: clamp(17px, 2vw, 22px); font-style: italic; text-align: center;
}

/* Close */
.closing { background: var(--navy-900); color: #cbd5e1; text-align: center; padding: 120px 0; }
.closing__inner { display: flex; flex-direction: column; align-items: center; }
.closing__rule { width: 120px; height: 4px; background: var(--sky); border-radius: 2px; margin-bottom: 34px; }
.closing h2 { color: #fff; font-size: clamp(34px, 5vw, 64px); font-weight: 700; letter-spacing: -0.015em; }
.closing__sub { margin-top: 18px; font: 400 clamp(18px, 2vw, 24px)/1.4 var(--mono); color: #94a3b8; }
.hero__cta--center { margin-top: 44px; }

.foot { background: var(--navy-950); color: #7c8aa5; padding: 32px 0; font-size: 14px; }
.foot__inner { display: grid; gap: 8px; }
.foot a { color: #cbd5e1; }
.foot__fine { font-size: 13px; color: #64748b; max-width: 820px; }

/* Reveal: only for elements that start below the fold (app.js), never hides content without JS. */
.reveal { transition: opacity .6s ease, transform .6s ease; }
.reveal.is-pending { opacity: 0; transform: translateY(18px); }

/* ── Small screens ───────────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .posture { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav {
    display: none; position: absolute; top: var(--bar-h); left: 0; right: 0; flex-direction: column; gap: 0;
    padding: 8px 24px 16px; background: rgba(11, 18, 32, 0.97); border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid rgba(148, 163, 184, 0.12); font-size: 16px; }
  .nav a[aria-current="true"] { border-bottom-color: rgba(148, 163, 184, 0.12); color: var(--sky); }
  .menu { display: flex; }
  .pipe { grid-template-columns: 1fr; padding: 32px 20px; }
  .pipe__arrow { width: 2px; height: 36px; margin: 0 auto; }
  .pipe__arrow::after { right: -5px; top: auto; bottom: -1px; transform: rotate(135deg); }
  .pillars, .split, .cards--2 { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
}
@media (max-width: 560px) {
  .wrap, .bar__inner, .hero__inner { padding: 0 16px; }
  .bar__inner { gap: 12px; }
  .brand span { font-size: 16px; }
  .btn { padding: 10px 16px; }
  .cards--4 { grid-template-columns: 1fr; }
  .card--row { flex-direction: column; align-items: flex-start; }
  .panel { padding: 28px 22px; }
  .flow { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .btn { transition: none; }
  .reveal.is-pending { opacity: 1; transform: none; }
}
