/* ============================================================================
   OpenSquid — "The Abyss"  ·  immersive art direction
   Magenta-on-noir. Static layer here; motion is layered in abyss.js.
   Built to the Awwwards framework: fluid type, varied rhythm, restraint.
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("fonts/space-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink:      #0a0a0b;
  --ink-2:    #101014;
  --abyss:    #05050a;        /* deepest tint for gradients */
  --magenta:  #ff2d78;
  --magenta-2:#ff5d97;
  --deep:     #c01a6b;
  --plum:     #7a1550;
  --white:    #f5f5f7;
  --grey:     #b0b4bb;
  --dim:      #7c8088;
  --faint:    #34343c;
  --line:     rgba(245,245,247,0.08);
  --line-2:   rgba(255,45,120,0.24);
  --veil:     rgba(255,45,120,0.06);

  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Inter", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* easing (Awwwards defaults) */
  --e-out:   cubic-bezier(0.16, 1, 0.3, 1);      /* power4.out */
  --e-inout: cubic-bezier(0.76, 0, 0.24, 1);     /* power4.inOut */
  --e-back:  cubic-bezier(0.34, 1.56, 0.64, 1);

  --maxw: 1280px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--ink);
  background-image:
    radial-gradient(70% 55% at 80% 10%, rgba(255,45,120,0.13), transparent 62%),
    radial-gradient(60% 60% at 10% 90%, rgba(122,21,80,0.20), transparent 60%);
  background-attachment: fixed;
  color: var(--white);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.94rem + 0.3vw, 1.15rem);
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;   /* clip horizontal bleed WITHOUT breaking position:sticky (iOS Safari) */
  overflow-wrap: break-word;   /* long unbreakable strings (mono code) wrap instead of bleeding */
  cursor: none;
}
@media (pointer: coarse) { body { cursor: auto; } }

::selection { background: var(--magenta); color: #fff; }
a { color: inherit; text-decoration: none; }
canvas { display: block; }

/* --- backdrop layers --- */
#field {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 4; pointer-events: none;   /* particles float ON TOP; canvas is transparent elsewhere */
  background: transparent;
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  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='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
/* vignette to deepen the edges */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(5,5,10,0.7) 100%);
}

/* --- custom cursor --- */
.cursor {
  position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
  width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%;
  border: 1px solid var(--magenta);
  mix-blend-mode: screen;
  transition: width .32s var(--e-out), height .32s var(--e-out), margin .32s var(--e-out),
              background .32s var(--e-out), opacity .3s;
  will-change: transform;
}
.cursor::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 3px; height: 3px;
  border-radius: 50%; background: var(--magenta);
}
.cursor.is-hover { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: var(--veil); }
.cursor.is-hover::after { opacity: 0; }
@media (pointer: coarse) { .cursor { display: none; } }

/* --- depth gauge (descent motif) --- */
.depth {
  position: fixed; left: 26px; top: 50%; transform: translateY(-50%);
  z-index: 40; display: grid; gap: 6px; font-family: var(--font-mono);
  writing-mode: vertical-rl; text-orientation: mixed;
}
.depth__cap { font-size: 0.62rem; letter-spacing: 0.4em; color: var(--dim); }
.depth__val { font-size: 1.1rem; color: var(--magenta); font-variant-numeric: tabular-nums; letter-spacing: 0.1em; }
.depth__unit { font-size: 0.6rem; letter-spacing: 0.24em; color: var(--dim); }
.depth__track { width: 2px; height: 120px; background: var(--line); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.depth__fill { display: block; width: 100%; height: 0%; background: linear-gradient(var(--magenta), var(--plum)); }
@media (max-width: 900px) { .depth { display: none; } }

/* --- topbar --- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 46px);
  border-bottom: 1px solid transparent;
  transition: background .45s var(--e-out), backdrop-filter .45s var(--e-out),
              border-color .45s var(--e-out), padding .45s var(--e-out);
}
.topbar.scrolled {
  mix-blend-mode: normal;
  background: rgba(10, 10, 11, 0.55);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom-color: var(--line);
  padding-top: 13px; padding-bottom: 13px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.brand i { font-style: normal; }
.topbar__nav { display: flex; gap: 30px; font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; }
.topbar__nav a { color: var(--white); opacity: 0.8; transition: opacity .3s; }
.topbar__nav a:hover { opacity: 1; }
.topbar__cta { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em; padding: 8px 14px; border: 1px solid var(--white); border-radius: 40px; }
.topbar__right { display: inline-flex; align-items: center; gap: 16px; }
.topbar__icon { display: inline-grid; place-items: center; width: 30px; height: 30px; color: var(--white); opacity: 0.82; transition: opacity .3s, transform .3s var(--e-out); }
.topbar__icon:hover { opacity: 1; transform: translateY(-1px); }
.topbar__icon svg { width: 19px; height: 19px; }
@media (max-width: 720px) { .topbar__nav { display: none; } }

/* --- shared bits --- */
.accent { color: var(--magenta); }
.kicker {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--dim);   /* muted so magenta is reserved for emphasis */
  display: inline-flex; align-items: center; gap: 0.7em;
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--magenta); opacity: 0.7; }
code { font-family: var(--font-mono); }

