/* ============================================================
   Fivefive — marketing site + reset page.
   The game's "Royal navy + cartoon" system: navy surfaces, gold
   accent, cream text, candy team colors, thick navy outlines and
   HARD zero-blur offset shadows. Matches the app exactly.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bagel+Fat+One&family=Fredoka:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=Geist+Mono:wght@400;600&display=swap');

:root {
  --navy: #0a1840;
  --navy-soft: #122560;
  --navy-card: #1a2f78;
  --navy-line: #060d2a;
  --gold: #e4c373;
  --gold-deep: #c9a35b;
  --cream: #fef3c7;
  --cream-soft: #fde68a;
  --coral: #fb7185;
  --coral-deep: #e11d48;
  --mint: #86efac;
  --sky: #38bdf8;

  --font-display: 'Bagel Fat One', system-ui, sans-serif;
  --font-title: 'Fredoka', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, monospace;

  --stroke: 3px solid var(--navy-line);
  --shadow: 4px 4px 0 var(--navy-line);
  --shadow-lg: 8px 8px 0 var(--navy-line);
  --radius-card: 20px;
  --radius-hero: 24px;
  --radius-pill: 999px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--gold); }
img { max-width: 100%; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---- Ambient background chips ---- */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-orbs span {
  position: absolute; border-radius: 50%; opacity: 0.08; filter: blur(2px);
}
.bg-orbs span:nth-child(1){ width: 340px; height: 340px; background: var(--gold); top: -80px; left: -60px; }
.bg-orbs span:nth-child(2){ width: 260px; height: 260px; background: var(--sky); top: 40%; right: -70px; }
.bg-orbs span:nth-child(3){ width: 220px; height: 220px; background: var(--coral); bottom: -60px; left: 20%; }
main, header, footer { position: relative; z-index: 1; }

/* ---- Nav ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; max-width: var(--maxw); margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--gold);
  border: var(--stroke); box-shadow: var(--shadow);
  display: grid; place-items: center; transform: rotate(-4deg);
  font-family: var(--font-display); color: var(--navy); font-size: 22px;
}
.brand .name {
  font-family: var(--font-title); font-weight: 600; font-size: 22px;
  color: var(--cream); letter-spacing: -0.03em;
}
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--cream-soft); text-decoration: none; font-weight: 600; font-size: 15px; }
.nav-links a:hover { color: var(--gold); }
@media (max-width: 720px){ .nav-links a.nl-hide { display: none; } }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-title); font-weight: 600; font-size: 16px;
  padding: 13px 22px; border-radius: var(--radius-pill); border: var(--stroke);
  text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .12s;
  box-shadow: var(--shadow);
}
.btn:hover { transform: translate(-2px,-2px); box-shadow: 6px 6px 0 var(--navy-line); }
.btn:active { transform: translate(2px,2px); box-shadow: 2px 2px 0 var(--navy-line); }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-secondary { background: var(--navy-card); color: var(--cream); }

/* ---- Hero ---- */
.hero { padding: 40px 0 70px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center; }
@media (max-width: 860px){ .hero-grid { grid-template-columns: 1fr; text-align: center; } }
.eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--gold); background: rgba(228,195,115,0.12);
  border: 2px solid rgba(228,195,115,0.4); padding: 5px 12px; border-radius: var(--radius-pill);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(44px, 8vw, 82px); line-height: 0.95; margin: 18px 0 10px;
  color: var(--cream); letter-spacing: -0.01em;
}
.hero h1 .tint { color: var(--gold); }
.hero .sub { font-size: clamp(17px, 2.4vw, 21px); color: var(--cream-soft); max-width: 30ch; }
@media (max-width: 860px){ .hero .sub { margin-left: auto; margin-right: auto; } }
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
@media (max-width: 860px){ .hero-cta { justify-content: center; } }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--cream-soft); opacity: 0.7; font-family: var(--font-mono); }

