/* linearascent.net — the terminal law (plan 003):
   ONE font, ONE size, everywhere. Hierarchy is done the ANSI way —
   caps, bright, dim, reverse video, borders — never a second font,
   never a second size. All art is 1-bit and rendered pixelated. */

@font-face {
  font-family: "VGA";
  src: url("/static/site/fonts/WebPlus_IBM_VGA_8x16.woff") format("woff");
  font-display: swap;
}

:root {
  --bg: #060606;
  --fg: #c8c8c8;
  --dim: #6f6f6f;
  --bright: #ffffff;
  --gold: #f2b632;
  --line: #3a3a3a;
  --paper: #101008;
}

* { box-sizing: border-box; margin: 0; padding: 0;
    font-family: inherit; font-size: inherit; font-weight: normal; }

html {
  font-family: "VGA", "Px437 IBM VGA8", "Courier New", monospace;
  font-size: 16px;
  line-height: 1.3;
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
  /* keep the bitmap face crisp — bright glyphs otherwise get
     antialiased into looking like a second, smoother font */
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: unset;
  font-smooth: never;
  text-rendering: optimizeSpeed;
}

body { overflow-x: hidden; }

/* CRT scanlines — texture, never in the way */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg, transparent 0 2px, rgba(0, 0, 0, .22) 2px 4px);
}

a { color: var(--gold); text-decoration: none; }
a:hover { background: var(--gold); color: var(--bg); }

.bright { color: var(--bright); }
.dim    { color: var(--dim); }
.gold   { color: var(--gold); }
.dim2   { color: var(--dim); }

/* ── the fixed eyebrow: the page's status line ─────────────────────── */
#bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; gap: 1ch;
  padding: 0 1ch;
  background: var(--gold); color: var(--bg);
  white-space: nowrap; overflow: hidden;
}
#bar-right { text-align: right; overflow: hidden; text-overflow: ellipsis;
             margin-left: auto; }
#bar-cta { color: var(--bg); font-weight: normal; text-decoration: none;
           flex-shrink: 0; }
#bar-cta:hover, #bar-cta:focus { background: var(--bg); color: var(--gold); }

main { max-width: 84ch; margin: 0 auto; padding: 2rem 1ch 0; }

section { padding: 2rem 0; }

/* ── the gate: full-fold title reel, CTA card bottom-right ─────────── */
#gate {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 480px;
  padding: 0;
  overflow: hidden;
  /* sit under the fixed gold bar, not under the fold */
  box-sizing: border-box;
}
.gate-bg {
  position: absolute; inset: 0; z-index: 0;
  background: var(--bg);
  overflow: hidden;
}
.gate-bg img,
.gate-bg img.px {
  /* beat the global img.px 640px cap. The hero gif is the stacked-tray
     tower drawing, 1-bit, clouds animated in the frames. The tower sits
     in the right third of the image itself, so no transform is needed —
     cover just crops vertically on wide screens. */
  display: block; width: 100%; height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 30%;
  image-rendering: pixelated;
}
/* signup card sits in the open left of the hero */
.gatecard {
  position: absolute;
  left: 2rem; bottom: 3.25rem;
  z-index: 2;
  margin: 0;
  max-width: min(44ch, calc(100vw - 3rem));
  max-height: calc(100dvh - 5.5rem);
  overflow: auto;
  background: rgba(9, 9, 9, .92);
  text-align: left;
}
.gatecard .tagline { color: var(--bright); margin-bottom: .5rem; }
.gatecard .free-line { margin-bottom: .25rem; }
.gatecard .live-line { margin: 1rem 0 0; }
.gatecard .options { justify-content: flex-start; margin-top: .75rem; }

.options { display: flex; flex-wrap: wrap; gap: 1ch; justify-content: center;
           margin-top: 1rem; }