section { position: relative; }

/* ============ HERO ============ */
.hero {
  position: relative; overflow: hidden;
  min-height: 100svh; display: flex; align-items: center;
  padding: clamp(104px, 15vh, 152px) clamp(20px, 6vw, 90px) clamp(48px, 8vh, 88px);
}
.hero__inner {
  position: relative; z-index: 2;
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  display: flex; flex-direction: column; justify-content: center;
}
/* signature: the brand squid — tentacles as data-streams, portal = the jack-in chair (RIGHT) */
.hero__art {
  position: absolute; top: 0; right: 0; bottom: 0; z-index: 1;
  width: min(56vw, 880px); pointer-events: none;
  background-repeat: no-repeat; background-position: 44% center;
  background-size: cover;
  will-change: transform;
}
.no-js .hero__art, .hero-fallback .hero__art {
  background-image: url("hero-squid.webp?v=2");
}
.hero__art { transition: opacity 1s ease; }
.hero__squid { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1.2s ease; }
.hero.squid-on .hero__squid { opacity: 1; }
.hero.squid-on .hero__art { opacity: 0; }
@media (max-width: 900px) { .hero.squid-on .hero__squid { opacity: 0.62; } }
.hero__art::after {  /* blend the art's left edge into the ink so type reads */
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--ink) 3%, rgba(10,10,11,0.72) 26%, rgba(10,10,11,0.12) 55%, transparent 72%),
    linear-gradient(0deg, var(--ink) 1%, transparent 22%),
    linear-gradient(180deg, var(--ink) 1%, transparent 16%);
}
@media (max-width: 900px) {
  .hero__art { width: 100%; opacity: 0.4; background-position: center center; }
  .hero__art::after { background: linear-gradient(0deg, var(--ink) 8%, rgba(10,10,11,0.55) 45%, rgba(10,10,11,0.35)); }
}
.hero__eyebrow {
  font-family: var(--font-mono); font-size: clamp(0.7rem, 0.66rem + 0.2vw, 0.82rem);
  letter-spacing: 0.24em; text-transform: uppercase; color: var(--grey);
  margin-bottom: clamp(14px, 2vw, 24px);
}
.hero__title {
  font-family: var(--font-display); font-weight: 600;
  line-height: 0.9; letter-spacing: -0.045em;
  margin-bottom: clamp(18px, 2.4vw, 30px);
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.3em; margin-bottom: -0.22em; }
.hero__title .line--sub { line-height: 1.05; }
.hero__title .line__in { display: block; will-change: transform; }
.hero__title .line:first-child { font-size: clamp(3rem, 11.5vw, 9rem); }
.hero__title .line--sub { font-size: clamp(1.5rem, 5.2vw, 4.2rem); font-weight: 400; letter-spacing: -0.03em; color: var(--grey); margin-top: 0.16em; }
.hero__title .line--sub .line__in { background: linear-gradient(92deg, var(--white), var(--grey)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__lede { max-width: 46ch; font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem); color: var(--grey); line-height: 1.5; }
.hero__row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: clamp(22px, 3vw, 36px); }
.cta {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 15px 26px; border-radius: 50px; color: #fff;
  background: linear-gradient(120deg, var(--magenta), var(--deep));
  box-shadow: 0 10px 50px -12px rgba(255,45,120,0.7);
  transition: transform .4s var(--e-out), box-shadow .4s var(--e-out);
}
.cta i { font-style: normal; transition: transform .4s var(--e-out); }
.cta:hover { transform: translateY(-3px); box-shadow: 0 18px 60px -12px rgba(255,45,120,0.9); }
.cta:hover i { transform: translateY(3px); }
.hero__cmd {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 0.86rem; color: var(--grey);
  padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px;
  background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: color .3s var(--e-out), border-color .3s var(--e-out), background .3s var(--e-out), transform .15s var(--e-out);
}
.hero__cmd-sigil { color: var(--dim); }
.hero__cmd:hover { color: var(--white); border-color: rgba(255,45,120,0.5); background: rgba(255,45,120,0.06); }
.hero__cmd:active { transform: translateY(1px); }
.hero__cmd:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; }
.hero__cmd-ico { width: 15px; height: 15px; flex: none; color: var(--dim); transition: color .3s var(--e-out); }
.hero__cmd:hover .hero__cmd-ico { color: var(--magenta); }
.hero__cmd-ico--check { display: none; }
.hero__cmd.copied { color: var(--magenta); border-color: rgba(255,45,120,0.6); background: rgba(255,45,120,0.08); }
.hero__cmd.copied .hero__cmd-sigil, .hero__cmd.copied .hero__cmd-ico { color: var(--magenta); }
.hero__cmd.copied .hero__cmd-ico--copy { display: none; }
.hero__cmd.copied .hero__cmd-ico--check { display: block; }
/* ============ THESIS ============ */
.thesis {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(80px, 11vw, 148px) clamp(20px, 6vw, 90px) clamp(28px, 4vw, 52px);
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  column-gap: clamp(30px, 5vw, 76px); row-gap: 26px; align-items: start;
}
.thesis .kicker { grid-column: 1 / -1; display: block; }
.thesis__big {
  grid-column: 1; align-self: start;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.2rem, 6vw, 5.2rem); line-height: 1.0; letter-spacing: -0.04em;
}
.thesis__big span { display: block; }
.thesis__big span.accent { padding-left: 0.4em; }
.thesis__body { grid-column: 2; align-self: end; max-width: 48ch; font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem); color: var(--grey); }
.thesis__body em { color: var(--white); font-style: italic; }
@media (max-width: 960px) { .thesis { grid-template-columns: 1fr; } .thesis__big { font-size: clamp(2.2rem, 11vw, 3.4rem); } .thesis__body { grid-column: 1; align-self: start; max-width: none; margin-top: 8px; } }
@media (max-width: 820px) { .thesis__big span.accent { padding-left: 0.6em; } }

