/* ============================================================
   Infrared City — homepage, direction C "two states"
   Dark petrol ground · one teal accent · sans + mono pairing.
   Data ramps appear ONLY where data is shown. Dark-only: a light
   theme is out of scope for this direction.
   ============================================================ */

:root {
  --ink0: #05100e;            /* page ground — near-black deep petrol */
  --ink1: #081a17;            /* panel */
  --ink2: #0c2320;            /* raised surface */
  --ink3: #12302b;            /* highest surface / hover */
  --line: rgba(140, 224, 200, .14);
  --line-strong: rgba(140, 224, 200, .30);
  --text: #e9f6f0;
  --muted: #8fada4;
  --faint: #62807a;
  --teal: #3adcc0;
  --teal-ink: #04211b;        /* text on teal fills */
  --teal-dim: rgba(58, 220, 192, .12);
  --sans: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --r: 10px;
  --shadow: 0 14px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.intro-open, html.intro-open body { overflow: hidden; }
body {
  margin: 0;
  background: var(--ink0);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.08; font-weight: 600; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(27px, 3.6vw, 44px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
a { color: inherit; }
::selection { background: var(--teal); color: var(--teal-ink); }

.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

/* ---------- shared vocabulary ---------- */
.mono, .eyebrow, .lbl {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.eyebrow { color: var(--teal); display: block; margin-bottom: 18px; font-weight: 500; }
.lbl { color: var(--muted); }
.lede { font-size: clamp(16px, 1.6vw, 19px); color: var(--muted); max-width: 38em; }
.fine { font-size: 13.5px; color: var(--faint); max-width: 60em; }
.muted { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono); font-size: 12.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  padding: 14px 22px; border-radius: 8px; border: 1px solid transparent;
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn-pri {
  background: var(--teal); color: var(--teal-ink);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), 0 6px 18px rgba(58, 220, 192, .18);
}
.btn-pri:hover { background: #5ce7cf; }
.btn-pri:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25); }
.btn-sec { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-sec:hover { border-color: var(--teal); color: var(--teal); }
.btn-sec:active { transform: translateY(2px); }
.btn-sm { padding: 10px 16px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.cta-row .btn[hidden] { display: none; }

.stamp {
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--muted);
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}

.ramp { display: inline-block; height: 8px; flex: 1; border-radius: 2px; }

/* ---------- intro gate ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 20px; background: var(--ink0); overflow-y: auto;
  transition: opacity .45s ease;
}
.intro[data-go] { opacity: 0; pointer-events: none; }
.intro-card {
  width: min(620px, 100%); background: var(--ink1);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 34px 36px 30px; box-shadow: var(--shadow);
}
.intro-card img { height: 26px; margin-bottom: 24px; }
.intro-card h2 { font-size: 24px; }
.intro-lede { color: var(--muted); }
.intro-list { list-style: none; margin: 18px 0 24px; padding: 0; display: grid; gap: 12px; }
.intro-list li { font-size: 13.5px; line-height: 1.5; color: var(--muted);
  padding-left: 14px; border-left: 2px solid var(--line); }
.intro-list b { color: var(--text); display: block; font-weight: 600; }
@media (max-width: 560px) { .intro-card { padding: 26px 22px; } }

/* ---------- persona fab ---------- */
.persona-fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
.fab-btn {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text); background: var(--ink2); border: 1px solid var(--line-strong);
  border-radius: 999px; padding: 11px 18px; cursor: pointer;
  box-shadow: var(--shadow);
}
.fab-btn b { color: var(--teal); margin-left: 6px; font-weight: 600; }
.fab-menu {
  position: absolute; right: 0; bottom: calc(100% + 10px); width: min(320px, 84vw);
  background: var(--ink2); border: 1px solid var(--line-strong); border-radius: var(--r);
  padding: 12px; box-shadow: var(--shadow); display: grid; gap: 4px;
}
.fab-hint { font-size: 12px; line-height: 1.5; color: var(--faint); margin: 2px 4px 10px; }
.fab-hint code { font-family: var(--mono); }
.fab-menu [role="option"] {
  text-align: left; font: 500 14px/1.3 var(--sans); color: var(--text);
  background: transparent; border: 0; border-radius: 7px; padding: 10px 12px; cursor: pointer;
}
.fab-menu [role="option"]:hover { background: var(--ink3); }
.fab-menu [aria-selected="true"] { background: var(--teal-dim); color: var(--teal); }

/* ---------- nav ---------- */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 14px 22px;
  background: linear-gradient(to bottom, rgba(5, 16, 14, .92), rgba(5, 16, 14, .75));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo-link { display: flex; }
.logo { height: 22px; width: auto; }
.links { margin-left: auto; display: flex; gap: 22px; font-size: 14.5px; }
.links a { color: var(--muted); text-decoration: none; }
.links a:hover { color: var(--teal); }
#navBtn {
  display: none; font-family: var(--mono); font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text); background: transparent;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 9px 14px; cursor: pointer;
}
.nav-sheet {
  position: fixed; top: 57px; left: 0; right: 0; z-index: 49;
  background: var(--ink1); border-bottom: 1px solid var(--line);
  padding: 10px 22px 18px; display: grid; gap: 2px;
}
.nav-sheet a { text-decoration: none; padding: 12px 4px; border-bottom: 1px solid var(--line);
  font-size: 16px; }
