:root {
  --bg: #050507;
  --bg-2: #0c0b10;
  --fg: #f2eee9;
  --fg-2: #cfc9c3;
  --muted: #8f8a96;
  --dim: #4b4852;
  --red: #ff2a3d;
  --red-rgb: 255, 42, 61;
  --amber: #ffb45a;
  --cyan: #5fe3ff;
  --line: rgba(242, 238, 233, .1);
  --glass: rgba(12, 11, 16, .62);

  --f-display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --f-name: "Anton", "Oswald", Impact, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --hud-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  /* Driven every frame from js/main.js */
  --bass: 0;
  --mid: 0;
  --high: 0;
  --beat: 0;

  color-scheme: dark;
}

body.is-mono {
  --red: #f2eee9;
  --red-rgb: 242, 238, 233;
  --amber: #bdb8b2;
  --cyan: #8f8a96;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 72px;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 400 16px/1.6 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .6s;
}

body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
kbd { font: inherit; padding: 1px 6px; border: 1px solid var(--line); border-radius: 4px; }

::selection { background: var(--red); color: #000; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.mono {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.accent { color: var(--red); transition: color .6s; }

.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 10px rgba(var(--red-rgb), .8);
  vertical-align: middle;
  margin-right: 6px;
  animation: blink 1.6s steps(2, jump-none) infinite;
}
.dot--beat {
  animation: none;
  transform: scale(calc(.7 + var(--beat) * .9));
  opacity: calc(.45 + var(--beat) * .55);
}
@keyframes blink { 50% { opacity: .25; } }

main { position: relative; z-index: 2; }

.section {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(88px, 14vh, 168px) var(--gutter);
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  padding-bottom: 20px;
  margin-bottom: clamp(32px, 6vw, 64px);
  border-bottom: 1px solid var(--line);
}

.section__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(48px, 9vw, 132px);
  line-height: .9;
  text-transform: uppercase;
  letter-spacing: -.005em;
}

.section__note { color: var(--muted); text-align: right; line-height: 1.5; font-size: 15px; max-width: 34ch; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid rgba(242, 238, 233, .28);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  background: rgba(5, 5, 7, .6);
  position: relative;
  transition: background-color .3s, border-color .3s, color .3s;
}
.btn:hover { border-color: var(--fg); }
.btn--solid {
  background: var(--red);
  border-color: var(--red);
  color: #0a0000;
}
/* glow lives on its own layer: only opacity changes per beat, nothing repaints */
.btn--solid::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 44px 4px rgba(var(--red-rgb), .75);
  opacity: calc(.25 + var(--beat) * .75);
  pointer-events: none;
  will-change: opacity;
}
.btn--solid:hover { background: var(--fg); border-color: var(--fg); }

@media (max-width: 720px) {
  .section__head { flex-direction: column; align-items: flex-start; }
  .section__note { text-align: left; }
  :root { --hud-h: 60px; }
}

/* ---------- Opened as a file: friendly gate instead of a dead page ---------- */
.filegate { display: none; }
.is-file .filegate {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  background: #050507;
}
.filegate__title { font-family: var(--f-display); font-weight: 700; font-size: clamp(36px, 7vw, 72px); text-transform: uppercase; line-height: 1; }
.filegate__title b { color: var(--red); }
.filegate__text { max-width: 46ch; color: var(--fg-2); font-size: 17px; line-height: 1.55; }
.filegate__text b { color: var(--fg); }
