/* Infrared City homepage — Direction B, "ultra-minimal / type-led".
   Near-monochrome. No cards, no boxes, no shadows, no gradients, no borders
   except hairlines. One accent colour, used a handful of times. The sans+mono
   pairing is the identity; the thermal ramp appears only where it is data. */

:root {
  --brand: #088A91;        /* the one accent — interactive teal */
  --brand-lift: #4AA8B4;   /* same hue, lifted for dark grounds */

  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", "Geist", -apple-system, sans-serif;
  --body: "Geist", -apple-system, "Segoe UI", Roboto, sans-serif;
  --maxw: 1080px;
  --measure: 640px;        /* line length the whole page is set to */
}

/* ---------- DARK (default) ---------- */
:root, :root[data-theme="dark"] {
  --ink-0: #0A0F12;        /* near-black deep petrol */
  --ink-1: #0E151A;
  --line: #26333B;         /* hairline — visible in daylight, not a whisper */
  --line-soft: #1B262D;
  --text: #EDF2F0;
  --muted: #8CA0A8;
  --scrim: rgba(10,15,18,.72);
}
/* ---------- LIGHT (second-class, kept honest) ---------- */
:root[data-theme="light"] {
  --ink-0: #F4F6F5;
  --ink-1: #FFFFFF;
  --line: rgba(14,30,38,.28);
  --line-soft: rgba(14,30,38,.14);
  --text: #0C181E;
  --muted: #4E6470;
  --scrim: rgba(244,246,245,.78);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--ink-0); color: var(--text);
  font-family: var(--body); font-size: 17px; line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }

/* ONE technical-label spec. */
.lbl, .eyebrow, .tab, .city-pill, .speeds .l, .exp-label, .exp-note,
.hero-card .sub, .hero-furniture .cap, #pauseBtn, .exp-time,
.entry-tab, .stamp, .table-note, .rail-u, .rail-v, .cta-note, .live-hint,
#icpBtn, #themeBtn, #navBtn, .sub-pill, .price-line {
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow { color: var(--muted); margin: 0 0 20px; letter-spacing: .22em; }

h1, h2, h3 { font-family: var(--sans); font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; margin: 0 0 22px; }
h3 { font-size: 19px; margin: 0 0 8px; letter-spacing: -.01em; }
p { max-width: var(--measure); }
.muted { color: var(--muted); }
.lede { font-size: clamp(17px, 1.9vw, 20px); line-height: 1.62; margin: 0 0 40px; color: var(--muted); }
.lede strong { color: var(--text); font-weight: 600; }