/* ============ GATE MACHINE (signature) ============ */
.machine {
  max-width: var(--maxw); margin-inline: auto;
  padding: clamp(64px, 8vw, 116px) clamp(20px, 6vw, 90px) clamp(72px, 9vw, 124px);
}
.machine__head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 68px); }
.machine__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 6vw, 4.4rem); line-height: 1; letter-spacing: -0.035em; margin: 22px 0 22px; }
.machine__sub { color: var(--grey); font-size: clamp(1.02rem, 1rem + 0.4vw, 1.25rem); max-width: 48ch; }
.machine__sub code { color: var(--magenta); }

.machine__foot { margin-top: clamp(46px, 6vw, 80px); max-width: 44ch; margin-left: auto; font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem); color: var(--grey); }

/* ============ START ============ */
.start {
  max-width: var(--maxw); margin-inline: auto; text-align: center;
  padding: clamp(80px, 11vw, 148px) clamp(20px, 6vw, 90px);
  display: grid; justify-items: center; gap: 22px;
}
.start .kicker { margin-bottom: 6px; }
.start__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.4rem, 8vw, 6.5rem); line-height: 0.95; letter-spacing: -0.04em; }
.start__sub { color: var(--grey); font-size: clamp(1.05rem, 1rem + 0.5vw, 1.3rem); max-width: 40ch; }
.start__cmd {
  font-family: var(--font-mono); font-size: clamp(0.8rem, 0.76rem + 0.3vw, 0.98rem);
  text-align: left; background: rgba(10,10,14,0.6); border: 1px solid var(--line-2);
  border-radius: 14px; padding: 24px 28px; margin-top: 12px; line-height: 2;
  box-shadow: 0 30px 90px -40px rgba(255,45,120,0.5);
  backdrop-filter: blur(6px);
}
.start__cmd .p { color: var(--magenta); }
.start__cmd .ok { color: var(--magenta); }
.start__props { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--dim); margin-top: 8px; }

