
/* =====================================================================
   Optrenex Code Engine — public site.

   The design system below is taken directly from optrenex.com so the two
   properties read as one company: the same near-black ground, the same
   cyan, the same Anton/JetBrains Mono pairing, and the same HUD framing.
   ===================================================================== */

:root {
  /* Ground and surfaces */
  --bg:         #020408;
  --bg2:        #04090f;
  --panel:      #06141c;
  --panel2:     #082330;

  /* Type */
  --ink:        #e9f1f6;
  --dim:        #8fa0ab;
  --line:       #e9f1f61a;

  /* Accent */
  --cyan:       #56cdec;
  --cyan-deep:  #1a92b4;
  --cyan-soft:  #56cdec24;

  /* Inverted "paper" sections */
  --paper:      #eef0ec;
  --paper2:     #e4e7e1;
  --paper-ink:  #0c1216;
  --paper-dim:  #5d6b73;
  --paper-line: #0c12161f;

  /* Rhythm */
  --sp:   clamp(20px, 4.2vw, 64px);
  --rad:  18px;

  --display: Anton, Impact, "Arial Narrow", sans-serif;
  --cond:    "Barlow Condensed", "Arial Narrow", sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sans:    Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* This site commits to one visual world — a dark instrument panel — so it
   does not follow the viewer's light/dark preference. Every colour is
   painted explicitly, so it holds on any host background. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.skip {
  position: fixed; left: -9999px; top: 0; z-index: 200;
  background: var(--cyan); color: #041018;
  padding: 12px 18px; font-family: var(--mono); font-size: 12px; font-weight: 600;
}
.skip:focus { left: 12px; top: 12px; }

.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 var(--sp); }

/* ---------------------------------------------------------------------
   The scene canvas. Fixed behind everything, driven by scroll.
   --------------------------------------------------------------------- */
#scene {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; pointer-events: none;
}

/* Everything above the canvas sits in its own stacking context. */
.layer { position: relative; z-index: 2; }

/* ---------------------------------------------------------------------
   HUD — the persistent instrument frame.
   --------------------------------------------------------------------- */
.hud {
  position: fixed; inset: 0; z-index: 5;
  pointer-events: none;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  color: var(--dim);
  text-transform: uppercase;
}
.hud > div { position: absolute; padding: 0 var(--sp); }
.hud-tl { top: 84px; left: 0; }
.hud-tr { top: 84px; right: 0; text-align: right; }
.hud-bl { bottom: 26px; left: 0; }
.hud-br { bottom: 26px; right: 0; text-align: right; }
.hud .live { color: var(--cyan); }
.hud b { font-weight: 400; color: var(--ink); }

@media (max-width: 900px) {
  .hud-bl, .hud-br { display: none; }
  .hud { font-size: 9.5px; }
}

/* ---------------------------------------------------------------------
   Header
   --------------------------------------------------------------------- */
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: 68px; display: flex; align-items: center;
  background: linear-gradient(to bottom, rgba(2,4,8,.92), rgba(2,4,8,0));
}
.head-inner { display: flex; align-items: center; gap: 30px; width: 100%; }

.logo { text-decoration: none; display: flex; align-items: baseline; gap: 9px; }
.logo-word {
  font-family: var(--mono); font-weight: 700; font-size: 17px;
  letter-spacing: .18em; color: var(--ink);
}
.logo-word i { font-style: normal; color: var(--cyan); }
.logo-tag {
  font-family: var(--mono); font-size: 9px; letter-spacing: .22em;
  color: var(--dim); text-transform: uppercase;
}

.head-nav { display: flex; gap: 26px; margin-left: auto; align-items: center; }
.head-nav a {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dim); text-decoration: none;
  transition: color .15s;
}
.head-nav a:hover { color: var(--ink); }
.head-nav a.on { color: var(--cyan); }

@media (max-width: 900px) {
  .head-nav a:not(.on) { display: none; }
}

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero {
  min-height: 100svh;
  display: grid; place-items: center;
  text-align: center;
  padding: 128px 0 96px;
}

