@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url(fonts/instrument-serif-italic.woff2) format("woff2"); }
@font-face { font-family: "Inter Tight"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/inter-tight.woff2) format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400 500; font-display: swap; src: url(fonts/jetbrains-mono.woff2) format("woff2"); }

:root {
  --bg: #0a0a0a;
  --text: #f4f1ea;
  --muted: #8d8a83;
  --faint: #2a2926;
  --accent: #ff3b1f;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: #fff; }

/* Background: faint grid fading out from a red glow */
.stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  isolation: isolate;
}
.stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(var(--faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--faint) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 0%, transparent 75%);
          mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 0%, transparent 75%);
  opacity: 0.55;
}
.stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 70vmax;
  height: 70vmax;
  left: -20vmax;
  top: -25vmax;
  background: radial-gradient(circle, rgba(255, 59, 31, 0.22) 0%, rgba(255, 59, 31, 0) 60%);
  pointer-events: none;
}

/* Top bar */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px var(--gutter);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.mark { color: var(--text); font-weight: 500; }
.live { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 59, 31, 0.6);
  animation: pulse 1.8s ease-out infinite;
}
.live b { color: var(--text); font-weight: 500; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(255, 59, 31, 0.6); }
  70%  { box-shadow: 0 0 0 10px rgba(255, 59, 31, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 31, 0); }
}

/* Hero */
.hero {
  align-self: center;
  padding: 48px var(--gutter);
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.4rem, 17vw, 11.5rem);
  line-height: 0.88;
  letter-spacing: -0.035em;
  margin: 0;
}
.hero h1 em { font-style: italic; color: var(--accent); padding-right: 0.04em; }
.hero p {
  margin: clamp(24px, 4vw, 40px) 0 0;
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  color: var(--muted);
}

/* Day-progress strip */
.day {
  padding: 0 var(--gutter);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.day .labels { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.track { position: relative; height: 1px; background: var(--faint); }
.fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 1px;
  width: 0;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.fill::after {
  content: "";
  position: absolute;
  right: -3px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Footer */
.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 28px var(--gutter) 32px;
  font-size: 14px;
  color: var(--muted);
}
.foot a { transition: color 0.15s; }
.foot a:hover { color: var(--text); }
.foot .email { color: var(--text); border-bottom: 1px solid var(--accent); padding-bottom: 2px; }
.foot nav { display: flex; gap: 24px; }

/* Legal pages */
.doc {
  max-width: 68ch;
  padding: 32px var(--gutter) 80px;
}
.doc h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 24px 0 12px;
}
.doc .updated { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 40px; }
.doc h2 { font-size: 1.05rem; font-weight: 600; margin: 36px 0 8px; }
.doc p { margin: 0 0 14px; color: #cfccc4; }
.doc a { border-bottom: 1px solid var(--accent); }
.doc a:hover { color: var(--accent); }
.legal { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.legal .foot { border-top: 1px solid var(--faint); }

@media (max-width: 560px) {
  .bar .hide-sm { display: none; }
  .foot { flex-direction: column; align-items: flex-start; }
}

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