/* Demolition Derby — main site redesign (marketing pages only) */
@import url("https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Bebas+Neue&display=swap");

:root {
  --ink: #0a0a0c;
  --fog: #c8c4bc;
  --paper: #ece8e1;
  --orange: #ff8a1f;
  --ember: #ff5c1a;
  --gold: #f6c34a;
  --muted: #9a958c;
  --line: rgba(255, 255, 255, 0.12);
  --ok: #7dcea0;
  --err: #ff7a6a;
  --font: "Barlow", system-ui, sans-serif;
  --display: "Bebas Neue", Impact, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--paper);
  background: var(--ink);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.stage-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(8, 8, 10, 0.4) 0%, rgba(8, 8, 10, 0.62) 45%, rgba(8, 8, 10, 0.96) 100%),
    radial-gradient(ellipse 90% 55% at 70% 30%, rgba(255, 120, 40, 0.18), transparent 55%),
    linear-gradient(125deg, #1c2430 0%, #3d3834 28%, #6a5848 52%, #2a3340 78%, #12151a 100%);
}
.stage-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  opacity: 0.4;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.shell { flex: 1; display: flex; flex-direction: column; min-height: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 25;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.92), rgba(10, 10, 12, 0.72) 70%, transparent);
  backdrop-filter: blur(8px);
}
.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.topbar a {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--fog);
  padding: 0.45rem 0.55rem;
}
.topbar a:hover,
.topbar a.is-active { color: var(--gold); }

.ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--line);
  padding: 0.35rem 0.35rem 0.35rem 0.7rem;
  background: rgba(0, 0, 0, 0.4);
}
.ip-chip a {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--paper);
  padding: 0;
}
.ip-chip button {
  appearance: none;
  border: 0;
  background: linear-gradient(180deg, var(--gold), var(--orange));
  color: #1a1005;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4rem 0.55rem;
  cursor: pointer;
}

.hero {
  width: min(720px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 5vh, 3rem) 0 clamp(2.5rem, 8vh, 4.5rem);
  display: grid;
  justify-items: center;
  text-align: center;
}
.hero-mark {
  width: min(520px, 90vw);
  height: auto;
  margin-bottom: 1.1rem;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45));
}
.hero-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}
.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: 0.04em;
  max-width: 18ch;
  background: linear-gradient(180deg, #fff6e0 0%, var(--gold) 45%, var(--ember) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead {
  margin: 0 auto 1.5rem;
  max-width: 36rem;
  font-size: clamp(1.02rem, 2vw, 1.18rem);
  color: var(--fog);
  font-weight: 500;
}
.hero-lead em {
  font-style: normal;
  color: var(--paper);
  font-weight: 650;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
}
.platform {
  display: inline-flex;
  gap: 0.5rem;
  margin-top: 0.85rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.platform b { color: var(--fog); font-weight: 700; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.85rem 1.25rem;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: inherit;
}
.btn-primary {
  background: linear-gradient(115deg, var(--gold), var(--orange) 55%, var(--ember));
  color: #140c04;
}
.btn-primary:hover { filter: brightness(1.06); color: #140c04; }
.btn-ghost {
  border-color: var(--line);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.04);
}
.btn-ghost:hover { border-color: rgba(246, 195, 74, 0.45); color: var(--gold); }

.page-main,
.home-main {
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.92) 0%, #101014 100%);
  border-top: 1px solid var(--line);
}
.band {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
}
.band + .band { border-top: 1px solid var(--line); }
.band-label {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
}
.band h2,
.page-hero h1 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  letter-spacing: 0.04em;
  line-height: 1;
}
.band > p,
.prose {
  margin: 0;
  max-width: 42rem;
  color: var(--fog);
  font-size: 1.05rem;
}
.prose + .prose { margin-top: 1rem; }
.prose .hi,
.band a.hi { color: var(--orange); font-weight: 600; }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.rank { list-style: none; margin: 0; padding: 0; }
.rank li {
  display: grid;
  grid-template-columns: 2rem 1fr auto;
  gap: 0.85rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.rank li:first-child { border-top: 1px solid var(--line); }
.rank .n {
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--orange);
}
.rank .name { font-size: 1.05rem; font-weight: 600; }
.rank .val {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 600;
}
.rank a:hover .name { color: var(--gold); }

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}
.pillar h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold);
}
.pillar p { margin: 0; font-size: 0.95rem; color: var(--fog); }