.pill {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(6,20,28,.55); backdrop-filter: blur(8px);
  padding: 9px 20px; margin: 0 0 30px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--ink);
}
.pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 10px var(--cyan);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

h1 {
  font-family: var(--display);
  font-size: clamp(46px, 9.2vw, 132px);
  line-height: .92;
  letter-spacing: -.005em;
  text-transform: uppercase;
  margin: 0 0 26px;
  color: var(--ink);
  text-wrap: balance;
}
h1 .accent { color: var(--cyan); }
h1 .fade {
  background: linear-gradient(180deg, #ffffff 12%, #9db2bd 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.lede {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--dim);
  max-width: 62ch; margin: 0 auto 34px;
}

.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  padding: 14px 24px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: background .16s, border-color .16s, color .16s;
}
.btn-cyan { background: var(--cyan); color: #04141c; }
.btn-cyan:hover { background: #7ddcf5; }
.btn-line { border-color: var(--line); color: var(--ink); background: rgba(6,20,28,.4); }
.btn-line:hover { border-color: var(--cyan); color: var(--cyan); }

.scroll-cue {
  margin-top: 64px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--dim);
}
.scroll-cue::after {
  content: ""; display: block; width: 1px; height: 44px; margin: 14px auto 0;
  background: linear-gradient(to bottom, var(--cyan), transparent);
}

/* ---------------------------------------------------------------------
   The scroll scene: a tall spacer that drives the canvas phases.
   --------------------------------------------------------------------- */
.scene-act {
  min-height: 190svh;
  display: grid; align-items: center;
  text-align: center;
  padding: 0 0 20svh;
}
.scene-act .inner { position: sticky; top: 32svh; }

h2.mega {
  font-family: var(--display);
  font-size: clamp(34px, 6.6vw, 92px);
  line-height: .94; letter-spacing: -.005em; text-transform: uppercase;
  margin: 0 0 20px; text-wrap: balance;
}
h2.mega .l1 { color: #b9c8d1; display: block; }
h2.mega .l2 { color: var(--cyan); display: block; }

/* ---------------------------------------------------------------------
   Section furniture
   --------------------------------------------------------------------- */
section { padding: clamp(64px, 9vw, 132px) 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cyan); margin: 0 0 18px;
}
.eyebrow::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--cyan);
}

h2 {
  font-family: var(--display);
  font-size: clamp(30px, 4.6vw, 60px);
  line-height: 1.0; letter-spacing: -.005em; text-transform: uppercase;
  margin: 0 0 18px; text-wrap: balance;
}
h3 { font-family: var(--cond); font-weight: 600; letter-spacing: .01em; }

.section-lede { font-size: 17px; color: var(--dim); max-width: 62ch; margin: 0 0 48px; }

/* ---------------------------------------------------------------------
   Stat strip
   --------------------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.stat { padding: 30px 26px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-n {
  font-family: var(--display); font-size: clamp(34px, 4vw, 54px);
  line-height: 1; color: var(--ink); letter-spacing: -.01em;
}
.stat-n span { color: var(--cyan); }
.stat-l {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim); margin-top: 10px;
}

/* ---------------------------------------------------------------------
   Step cards
   --------------------------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1px; background: var(--line); }
.step { background: var(--bg); padding: 30px 26px; position: relative; }
.step-n {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  color: var(--cyan); margin: 0 0 16px;
}
.step h3 { font-size: 21px; margin: 0 0 10px; color: var(--ink); text-transform: uppercase; }
.step p { margin: 0; color: var(--dim); font-size: 14.5px; }

/* ---------------------------------------------------------------------
   Data tables
   --------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--rad); }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
caption {
  text-align: left; padding: 18px 22px 0;
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--cyan);
}
th {
  text-align: left; padding: 16px 22px 12px;
  font-family: var(--mono); font-size: 10px; font-weight: 400;
  letter-spacing: .14em; text-transform: uppercase; color: var(--dim);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
td { padding: 15px 22px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink); }
tbody tr:last-child td { border-bottom: 0; }
td.dim { color: var(--dim); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.acct { font-family: var(--mono); font-size: 12px; color: var(--cyan); }

/* ---------------------------------------------------------------------
   Inverted paper section, with the notch transition.
   --------------------------------------------------------------------- */