/* ============ FOOTER ============ */
.foot {
  max-width: var(--maxw); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 40px clamp(20px, 6vw, 90px); border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.76rem; color: var(--dim);
}
.foot span:first-child { font-family: var(--font-display); font-weight: 700; color: var(--white); }
.foot i { font-style: normal; color: var(--magenta); }
.foot__tag { color: var(--grey); }
.foot__links { display: inline-flex; align-items: center; gap: 22px; }
.foot__links a { display: inline-flex; align-items: center; gap: 7px; color: var(--grey); transition: color .3s var(--e-out); }
.foot__links a:hover { color: var(--magenta); }
.foot__links svg { width: 15px; height: 15px; }

/* ============ MOTION STATES (JS-driven) ============ */
.reveal, .reveal-load { will-change: transform, opacity; }
.reveal { opacity: 0; transform: translateY(30px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .8s var(--e-out), transform .8s var(--e-out); }
/* on-load line reveal uses CSS (fires immediately) */
.hero__title .line__in { transform: translateY(110%); }
.hero.ready .line__in { transform: translateY(0); transition: transform 1s var(--e-out); transition-delay: var(--d, 0s); }
.reveal-load { opacity: 0; transform: translateY(16px); }
.hero.ready .reveal-load { opacity: 1; transform: none; transition: opacity .9s var(--e-out), transform .9s var(--e-out); transition-delay: var(--d, 0s); }

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
  body { cursor: auto; }
  .cursor { display: none; }
  .reveal, .reveal-load, .hero__title .line__in { opacity: 1 !important; transform: none !important; transition: none !important; }
  #field { animation: none; }
}

/* ---- hero accent ---- */
.hero__title em { font-style: normal; color: var(--magenta); }

/* ---- two loads: skills + knowledge ---- */
.loads { max-width: var(--maxw); margin-inline: auto; padding: clamp(20px, 3vw, 40px) clamp(20px, 6vw, 90px) clamp(40px, 5vw, 68px); display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 36px); }
.load { border: 1px solid var(--line); border-radius: 20px; padding: clamp(28px, 3vw, 44px); background: linear-gradient(160deg, rgba(255,45,120,0.05), transparent 65%); transition: border-color .5s var(--e-out), transform .5s var(--e-out); }
.load:hover { border-color: var(--line-2); transform: translateY(-4px); }
.load__tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--magenta); }
.load h3 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.5vw, 2.6rem); font-weight: 600; letter-spacing: -0.03em; margin: 16px 0 14px; }
.load p { color: var(--grey); font-size: clamp(1rem, 0.96rem + 0.3vw, 1.15rem); }
.load em { color: var(--white); font-style: italic; }
@media (max-width: 960px) { .loads { grid-template-columns: 1fr; } }

/* ---- pack range strip (not just coding) ---- */
.range { max-width: var(--maxw); margin-inline: auto; padding: clamp(16px, 2vw, 28px) clamp(20px, 6vw, 90px) clamp(60px, 8vw, 104px); }
.range .kicker { display: block; text-align: center; margin-bottom: 30px; letter-spacing: 0.16em; }
.range__grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.range__grid li { background: var(--ink); padding: 26px 24px; min-height: 110px; display: flex; flex-direction: column; justify-content: center; gap: 6px; transition: background .4s var(--e-out); }
.range__grid li:hover { background: var(--ink-2); }
.range__grid span { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; }
.range__grid i { font-family: var(--font-mono); font-style: normal; font-size: 0.76rem; color: var(--magenta); opacity: 0.85; }
@media (max-width: 820px) { .range__grid { grid-template-columns: 1fr 1fr; } }

