/* ==========================================================================
   KeyGrantX homepage
   One light source. System type. No webfonts.
   ========================================================================== */

:root {
  --void: #06070a;
  --surface: #0e1116;
  --surface-2: #14181f;
  --paper: #f6f7f9;
  --paper-2: #eef0f4;
  --ink: #0b0d10;
  --muted: #5b6472;
  --muted-dark: #8b93a1;
  --line: rgba(255, 255, 255, 0.09);
  --line-ink: rgba(11, 13, 16, 0.1);
  --accent: #3f7bff;
  --accent-soft: #7ba3ff;
  --brass: #e0a33e;
  --safe: #34d399;

  --r-card: 18px;
  --r-btn: 12px;
  --wrap: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo,
    Consolas, monospace;

  color-scheme: dark light;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--void);
  color: #eef1f6;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
code { font-family: var(--mono); font-size: 0.92em; }

a { color: inherit; text-decoration: none; }

::selection { background: rgba(63, 123, 255, 0.32); color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.skip {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: var(--r-btn);
  background: #fff;
  color: #000;
  transition: top 0.2s var(--ease);
}
.skip:focus-visible { top: 16px; }

/* ---------------------------------------------------------------- type --- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 26px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px 2px rgba(63, 123, 255, 0.55);
}
.eyebrow--ink { color: var(--muted); }

.display {
  margin: 0;
  font-size: clamp(2.6rem, 6.4vw, 5.2rem);
  font-weight: 700;
  line-height: 1.03;
  letter-spacing: -0.022em;
  max-width: 15ch;
}
.display__dim {
  color: rgba(238, 241, 246, 0.62);
  font-weight: 600;
}

.h2 {
  margin: 0 0 26px;
  font-size: clamp(1.9rem, 3.7vw, 3.1rem);
  font-weight: 680;
  line-height: 1.14;
  letter-spacing: -0.02em;
  max-width: 22ch;
}
.h2--ink { color: var(--ink); }

.dim { color: rgba(238, 241, 246, 0.38); }
.section--paper .dim, .h2--ink .dim { color: rgba(11, 13, 16, 0.3); }

.lede {
  margin: 0 0 40px;
  max-width: 34em;
  font-size: clamp(1rem, 1.35vw, 1.14rem);
  line-height: 1.75;
  color: rgba(238, 241, 246, 0.66);
}
.lede--tight { max-width: 30em; }
.lede--ink { color: var(--muted); }

.micro {
  margin: 22px 0 0;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: rgba(238, 241, 246, 0.42);
}
.micro--ink { color: var(--muted); }

/* -------------------------------------------------------------- buttons --- */

.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--r-btn);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 0.12s var(--ease), background-color 0.2s var(--ease),
    border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  will-change: transform;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: #fff;
  color: #07080b;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 10px 30px -12px rgba(255, 255, 255, 0.35);
}
.btn--primary:hover { background: #eef1f7; }

.btn--ghost {
  border: 1px solid var(--line);
  color: rgba(238, 241, 246, 0.86);
  background: rgba(255, 255, 255, 0.02);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.18); }

.btn--sm { padding: 9px 16px; font-size: 13.5px; }

:where(a, button):focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ------------------------------------------------------------------ nav --- */

