:root {
  --bg: #070707;
  --red: #e10600;
  --red-hot: #ff2a2a;
  --text: #f2f0ee;
  --dim: #8a8383;
  --line: #1c1c1c;
  --display: "Poppins", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "ui-monospace", "SFMono-Regular", Menlo, Consolas, monospace;
  --nav: 52px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--display);
  font-weight: 400;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

.scan,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}

.scan {
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.035) 0 1px,
    transparent 1px 3px
  );
  mix-blend-mode: overlay;
  opacity: 0.45;
}

.grain {
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- nav --- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--nav);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 7, 0.92);
  box-shadow: inset 0 2px 0 var(--red);
}

.logo {
  font-style: italic;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.04em;
  font-synthesis: none;
}

.logo-name { color: var(--text); }
.logo-tld {
  color: var(--red);
  text-shadow: 0 0 12px rgba(225, 6, 0, 0.5);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 22px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-right a { color: #bdb6b6; }
.nav-right a:hover { color: var(--text); }

.nav-discord {
  color: #fff !important;
  background: var(--red);
  padding: 7px 12px;
  line-height: 1;
}

.nav-discord:hover { background: var(--red-hot); }

/* --- hero --- */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "kicker kicker"
    "mark  mark"
    "copy  actions";
  column-gap: 32px;
  row-gap: 0;
  align-items: end;
  padding: 44px 28px 56px;
  border-bottom: 1px solid var(--line);
}

.hero-kicker {
  grid-area: kicker;
  margin: 0 0 18px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

.wordmark {
  grid-area: mark;
  margin: 0 0 28px;
  font-style: italic;
  font-weight: 800;
  font-size: clamp(4rem, 11.2vw, 9.4rem);
  line-height: 0.78;
  letter-spacing: -0.055em;
  font-synthesis: none;
}

.name { color: var(--text); }
.tld {
  color: var(--red);
  text-shadow: 0 0 18px rgba(225, 6, 0, 0.55);
}

.hero-copy {
  grid-area: copy;
  margin: 0;
  max-width: 28rem;
  font-size: 1.12rem;
  line-height: 1.4;
  color: #d8d0d0;
}

.hero-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding-bottom: 2px;
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  background: var(--red);
  color: #fff;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 16px;
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover,
.btn:focus-visible { background: var(--red-hot); }

.text-go {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px solid #3a3a3a;
  padding-bottom: 2px;
}

.text-go:hover { color: var(--text); border-color: var(--text); }

/* --- board / table --- */
.board {
  padding: 48px 28px 40px;
}

.board-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.board-head h2 {
  margin: 0;
  font-style: italic;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  font-synthesis: none;
}

.board-meta {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--red);
  margin-bottom: 28px;
}

.empty[hidden] { display: none; }

.empty p {
  margin: 0;
  font-size: 1.05rem;
  max-width: 36rem;
}

.table-wrap { overflow-x: auto; }

.script-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.script-table th {
  text-align: left;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--line);
}

.script-table th:last-child,
.script-table td:last-child { text-align: right; padding-right: 0; }

.script-table td {
  padding: 16px 16px 16px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.script-table tbody tr { transition: background 0.15s ease; }
.script-table tbody tr:hover { background: #0e0e0e; }

.script-table .name-cell {
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-synthesis: none;
}

.script-table .game-cell { color: #c4bbbb; }

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 2px 6px;
}

.pill-soon {
  color: var(--dim);
  border-color: #3a3a3a;
}

.updated { font-family: var(--mono); font-size: 11px; color: var(--dim); }

.copy-btn {
  background: none;
  border: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
  border-bottom: 1px solid #3a3a3a;
}

.copy-btn:hover,
.copy-btn.is-copied {
  color: var(--red);
  border-color: var(--red);
}

.row-slot .name-cell,
.row-slot .game-cell { color: #6e6a6a; }

/* --- note / footer --- */
.note {
  padding: 8px 28px 72px;
}

.note p {
  margin: 0;
  max-width: 34rem;
  font-size: 1.35rem;
  line-height: 1.35;
  font-style: italic;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-synthesis: none;
}

.note strong { color: var(--red); font-style: italic; }

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.foot > a:last-child { text-transform: uppercase; }

.foot a:last-child { color: var(--dim); }
.foot a:last-child:hover { color: var(--text); }

.lost {
  padding: 20vh 28px 80px;
}

.lost-code {
  margin: 0 0 8px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--red);
  text-transform: uppercase;
}

.lost h1 {
  margin: 0 0 28px;
  font-style: italic;
  font-weight: 800;
  font-size: clamp(2rem, 6vw, 3.4rem);
  letter-spacing: -0.04em;
  font-synthesis: none;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    grid-template-areas:
      "kicker"
      "mark"
      "copy"
      "actions";
    padding: 36px 18px 44px;
  }
  .wordmark {
    font-size: clamp(3.6rem, 19vw, 5.4rem);
    display: flex;
    flex-direction: column;
    line-height: 0.82;
    margin-bottom: 22px;
  }
  .hero-actions {
    justify-content: flex-start;
    margin-top: 22px;
  }
  .nav, .board, .note, .foot, .lost { padding-left: 18px; padding-right: 18px; }
  .nav { padding-left: 18px; padding-right: 18px; }
  .empty { flex-direction: column; align-items: flex-start; }
  .script-table thead { display: none; }
  .script-table, .script-table tbody, .script-table tr, .script-table td {
    display: block;
    width: 100%;
  }
  .script-table tr {
    padding: 14px 0 16px;
    border-bottom: 1px solid var(--line);
  }
  .script-table td {
    padding: 0;
    border: 0;
    text-align: left !important;
  }
  .script-table td:nth-child(1) { margin-bottom: 4px; font-size: 1.1rem; }
  .script-table td:nth-child(2),
  .script-table td:nth-child(3),
  .script-table td:nth-child(4) {
    display: inline-block;
    margin-right: 10px;
    margin-top: 6px;
    font-size: 12px;
  }
  .script-table td:last-child {
    position: relative;
    margin-top: -1.6rem;
    text-align: right !important;
  }
  .note p { font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
