:root {
  --cream: #f9f6e7;
  --cream-2: #f3efe0;
  --ink: #5f1513;
  --muted: #8f7371;
  --green: #2e5a36;
  --green-deep: #1f4428;
  --gold: #d4af37;
  --gold-soft: #efe6c4;
  --line: rgba(95, 21, 19, 0.12);
  --shadow: 0 18px 50px rgba(95, 21, 19, 0.12);
  --sans: "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0 4px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 42px;
}
.brand img { width: 108px; height: 108px; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 999px;
}
.nav-cta:hover { background: #4a100f; }

.intro {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  column-gap: 48px;
  padding-bottom: 64px;
}
.hero-copy { grid-column: 1; grid-row: 1; padding-top: 8px; }
.kicker {
  display: inline-block;
  color: var(--green);
  font-weight: 800;
  letter-spacing: 0.16em;
  font-size: 12px;
  margin-bottom: 14px;
}
h1 {
  margin: 0 0 16px;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.lede {
  margin: 0 0 28px;
  max-width: 36rem;
  color: var(--muted);
  font-size: 18px;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 14px;
  font-weight: 700;
  padding: 14px 18px;
}
.btn-store {
  background: #111;
  color: #fff;
  min-width: 220px;
}
.btn-store .apple-logo {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.btn-store span { text-align: left; }
.btn-store small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  opacity: 0.8;
}
.btn-store strong { font-size: 17px; line-height: 1.1; }
.fine {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.phones {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-height: 480px;
}
.phone {
  position: absolute;
  width: min(280px, 70%);
  background: #fff;
  border: 8px solid #3a1a18;
  border-radius: 36px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.phone img { width: 100%; display: block; }
.phone-a { right: 18%; top: 0; transform: rotate(-6deg); z-index: 2; }
.phone-b { right: 0; top: 70px; transform: rotate(7deg); z-index: 1; }

.founding {
  margin: 8px 0 16px;
  background: linear-gradient(180deg, #fffdf4, var(--gold-soft));
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 18px;
  padding: 20px 28px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}
.founding-copy {
  min-width: 0;
  flex: 1;
}
.founding strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
}
.founding p {
  margin: 0;
  color: #5c4a12;
  font-size: 14px;
  max-width: 40rem;
  line-height: 1.45;
}
.founding-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #5c4a12;
  border: 1px solid rgba(92, 74, 18, 0.28);
  border-radius: 999px;
  padding: 6px 12px;
}

.how {
  grid-column: 1;
  grid-row: 2;
  padding: 28px 0 0;
}
.how h2 {
  margin: 0 0 16px;
  font-size: clamp(26px, 3.2vw, 34px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
}
.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.card-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--cream);
}
.card-icon svg {
  width: 34px;
  height: 34px;
}
.card-icon-link { background: var(--ink); }
.card-icon-gps { background: var(--green); }
.card-icon-games { background: var(--green-deep); }
.step {
  display: block;
  font-weight: 800;
  color: var(--green);
  font-size: 12px;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.live-board {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin-top: 28px;
  background: var(--ink);
  color: var(--cream);
  border-radius: 22px;
  padding: 22px 22px 20px;
  box-shadow: var(--shadow);
}
.live-board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(249, 246, 231, 0.7);
  margin-bottom: 10px;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d7e8d4;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
}
.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3d9a4a;
  box-shadow: 0 0 0 4px rgba(61, 154, 74, 0.25);
}
.live-board h3 {
  margin: 0 0 18px;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--cream);
}
.live-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.live-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(249, 246, 231, 0.12);
  font-size: 15px;
}
.live-list li:first-child { border-top: 0; }
.live-rank {
  font-weight: 800;
  color: rgba(249, 246, 231, 0.45);
}
.live-name { font-weight: 700; }
.live-score {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.live-list .is-you {
  background: rgba(249, 246, 231, 0.08);
  margin: 0 -10px;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 10px;
  border-top-color: transparent;
}
.live-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(249, 246, 231, 0.12);
}
.live-meta small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(249, 246, 231, 0.5);
  margin-bottom: 4px;
}
.live-meta strong {
  font-size: 16px;
  color: var(--cream);
}

.legal-page, .join-page { padding: 8px 0 80px; }
.legal-page h1 { font-size: 36px; margin-bottom: 8px; }
.meta { color: var(--muted); margin: 0 0 28px; }
.legal-page h2 { font-size: 18px; margin: 28px 0 8px; }
.legal-page p, .legal-page li { color: #4a2a28; max-width: 42rem; }
.legal-page ul { padding-left: 1.2rem; }

.join-hero { text-align: center; padding: 48px 0 24px; }
.join-hero img { width: 128px; height: 128px; margin: 0 auto 16px; }
.join-hero h1 { font-size: clamp(32px, 6vw, 48px); }
.join-actions { justify-content: center; }
.status {
  min-height: 1.4em;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 13px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); text-decoration: none; margin-right: 14px; }
.site-footer a:hover { color: var(--ink); }

body.open-page {
  background: #5f1513;
  color: #f9f6e7;
  min-height: 100vh;
}
.open-stage {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, #8a2420 0%, #5f1513 52%, #3d0d0c 100%);
  padding-bottom: 48px;
}
.open-page .open-brand {
  color: #f9f6e7;
}
.open-page .open-brand img {
  width: 72px;
  height: 72px;
}
.open-card {
  max-width: 460px;
  margin: 12px auto 0;
  padding: 36px 28px 32px;
  background: #f9f6e7;
  color: #5f1513;
  border: 3px solid #d4af37;
  border-radius: 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}
.open-card img {
  width: 148px;
  height: 148px;
  margin: 0 auto 8px;
}
.open-kicker {
  margin: 8px 0 10px;
  color: #2e5a36;
  font-weight: 800;
  letter-spacing: 0.22em;
  font-size: 12px;
  text-transform: uppercase;
}
.open-card h1 {
  margin: 0 0 12px;
  font-size: clamp(40px, 8vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: #5f1513;
}
.open-card .lede {
  margin: 0 auto 8px;
  max-width: 22rem;
  color: #8f7371;
  font-size: 17px;
}
.open-card .status {
  color: #2e5a36;
  font-weight: 700;
  margin: 10px 0 18px;
}
.btn-open-primary {
  background: #2e5a36;
  color: #f9f6e7;
  min-width: 260px;
  padding: 18px 28px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px;
  box-shadow: inset 0 0 0 3px #d4af37;
}
.btn-open-primary:hover {
  background: #24482b;
}
.btn-open-store {
  background: #5f1513;
  color: #f9f6e7;
  min-width: 260px;
}
.btn-open-store:hover {
  background: #4a100f;
}

@media (max-width: 860px) {
  .intro { grid-template-columns: 1fr; }
  .hero-copy, .how, .phones, .live-board { grid-column: 1; grid-row: auto; }
  .phones { min-height: 460px; margin: 16px auto 0; width: min(420px, 100%); }
  .phone-a { left: 0; right: auto; }
  .how { padding-top: 28px; }
  .live-board { margin-top: 16px; }
  .founding { flex-direction: column; align-items: flex-start; padding: 18px 20px; }
  .founding-badge { align-self: flex-start; }
}
