@import url("fonts/fonts.css");

/* ============================================================
   RAZAN — RZN-01 REV B
   Palette: cyanotype. Deep prussian ground, cyan line work,
   brass reserved exclusively for "authorized".
   ============================================================ */

:root{
  --void:#06111C;
  --hull:#0B1B2B;
  --hull2:#10263A;
  --rule:#1E3D57;
  --rule-soft:#152C41;

  --cyan:#6FC3DE;
  --cyan-dim:#4E93B2;
  --ice:#E2EEF5;
  --ice-dim:#A9C3D2;

  --brass:#E4AE43;
  --flare:#F4705A;

  --col:min(46vw,610px);
  --gutter:clamp(1.25rem,5vw,4.5rem);
  --rail:74px;
  --bar:54px;

  --ease:cubic-bezier(.2,.7,.2,1);
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}

body{
  background:var(--void);
  color:var(--ice);
  font-family:"Archivo",system-ui,sans-serif;
  font-variation-settings:"wght" 380,"wdth" 100;
  font-size:17px;
  line-height:1.68;
  overflow-x:hidden;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
::selection{background:var(--brass);color:var(--void)}
:focus-visible{outline:2px solid var(--brass);outline-offset:3px;border-radius:2px}

/* ---------- type roles ---------- */
.mono{
  font-family:"Martian Mono",ui-monospace,monospace;
  font-variation-settings:"wght" 450,"wdth" 100;
  font-size:.68rem;letter-spacing:.04em;line-height:1.5;
  font-feature-settings:"tnum" 1;
}
h1,h2,h3{font-weight:400;text-wrap:balance}

/* ============================================================
   Stage — the 3D scene, fixed behind everything
   ============================================================ */
#stage{position:fixed;inset:0;z-index:0}
#stage canvas{display:block;width:100%;height:100%}
#scrim{
  position:fixed;inset:0;z-index:1;pointer-events:none;
  background:
    linear-gradient(97deg,var(--void) 0%,var(--void) 34%,rgba(6,17,28,.86) 46%,rgba(6,17,28,.28) 57%,rgba(6,17,28,0) 66%),
    radial-gradient(ellipse 130% 70% at 50% 118%,rgba(6,17,28,.9),transparent 62%);
}
@media (max-width:999px){
  #scrim{background:rgba(6,17,28,.9)}
  body.cover #scrim{
    background:linear-gradient(rgba(6,17,28,0) 0%,rgba(6,17,28,.06) 24%,rgba(6,17,28,.72) 36%,var(--void) 47%);
  }
  .rec{padding-top:calc(var(--bar) + 3rem);align-items:flex-start}
  #hero,#close{padding-top:calc(var(--bar) + 34svh);align-items:flex-start;justify-content:flex-start}
  :root{--col:100%}
}
#scrim{transition:background .45s ease}

/* narrow tables must not wrap their own headings into the rows */
@media (max-width:620px){
  .tbl{font-size:.56rem}
  .tbl th,.tbl td{padding:.45rem .25rem;white-space:nowrap}
  .note{font-size:.63rem;line-height:1.75}
}
body.no-webgl #stage{
  background:
    radial-gradient(circle at 74% 48%,rgba(31,73,102,.5),transparent 55%),
    var(--void);
}

/* ============================================================
   Fixed chrome
   ============================================================ */
#bar{
  position:fixed;top:0;left:0;right:0;height:var(--bar);z-index:40;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 var(--gutter);
  border-bottom:1px solid var(--rule-soft);
  background:linear-gradient(var(--void) 62%,rgba(6,17,28,.93));
}
.brand{display:flex;align-items:center;gap:.7rem;color:var(--ice);text-decoration:none}
.brand svg{width:24px;height:24px;display:block;flex:none}
.brand .wm{
  font-variation-settings:"wght" 700,"wdth" 112;
  font-size:.94rem;letter-spacing:.30em;line-height:1;
}
.brand .id{
  color:var(--cyan-dim);border-left:1px solid var(--rule);
  padding-left:.75rem;margin-left:.2rem;
}
@media (max-width:640px){.brand .id{display:none}}