.nav {
  position: fixed;
  inset: 14px 14px auto 14px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 10px 12px 10px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease),
    backdrop-filter 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.nav.is-stuck {
  background: rgba(10, 12, 16, 0.62);
  border-color: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 12px 40px -18px rgba(0, 0, 0, 0.9);
}
.nav.is-stuck .brand__word { color: #eef1f6; }

.nav.is-light {
  background: rgba(252, 253, 255, 0.72);
  border-color: rgba(11, 13, 16, 0.07);
  box-shadow: 0 10px 30px -20px rgba(13, 18, 28, 0.5);
}
.nav.is-light .brand { color: var(--ink); }
.nav.is-light .brand__word { color: var(--ink); }
.nav.is-light .nav__links { color: var(--muted); }
.nav.is-light .nav__links a:hover { color: var(--ink); }
.nav.is-light .btn--primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 20px -10px rgba(11, 13, 16, 0.6);
}
.nav.is-light .btn--primary:hover { background: #1b1f26; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-right: auto;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(238, 241, 246, 0.9);
  transition: color 0.3s var(--ease);
}
.brand__mark {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand__word { color: rgba(238, 241, 246, 0.9); }

.nav__links {
  display: flex;
  gap: 26px;
  font-size: 14px;
  color: rgba(238, 241, 246, 0.6);
}
.nav__links a {
  transition: color 0.2s var(--ease);
}
.nav__links a:hover { color: #fff; }

/* ----------------------------------------------------------------- hero --- */

.hero {
  position: relative;
  padding-top: clamp(140px, 20vh, 210px);
  padding-bottom: clamp(60px, 9vh, 110px);
  overflow: hidden;
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.hero__photo {
  position: absolute;
  inset: 0;
  background-image: url("img/hero-vault.jpg");
  background-size: cover;
  background-position: 70% 42%;
  opacity: 1;
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 92%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 92%);
}
.hero__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(95% 75% at 8% 26%, rgba(6, 7, 10, 0.9), rgba(6, 7, 10, 0.55) 55%, rgba(6, 7, 10, 0) 78%),
    radial-gradient(50% 44% at 80% 44%, rgba(63, 123, 255, 0.2), transparent 72%),
    linear-gradient(to bottom, rgba(6, 7, 10, 0.35), rgba(6, 7, 10, 0.75) 62%, var(--void) 94%);
}
.hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
  pointer-events: none;
}

.hero__inner { position: relative; }
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

/* ---------------------------------------------------------------- scene --- */

.scene {
  position: relative;
  margin-top: clamp(52px, 8vh, 96px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(18, 21, 27, 0.92), rgba(10, 12, 16, 0.92));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 120px -40px rgba(0, 0, 0, 0.9),
    0 0 0 1px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  overflow: hidden;
}
.scene__chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}
.scene__dots { display: inline-flex; gap: 6px; }
.scene__dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}
.scene__title {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(238, 241, 246, 0.42);
}
.scene__toggle {
  margin-left: auto;
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; border-radius: 7px;
  background: transparent;
  color: rgba(238, 241, 246, 0.4);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.scene__toggle:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.scene__toggle svg { width: 15px; height: 15px; fill: currentColor; }

.scene__body {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 74px 1fr;
  gap: 0;
  padding: clamp(18px, 3vw, 30px);
  min-height: 300px;
}

.pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  transition: opacity 0.4s var(--ease), filter 0.4s var(--ease);
}
.scene__body.is-modal .pane { opacity: 0.38; filter: saturate(0.6); }
.pane__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 6px;
}
.tag--ctx { color: #9fb4d8; background: rgba(120, 150, 200, 0.12); }
.tag--proc { color: #86dfc0; background: rgba(52, 211, 153, 0.11); }
.pane__note {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(238, 241, 246, 0.34);
}

.term {
  margin: 0;
  min-height: 44px;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.35);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.65;
  color: rgba(238, 241, 246, 0.8);
  white-space: pre-wrap;
  word-break: break-word;
  overflow: hidden;
}
.term--out:empty { display: none; }
.term .k { color: #86a9ff; }
.term .s { color: #d6c08a; }
.term .c { color: rgba(238, 241, 246, 0.4); }
.term .ok { color: var(--safe); }
.term .redact {
  color: var(--safe);
  background: rgba(52, 211, 153, 0.12);
  border-radius: 4px;
  padding: 0 4px;
}

.pane__chiprow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 30px;
}
.chip {
  font-family: var(--mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(63, 123, 255, 0.14);
  border: 1px solid rgba(63, 123, 255, 0.28);
  color: #a8c2ff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.chip.is-in { opacity: 1; transform: none; }
.chip--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(238, 241, 246, 0.35);
}

.pane__progress {
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.pane__progress i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--safe));
  box-shadow: 0 0 10px rgba(63, 123, 255, 0.6);
  transition: width 0.18s linear;
}
.pane__foot {
  margin: auto 0 0;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(238, 241, 246, 0.3);
  line-height: 1.6;
}

.val {
  color: var(--safe);
  transition: color 0.3s var(--ease);
}
.val.is-live {
  text-shadow: 0 0 16px rgba(52, 211, 153, 0.5);
}

/* the gate */
.gate {
  position: relative;
  display: grid;
  place-items: center;
  align-self: stretch;
}
.gate__line {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255, 255, 255, 0.12) 20%,
    rgba(255, 255, 255, 0.12) 80%,
    transparent
  );
}
.gate__beam {
  position: absolute;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, transparent, var(--accent) 35%, var(--safe) 65%, transparent);
  opacity: 0;
  box-shadow: 0 0 22px 3px rgba(63, 123, 255, 0.55);
}
.gate__beam.is-firing { animation: beam 1.1s var(--ease-in-out) forwards; }
@keyframes beam {
  0% { opacity: 0; transform: scaleY(0.2); }
  30% { opacity: 1; transform: scaleY(1); }
  100% { opacity: 0; transform: scaleY(1); }
}

