:root {
  --space: #04050c;
  --panel: #0b1220;
  --line: #1d2a44;
  --text: #eef1fb;
  --muted: #9aa3b8;
  --cyan: #3ec8f0;
  --orange: #ff6a3d;
  --violet: #7b6cff;
  --magenta: #c04dff;
  --gold: #ffc94a;
  /* One content width for every section, so the page holds its shape on wide screens. */
  --page: 1200px;
  --wordmark: linear-gradient(90deg, #3ec8f0 0%, #ff6a3d 50%, #a86bff 100%);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,.7) 0, transparent 60%),
    radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,.5) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 60% 15%, rgba(255,255,255,.6) 0, transparent 60%),
    radial-gradient(1px 1px at 80% 40%, rgba(255,255,255,.4) 0, transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 80%, rgba(255,255,255,.5) 0, transparent 60%),
    radial-gradient(1px 1px at 45% 90%, rgba(255,255,255,.4) 0, transparent 60%),
    var(--space);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: var(--cyan); }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

h1, h2 { font-family: Unbounded, system-ui, sans-serif; margin: 0 0 .5rem; }

h1 { font-weight: 800; font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 1.05; }

h2 { font-weight: 800; font-size: clamp(1.8rem, 6vw, 3.2rem); }

/* The gradient sits on an inline span so, when a heading must wrap on a phone, the
   color runs on across the break instead of restarting at cyan on every line. */
h2 > span {
  background: var(--wordmark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-box-decoration-break: slice;
  box-decoration-break: slice;
}

/* From tablet up, gradient headings stay on one line (owner, 2026-09-29). */
@media (min-width: 800px) {
  h2 { white-space: nowrap; font-size: min(3.6rem, 4.4vw); }
  .doc h2 { font-size: 1.5rem; }
}

.wordmark {
  font-family: Unbounded, system-ui, sans-serif;
  font-weight: 600;
  background: var(--wordmark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
}

/* Phones: the nav drops to its own row under the logo and button. */
.site-nav {
  order: 3;
  flex-basis: 100%;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
}
/* Keep the App Store button on the logo's row on phones: it may wrap its own text instead. */
.site-header > .app-store-btn { flex: 0 1 auto; max-width: 11rem; text-align: center; }
.site-header > .brand { flex: 1 1 0; min-width: 0; }
.site-nav a {
  font-family: Unbounded, system-ui, sans-serif;
  font-weight: 600;
  font-size: .8rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  padding: .5rem 0;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--cyan); }

@media (min-width: 900px) {
  .site-nav { order: 0; flex-basis: auto; margin-left: auto; margin-right: 1rem; gap: 1.25rem; }
  .site-nav a { font-size: .9rem; }
  .site-header > .app-store-btn { max-width: none; }
}

.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  font-size: 1.1rem;
}

.app-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  padding: 0 1.4rem;
  border-radius: 12px;
  background: var(--violet);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 0 34px rgba(123,108,255,.8);
}

@media (pointer: coarse) {
  .app-store-btn, button, a { min-height: 44px; }
}

.hero {
  max-width: var(--page);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding: 1rem 1rem 3rem;
}

.hero-sub { font-size: 1.3rem; color: var(--muted); }

.lede { max-width: 46ch; font-size: 1.15rem; line-height: 1.5; }

.fine { color: var(--muted); font-size: .9rem; }

.phone-frame {
  border-radius: 24px;
  border: 1px solid var(--line);
  box-shadow: 0 0 40px rgba(62,200,240,.35);
}

.hero-media { display: flex; justify-content: center; }
.hero-media .phone-frame { overflow: hidden; line-height: 0; width: fit-content; }
.hero-video { display: block; height: min(70vh, 760px); width: auto; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
  .hero-media {
    background-image: var(--poster-bg, url('/img/big-bang-poster.jpg?v=f83afa3125'));
    background-size: cover;
    background-position: center;
    aspect-ratio: 540 / 1170;
    height: min(70vh, 760px);
    border-radius: 24px;
  }
}

.band {
  min-height: 40vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1rem;
  background-size: cover;
  background-position: center;
  position: relative;
}

.band::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Fade the art into the page at both edges so sections blend instead of butting. */
  background:
    linear-gradient(to bottom, var(--space) 0%, rgba(4,5,12,0) 22%, rgba(4,5,12,0) 78%, var(--space) 100%),
    rgba(4,5,12,.6);
}

.band h2, .band p { position: relative; z-index: 1; }

.band-gold { background-image: url('/img/ipad-gold-supernova.jpg?v=0e0cd9ccdf'); }

.band-violet { background-image: url('/img/ipad-violet-shell.jpg?v=7a2343aa59'); }

#events, #players, #how-it-plays {
  padding: 3rem 1rem;
  max-width: var(--page);
  margin: 0 auto;
}

.section-lede { font-size: 1.2rem; color: var(--muted); }

.modes {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  display: grid;
  gap: 1rem;
}