/* ============ LIVE FLOW CONSOLE (scroll-driven state machine) ============ */
.lab-wrap { height: 340vh; position: relative; margin-top: 14px; }
.lab-sticky { position: sticky; top: 0; height: 100vh; display: grid; place-items: center; padding: 78px clamp(16px,4vw,40px) 40px; }
.lab {
  width: 100%; max-width: 920px; border: 1px solid var(--line-2); border-radius: 18px;
  background: linear-gradient(180deg, rgba(20,12,17,0.92), rgba(10,9,12,0.94));
  box-shadow: 0 50px 120px -50px rgba(255,45,120,0.4), 0 0 0 1px rgba(255,45,120,0.05);
  backdrop-filter: blur(10px); overflow: hidden;
  transition: border-color .4s var(--e-out), box-shadow .4s var(--e-out);
}
.lab.is-drift { border-color: rgba(255,90,82,0.6); box-shadow: 0 50px 120px -50px rgba(255,90,82,0.5); animation: labshake .4s var(--e-out); }
@keyframes labshake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-5px)} 40%{transform:translateX(5px)} 60%{transform:translateX(-3px)} 80%{transform:translateX(2px)} }
.lab.is-cleared { border-color: rgba(255,45,120,0.5); }

.lab__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--hairline, rgba(245,245,247,0.08)); font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--grey); flex-wrap: wrap; }
.lab__pack { display: inline-flex; align-items: center; gap: 8px; text-transform: uppercase; }
.lab__pack i { width: 7px; height: 7px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 10px var(--magenta); }
.lab__lap { color: var(--dim); }
.lab__lap b { color: var(--magenta); font-variant-numeric: tabular-nums; }