.nav-sheet[hidden] { display: none; }
.nav-sheet a:last-of-type { border-bottom: 0; }
.sheet-personas { margin-top: 12px; display: grid; gap: 6px; }
.sheet-personas .lbl { display: block; margin-bottom: 4px; }
.sheet-personas button {
  text-align: left; font: 500 14px var(--sans); color: var(--muted); background: transparent;
  border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; cursor: pointer;
}
.sheet-personas button[aria-selected="true"] { border-color: var(--teal); color: var(--teal); }
@media (max-width: 900px) {
  nav.top .links { display: none; }
  nav.top .btn-sm { margin-left: auto; }
  #navBtn { display: inline-block; }
  .persona-fab { display: none; }   /* lives in the sheet instead */
}
@media (min-width: 901px) { .nav-sheet { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; height: max(92svh, 560px); overflow: hidden; }
#stage { position: absolute; inset: 0; }
#stage canvas { display: block; width: 100%; height: 100%; }
.hero::after {   /* legibility scrim under the card, never over the whole frame */
  content: ''; position: absolute; inset: auto 0 0 0; height: 46%;
  background: linear-gradient(to bottom, transparent, rgba(5, 16, 14, .88));
  pointer-events: none;
}
.hero-card {
  position: absolute; left: 22px; bottom: 108px; z-index: 2; max-width: 720px;
}
.hero-logo { display: none; }
.hero-card h1 { font-size: clamp(31px, 4.6vw, 62px); font-weight: 700; margin-bottom: 14px; }
.hero-card .sub { color: var(--muted); font-size: clamp(15px, 1.7vw, 19px); margin-bottom: 26px; }
.cycle-word { color: var(--teal); font-weight: 600; display: inline-block;
  transition: opacity .3s ease; min-width: 1ch; }
.cycle-word[data-out="true"] { opacity: 0; }

.hero-furniture {
  position: absolute; left: 22px; right: 22px; bottom: 20px; z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 18px;
  font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--muted);
}
.hf-left { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hf-state { color: var(--teal); letter-spacing: .13em; }
.cap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: opacity .42s ease; }
.legend { display: flex; align-items: center; gap: 8px; width: min(240px, 32vw); flex-shrink: 0; }
#pauseBtn {
  position: absolute; right: 22px; top: 76px; z-index: 3;
  font-family: var(--mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: rgba(5, 16, 14, .55); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
#pauseBtn:hover { color: var(--teal); border-color: var(--teal); }
@media (max-width: 700px) {
  .hero { height: max(88svh, 520px); }
  .hero-card { left: 18px; right: 18px; bottom: 96px; }
  .hero-furniture { left: 18px; right: 18px; flex-wrap: wrap; gap: 10px; }
  .legend { width: 100%; order: 3; }
  .hf-state { display: none; }   /* one idea per screen: the caption wins on a phone */
}

/* ---------- trust strip ---------- */
.trust-strip { border-block: 1px solid var(--line); background: var(--ink1); }
.trust-strip .wrap {
  display: flex; flex-wrap: wrap; gap: 14px 40px; justify-content: space-between;
  padding: 20px 0; font-size: 14px; color: var(--muted);
}
.trust-strip b { color: var(--text); font-weight: 600; margin-right: 6px;
  font-family: var(--mono); font-size: 15px; }
.trust-strip .cities-live b { color: var(--teal); }
@media (max-width: 800px) {
  .trust-strip .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
}