/* ---- Mini board mockup ---- */
.board-card {
  background: var(--navy-card); border: var(--stroke); border-radius: var(--radius-hero);
  box-shadow: var(--shadow-lg); padding: 16px; transform: rotate(2deg);
}
.board {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; aspect-ratio: 1;
}
.cell {
  background: var(--navy-soft); border: 2px solid var(--navy-line); border-radius: 8px;
  display: grid; place-items: center; position: relative;
  font-family: var(--font-mono); font-size: 10px; color: rgba(254,243,199,0.45);
}
.cell.corner { background: var(--gold); color: var(--navy); }
.chip {
  position: absolute; width: 66%; height: 66%; border-radius: 50%;
  border: 2px solid var(--navy-line);
}
.chip.red { background: var(--coral); }
.chip.blue { background: var(--sky); }
.chip.gold { background: var(--gold); box-shadow: 0 0 0 3px rgba(228,195,115,0.4); }

/* ---- Sections ---- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 {
  font-family: var(--font-title); font-weight: 700; font-size: clamp(28px, 5vw, 40px);
  color: var(--cream); margin: 0 0 10px; letter-spacing: -0.01em;
}
.section-head p { color: var(--cream-soft); font-size: 17px; margin: 0; }

/* ---- Feature cards ---- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px){ .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .features { grid-template-columns: 1fr; } }
.feature {
  background: var(--navy-soft); border: var(--stroke); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: 22px;
}
.feature .ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  font-size: 26px; border: 2px solid var(--navy-line); margin-bottom: 14px;
  background: var(--navy-card);
}
.feature h3 { font-family: var(--font-title); font-weight: 600; font-size: 19px; margin: 0 0 6px; color: var(--cream); }
.feature p { margin: 0; color: var(--cream-soft); font-size: 15px; }

/* ---- Steps ---- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 860px){ .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px){ .steps { grid-template-columns: 1fr; } }
.step {
  background: var(--navy-soft); border: var(--stroke); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: 20px; text-align: center;
}
.step .num {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--gold); color: var(--navy); border: var(--stroke);
  display: grid; place-items: center; font-family: var(--font-display); font-size: 22px;
}
.step h3 { font-family: var(--font-title); font-weight: 600; font-size: 17px; margin: 0 0 4px; color: var(--cream); }
.step p { margin: 0; color: var(--cream-soft); font-size: 14px; }

/* ---- Showcase / phone mockups ---- */
.showcase { display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; }
.phone {
  width: 240px; background: var(--navy-line); border-radius: 34px; padding: 10px;
  border: var(--stroke); box-shadow: var(--shadow-lg);
}
.phone:nth-child(2){ transform: rotate(-3deg); }
.phone:nth-child(1){ transform: rotate(3deg); }
.phone .screen {
  background: var(--navy); border-radius: 26px; overflow: hidden; aspect-ratio: 9/17;
  display: flex; flex-direction: column; padding: 14px; gap: 10px;
}
.mini-scorebar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--navy-ink, var(--navy-line)); border: 2px solid var(--gold);
  border-radius: var(--radius-pill); padding: 8px 12px; font-family: var(--font-title);
  font-weight: 700; font-size: 12px;
}
.mini-scorebar .r { color: var(--coral); }
.mini-scorebar .b { color: var(--sky); }
.mini-board { display: grid; grid-template-columns: repeat(5,1fr); gap: 4px; flex: 1; }
.mini-cell { background: var(--navy-soft); border: 1.5px solid var(--navy-line); border-radius: 5px; position: relative; }
.mini-cell .c { position: absolute; inset: 20%; border-radius: 50%; border: 1.5px solid var(--navy-line); }
.mini-caption { text-align: center; color: var(--cream-soft); font-size: 13px; margin-top: 12px; font-weight: 600; }