.lab__body { display: grid; grid-template-columns: 210px 1fr; min-height: 340px; }
.lab__rail { list-style: none; border-right: 1px solid var(--hairline, rgba(245,245,247,0.08)); padding: 14px; display: grid; gap: 6px; align-content: start; }
.lab__rail li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; border: 1px solid transparent; color: var(--dim); transition: all .35s var(--e-out); }
.lab__rail li b { font-family: var(--font-mono); font-size: 0.72rem; }
.lab__rail li span { font-family: var(--font-display); font-weight: 600; font-size: 0.98rem; color: var(--grey); }
.lab__rail li em { width: 9px; height: 9px; border-radius: 50%; background: transparent; border: 1px solid var(--faint, #34343c); font-style: normal; }
.lab__rail li.is-active { background: var(--veil); border-color: var(--line-2); }
.lab__rail li.is-active span { color: var(--white); }
.lab__rail li.is-pass span, .lab__rail li.is-human span { color: var(--white); }
.lab__rail li.is-pass em { background: var(--magenta); border-color: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.lab__rail li.is-human em { background: #7bdc9a; border-color: #7bdc9a; box-shadow: 0 0 8px #7bdc9a; }
.lab__rail li.is-block em { background: #ff5a52; border-color: #ff5a52; box-shadow: 0 0 8px #ff5a52; }

.lab__panel { padding: 22px 26px; display: flex; flex-direction: column; gap: 12px; }
.lab__head { display: flex; align-items: center; gap: 12px; }
.lab__no { font-family: var(--font-mono); font-size: 0.78rem; color: var(--dim); }
.lab__head h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.02em; }
.lab__verdict { margin-left: auto; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; padding: 6px 11px; border-radius: 8px; opacity: 0; transform: scale(.85); transition: opacity .35s var(--e-back), transform .35s var(--e-back); }
.lab__verdict.show { opacity: 1; transform: none; }
.lab__verdict.pass { color: var(--magenta); background: var(--veil); border: 1px solid var(--line-2); }
.lab__verdict.block { color: #ff5a52; background: rgba(255,90,82,0.1); border: 1px solid rgba(255,90,82,0.45); }
.lab__verdict.human { color: #7bdc9a; background: rgba(123,220,154,0.1); border: 1px solid rgba(123,220,154,0.4); }
.lab__what { color: var(--grey); font-size: 1.02rem; max-width: 52ch; }
.lab__gate { display: flex; gap: 10px; align-items: baseline; font-size: 0.9rem; padding: 10px 0; border-top: 1px solid var(--hairline-soft, rgba(245,245,247,0.05)); }
.lab__gate span { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--dim); }
.lab__gate em { font-style: normal; color: var(--white); }
.lab__checks { list-style: none; display: grid; gap: 8px; font-family: var(--font-mono); font-size: 0.86rem; }
.lab__checks li { display: flex; align-items: center; gap: 11px; color: var(--grey); opacity: 0; transform: translateX(-6px); animation: chkin .4s var(--e-out) forwards; }
@keyframes chkin { to { opacity: 1; transform: none; } }
.lab__checks li i { width: 17px; text-align: center; font-style: normal; }
.lab__checks li.ok i { color: var(--magenta); }
.lab__checks li.bad { color: #ff8a84; }
.lab__checks li.bad i { color: #ff5a52; }
.lab__checks li.run i, .lab__checks li.wait i { color: var(--dim); }
.lab__checks li.run i { animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.lab__fix { font-family: var(--font-mono); font-size: 0.82rem; color: #ff8a84; background: rgba(255,90,82,0.08); border: 1px solid rgba(255,90,82,0.35); border-radius: 9px; padding: 10px 13px; }
.lab__fix b { color: #ff5a52; }

.lab__status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--hairline, rgba(245,245,247,0.08)); font-family: var(--font-mono); font-size: 0.74rem; flex-wrap: wrap; }
.lab__commit { color: var(--dim); letter-spacing: 0.06em; }
.lab__commit b { padding: 4px 9px; border-radius: 6px; letter-spacing: 0.1em; color: #ff5a52; background: rgba(255,90,82,0.1); border: 1px solid rgba(255,90,82,0.4); transition: all .4s var(--e-out); }
.lab__commit b.cleared { color: #7bdc9a; background: rgba(123,220,154,0.12); border-color: rgba(123,220,154,0.45); }
.lab__cap { color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase; }

@media (max-width: 720px) {
  .lab__body { grid-template-columns: 1fr; }
  .lab__rail { grid-template-columns: repeat(5, 1fr); border-right: 0; border-bottom: 1px solid var(--hairline, rgba(245,245,247,0.08)); }
  .lab__rail li { grid-template-columns: 1fr; justify-items: center; gap: 4px; text-align: center; padding: 9px 4px; }
  .lab__rail li span { font-size: 0.74rem; }
  .lab-wrap { height: 300vh; }
}
@media (prefers-reduced-motion: reduce) { .lab-wrap { height: auto; } .lab-sticky { position: static; height: auto; } }

/* ============ INTRO: boot / jack-in sequence ============ */
.intro { position: fixed; inset: 0; z-index: 300; background: var(--ink); display: grid; place-items: center;
  transition: transform 0.45s var(--e-inout), opacity 0.3s ease; }
.intro.out { transform: translateY(-101%); }
.boot__inner { width: min(430px, 84vw); font-family: var(--font-mono); }
.boot__mark { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; margin-bottom: 30px; opacity: 0; transform: translateY(8px); animation: bootMark 0.6s var(--e-out) 0.1s forwards; }
.boot__mark i { font-style: normal; color: var(--magenta); }
@keyframes bootMark { to { opacity: 1; transform: none; } }
.boot__log { list-style: none; display: grid; gap: 10px; font-size: 0.8rem; color: var(--grey); }
.boot__log li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; opacity: 0; transform: translateY(6px); border-bottom: 1px dashed var(--hairline-soft, rgba(245,245,247,0.05)); padding-bottom: 6px; }
.boot__log li.in { opacity: 1; transform: none; transition: opacity 0.4s var(--e-out), transform 0.4s var(--e-out); }
.boot__log li b { color: var(--magenta); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.1em; }
.boot__bar { height: 2px; background: var(--line); margin-top: 24px; border-radius: 2px; overflow: hidden; }
.boot__bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--magenta), var(--plum)); box-shadow: 0 0 12px var(--magenta); transition: width 0.28s linear; }
.boot__done { margin-top: 16px; font-size: 0.74rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--magenta); opacity: 0; }
.boot__done.in { opacity: 1; transition: opacity 0.45s var(--e-out); }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }

/* ---- hero status line + scroll cue (replaces the boot readout) ---- */
.hero__status { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-family: var(--font-mono); font-size: clamp(0.76rem, 0.72rem + 0.2vw, 0.88rem); color: var(--grey); margin-top: clamp(20px, 2.6vw, 32px); }
.hero__status b { color: var(--white); font-weight: 500; }
.hero__status #packRoll { color: var(--magenta); transition: opacity .22s ease; }
.hero__dot { width: 8px; height: 8px; border-radius: 50%; background: #7bdc9a; box-shadow: 0 0 10px #7bdc9a; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
.hero__cue { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3; width: 24px; height: 38px; border: 1px solid var(--line); border-radius: 20px; display: grid; justify-items: center; padding-top: 7px; }
.hero__cue span { width: 3px; height: 8px; border-radius: 3px; background: var(--magenta); animation: cue 1.7s var(--e-inout) infinite; }
@keyframes cue { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(11px); opacity: 0.15; } }
@media (max-width: 720px) { .hero__cue { display: none; } }

/* ============ THE ENGINE / MOAT ============ */
.engine { padding: clamp(90px,12vw,170px) 0; border-top: 1px solid var(--line); }
.engine__inner { max-width: 1080px; margin-inline: auto; padding-inline: clamp(20px,6vw,90px); }
.engine .kicker { display: block; margin-bottom: 22px; }
.engine__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem,5.4vw,4.4rem); line-height: 1.02; letter-spacing: -0.035em; max-width: 16ch; }
.engine__lede { margin-top: 24px; max-width: 60ch; color: var(--grey); font-size: clamp(1.05rem,1rem+0.5vw,1.35rem); }
.engine__lede em { color: var(--white); font-style: italic; }
.engine__split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: clamp(40px,5vw,64px); }
.plane { border: 1px solid var(--line); border-radius: 18px; padding: 28px clamp(22px,2.6vw,34px); }
.plane--det { border-color: var(--line-2); background: linear-gradient(160deg, var(--veil), transparent 65%); }
.plane__tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.plane--det .plane__tag { color: var(--magenta); }
.plane ul { list-style: none; margin-top: 16px; display: grid; gap: 11px; }
.plane li { position: relative; padding-left: 20px; color: var(--grey); font-size: 0.98rem; }
.plane li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.plane--det li::before { background: var(--magenta); box-shadow: 0 0 8px var(--magenta); }
.plane--det li { color: var(--white); }
@media (max-width: 960px) { .engine__split { grid-template-columns: 1fr; } }

/* ============ ANTI-SELF-GRADING ============ */
.grade { padding: clamp(90px,12vw,170px) 0; border-top: 1px solid var(--line); }
.grade__inner { max-width: 1080px; margin-inline: auto; padding-inline: clamp(20px,6vw,90px); }
.grade .kicker { display: block; margin-bottom: 20px; }
.grade__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem,5.6vw,4.6rem); line-height: 1.0; letter-spacing: -0.035em; max-width: 15ch; }
.grade__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-top: clamp(40px,5vw,64px); align-items: stretch; }
.grade__us, .grade__them { border: 1px solid var(--line); border-radius: 18px; padding: 30px clamp(22px,2.6vw,34px); }
.grade__us { border-color: var(--line-2); background: linear-gradient(160deg, var(--veil), transparent 60%); }
.grade__tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.grade__tag.on { color: var(--magenta); }
.grade__us p { margin-top: 16px; color: var(--grey); font-size: 1.02rem; }
.grade__us b { color: var(--white); }
.grade__punch { font-family: var(--font-display); font-size: clamp(1.2rem,2.4vw,1.6rem); font-weight: 600; letter-spacing: -0.02em; color: var(--white) !important; }
.grade__them ul { list-style: none; margin-top: 18px; display: grid; gap: 10px; }
.grade__them li { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--dim); position: relative; padding-left: 26px; text-decoration: line-through; text-decoration-color: rgba(255,90,82,0.5); }
.grade__them li::before { content: "✗"; position: absolute; left: 0; color: #ff5a52; text-decoration: none; }
.grade__foot { margin-top: 20px; font-family: var(--font-mono); font-size: 0.8rem; color: var(--dim); }
@media (max-width: 960px) { .grade__grid { grid-template-columns: 1fr; } }

/* ============ CONTINUITY (full-bleed moment) ============ */
.cont { padding: clamp(110px,16vw,220px) 0; border-top: 1px solid var(--line);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255,45,120,0.12), transparent 60%),
    radial-gradient(60% 50% at 50% 100%, rgba(122,21,80,0.2), transparent 60%); }
