/* ==========================================================================
   Ostopian Interactive — site styles
   Brand: pale off-white on black (from the dragon logo and channel banner).
   Mood: low-res, dithered, signal-in-the-dark.
   ========================================================================== */

@font-face { font-family: "Inter Display"; src: url("../fonts/interdisplay-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-light.woff") format("woff"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-semibold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Anonymous Pro"; src: url("../fonts/anonymouspro-regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  --bg: #070708;
  --bg-2: #0c0c0e;
  --panel: #111113;
  --line: rgba(233, 229, 224, 0.09);
  --line-strong: rgba(233, 229, 224, 0.38);
  --text: #e9e5e0;          /* logo off-white */
  --muted: #a19d97;
  --signal: #e5574a;        /* the one warning lamp */
  --display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Anonymous Pro", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --max: 1120px;
  --header: 72px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 8px); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg, canvas { display: block; }
.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
::selection { background: var(--text); color: var(--bg); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--text); color: var(--bg); padding: 10px 16px; font-weight: 600; text-decoration: none;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* CRT scanlines over everything — CSS only, no images */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
}

/* ---------- header ---------- */
header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: linear-gradient(to bottom, rgba(7,7,8,.9), rgba(7,7,8,0));
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
header.scrolled { background: rgba(7,7,8,.9); backdrop-filter: blur(10px); border-bottom-color: var(--line); }
nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name b { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: .2em; }
.brand-name small { font-weight: 300; font-size: 8.5px; letter-spacing: .62em; margin-top: 5px; color: var(--muted); }
.nav-links { display: flex; gap: 30px; list-style: none; }
.nav-links a { text-decoration: none; font-size: 13px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; transition: color .2s; }
.nav-links a:hover { color: var(--text); }

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: grid; place-items: center; text-align: center; overflow: hidden;
  padding: calc(var(--header) + 40px) 0 110px;
  isolation: isolate;
}
#void {
  position: absolute; inset: 0; z-index: -3; width: 100%; height: 100%;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.hero-fog {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 50% at 50% 46%, transparent 0, rgba(7,7,8,.35) 55%, var(--bg) 100%),
    linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero-mark {
  position: absolute; left: 50%; top: 46%; translate: -50% -50%; z-index: -1;
  width: min(620px, 92vw); opacity: .07; pointer-events: none;
  animation: breathe 9s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .12; scale: 1.015; } }

.hero-logo { width: clamp(88px, 12vw, 132px); height: auto; margin: 0 auto 30px; filter: drop-shadow(0 0 28px rgba(233,229,224,.18)); }
.wordmark { display: inline-flex; flex-direction: column; align-items: stretch; }
.wordmark .w1 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(46px, 10.5vw, 132px); line-height: .9; letter-spacing: .1em; margin-right: -.1em;
}
.wordmark .rule { height: 1px; background: var(--line-strong); margin: clamp(14px, 2vw, 22px) 0; }
.wordmark .w2 {
  font-weight: 300; text-transform: uppercase; font-size: clamp(14px, 2.4vw, 30px);
  letter-spacing: .82em; margin-right: -.82em; line-height: 1; color: var(--text);
}
.hero .lede { max-width: 540px; margin: 40px auto 36px; color: var(--muted); font-size: 18px; }

.status-line {
  font-family: var(--mono); font-size: 14px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); display: inline-flex; align-items: center; gap: 10px; margin-top: 40px;
}
.lamp {
  width: 8px; height: 8px; background: var(--signal); flex: none;
  box-shadow: 0 0 10px var(--signal); animation: lamp 2.4s steps(1) infinite;
}
@keyframes lamp { 0%, 62% { opacity: 1; } 63%, 70% { opacity: .2; } 71%, 76% { opacity: 1; } 77%, 82% { opacity: .2; } 83% { opacity: 1; } }

.btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none;
  font-family: var(--body); font-weight: 600; font-size: 13px; letter-spacing: .18em; text-transform: uppercase;
  padding: 15px 26px; border: 1px solid var(--line-strong); border-radius: 0; cursor: pointer;
  transition: transform .2s, background .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn-primary:hover { background: #fff; transform: translateY(-2px); }
.btn-ghost { background: rgba(7,7,8,.5); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.scroll-cue {
  position: absolute; bottom: 30px; left: 50%; translate: -50% 0;
  font-family: var(--mono); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-cue i { width: 1px; height: 38px; background: linear-gradient(var(--text), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%, 100% { opacity: .25; transform: scaleY(.5); } 50% { opacity: .9; transform: scaleY(1); } }

/* ---------- sections ---------- */
section { padding: 130px 0; position: relative; }
.section-label {
  font-family: var(--mono); font-size: 14px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 12px;
}
.section-label::before { content: ""; width: 26px; height: 1px; background: var(--line-strong); }
.section-label.center { justify-content: center; }
.section-label.center::after { content: ""; width: 26px; height: 1px; background: var(--line-strong); }
h2 {
  font-family: var(--display); font-weight: 600; text-transform: uppercase;
  font-size: clamp(32px, 4.6vw, 54px); line-height: 1.04; letter-spacing: .04em; margin-bottom: 26px;
}

/* studio */
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; align-items: start; }
.about-grid p + p { margin-top: 18px; }
.pillars { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.pillar { background: var(--bg); padding: 28px; display: grid; grid-template-columns: 40px 1fr; gap: 16px; }
.pillar .num { font-family: var(--mono); color: var(--muted); font-size: 14px; padding-top: 2px; }
.pillar h3 { font-family: var(--display); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 17px; margin-bottom: 6px; }
.pillar p { color: var(--muted); font-size: 15px; }

/* project: incoming transmission */
.project { background: var(--bg-2); border-block: 1px solid var(--line); overflow: hidden; }
.tx {
  border: 1px solid var(--line); background: var(--panel);
  display: grid; grid-template-columns: 1.15fr 1fr; min-height: 440px;
}
.tx-screen { position: relative; background: #050506; border-right: 1px solid var(--line); overflow: hidden; min-height: 300px; }
#signal { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; }
.tx-screen::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,.75) 100%);
}
.tx-tag {
  position: absolute; z-index: 1; top: 18px; left: 18px; right: 18px;
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.tx-tag .live { color: var(--signal); display: inline-flex; align-items: center; gap: 8px; }
.tx-info { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; }
.tx-info h2 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 18px; }
.redacted { display: inline-block; background: var(--text); height: .78em; vertical-align: -.02em; }
.r-sm { width: 5.5ch; } .r-md { width: 7.5ch; } .r-lg { width: 9ch; }
.log { margin-top: 28px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 15px; }
.log div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.log dt { color: var(--muted); text-transform: uppercase; letter-spacing: .14em; font-size: 13px; }
.log dd { text-align: right; }
.log .on { display: inline-flex; align-items: center; gap: 8px; }

/* signup */
.signup { text-align: center; }
.signup h2 { margin-inline: auto; max-width: 760px; }
.signup .lede { max-width: 520px; margin: 0 auto 40px; color: var(--muted); }
.signup form { display: flex; max-width: 520px; margin: 0 auto; border: 1px solid var(--line-strong); background: var(--panel); }
.signup form:focus-within { border-color: var(--text); outline: 2px solid var(--text); outline-offset: 3px; }
.signup input {
  flex: 1; min-width: 0; background: transparent; border: 0; color: var(--text);
  font: inherit; font-size: 16px; padding: 18px 20px;
}
.signup input:focus { outline: none; } /* the form's outline above shows focus */
.signup input::placeholder { color: #807c77; }
.signup .btn { border: 0; }
.form-note { margin-top: 16px; font-size: 14px; color: var(--muted); min-height: 1.5em; }
.form-note.ok { color: var(--text); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* contact */
.contact { background: var(--bg-2); border-top: 1px solid var(--line); }
.contact .intro { max-width: 520px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 48px; }
.contact-card { background: var(--bg-2); padding: 34px 30px; text-decoration: none; display: flex; flex-direction: column; gap: 10px; transition: background .25s; }
.contact-card:hover { background: var(--panel); }
.contact-card .k { font-family: var(--mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.contact-card .v { font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
.contact-card .d { color: var(--muted); font-size: 14px; }
.contact-card .arrow { margin-top: auto; padding-top: 16px; color: var(--muted); transition: transform .25s, color .25s; }
.contact-card:hover .arrow { transform: translateX(6px); color: var(--text); }

footer { padding: 36px 0; border-top: 1px solid var(--line); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.foot .brand img { width: 24px; height: 24px; }
.to-top { text-decoration: none; }

/* reveal — only hides content when JS is running (html.js is set by boot.js) */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* 404 */
.notfound .lede { margin-top: 28px; }
.notfound .status-line { display: flex; justify-content: center; margin: 0 0 22px; }
.notfound .wordmark { display: flex; justify-content: center; }
.notfound .w1 { font-size: clamp(38px, 7vw, 84px); letter-spacing: .06em; margin-right: -.06em; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .about-grid, .tx { grid-template-columns: 1fr; gap: 48px; }
  .tx { gap: 0; }
  .tx-screen { border-right: 0; border-bottom: 1px solid var(--line); min-height: 260px; }
  .tx-info { padding: 34px 26px; }
  .contact-grid { grid-template-columns: 1fr; }
  section { padding: 96px 0; }
  .nav-links { gap: 18px; }
}
@media (max-width: 600px) {
  :root { --header: 64px; }
  .brand-name { display: none; }
  .nav-links { gap: 16px; }
  .nav-links a { font-size: 12px; letter-spacing: .1em; }
  .signup form { flex-direction: column; }
  .status-line { font-size: 12.5px; }
  .log dt { letter-spacing: .08em; }
}
@media (max-width: 360px) {
  nav.wrap { width: calc(100% - 32px); gap: 12px; }
  .nav-links { gap: 10px; }
  .nav-links a { font-size: 11px; letter-spacing: .02em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