/* ---- FAQ ---- */
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 12px; }
.faq details {
  background: var(--navy-soft); border: var(--stroke); border-radius: var(--radius-card);
  box-shadow: var(--shadow); padding: 4px 20px;
}
.faq summary {
  cursor: pointer; list-style: none; font-family: var(--font-title); font-weight: 600;
  font-size: 17px; color: var(--cream); padding: 14px 0; display: flex; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq p { margin: 0 0 16px; color: var(--cream-soft); font-size: 15px; }

/* ---- Full-rules collapsible ---- */
.rulebook { max-width: 760px; margin: 34px auto 0; }
.rulebook details {
  background: var(--navy-soft); border: var(--stroke); border-color: var(--gold);
  border-radius: var(--radius-card); box-shadow: var(--shadow-lg); padding: 4px 26px;
}
.rulebook summary {
  cursor: pointer; list-style: none; font-family: var(--font-title); font-weight: 700;
  font-size: 20px; color: var(--gold); padding: 18px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.rulebook summary::-webkit-details-marker { display: none; }
.rulebook summary::after { content: '+'; color: var(--gold); font-size: 26px; line-height: 1; }
.rulebook details[open] summary::after { content: '\2212'; }
.rules-body { padding-bottom: 22px; }
.rules-body h3 {
  font-family: var(--font-title); font-weight: 700; font-size: 17px;
  color: var(--cream); margin: 20px 0 8px;
}
.rules-body h3:first-child { margin-top: 6px; }
.rules-body ul { margin: 0; padding-left: 20px; }
.rules-body li { color: var(--cream-soft); font-size: 15px; line-height: 1.6; margin-bottom: 7px; }
.rules-body strong { color: var(--gold); font-weight: 700; }
.rules-legend { display: flex; gap: 22px; flex-wrap: wrap; margin: 6px 0 0; font-size: 16px; }
.rules-legend .red { color: var(--coral); font-weight: 700; }
.rules-legend .black { color: var(--cream); font-weight: 700; }

/* ---- CTA band ---- */
.cta-band {
  background: var(--navy-card); border: var(--stroke); border-radius: var(--radius-hero);
  box-shadow: var(--shadow-lg); text-align: center; padding: 44px 24px; max-width: var(--maxw);
  margin: 0 auto;
}
.cta-band h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(26px,5vw,42px); margin: 0 0 8px; color: var(--gold); }
.cta-band p { color: var(--cream-soft); margin: 0 0 22px; }

/* ---- Footer ---- */
footer { padding: 40px 0 56px; border-top: 2px solid var(--navy-soft); margin-top: 40px; }
.foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.foot .links { display: flex; gap: 20px; }
.foot .links a { color: var(--cream-soft); text-decoration: none; font-size: 14px; font-weight: 600; }
.foot .links a:hover { color: var(--gold); }
.foot .cr { color: var(--cream-soft); opacity: 0.6; font-size: 13px; font-family: var(--font-mono); }

/* ============================================================
   Reset page
   ============================================================ */
.reset-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.reset-card {
  width: 100%; max-width: 420px; background: var(--navy-soft); border: var(--stroke);
  border-color: var(--gold); border-radius: var(--radius-hero); box-shadow: var(--shadow-lg); padding: 30px;
}
.reset-card .mark {
  width: 52px; height: 52px; border-radius: 14px; background: var(--gold);
  border: var(--stroke); box-shadow: var(--shadow); display: grid; place-items: center;
  font-family: var(--font-display); color: var(--navy); font-size: 26px; transform: rotate(-4deg); margin: 0 auto 18px;
}
.reset-card h1 { font-family: var(--font-title); font-weight: 700; font-size: 24px; text-align: center; margin: 0 0 6px; color: var(--cream); }
.reset-card .lead { text-align: center; color: var(--cream-soft); font-size: 15px; margin: 0 0 22px; }
.field { display: block; margin-bottom: 14px; }
.field input {
  width: 100%; background: var(--navy); border: var(--stroke); border-radius: 12px;
  padding: 13px 14px; color: var(--cream); font-size: 15px; font-family: var(--font-body);
}
.field input::placeholder { color: #94a3b8; }
.reset-card .btn { width: 100%; justify-content: center; }
.msg { text-align: center; font-size: 14px; margin: 14px 0 0; min-height: 20px; }
.msg.err { color: var(--coral); }
.msg.ok { color: var(--mint); }
.reset-foot { text-align: center; margin-top: 18px; }
.reset-foot a { font-size: 14px; font-weight: 600; }
[hidden] { display: none !important; }
