@font-face {
  font-family: 'Ackbar';
  src: url('/fonts/Ackbar.ttf') format('truetype');
  font-display: swap;
}

/* The whole palette. Nothing else gets a colour. */
:root {
  --bg: #021126;
  --surface: #0a1a2e;
  --line: rgba(207, 227, 254, 0.1);
  --text: #f2f6fc;
  --muted: #909fbe;
  --accent: #ffc33f;
  --accent-ink: #1a1200;
  --error: #ff294b; /* form errors only */

  --display: 'Ackbar', 'Fira Sans', sans-serif;
  --body: 'Fira Sans', system-ui, sans-serif;
  --radius: 14px;
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: normal; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(2.4rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0; }
code { font-size: 0.82em; word-break: break-all; color: var(--muted); }
[hidden] { display: none !important; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1.5rem; }

.eyebrow { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.75rem; }
.muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; height: 46px; padding: 0 1.3rem; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--text); font: 700 0.82rem var(--body); letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color 0.15s, background 0.15s; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #ffcf5f; }
.btn.sm { height: 36px; padding: 0 0.9rem; font-size: 0.74rem; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.link { color: var(--accent); font-weight: 700; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; }
.link:hover { text-decoration: underline; }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(2, 17, 38, 0.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 2.25rem; height: 64px; }
.brand img { height: 18px; width: auto; }
.nav nav { display: flex; gap: 1.75rem; flex: 1; }
.nav nav a { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; text-decoration: none; color: var(--muted); }
.nav nav a:hover, .nav nav a[aria-current] { color: var(--text); }
.nav .end { display: flex; align-items: center; gap: 0.5rem; }
.icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.icon:hover { color: var(--text); border-color: var(--muted); }
.icon svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- Hero ---------- */
.hero { position: relative; border-bottom: 1px solid var(--line); }
.hero .wrap { position: relative; display: grid; grid-template-columns: 5fr 7fr; gap: 3.5rem; align-items: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.hero-logo { width: 300px; margin: 0 0 1.25rem -6px; }
.hero-copy .lede { font-size: 1.1rem; color: var(--text); max-width: 26rem; margin-bottom: 1.5rem; }
.specs { display: flex; gap: 2rem; margin-bottom: 2rem; }
.specs div { display: grid; gap: 0.1rem; }
.specs b { font-family: var(--display); font-weight: normal; font-size: 1.5rem; }
.specs span { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.code-note { margin-top: 1.1rem; font-size: 0.9rem; color: var(--muted); }
.code-note b { color: var(--text); }
.screen { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); aspect-ratio: 16 / 9; }
.screen img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Sections ---------- */
.section { padding: 3.5rem 0; border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature { text-align: center; }
.feature img { height: 92px; width: auto; margin: 0 auto 1.1rem; object-fit: contain; }
.feature h3 { font-size: 1.35rem; margin-bottom: 0.4rem; }
.feature p { color: var(--muted); }

.promo { display: flex; flex-direction: column; gap: 0.9rem; }
.promo h3 { font-size: 1.5rem; }
.promo p { color: var(--muted); }
.promo .amount { font-family: var(--display); font-size: 2.6rem; line-height: 1; color: var(--accent); }
.promo .end { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.5rem; }
.promo .timer { font-size: 0.8rem; color: var(--muted); }
.promo.code { border-color: rgba(255, 195, 63, 0.4); }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; height: 54px; padding: 0 0.4rem 0 1rem; border-radius: 10px; border: 1px dashed rgba(255, 195, 63, 0.5); }
.code-box span { font-family: var(--display); font-size: 1.35rem; letter-spacing: 0.04em; }

/* ---------- Games ---------- */
.games { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.game { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.game img { width: 100%; aspect-ratio: 408 / 546; object-fit: cover; }
.game-body { padding: 1rem 1rem 1.1rem; display: grid; gap: 0.35rem; }
.game-body h3 { font-size: 1.05rem; }
.game-body .meta { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.6rem; }
.game .btn-row { gap: 0.4rem; }
.game .btn { flex: 1; padding: 0 0.5rem; }

/* ---------- Contest pages ---------- */
.page-head { position: relative; background: url('/assets/head-bg.webp') center 40% / cover no-repeat; }
.page-head::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(2, 17, 38, 0.92) 0%, rgba(2, 17, 38, 0.7) 50%, rgba(2, 17, 38, 0.35) 100%), linear-gradient(0deg, var(--bg) 0%, rgba(2, 17, 38, 0) 35%); }
.page-head .wrap { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: center; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.page-head h1 { margin-bottom: 0.75rem; }
.page-head .amount { font-family: var(--display); font-size: clamp(2.4rem, 5vw, 3.5rem); line-height: 1; color: var(--accent); margin-bottom: 0.9rem; }
.page-head p { color: var(--muted); max-width: 32rem; }
.page-head .art { width: 320px; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)); }
.timer-row { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.timer-row .label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.countdown { display: flex; gap: 0.4rem; }
.countdown div { min-width: 3.6rem; padding: 0.45rem 0.3rem; text-align: center; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.countdown b { display: block; font-family: var(--display); font-weight: normal; font-size: 1.35rem; line-height: 1.1; }
.countdown span { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; align-items: stretch; }
.card h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 1.1rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr; gap: 0.85rem; color: var(--muted); }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid var(--accent); color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.steps b { display: block; color: var(--text); font-weight: 500; }

form { display: grid; gap: 1.1rem; }
label { display: grid; gap: 0.4rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
input:not([type='checkbox']) { height: 48px; padding: 0 0.95rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 400 1rem var(--body); letter-spacing: 0; text-transform: none; }
input::placeholder { color: rgba(144, 159, 190, 0.6); }
input:focus { outline: none; border-color: var(--accent); }
label.check { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; font-weight: 400; letter-spacing: 0; text-transform: none; }
label.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.note { min-height: 1.5em; font-size: 0.9rem; }
.note.ok { color: var(--accent); }
.note.err { color: var(--error); }

.rules { margin: 0; padding-left: 1.1rem; display: grid; gap: 0.55rem; color: var(--muted); }
.rules li::marker { color: var(--accent); }
.hash { margin-top: 1.25rem; padding: 0.9rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hash code { display: block; margin-top: 0.35rem; letter-spacing: 0; text-transform: none; }
.fair p + p { margin-top: 0.75rem; }
.fair p { color: var(--muted); }
.results { margin-top: 1.25rem; }
.results ol { color: var(--text); }

/* ---------- Footer ---------- */
footer { padding: 3rem 0; font-size: 0.85rem; color: var(--muted); }
footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2rem; align-items: center; }
footer .brand img { height: 15px; margin-bottom: 0.6rem; }
footer nav { display: flex; gap: 1.5rem; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--text); }
footer .legal { grid-column: 1 / -1; padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
footer .legal a { color: var(--text); }
.age { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--muted); font-size: 0.68rem; font-weight: 700; color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .games { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav nav { display: none; }
  .nav .wrap { justify-content: space-between; }
  .nav .end .btn { display: none; }
  .hero .wrap { padding-top: 2.5rem; padding-bottom: 3rem; }
  .hero-logo { width: 220px; }
  .specs { gap: 1.25rem; }
  .specs b { font-size: 1.2rem; }
  .hero .btn-row .btn { flex: 1; }
  .section { padding: 2.5rem 0; }
  .feature { display: grid; grid-template-columns: 96px 1fr; column-gap: 1rem; row-gap: 0.2rem; text-align: left; padding: 1.25rem; }
  .feature img { grid-row: 1 / 3; align-self: center; height: auto; width: 96px; margin: 0; }
  .feature h3 { font-size: 1.1rem; align-self: end; margin: 0; }
  .feature p { align-self: start; }
  .games { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .game .btn-row { flex-direction: column; }
  .game .btn { flex: none; width: 100%; }
  .page-head .wrap { grid-template-columns: 1fr; }
  .page-head .art { display: none; }
  .timer-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  footer .wrap { grid-template-columns: 1fr; }
}

/* ---------- Later additions ---------- */
.btn-row.even { display: grid; grid-template-columns: repeat(3, 1fr); max-width: 30rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.promo .end .btn { margin-left: auto; }
.signup { display: grid; grid-template-columns: 1fr minmax(260px, 320px) auto; gap: 1.5rem; align-items: center; border-color: rgba(255, 195, 63, 0.4); }
.signup h2 { margin-bottom: 0.35rem; font-size: 1.5rem; }
@media (max-width: 1000px) {
  .grid-2 { grid-template-columns: 1fr; }
  .signup { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .btn-row.even { grid-template-columns: 1fr 1fr; max-width: none; }
  .btn-row.even .btn:last-child { grid-column: 1 / -1; }
}
footer .wrap > nav { justify-self: end; }
footer .socials { display: flex; gap: 0.5rem; }
footer .wrap { grid-template-columns: 1fr auto auto; }
footer .brand img { margin-bottom: 0; }
@media (max-width: 680px) {
  footer .wrap { grid-template-columns: 1fr; }
  footer .wrap > nav { justify-self: start; }
}
.promo .end { align-items: end; }
.ends { display: block; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.45rem; }
@media (max-width: 680px) {
  .promo .end { flex-direction: column; align-items: stretch; }
  .promo .end .btn { margin-left: 0; }
  .promo .countdown div { flex: 1; min-width: 0; }
}
.entries { min-width: 4.6rem; padding: 0.45rem 0.6rem; margin-left: 0.6rem; text-align: center; border-radius: 10px; border: 1px solid rgba(255, 195, 63, 0.45); background: var(--bg); position: relative; }
.entries::before { content: ''; position: absolute; left: -0.85rem; top: 15%; bottom: 15%; border-left: 1px solid var(--line); }
.entries b { display: block; font-family: var(--display); font-weight: normal; font-size: 1.35rem; line-height: 1.1; color: var(--accent); }
.entries span { font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.board { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.board th { text-align: left; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 0 0.75rem 0.75rem; border-bottom: 1px solid var(--line); }
.board td { padding: 0.75rem; border-bottom: 1px solid var(--line); }
.board th:first-child, .board td:first-child { width: 3rem; padding-left: 0; color: var(--muted); }
.board th:last-child, .board td:last-child { text-align: right; padding-right: 0; }
.board td.multi, .board tr.top td.multi { font-family: var(--display); font-size: 1.05rem; color: var(--accent); }
.board .pending { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
.board tr.top td { color: var(--text); }
.board-note { margin-top: 1rem; font-size: 0.85rem; }
.board tr.clickable { cursor: pointer; }
.board tr.clickable:hover td { background: rgba(207, 227, 254, 0.03); }
.board .bet { color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.board tr:hover .bet { color: var(--accent); }
.board .ok { color: var(--accent); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }
@media (max-width: 680px) {
  .board { font-size: 0.85rem; }
  .board td, .board th { padding-left: 0.4rem; padding-right: 0.4rem; }
  .board .bet { font-size: 0.75rem; }
}
.board th.num { text-align: right; }
.board td.multi, .board td.pending { text-align: right; }
.board th:last-child, .board td:last-child { width: 8.5rem; }
.board .bet-sub { display: none; }
@media (max-width: 680px) {
  .board .betcol { display: none; }
  .board .bet-sub { display: block; margin-top: 0.15rem; }
  .board th:last-child, .board td:last-child { width: auto; }
  .board .ok, .board .pending { font-size: 0.7rem; letter-spacing: 0.06em; }
}
.board tr.top td.ok { color: var(--accent); }
.board td.ok, .board td.pending, .board .bet { white-space: nowrap; }
@media (max-width: 680px) {
  .board .bet-sub { font-size: 0.7rem; }
  .board td.multi { font-size: 0.95rem; }
}
@media (max-width: 680px) {
  .page-head .timer-row { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .page-head .timer-row .label { flex-basis: 100%; }
  .page-head .countdown { flex: 1; }
  .entries { margin-left: 0.4rem; min-width: 4rem; }
  .entries::before { display: none; }
}
.card.empty { text-align: center; padding: 3rem 1.5rem; }
.card.empty h2 { margin-bottom: 0.5rem; }
.results ol { margin: 0 0 0.75rem; padding-left: 1.2rem; display: grid; gap: 0.3rem; font-weight: 500; }
.results p { font-size: 0.8rem; word-break: break-all; }
label .opt { font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--muted); opacity: 0.8; margin-left: 0.3rem; }
.hero-copy .lede { margin-bottom: 0.75rem; max-width: 30rem; }
.hero-copy .lede b { color: var(--accent); font-weight: 700; }
.lede-more { color: var(--muted); max-width: 30rem; margin-bottom: 1.5rem; font-size: 0.95rem; }
.lede-more strong { color: var(--text); font-weight: 500; }
.btn-row.center { justify-content: center; margin-top: 1.5rem; }