.modes li {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 0 30px rgba(123,108,255,.25);
}

.mode-num {
  display: block;
  font-family: Unbounded, sans-serif;
  font-weight: 800;
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: .5rem;
  background: var(--wordmark);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.modes strong { display: block; font-family: Unbounded, sans-serif; margin-bottom: .25rem; }

@media (min-width: 800px) {
  .modes { grid-template-columns: repeat(3, 1fr); }
}

.phone-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  /* Room for the frames' glow, which the scroll container would otherwise clip into a box. */
  padding: 2.5rem 2rem;
  margin: 0 -2rem;
}

.phone-row > img {
  scroll-snap-align: start;
  flex: 0 0 auto;
  width: 220px;
}

.final {
  background-image: url('/img/ipad-twin-shells.jpg?v=1955d2b31c');
  background-size: cover;
  background-position: center;
  position: relative;
  text-align: center;
  padding: 4rem 1rem;
}

.final::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, var(--space) 0%, rgba(4,5,12,0) 25%, rgba(4,5,12,0) 80%, var(--space) 100%),
    rgba(4,5,12,.75);
}

.final h2, .final p, .final a { position: relative; z-index: 1; }

footer {
  padding: 2rem 1rem 5rem;
  text-align: center;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.footer-links button,
footer .consent-open {
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: .4rem .8rem;
  cursor: pointer;
}


.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--panel);
  border-top: 1px solid var(--line);
  padding: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.consent[hidden] { display: none; }

.consent div { display: flex; gap: .6rem; }

.consent button {
  background: var(--violet);
  color: var(--text);
  border: none;
  border-radius: 8px;
  padding: .6rem 1rem;
  cursor: pointer;
}

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
  line-height: 1.7;
}

.doc h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

.doc h3 {
  font-family: Inter, system-ui, sans-serif;
  font-size: 1.1rem;
  margin-top: 1.5rem;
}

.doc ul, .doc ol {
  padding-left: 1.4rem;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: .4rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .6rem .8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  width: 100%;
  border: none;
  border-radius: 12px;
  background: var(--violet);
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 0 34px rgba(123,108,255,.8);
}

.note {
  color: var(--muted);
  font-size: .875rem;
  margin-top: 1rem;
  text-align: center;
}

.botcheck { display: none; }

/* Game guide pages: /events, /bonuses, /constellations (scripts/build-ttt-reference.mjs). */
.ref { max-width: var(--page); margin: 0 auto; padding: 2rem 1rem 4rem; }
.ref h1 { font-size: clamp(2rem, 6vw, 4.2rem); }
.ref-nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.ref-nav a {
  font-family: Unbounded, system-ui, sans-serif;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  padding: .6rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.ref-nav a[aria-current="page"] { background: var(--violet); border-color: var(--violet); box-shadow: 0 0 24px rgba(123,108,255,.6); }
.ref-grid { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1rem; }
.ref-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: 0 0 30px rgba(62,200,240,.12);
}
.ref-card h3 { font-family: Unbounded, system-ui, sans-serif; font-size: 1.2rem; margin: .25rem 0 .5rem; }
.ref-emoji { font-size: 2.4rem; line-height: 1; margin: 0; }
.ref-img { display: block; width: 100%; height: auto; aspect-ratio: 1; border-radius: 12px; margin-bottom: .75rem; background: var(--space); }
.ref-img-wide { aspect-ratio: 600 / 280; }
.ref-diagram { margin: .25rem 0 .75rem; }
.ref-diagram summary { cursor: pointer; color: var(--cyan); font-weight: 600; padding: .5rem 0; }
.ref-diagram .ref-img { margin-top: .5rem; }
.ref-tesseract-img { max-width: 420px; margin: 0 auto 1rem; }
.ref-rating { font-size: .75rem; font-weight: 700; border-radius: 999px; padding: .15rem .6rem; }
.ref-rating-bad { color: #ff8a70; border: 1px solid rgba(255,106,61,.5); }
.ref-rating-neutral { color: var(--gold); border: 1px solid rgba(255,201,74,.45); }
.ref-rating-good { color: #7be3a0; border: 1px solid rgba(123,227,160,.45); }
.ref-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .6rem; }
.ref-tag { font-size: .75rem; font-weight: 600; color: var(--cyan); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .6rem; }
.ref-from { color: var(--muted); font-size: .95rem; margin-bottom: 0; }
.ref-tesseract {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid var(--violet);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 0 44px rgba(192,77,255,.35);
  text-align: center;
}
@media (min-width: 700px) { .ref-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .ref-grid { grid-template-columns: repeat(3, 1fr); } }

@media (min-width: 800px) {
  .hero {
    flex-direction: row;
    align-items: center;
    padding: 3rem 2rem;
  }
  .hero-copy { flex: 1 1 55%; }
  .hero-media { flex: 0 1 auto; }
  .band { min-height: 60vh; }
}

footer .consent-open { margin-top: 1rem; }
