:root {
  --bg:        #0a0907;
  --bg-warm:   #15110b;
  --bone:      #e8dcc4;
  --bone-dim:  #b5a988;
  --amber:     #c89556;
  --copper:    #9c6a36;
  --muted:     #6b5d45;
  --faint:     #3a3326;
  --line:      rgba(232, 220, 196, 0.12);
  --line-warm: rgba(200, 149, 86, 0.22);

  --bg-image:  url("assets/ruins-citadel.jpg");
  --bg-bright: 0.45;
  --bg-opacity: 0.75;

  --grain-opacity: 0.10;
  --scan-opacity:  0.06;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--bone);
  font-family: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  overflow: hidden;
}

/* ── Stage ──────────────────────────────────────────────────────── */
.stage {
  position: fixed; inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  isolation: isolate;
}

/* Background photograph, dimmed + sepia-warmed */
.bg-image {
  position: absolute; inset: 0; z-index: 0;
  background: var(--bg-image) center / cover no-repeat;
  filter: grayscale(0.35) brightness(var(--bg-bright)) sepia(0.45) contrast(1.05);
  opacity: var(--bg-opacity);
  transform: scale(1.02);
}
.bg-image::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 75% at 50% 55%, transparent 0%, rgba(10,9,7,0.55) 55%, rgba(10,9,7,0.96) 100%),
    linear-gradient(180deg, rgba(10,9,7,0.85) 0%, rgba(10,9,7,0.35) 22%, transparent 45%, transparent 65%, rgba(10,9,7,0.9) 100%);
}

/* Film grain */
.grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.91  0 0 0 0 0.86  0 0 0 0 0.77  0 0 0 0.7 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 240px 240px;
}

/* Scanlines */
.scan {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  opacity: var(--scan-opacity);
  background-image: repeating-linear-gradient(
    0deg,
    rgba(232,220,196,0.6) 0px,
    rgba(232,220,196,0.6) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

/* Crop marks */
.crop {
  position: absolute; z-index: 3; pointer-events: none;
  width: 22px; height: 22px;
  border: 1px solid var(--line-warm);
}
.crop.tl { top: 22px; left: 22px; border-right: 0; border-bottom: 0; }
.crop.tr { top: 22px; right: 22px; border-left: 0; border-bottom: 0; }
.crop.bl { bottom: 22px; left: 22px; border-right: 0; border-top: 0; }
.crop.br { bottom: 22px; right: 22px; border-left: 0; border-top: 0; }

/* ── Status bars ─────────────────────────────────────────────────── */
.stage > .row { position: relative; z-index: 4; }

.topbar {
  padding: 28px 44px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bone-dim);
}
.topbar .left  { justify-self: start; display: flex; align-items: center; gap: 12px; }
.topbar .mid   { justify-self: center; color: var(--muted); }
.topbar .right { justify-self: end;   display: flex; align-items: center; gap: 16px; }
.topbar .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(200,149,86,0.6);
  animation: pulse 3.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
.topbar .sep { color: var(--faint); }

.glyph {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--bone);
}
.glyph svg { display: block; }

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  padding: 24px;
}

.ornament {
  position: absolute;
  top: 50%; left: 50%;
  width: clamp(560px, 78vmin, 940px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  opacity: 0.55;
  pointer-events: none;
  mix-blend-mode: screen;
}
.ornament svg { width: 100%; height: 100%; display: block; }
.ornament .ring      { fill: none; stroke: var(--bone-dim); stroke-width: 0.6; }
.ornament .ring-warm { stroke: var(--amber); }
.ornament .tick      { stroke: var(--bone-dim); stroke-width: 0.6; }
.ornament .glyph-text{ fill: var(--bone-dim); font-family: 'IBM Plex Mono', monospace; font-size: 4.5px; letter-spacing: 0.2em; }

.hero-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 880px;
  width: 100%;
  text-align: center;
}

.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 14px;
}
.eyebrow::before, .eyebrow::after {
  content: ""; height: 1px; width: 32px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
}

.wordmark {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 300;
  font-size: clamp(54px, 11vw, 148px);
  line-height: 0.92;
  letter-spacing: 0.04em;
  color: var(--bone);
  margin: 0;
  text-shadow: 0 0 60px rgba(200,149,86,0.12);
  position: relative;
}
.wordmark .char { display: inline-block; position: relative; }
.wordmark .char:nth-child(3) { opacity: 0.92; }
.wordmark .char:nth-child(7) { opacity: 0.86; }

.tagline {
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--bone);
  max-width: 620px;
  margin: 0;
  line-height: 1.55;
  text-wrap: balance;
}
.tagline em {
  font-style: normal;
  color: var(--amber);
}

/* ── Bottom bar ────────────────────────────────────────────────── */
.botbar {
  padding: 0 44px 28px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: end;
  gap: 24px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.botbar .left  { justify-self: start; }
.botbar .mid   { justify-self: center; display: flex; gap: 10px; align-items: center; }
.botbar .right { justify-self: end;    text-align: right; }
.botbar .mid .ref { color: var(--bone-dim); }

.ledger { display: inline-flex; gap: 12px; align-items: center; }
.ledger .item {
  display: inline-flex; gap: 6px; align-items: center;
  color: var(--bone-dim);
}
.ledger .item .num { color: var(--muted); }
.ledger .item.idle .pip {
  width: 7px; height: 7px;
  border: 1px solid var(--muted);
  border-radius: 50%;
}
.ledger .item.live .pip {
  width: 7px; height: 7px;
  background: var(--amber);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(200,149,86,0.55);
}
.ledger .sep { color: var(--faint); }

.clock {
  font-variant-numeric: tabular-nums;
  color: var(--bone-dim);
}

@media (max-height: 640px) {
  .topbar, .botbar { padding-left: 24px; padding-right: 24px; }
  .crop { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .topbar .dot { animation: none; }
}