.gate__badge {
  position: relative;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0b0e13;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: rgba(238, 241, 246, 0.45);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}
.gate__badge.is-armed {
  color: #cfe0ff;
  border-color: rgba(63, 123, 255, 0.5);
  box-shadow: 0 0 20px rgba(63, 123, 255, 0.35);
}

/* approval dialog */
.dlg {
  position: absolute;
  left: 50%;
  top: 54%;
  width: min(430px, calc(100% - 36px));
  padding: 16px 18px 14px;
  border-radius: 16px;
  background: rgba(247, 248, 250, 0.97);
  color: #0b0d10;
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.85);
  opacity: 0;
  transform: translate(-50%, -46%) scale(0.96);
  transition: opacity 0.28s var(--ease), transform 0.42s var(--ease);
  pointer-events: none;
  z-index: 6;
}
.dlg.is-open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.dlg__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.dlg__lock {
  width: 20px; height: 20px;
  fill: none; stroke: #3f7bff; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}
.dlg__head strong { display: block; font-size: 14px; letter-spacing: 0; }
.dlg__head span {
  display: block;
  font-size: 11.5px;
  color: #6b7482;
  line-height: 1.4;
}
.dlg__timer {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: #8b93a1;
}
.dlg__cmd {
  padding: 9px 11px;
  border-radius: 8px;
  background: #edeff3;
  font-size: 11px;
  line-height: 1.55;
  color: #3d444f;
  margin-bottom: 12px;
}
.dlg__cmd code { font-size: 11px; }
.dlg__actions { display: flex; gap: 8px; justify-content: flex-end; }
.dlg__deny, .dlg__allow {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 550;
}
.dlg__deny { color: #5b6472; background: #eceef2; }
.dlg__allow {
  color: #fff;
  background: #2f6bf0;
  box-shadow: 0 2px 10px -2px rgba(47, 107, 240, 0.6);
  transition: transform 0.12s var(--ease), background-color 0.2s var(--ease);
}
.dlg__allow.is-pressed { transform: scale(0.96); background: #1f56d0; }

/* -------------------------------------------------------------- section --- */

.section {
  position: relative;
  padding-block: clamp(84px, 11vw, 150px);
}
section[id], header[id] { scroll-margin-top: 96px; }
.section--paper {
  background: var(--paper);
  color: var(--ink);
}
.section--paper + .section--paper { padding-top: 0; }
.section--void {
  background:
    radial-gradient(70% 60% at 50% 0%, rgba(63, 123, 255, 0.08), transparent 70%),
    var(--void);
}

.cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 56px 0 0;
  padding: 0;
}
.card {
  padding: 26px 24px 28px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover { border-color: rgba(255, 255, 255, 0.2); }
.card__icon {
  width: 24px; height: 24px;
  fill: none;
  stroke: var(--accent-soft);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 18px;
}
.card h3 {
  margin: 0 0 10px;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0;
}
.card p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(238, 241, 246, 0.55);
}
.card code {
  color: rgba(238, 241, 246, 0.78);
  font-size: 0.86em;
}

/* ------------------------------------------------------------- boundary --- */

.boundary {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.kv {
  margin: 44px 0 0;
  display: grid;
  gap: 26px;
}
.kv div { border-top: 1px solid var(--line-ink); padding-top: 18px; }
.kv dt {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8b929e;
  margin-bottom: 8px;
}
.kv dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: #3f4753;
}
.kv code { color: var(--ink); background: var(--paper-2); padding: 1px 5px; border-radius: 4px; }

.boundary__figure { margin: 0; }
.stack {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 34px 30px;
  border-radius: 22px;
  background: linear-gradient(160deg, #0f131a, #07080c 70%);
  box-shadow: 0 30px 70px -30px rgba(13, 18, 28, 0.5);
  transform: perspective(1200px) rotateX(6deg) rotateZ(-1deg);
  transition: transform 0.6s var(--ease);
}
.stack:hover { transform: perspective(1200px) rotateX(2deg) rotateZ(0deg); }

.stack__layer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 14px;
  color: rgba(238, 241, 246, 0.85);
  background: rgba(255, 255, 255, 0.03);
}
.stack__layer span { font-weight: 550; }
.stack__layer em {
  font-family: var(--mono);
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: rgba(238, 241, 246, 0.4);
}
.stack__layer--1 { transform: translateZ(0); }
.stack__layer--2 {
  border-color: rgba(63, 123, 255, 0.4);
  background: rgba(63, 123, 255, 0.08);
  box-shadow: 0 0 40px -8px rgba(63, 123, 255, 0.3) inset;
}
.stack__layer--2 em { color: rgba(168, 194, 255, 0.9); }
.stack__layer--3 { transform: translateZ(0); }
.stack__layer--3 em { color: rgba(134, 223, 192, 0.9); }

.boundary__figure figcaption {
  margin-top: 22px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

/* ------------------------------------------------------------------ how --- */

.how {
  display: grid;
  grid-template-columns: 1fr 1.06fr;
  gap: clamp(36px, 5vw, 76px);
  align-items: start;
  margin-top: 56px;
}
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  counter-reset: s;
}
.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.steps li:first-child { border-top: 0; }
.steps__n {
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(238, 241, 246, 0.3);
  padding-top: 4px;
}
.steps h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
  font-weight: 600;
}
.steps p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.72;
  color: rgba(238, 241, 246, 0.55);
}
.steps code {
  color: rgba(238, 241, 246, 0.82);
  font-size: 0.86em;
}