.cont__inner { max-width: 1000px; margin-inline: auto; padding-inline: clamp(20px,6vw,90px); text-align: center; display: grid; justify-items: center; }
.cont .kicker { margin-bottom: 22px; }
.cont__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem,9vw,6.2rem); line-height: 0.98; letter-spacing: -0.045em; }
.cont__lede { margin-top: 26px; max-width: 58ch; color: var(--grey); font-size: clamp(1.08rem,1rem+0.55vw,1.4rem); }
.cont__devices { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: clamp(34px,4vw,52px); }
.cont__devices span { font-family: var(--font-mono); font-size: 0.82rem; padding: 9px 16px; border-radius: 40px; border: 1px solid var(--line-2); color: var(--grey); background: rgba(10,10,14,0.4); backdrop-filter: blur(6px); }
.cont__ladder { margin-top: clamp(30px,3.6vw,44px); font-family: var(--font-mono); font-size: clamp(0.72rem,0.68rem+0.2vw,0.86rem); letter-spacing: 0.06em; color: var(--dim); }
.cont__ladder i { color: var(--magenta); font-style: normal; margin: 0 6px; }

/* ============ IN PLAIN TERMS (concrete: what you install) ============ */
.plain { padding: clamp(72px,9vw,124px) 0; border-top: 1px solid var(--line); }
.plain__inner { max-width: 1120px; margin-inline: auto; padding-inline: clamp(20px,6vw,90px); }
.plain .kicker { display: block; margin-bottom: 18px; }
.plain__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.8rem,4.6vw,3.4rem); line-height: 1.04; letter-spacing: -0.03em; margin-bottom: clamp(36px,5vw,58px); }
.plain__steps { list-style: none; display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.plain__steps li { border: 1px solid var(--line); border-radius: 18px; padding: 26px clamp(20px,2vw,28px); display: flex; flex-direction: column; gap: 11px; background: linear-gradient(180deg, rgba(255,255,255,0.016), transparent 70%); transition: border-color .4s var(--e-out), transform .4s var(--e-out); }
.plain__steps li:hover { border-color: var(--line-2); transform: translateY(-3px); }
.plain__n { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--magenta); color: #fff; }
.plain__steps h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.32rem; letter-spacing: -0.01em; margin-top: 2px; }
.plain__steps p { color: var(--grey); font-size: 0.99rem; flex: 1; }
.plain__steps p b { color: var(--white); font-weight: 600; }
.plain__steps code { font-family: var(--font-mono); font-size: 0.76rem; color: var(--magenta); background: var(--veil); border: 1px solid var(--line-2); border-radius: 8px; padding: 8px 11px; overflow-x: auto; white-space: nowrap; }
@media (max-width: 900px) { .plain__steps { grid-template-columns: 1fr; } }

/* console task anchor (concrete demo) */
.lab__task { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 12px 20px; border-bottom: 1px solid var(--hairline, rgba(245,245,247,0.08)); font-family: var(--font-mono); font-size: 0.8rem; color: var(--white); }
.lab__task i { font-style: normal; color: var(--magenta); }
.lab__task b { color: var(--grey); font-weight: 400; }