.opt {
  display: inline-block; padding: 0 1ch;
  color: var(--gold); border: 1px solid var(--line);
  cursor: pointer; background: none; text-transform: uppercase;
}
.opt:hover, .opt.hot { background: var(--gold); color: var(--bg);
                       border-color: var(--gold); }
.opt.dim2 { color: var(--dim); }
.opt[hidden] { display: none; }
.gold-opt { border-color: var(--gold); }

/* ── the ticker — pinned to the fold's bottom edge ─────────────────── */
#ticker {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: none;
  background: rgba(6, 6, 6, .88);
  overflow: hidden; white-space: nowrap;
}
#ticker-inner { display: inline-block; padding-left: 100%;
                animation: tick 40s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }

@media (max-width: 52ch) {
  .gatecard {
    left: 1ch; right: 1ch; bottom: 2.75rem;
    max-width: none;
  }
  /* phones: cover crops the flanks; composition is baked into the gif */
}

/* ── scene cards ───────────────────────────────────────────────────── */
.card {
  border: 1px solid var(--line);
  outline: 1px solid #1c1c1c; outline-offset: 3px;
  padding: 1rem 2ch 1.25rem;
  margin: 0 auto 2.5rem;
  max-width: 72ch;
  background: #090909;
}
.card.wide { max-width: 84ch; }
.card .eyebrow {
  background: #2a2a2a; color: var(--fg);
  margin: -1rem -2ch 1rem; padding: 0 1ch;
  text-transform: uppercase;
}
.card h2 { color: var(--bright); text-transform: uppercase;
           margin-bottom: .75rem; }
.card p { margin-bottom: .75rem; }
.card img.px { display: block; margin: 0 auto 1rem; }

img.px { image-rendering: pixelated; width: min(640px, 100%); height: auto; }
.trio img.px, .floorcol img.px { width: auto; max-width: 100%; }

.closer { color: var(--bright); text-align: center; margin-top: 1rem; }

/* materialize: sections arrive in steps, not fades — fades are anti-1-bit */
.card, .floorcol figure { opacity: 1; }
.veil { opacity: 0; }
.on { animation: mat .45s steps(5) both; }
@keyframes mat { from { opacity: 0; } to { opacity: 1; } }

/* ── 006: the story plays itself — one card in place, dots on rail ── */
#lore.playing .card.off { display: none; }
#story-rail {
  max-width: 72ch; margin: 0 auto; padding: 0 1ch;
  text-align: center; color: var(--dim);
  overflow: hidden; white-space: nowrap;
}
#story-rail .raildot { display: inline-block; padding: 0 .5ch; }
#story-rail .raildot.live { color: var(--gold);
                            animation: blink 1s steps(1) infinite; }
#story-train {
  color: var(--dim); white-space: pre;
  animation: march 3.6s steps(24) infinite;
}
@keyframes march {
  from { transform: translateX(-40%); }
  to   { transform: translateX(40%); }
}