/* ---------- buttons ---------- */
.btn {
  background: transparent;
  display: inline-flex; align-items: center; gap: 9px; cursor: pointer;
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 14px 24px; border-radius: 999px; text-decoration: none;
  border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:focus-visible { outline: 2px solid var(--brand-lift); outline-offset: 3px; }
.btn-pri { background: var(--brand); color: #fff; }
.btn-pri:hover { background: var(--brand-lift); }
.btn-sec { border: none; padding-left: 8px; padding-right: 8px; color: var(--brand-lift); }
.btn-sec::after { content: " →"; }
.btn-sec:hover { color: var(--text); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- nav ---------- */
nav.top {
  position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center;
  gap: 20px; padding: 14px 32px;
  background: var(--scrim); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
nav.top .logo { height: 20px; }
nav.top .links { display: flex; gap: 22px; margin-left: auto; font-size: 14.5px; }
nav.top .links a { color: var(--muted); text-decoration: none; }
nav.top .links a:hover { color: var(--text); }
nav.top .btn { padding: 10px 18px; }
nav.top a.btn-pri { color: #fff; }
#themeBtn, #icpBtn, #navBtn {
  cursor: pointer; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: 9px 14px;
}
#icpBtn b { color: var(--brand-lift); font-weight: 600; margin-left: .4em; }
#themeBtn:hover, #icpBtn:hover, #navBtn:hover { color: var(--brand-lift); border-color: var(--brand-lift); }
#navBtn { display: none; }
@media (max-width: 900px) { nav.top .links { display: none; } }

/* persona menu — a plain list under the button, not a floating card */
.icp-menu {
  position: fixed; z-index: 45; top: 58px; right: 32px;
  background: var(--ink-1); border: 1px solid var(--line);
  display: flex; flex-direction: column; min-width: 240px;
}
.icp-menu button {
  background: none; border: none; border-bottom: 1px solid var(--line-soft);
  color: var(--text); text-align: left; padding: 13px 16px; font-size: 14.5px;
  font-family: var(--body); cursor: pointer; min-height: 44px;
}
.icp-menu button:last-child { border-bottom: none; }
.icp-menu button:hover { color: var(--brand-lift); }
.icp-menu button[aria-selected="true"] { color: var(--brand-lift); }

/* mobile nav sheet */
.nav-sheet { position: fixed; z-index: 39; inset: 0 0 auto 0; display: flex;
  flex-direction: column; padding: 62px 20px 16px;
  background: var(--ink-1); border-bottom: 1px solid var(--line-soft); }
.nav-sheet a { padding: 14px 4px; min-height: 44px; color: var(--text);
  text-decoration: none; border-bottom: 1px solid var(--line-soft); font-size: 16px; }
.nav-sheet a:last-child { border-bottom: none; }
.sheet-personas { margin-top: 14px; border-top: 1px solid var(--line-soft); padding-top: 12px;
  display: flex; flex-direction: column; }
.sheet-personas .lbl { color: var(--muted); margin: 0 4px 8px; }
.sheet-personas button { background: none; border: none; border-bottom: 1px solid var(--line-soft);
  color: var(--text); text-align: left; padding: 13px 4px; min-height: 44px;
  font-size: 15px; font-family: var(--body); cursor: pointer; }
.sheet-personas button[aria-selected="true"] { color: var(--brand-lift); }
@media (min-width: 901px) { .nav-sheet { display: none !important; } }
@media (max-width: 900px) {
  #navBtn { display: inline-flex; align-items: center; }
  nav.top { gap: 8px; padding: 12px 16px 12px 24px; }
  nav.top .btn-pri { display: none; }
  nav.top .logo { height: 18px; }
  #icpBtn, #themeBtn { padding: 8px 10px; letter-spacing: .08em; }
  #navBtn { margin-left: auto; }
}

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; min-height: 600px; overflow: hidden; }
#stage, #stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 26%; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--ink-0));
}
/* The hero card is the one place type sits on the film: a scrim, not a panel. */
.hero-card {
  position: absolute; left: 5vw; top: 50%; transform: translateY(-50%); z-index: 10;
  width: min(48vw, 640px);
}
.hero-card h1 { font-size: clamp(30px, 3.6vw, 56px); line-height: 1.05;
  letter-spacing: -.025em; margin: 0 0 18px; color: #F4FAF9;
  text-shadow: 0 1px 14px rgba(4,12,16,.55); }
.hero-card .sub { color: #B7C6CB; margin: 0 0 30px; text-shadow: 0 1px 10px rgba(4,12,16,.6); }
.hero-card .sub b { color: #7FE3DA; font-weight: 600; }
.cycle-word { display: inline-block; text-align: left; position: relative;
  transition: opacity .28s ease, transform .28s ease; }
.cycle-word[data-out="true"] { opacity: 0; transform: translateY(-.35em); }
@media (prefers-reduced-motion: reduce) { .cycle-word { transition: none; } }
.hero-furniture {
  position: absolute; left: 5vw; bottom: 40px; z-index: 10;
}
.hero-furniture .cap { color: var(--text); transition: opacity .3s ease; }
.legend { display: flex; align-items: center; gap: 10px; margin-top: 10px;
  font-family: var(--mono); font-size: 12px; color: var(--muted); }
.legend .ramp { width: 170px; height: 6px; background: #333; }
#pauseBtn {
  position: absolute; right: 28px; bottom: 40px; z-index: 12; cursor: pointer;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 16px;
}
#pauseBtn:hover { color: var(--brand-lift); border-color: var(--brand-lift); }

/* ---------- intro / loading gate ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 24px; background: #07131A; overflow-y: auto;
  transition: opacity .5s ease;
}
.intro[data-go="true"] { opacity: 0; pointer-events: none; }
.intro-card { width: min(680px, 100%); color: #E8F1F0; }
.intro-card img { height: 22px; margin-bottom: 28px; }
.intro-card h2 { color: #F4FAF9; font-size: clamp(24px, 3vw, 32px); margin: 0 0 14px; }
.intro-lede { color: #9FB6BC; font-size: 16.5px; margin: 0 0 24px; max-width: none; }
.intro-list { list-style: none; margin: 0 0 32px; padding: 0;
  border-top: 1px solid rgba(180,232,226,.16); }
.intro-list li { padding: 13px 0; border-bottom: 1px solid rgba(180,232,226,.16);
  font-size: 14.5px; line-height: 1.55; color: #9FB6BC; }
.intro-list b { color: #E8F1F0; font-weight: 600; }
.intro-list i { color: #E8F1F0; font-style: normal; }
.intro-list code { font-family: var(--mono); font-size: 12.5px; color: #7FE3DA; }
#introGo[disabled] { opacity: .55; cursor: progress; }
.intro { height: 100dvh; }
.intro-card { max-height: calc(100dvh - 36px); overflow-y: auto; }
html.intro-open, html.intro-open body { overflow: hidden; }

/* ---------- gimmick 2 · the transect rail ---------- */
.rail {
  position: fixed; top: 0; bottom: 0; left: 18px; width: 56px; z-index: 30;
  pointer-events: none; display: none;
}
.rail.on { display: block; }
/* In the flow at last — the top of the page is the start of the transect. */
.rail.at-end { display: none; }
#railSvg { position: absolute; inset: 0; width: 100%; height: 100%; }
.rail-chip {
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: row; align-items: baseline; gap: 6px;
  white-space: nowrap;
}
.rail-v { color: var(--text); font-weight: 600; letter-spacing: .04em; }
.rail-u { color: var(--muted); font-size: 12px; }
.rail-base { stroke: var(--line); stroke-width: 1; }
.rail-line { stroke: var(--brand-lift); stroke-width: 1.25; }
.rail-dot { fill: var(--brand-lift); }
@media (max-width: 900px) {
  .rail { left: 3px; width: 16px; }
  .rail-chip { display: none; }
}

/* iOS: svh is the height that is always visible. */
@supports (height: 100svh) { .hero { height: 100svh; } }
nav.top { padding-top: max(14px, env(safe-area-inset-top)); }

@media (max-width: 900px) {
  .hero-card { left: 0; right: 0; width: auto; margin: 0 20px; }
  .hero-card h1 { font-size: clamp(28px, 8vw, 36px); }
  .hero-furniture { left: 20px; right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); }
  .legend .ramp { width: 110px; }
  #pauseBtn { right: 16px; top: 84px; bottom: auto; }
  .hero-card .sub { letter-spacing: .12em; line-height: 1.7; }
  .cycle-word { min-width: 0 !important; }
  .icp-menu { right: 12px; left: 12px; top: 56px; }
}

/* The transect rail is a 16 px instrument on the left edge; the fixed nav
   slides right to clear it so the profile never runs under the buttons. */
@media (max-width: 900px) {
  nav.top { left: 16px; right: -16px; }
}