.lang{display:flex;border:1px solid var(--rule);border-radius:3px;overflow:hidden}
.lang button{
  font:inherit;cursor:pointer;background:none;border:0;color:var(--ice-dim);
  font-family:"Martian Mono",monospace;font-size:.6rem;letter-spacing:.08em;
  padding:.34rem .62rem;transition:background .18s,color .18s;
}
.lang button[aria-pressed="true"]{background:var(--brass);color:var(--void)}
.lang button:not([aria-pressed="true"]):hover{background:var(--hull2);color:var(--ice)}

#progress{
  position:fixed;top:var(--bar);left:0;height:2px;width:0;z-index:41;
  background:var(--brass);
}

#foot{
  position:fixed;left:0;right:0;bottom:0;z-index:40;height:38px;
  display:flex;align-items:center;justify-content:space-between;
  padding:0 var(--gutter);
  border-top:1px solid var(--rule-soft);
  background:linear-gradient(rgba(6,17,28,.93),var(--void) 42%);
  color:var(--cyan-dim);
}
#foot .r{color:var(--ice-dim)}
@media (max-width:760px){#foot .r{display:none}}

/* ---------- record rail ---------- */
#rail{
  position:fixed;left:0;top:var(--bar);bottom:38px;width:var(--rail);z-index:35;
  display:flex;flex-direction:column;justify-content:center;gap:.1rem;
  border-right:1px solid var(--rule-soft);
}
#rail a{
  display:block;padding:.42rem 0 .42rem var(--gutter);
  font-family:"Martian Mono",monospace;font-size:.6rem;letter-spacing:.02em;
  color:var(--cyan-dim);text-decoration:none;
  border-left:2px solid transparent;
  transition:color .2s,border-color .2s;
  white-space:nowrap;
}
#rail a:hover{color:var(--ice)}
#rail a[aria-current="true"]{color:var(--brass);border-left-color:var(--brass)}
#rail a.gap{margin-top:.7rem;padding-top:.7rem;border-top:1px solid var(--rule)}
@media (max-width:1180px){#rail{display:none}}

/* ============================================================
   Records
   ============================================================ */
main{position:relative;z-index:10}

.rec{
  min-height:100svh;
  display:flex;align-items:center;
  padding:calc(var(--bar) + 4rem) var(--gutter) 5rem
          calc(var(--gutter) + var(--rail));
}
@media (max-width:1180px){
  .rec{padding-left:var(--gutter)}
}
.rec > .inner{
  width:var(--col);max-width:100%;
  transition:opacity .5s var(--ease),transform .5s var(--ease);
}
html.js .rec > .inner{opacity:.16;transform:translateY(14px)}
html.js .rec.live > .inner{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  html.js .rec > .inner{opacity:1;transform:none;transition:none}
}

.tag{
  display:flex;align-items:baseline;gap:.7rem;
  color:var(--cyan);margin-bottom:1.15rem;
  padding-bottom:.6rem;border-bottom:1px solid var(--rule);
}
.tag b{font-weight:400;color:var(--brass)}
.tag span{color:var(--ice-dim);letter-spacing:.02em}

h2{
  font-variation-settings:"wght" 640,"wdth" 106;
  font-size:clamp(1.7rem,3.7vw,2.9rem);
  line-height:1.04;letter-spacing:-.018em;
  margin-bottom:1.05rem;color:var(--ice);
}
.rec p{color:var(--ice-dim);max-width:60ch}
.rec p + p{margin-top:.85rem}
.rec p strong{color:var(--ice);font-variation-settings:"wght" 560,"wdth" 100}
.rec p em{font-style:normal;color:var(--cyan)}

/* the standing caveat block — the most important texture on this site */
.note{
  margin-top:1.4rem;padding:.85rem 0 .1rem 1rem;
  border-left:2px solid var(--brass);
  color:var(--ice-dim);
  font-family:"Martian Mono",monospace;
  font-variation-settings:"wght" 400,"wdth" 90;
  font-size:.665rem;line-height:1.85;letter-spacing:.005em;
  max-width:64ch;
}
.note b{color:var(--brass);font-weight:400}

/* ---------- the two doors ---------- */
.doors{
  display:grid;grid-template-columns:1fr 1fr;gap:1px;
  margin-top:2.6rem;max-width:min(760px,100%);
  background:var(--rule);border:1px solid var(--rule);border-radius:4px;overflow:hidden;
}
.door{
  display:flex;flex-direction:column;gap:.4rem;
  padding:1.15rem 1.25rem 1.35rem;text-decoration:none;
  background:rgba(11,27,43,.86);
  border-top:2px solid var(--cyan);
  transition:background .2s,border-color .2s,transform .2s var(--ease);
}
.door.b{border-top-color:var(--brass)}
.door:hover{background:rgba(16,38,58,.96);transform:translateY(-2px)}
.door .k{color:var(--cyan);letter-spacing:.14em;font-size:.6rem}
.door.b .k{color:var(--brass)}
.door .t{
  font-variation-settings:"wght" 600,"wdth" 104;
  font-size:clamp(1.15rem,2.2vw,1.5rem);line-height:1.1;color:var(--ice);
}
.door .d{color:var(--ice-dim);font-size:.88rem;line-height:1.5}
@media (max-width:720px){.doors{grid-template-columns:1fr}}

/* ---------- headline figures ---------- */
.figs{display:grid;grid-template-columns:1fr 1fr;gap:1.6rem;margin-top:1.6rem;
  padding-top:1.2rem;border-top:1px solid var(--rule)}
.figs > div v{display:block;font-style:normal;
  font-variation-settings:"wght" 720,"wdth" 112;
  font-size:clamp(2.1rem,5.2vw,3.4rem);line-height:1;color:var(--brass);letter-spacing:-.01em}
.figs > div span{display:block;margin-top:.5rem;color:var(--ice-dim);font-size:.85rem;line-height:1.5}
@media (max-width:620px){.figs{grid-template-columns:1fr;gap:1.2rem}}

/* ---------- part markers ---------- */
.partmark{
  position:relative;z-index:10;
  padding:14svh var(--gutter) 6svh calc(var(--gutter) + var(--rail));
  width:min(calc(var(--col) + 8rem),100%);
}
@media (max-width:1180px){.partmark{padding-left:var(--gutter)}}
.partmark p:first-child{
  color:var(--brass);letter-spacing:.16em;
  padding-bottom:.7rem;border-bottom:1px solid var(--brass);
}
.partmark p:last-child{
  margin-top:.9rem;max-width:44ch;color:var(--ice);
  font-variation-settings:"wght" 480,"wdth" 102;
  font-size:clamp(1.05rem,2vw,1.32rem);line-height:1.4;
}

/* ---------- data list ---------- */
.data{margin-top:1.5rem;border-top:1px solid var(--rule)}
.data > div{
  display:grid;grid-template-columns:6.5rem 1fr;gap:1rem;
  padding:.62rem 0;border-bottom:1px solid var(--rule-soft);
  align-items:baseline;
}
.data k{
  font-family:"Martian Mono",monospace;font-size:.6rem;
  color:var(--cyan);letter-spacing:.03em;
}
.data span{font-size:.92rem;color:var(--ice-dim)}
.data span var{font-style:normal;color:var(--ice);font-family:"Martian Mono",monospace;font-size:.82rem}
@media (max-width:560px){
  .data > div{grid-template-columns:1fr;gap:.15rem}
}

/* ---------- two-column ledger (stops / does not stop) ---------- */
.ledger{display:grid;grid-template-columns:1fr 1fr;gap:0;margin-top:1.5rem;border-top:1px solid var(--rule)}
.ledger > section{padding:.9rem 1.1rem .9rem 0}
.ledger > section + section{padding-left:1.1rem;border-left:1px solid var(--rule-soft)}
.ledger h3{
  font-family:"Martian Mono",monospace;font-size:.6rem;letter-spacing:.03em;
  margin-bottom:.7rem;color:var(--cyan);
}
.ledger section.no h3{color:var(--flare)}
.ledger li{list-style:none;font-size:.88rem;line-height:1.55;color:var(--ice-dim);
  padding:.34rem 0 .34rem .85rem;position:relative}
.ledger li::before{
  content:"";position:absolute;left:0;top:.72em;width:4px;height:1px;background:var(--cyan-dim);
}
.ledger section.no li::before{background:var(--flare)}
@media (max-width:720px){
  .ledger{grid-template-columns:1fr}
  .ledger > section + section{padding-left:0;border-left:0;border-top:1px solid var(--rule-soft)}
}

/* ---------- failure-mode list ---------- */
.modes{margin-top:1.4rem;border-top:1px solid var(--rule)}
.modes > div{padding:.62rem 0;border-bottom:1px solid var(--rule-soft)}
.modes t{
  display:block;font-variation-settings:"wght" 580,"wdth" 100;
  font-size:.95rem;color:var(--ice);margin-bottom:.15rem;
}
.modes p{font-size:.86rem;line-height:1.55;max-width:62ch}

/* ---------- uplink table ---------- */
.tbl{margin-top:1.5rem;width:100%;border-collapse:collapse;
  font-family:"Martian Mono",monospace;font-size:.63rem}
.tbl th,.tbl td{
  text-align:right;padding:.5rem .4rem;border-bottom:1px solid var(--rule-soft);
  font-variation-settings:"wght" 400,"wdth" 90;
}
.tbl th{color:var(--cyan);border-bottom-color:var(--rule);font-variation-settings:"wght" 500,"wdth" 90}
.tbl th:first-child,.tbl td:first-child{text-align:left;color:var(--ice-dim)}
.tbl td.bad{color:var(--flare)}
.tbl td.good{color:var(--brass)}

/* ---------- phases ---------- */
.phases{margin-top:1.4rem;border-top:1px solid var(--rule)}
.phases > div{display:grid;grid-template-columns:2.4rem 1fr;gap:1rem;
  padding:.85rem 0;border-bottom:1px solid var(--rule-soft)}
.phases n{
  font-family:"Martian Mono",monospace;font-size:.72rem;color:var(--brass);
  font-style:normal;padding-top:.15rem;
}
.phases t{display:block;font-variation-settings:"wght" 580,"wdth" 100;
  font-size:.95rem;color:var(--ice);margin-bottom:.15rem}
.phases p{font-size:.87rem;line-height:1.6}

/* ---------- clock strip ---------- */
.clock{display:flex;gap:2.2rem;margin-top:1.5rem;padding-top:1.1rem;border-top:1px solid var(--rule)}
.clock > div v{
  display:block;font-style:normal;
  font-variation-settings:"wght" 700,"wdth" 118;
  font-size:clamp(2rem,5vw,3rem);line-height:1;color:var(--brass);
  letter-spacing:.01em;
}
.clock > div span{
  display:block;margin-top:.35rem;font-family:"Martian Mono",monospace;
  font-size:.6rem;color:var(--ice-dim);letter-spacing:.02em;max-width:15ch;line-height:1.5;
}

/* ============================================================
   Hero
   ============================================================ */
#hero{
  min-height:100svh;display:flex;flex-direction:column;justify-content:center;
  padding:calc(var(--bar) + 4rem) var(--gutter) 6rem calc(var(--gutter) + var(--rail));
  position:relative;z-index:10;
}
@media (max-width:1180px){#hero{padding-left:var(--gutter)}}

#word{
  font-variation-settings:"wght" 780,"wdth" 116;
  font-size:clamp(3.1rem,11.5vw,9.2rem);
  line-height:.92;letter-spacing:.12em;color:var(--ice);
  display:flex;gap:0;user-select:none;margin-left:-.04em;
}
#word span{display:inline-block;will-change:transform,opacity}
#word span.hot{color:var(--brass)}