.paper {
  position: relative; z-index: 3;
  background: var(--paper); color: var(--paper-ink);
  border-radius: var(--rad) var(--rad) 0 0;
  margin-top: 10svh;
}
.paper::before {
  /* the small tab that sits above the fold, as on optrenex.com */
  content: ""; position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 240px; height: 24px; background: var(--paper);
  border-radius: var(--rad) var(--rad) 0 0;
}
.paper .eyebrow { color: var(--paper-dim); }
.paper .eyebrow::before { background: var(--cyan-deep); }
.paper h2 { color: var(--paper-ink); }
.paper .section-lede { color: var(--paper-dim); }

.marquee { overflow: hidden; padding: 8px 0; --gap: 56px; }
.marquee-row { display: flex; gap: var(--gap); width: max-content; }
.marquee-row span {
  font-family: var(--display); font-size: clamp(22px, 3vw, 38px);
  text-transform: uppercase; color: #b4bcb8; white-space: nowrap;
  display: flex; align-items: center; gap: var(--gap);
}
.marquee-row span::after {
  content: "·"; color: var(--cyan-deep); font-size: .6em;
}
.marquee-a { animation: slide-l 46s linear infinite; }
.marquee-b { animation: slide-r 54s linear infinite; }
@keyframes slide-l { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes slide-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }

.paper-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--paper-line); margin-top: 56px; }
.paper-card { background: var(--paper); padding: 28px 24px; }
.paper-card h3 { font-size: 19px; margin: 0 0 9px; text-transform: uppercase; color: var(--paper-ink); }
.paper-card p { margin: 0; color: var(--paper-dim); font-size: 14.5px; }
.paper-card .step-n { color: var(--cyan-deep); }

/* ---------------------------------------------------------------------
   FAQ
   --------------------------------------------------------------------- */
.faq-item { border-top: 1px solid var(--line); padding: 26px 0; }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 {
  font-size: 22px; margin: 0 0 10px; color: var(--ink);
  text-transform: uppercase; letter-spacing: .005em;
}
.faq-item p { margin: 0; color: var(--dim); font-size: 15.5px; max-width: 72ch; }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
footer {
  position: relative; z-index: 3;
  background: var(--bg2); border-top: 1px solid var(--line);
  padding: 64px 0 40px;
}
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 36px; }
.foot-h {
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--cyan); margin: 0 0 14px;
}
.foot-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.foot-list a, .foot-list li { color: var(--dim); text-decoration: none; font-size: 14px; }
.foot-list a:hover { color: var(--ink); }
.foot-legal {
  margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em;
  color: #5d6f7b; line-height: 1.8;
}

/* ---------------------------------------------------------------------
   Reveal on scroll — from a VISIBLE resting state, never opacity:0.
   --------------------------------------------------------------------- */
.rise { transform: translateY(14px); opacity: .001; transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .7s; }
.rise.in { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .rise { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------------
   Over the inverted paper section, the fixed chrome inverts with it.
   Without this the HUD and header are pale text on a pale ground —
   invisible for the whole length of that section.
   --------------------------------------------------------------------- */
body.on-paper .site-head {
  background: linear-gradient(to bottom, rgba(238,240,236,.94), rgba(238,240,236,0));
}
body.on-paper .logo-word { color: var(--paper-ink); }
body.on-paper .logo-tag,
body.on-paper .head-nav a { color: var(--paper-dim); }
body.on-paper .head-nav a:hover { color: var(--paper-ink); }
body.on-paper .head-nav a.on { color: var(--cyan-deep); }
body.on-paper .hud { color: var(--paper-dim); }
body.on-paper .hud .live { color: var(--cyan-deep); }
.site-head, .hud, .logo-word, .logo-tag, .head-nav a { transition: color .35s, background .35s; }