.feature-flow { margin-top: 1.5rem; }
.feature-flow div {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.feature-flow div:first-child { border-top: 1px solid var(--line); }
.feature-flow span {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--orange);
  line-height: 1;
}
.feature-flow p { margin: 0; color: var(--paper); }

.cta-band {
  padding: clamp(3rem, 7vw, 5rem) 0;
  background:
    linear-gradient(105deg, rgba(255, 92, 26, 0.16), rgba(10, 10, 12, 0.2) 45%, rgba(246, 195, 74, 0.1)),
    #0e0e12;
  border-top: 1px solid rgba(255, 138, 31, 0.35);
  border-bottom: 1px solid rgba(255, 138, 31, 0.35);
}
.cta-band .band { padding: 0; }
.cta-band .hero-actions {
  margin-top: 1.35rem;
  justify-content: flex-start;
}

.page-hero {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}
.page-hero h1 {
  margin: 0.35rem 0 0.5rem;
  background: linear-gradient(180deg, #fff6e0, var(--gold) 60%, var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.page-hero p { margin: 0; color: var(--fog); max-width: 40rem; }

.page-content {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 clamp(2.5rem, 6vw, 4rem);
}
.page-content h3,
.content-block h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.page-content p,
.content-block p,
.page-content li,
.content-block li {
  color: var(--fog);
}
.page-content a,
.content-block a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.page-content a:hover,
.content-block a:hover { color: var(--orange); }
.content-block + .content-block {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.content-block ul {
  margin: 0.5rem 0 0;
  padding-left: 1.15rem;
}
.content-block li { margin: 0.4rem 0; }

.credits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}
.credits-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.credits-grid li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--fog);
}
.mappers {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.35rem 1rem;
}
.mappers li {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--fog);
  font-size: 0.95rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
  max-width: 28rem;
}
.field { display: grid; gap: 0.35rem; }
.field label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  color: var(--paper);
  padding: 0.7rem 0.85rem;
}
.field input:focus {
  outline: 1px solid var(--orange);
  border-color: var(--orange);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.35rem;
}
.alert {
  padding: 0.85rem 1rem;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  color: var(--fog);
  max-width: 40rem;
}
.alert-error {
  border-color: rgba(255, 122, 106, 0.45);
  background: rgba(255, 122, 106, 0.1);
  color: var(--err);
}
.alert-success {
  border-color: rgba(125, 206, 160, 0.45);
  background: rgba(125, 206, 160, 0.1);
  color: var(--ok);
}

/* Standalone system/status pages (no DB shell split) */
.status-page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 clamp(3rem, 8vw, 5rem);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.status-page .band-label { margin-bottom: 0.65rem; }
.status-page h1 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
  background: linear-gradient(180deg, #fff6e0, var(--gold) 60%, var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.status-page > p,
.status-page .prose {
  margin: 0;
  max-width: 36rem;
  color: var(--fog);
  font-size: 1.05rem;
}
.status-page .alert {
  margin: 1.5rem 0 1.25rem;
  max-width: 36rem;
}
.status-page .hero-actions {
  margin-top: 1.75rem;
  justify-content: flex-start;
}
.status-page .btn {
  text-decoration: none;
}

.video-grid {
  display: grid;
  gap: 1.25rem;
  margin-top: 1rem;
}
.video-grid iframe {
  width: min(100%, 640px);
  aspect-ratio: 16 / 9;
  height: auto;
  border: 0;
  background: #000;
}

.site-footer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  margin-top: auto;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--gold); }

.notice {
  width: min(1120px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 138, 31, 0.35);
  background: rgba(255, 138, 31, 0.08);
  color: var(--fog);
  font-size: 0.9rem;
}
.notice a { color: var(--gold); font-weight: 600; }

@media (max-width: 860px) {
  .split, .pillars { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; align-items: stretch; }
  .ip-chip { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