.shot { margin: 0; }
.shot__frame {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  padding: 10px;
  box-shadow: 0 40px 90px -44px rgba(0, 0, 0, 0.9);
}
.shot__frame img {
  border-radius: 9px;
  width: 100%;
  height: auto;
}
.shot__frame--flat { padding: 0; border-color: rgba(11, 13, 16, 0.08); box-shadow: 0 24px 60px -30px rgba(13, 18, 28, 0.4); background: #fff; }
.shot__frame--flat img { border-radius: 15px; }
.shot figcaption {
  margin-top: 16px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(238, 241, 246, 0.42);
}

/* ----------------------------------------------------------------- film --- */

.section--film .lede { margin-bottom: 0; }
.film { margin: clamp(38px, 5vw, 58px) 0 0; }
.film__frame {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #05060a;
  box-shadow: 0 60px 140px -60px rgba(0, 0, 0, 0.95), 0 0 90px -40px rgba(63, 123, 255, 0.4);
}
.film__frame video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.film figcaption {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(238, 241, 246, 0.32);
}

/* -------------------------------------------------------------- gallery --- */

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  max-width: var(--wrap);
  margin: clamp(44px, 6vw, 68px) auto 0;
  padding-inline: clamp(20px, 4vw, 40px);
}
.gallery__item { margin: 0; }
.gallery__item:first-child { grid-column: 1 / -1; }
.gallery__item figcaption {
  margin-top: 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
}
.gallery__item figcaption strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

/* --------------------------------------------------------------- scopes --- */

.scopes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 24px;
  max-width: 900px;
}
.scope {
  padding: 28px 26px 30px;
  border-radius: var(--r-card);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}