/* typewriter */
.t.untyped { visibility: hidden; }
.caret::after { content: "▮"; color: var(--gold);
                animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── one world: the wound bar ──────────────────────────────────────── */
.wound { border: 1px dashed var(--line); padding: .75rem 1ch;
         margin: 1rem 0; text-align: center; }
.meter { white-space: pre; overflow-x: auto; color: var(--gold); }

/* ── your climb ────────────────────────────────────────────────────── */
.trio { display: flex; gap: 2ch; justify-content: center; flex-wrap: wrap;
        align-items: flex-end; margin-top: 1rem; }
.trio figure { text-align: center; max-width: 24ch; }
.trio img { width: 100px; }
/* the sorcerer is a giant — two heads taller, wider; feet on the same
   ground line as the others (flex-end), head above their margin */
.trio figure.giant img { width: 140px; }
.trio figcaption { margin-top: .5rem; }

#demo-lines { min-height: 5.2rem; }
#demo-lines p { margin-bottom: 0; }
.demo-opts { justify-content: center; }

/* ── the floors — a vertical climb, no scroller (006) ──────────────── */
.floorcol { display: flex; flex-direction: column; align-items: center;
            gap: 2rem; padding: 0 1ch 1rem; }
.floorcol figure { width: 320px; max-width: 100%; text-align: center; }
.floorcol img { width: 320px; max-width: 100%; }
.floorcol figcaption { margin-top: .5rem; }

/* ── the society quad ──────────────────────────────────────────────── */
.quad { display: grid; grid-template-columns: repeat(auto-fit, minmax(30ch, 1fr));
        gap: 1rem; margin-top: 1rem; }
.mini { border: 1px solid var(--line); padding: .75rem 1ch; }
.mini .eyebrow { margin: -.75rem -1ch .5rem; }

/* ── the stone ─────────────────────────────────────────────────────── */
.stonecard { background: #0b0b10; }
.stonepre {
  white-space: pre-wrap; overflow-x: auto;
  border: 1px solid var(--line); padding: .75rem 1ch;
  color: var(--gold); background: #08080c;
  text-shadow: 0 0 6px rgba(242, 182, 50, .35);
  margin-bottom: .75rem;
}

/* ── the crier ─────────────────────────────────────────────────────── */
.papercard { background: var(--paper); }
.papercard .eyebrow { background: var(--fg); color: var(--bg); }
#crier-lines p { margin-bottom: .25rem; }
#crier-lines p::before { content: "· "; color: var(--dim); }

/* ── the door ──────────────────────────────────────────────────────── */
.doorcard { border-color: var(--gold); }
.doorcard .eyebrow { background: var(--gold); color: var(--bg); }
/* two doors, one card: the tab says which one the form is */
.dtabs { justify-content: flex-start; margin-top: 1rem; }
.dtab.on { background: var(--gold); color: var(--bg);
           border-color: var(--gold); }
#door-form { margin: 1rem 0 .75rem; }
#door-form label { display: block; margin-bottom: .75rem;
                   color: var(--bright); }
#door-form input {
  background: var(--bg); color: var(--gold);
  border: 1px solid var(--line); border-radius: 0;
  padding: 0 1ch; width: min(32ch, 100%);
  caret-color: var(--gold);
}
#door-form input:focus { outline: 1px solid var(--gold); }
#door-form .options { justify-content: flex-start; }
#door-note.err { color: var(--gold); }

/* 010: the Gmail door — the primary way in (sign up + sign in). A
   bracketless bordered row; the one flourish is the 4-ink 16×16 G glyph
   riding in front of the label. It is an <a>, so it works scripts-off. */
.gbtn {
  display: inline-flex; align-items: center; gap: 1ch;
  padding: .35rem 1.25ch; margin-top: 1rem;
  color: var(--bright); text-decoration: none;
  border: 1px solid var(--line); background: none; cursor: pointer;
  text-transform: uppercase; width: min(34ch, 100%);
  justify-content: center;
}
.gbtn:hover { border-color: var(--gold); }
.gbtn:hover .gname { color: var(--gold); }
.gicon-svg { width: 16px; height: 16px; display: inline-block;
  vertical-align: -3px; image-rendering: pixelated; }
/* the OR rail between the Gmail door and the returning-password sign-in */
.or { display: flex; align-items: center; gap: 1ch; color: var(--dim);
  margin: 1.1rem 0 .25rem; text-transform: uppercase; }
.or::before, .or::after { content: ""; flex: 1;
  border-top: 1px solid var(--line); }

footer { max-width: 84ch; margin: 0 auto; padding: 2rem 1ch 3rem;
         border-top: 1px solid var(--line); text-align: center; }
footer p { margin-bottom: .5rem; }

/* ── stillness for those who ask for it ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #ticker-inner { animation: none; padding-left: 0; }
  .on { animation: none; }
  .caret::after { animation: none; }
  #story-train, #story-rail .raildot.live { animation: none; }
}