#lede{
  margin-top:1.6rem;max-width:24ch;
  font-variation-settings:"wght" 500,"wdth" 102;
  font-size:clamp(1.25rem,2.9vw,2rem);line-height:1.16;letter-spacing:-.015em;
  color:var(--ice);
}
#lede b{font-weight:400;color:var(--brass)}
#sub{margin-top:1.1rem;max-width:56ch;color:var(--ice-dim);font-size:1rem}
#cue{
  margin-top:2.6rem;display:inline-flex;align-items:center;gap:.6rem;
  color:var(--cyan-dim);text-decoration:none;
}
#cue i{
  font-style:normal;width:22px;height:22px;border:1px solid var(--rule);border-radius:50%;
  display:grid;place-items:center;font-size:.7rem;color:var(--cyan);
  animation:nudge 2.8s var(--ease) infinite;
}
@keyframes nudge{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(4px);opacity:1}}
@media (prefers-reduced-motion:reduce){#cue i{animation:none;opacity:1}}
#cue:hover{color:var(--ice)}

/* ============================================================
   Gate — the interactive moment in record 05
   ============================================================ */
.gate{margin-top:1.6rem;border:1px solid var(--rule);border-radius:4px;background:rgba(11,27,43,.92)}
.gate .ctl{display:flex;border-bottom:1px solid var(--rule)}
.gate button{
  flex:1;font:inherit;cursor:pointer;background:none;border:0;
  font-family:"Martian Mono",monospace;font-size:.63rem;letter-spacing:.02em;
  padding:.85rem .7rem;color:var(--ice-dim);
  transition:background .18s,color .18s;
}
.gate button + button{border-left:1px solid var(--rule)}
.gate button:hover{background:var(--hull2);color:var(--ice)}
.gate button[aria-pressed="true"]{color:var(--void);background:var(--cyan)}
.gate button.deny[aria-pressed="true"]{background:var(--flare)}
.gate .out{padding:1rem 1.1rem;display:flex;align-items:center;gap:1rem;min-height:86px}
.gate .stamp{
  font-variation-settings:"wght" 720,"wdth" 108;
  font-size:1.25rem;letter-spacing:.09em;line-height:1;
  border:2px solid currentColor;padding:.42rem .6rem;border-radius:3px;
  color:var(--brass);white-space:nowrap;
  transform:rotate(-3deg);
}
.gate .stamp.deny{color:var(--flare)}
.gate .why{font-family:"Martian Mono",monospace;font-size:.62rem;line-height:1.75;color:var(--ice-dim)}
.gate .why em{font-style:normal;color:var(--cyan)}

/* ============================================================
   Close
   ============================================================ */
#close{
  position:relative;z-index:10;min-height:88svh;
  display:flex;flex-direction:column;justify-content:center;
  padding:5rem var(--gutter) 6rem calc(var(--gutter) + var(--rail));
  border-top:1px solid var(--rule);
}
@media (max-width:1180px){#close{padding-left:var(--gutter)}}
#reveal{
  font-variation-settings:"wght" 780,"wdth" 116;
  font-size:clamp(2.4rem,9vw,7rem);letter-spacing:.12em;line-height:.95;
  color:var(--ice);display:flex;
}
#reveal span{display:inline-block;transition:transform .5s var(--ease),color .5s}
#reveal.flip span{color:var(--brass)}
#gloss{
  margin-top:1.1rem;min-height:1.6em;
  color:var(--cyan-dim);letter-spacing:.06em;
  opacity:0;transition:opacity .4s ease;
}
#gloss b{color:var(--brass);font-weight:400}
#close p.line{margin-top:1.3rem;max-width:52ch;color:var(--ice-dim);font-size:1.02rem}
.cta{
  display:inline-block;align-self:flex-start;margin-top:2rem;
  font-family:"Martian Mono",monospace;font-size:.7rem;letter-spacing:.04em;
  color:var(--void);background:var(--brass);
  padding:.85rem 1.4rem;border-radius:3px;text-decoration:none;
  transition:filter .18s,transform .18s;
}
.cta:hover{filter:brightness(1.1);transform:translateY(-1px)}
#colophon{
  margin-top:3rem;padding-top:1.1rem;border-top:1px solid var(--rule-soft);
  color:var(--cyan-dim);max-width:70ch;
}
#colophon a{color:var(--ice-dim)}