.scope--light { border-color: rgba(224, 163, 62, 0.28); background: rgba(224, 163, 62, 0.04); }
.scope header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.scope h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 620;
  letter-spacing: -0.01em;
}
.scope__tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 5px;
  color: rgba(134, 223, 192, 0.9);
  background: rgba(52, 211, 153, 0.1);
}
.scope__tag--warm { color: rgba(240, 190, 110, 0.95); background: rgba(224, 163, 62, 0.12); }
.scope__what {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(238, 241, 246, 0.62);
}
.scope ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
  font-size: 14px;
  color: rgba(238, 241, 246, 0.5);
}
.scope li { position: relative; padding-left: 18px; line-height: 1.6; }
.scope li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

/* --------------------------------------------------------------- limits --- */

.limits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-top: 58px;
}
.limit h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(238, 241, 246, 0.9);
}
.limit p {
  margin: 0;
  font-size: 14px;
  line-height: 1.72;
  color: rgba(238, 241, 246, 0.45);
}
.limit code { font-size: 0.86em; color: rgba(238, 241, 246, 0.7); }
.limits__note {
  margin: 52px 0 0;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(238, 241, 246, 0.3);
}

/* -------------------------------------------------------------- install --- */

.install {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.code-block {
  border-radius: var(--r-card);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0c11;
  overflow: hidden;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}
.code-block__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(238, 241, 246, 0.35);
}
.copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: transparent;
  color: rgba(238, 241, 246, 0.55);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.copy svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.copy:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.copy.is-done { color: var(--safe); border-color: rgba(52, 211, 153, 0.4); }

.code {
  margin: 0;
  padding: 22px 20px 24px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 2;
  color: rgba(238, 241, 246, 0.9);
  overflow-x: auto;
}
.code__muted { color: rgba(238, 241, 246, 0.3); }
.code__cmd::before { content: "$ "; color: var(--accent-soft); }
.code__cmd { color: #e7ecf5; }

/* --------------------------------------------------------------- closer --- */

.closer {
  padding-block: clamp(96px, 14vw, 180px);
  background:
    radial-gradient(60% 80% at 50% 100%, rgba(63, 123, 255, 0.16), transparent 70%),
    var(--void);
  border-top: 1px solid var(--line);
}
.closer__inner { text-align: center; display: grid; justify-items: center; }
.closer__line {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 680;
  line-height: 1.1;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.55));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ----------------------------------------------------------------- foot --- */

.foot {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-block: 34px;
  font-size: 13px;
  color: rgba(238, 241, 246, 0.4);
}
.foot__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.foot__brand { display: inline-flex; align-items: center; gap: 9px; }
.foot__brand .brand__mark { width: 18px; height: 18px; }
.foot__links { display: flex; gap: 22px; }
.foot__links a { transition: color 0.2s var(--ease); }
.foot__links a:hover { color: #fff; }

/* --------------------------------------------------------------- reveal --- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------- responsive --- */

@media (max-width: 1024px) {
  .cards, .limits { grid-template-columns: 1fr 1fr; }
  .gallery__item:first-child { grid-column: auto; }
  .boundary, .how, .install { grid-template-columns: 1fr; }
  .boundary__figure { order: -1; }
  .stack { transform: none; }
  .scopes { max-width: none; }
}

@media (max-width: 760px) {
  .nav { gap: 12px; inset: 10px 10px auto 10px; padding: 8px 10px 8px 14px; }
  .nav__links { display: none; }
  .display { max-width: 12ch; }
  .cards, .limits, .gallery, .scopes { grid-template-columns: 1fr; }

  .scene__body {
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: 0;
  }
  .gate { height: 44px; }
  .gate__line { inset: 0 auto 0 0; width: 100%; height: 1px; top: 50%; bottom: auto;
    background: linear-gradient(to right, transparent, rgba(255,255,255,.14), transparent); }
  .gate__beam { top: 50%; left: 6px; right: 6px; bottom: auto; height: 2px; width: auto;
    background: linear-gradient(to right, transparent, var(--accent) 35%, var(--safe) 65%, transparent); }
  @keyframes beam {
    0% { opacity: 0; transform: scaleX(0.2); }
    30% { opacity: 1; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(1); }
  }
  .dlg__cmd { font-size: 10.5px; }
  .code { font-size: 12px; }
  .foot__inner { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .js [data-reveal] { opacity: 1; transform: none; }
  .hero__photo { filter: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav.is-stuck { background: #0a0c10; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .scene { background: #0d1015; backdrop-filter: none; }
}
