/* Unbeaten Studios. One dark look ("Twilight", from the Unbeaten brand): a scoreboard-style condensed
   headline, the 23-bar season strip as the studio's mark, and one panel per game in that game's own colours. */
:root {
  color-scheme: dark;
  --bg: #1c2230;
  --bg-raised: #262d3d;
  --ink: #eef1f6;
  --ink-2: #b9c1d1;
  --ink-3: #8a94a8;
  --line: rgba(238, 241, 246, 0.12);
  --amber: #ffb400;
  --amber-ink: #1c2230;

  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --radius: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink-2);
  font: 400 18px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 0.95;
  color: var(--ink);
  text-wrap: balance;
}
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 6px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--amber); color: var(--amber-ink); padding: 8px 14px; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-grid; gap: 5px; text-decoration: none; color: var(--ink); font: 800 24px/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; }
.brand .bars { height: 4px; gap: 1px; }
.nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 30px); font-weight: 500; font-size: 16px; }
.nav a { text-decoration: none; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
@media (max-width: 480px) { .nav .nav-about { display: none; } }

/* ---------- The 23 bars: one for every game of a perfect season ---------- */
.bars { display: grid; grid-template-columns: repeat(23, 1fr); gap: 4px; height: 22px; }
.bars i { background: var(--amber); border-radius: 3px; }
.hero .bars i { animation: win 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i) * 55ms + 250ms); transform-origin: bottom; }
@keyframes win { from { background: var(--bg-raised); transform: scaleY(0.45); } }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 999px; font: 600 17px/1 var(--body); text-decoration: none; border: 1.5px solid transparent; transition: transform 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--amber); color: var(--amber-ink); }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-raised); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(48px, 9vw, 104px) clamp(40px, 6vw, 72px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(56px, 11vw, 132px); line-height: 0.86; }
.hero h1 em { font-style: normal; color: var(--amber); }
.lede { margin-top: 24px; max-width: 34em; font-size: clamp(18px, 2vw, 21px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.lineup { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(10px, 1.6vw, 18px); }
.lineup img { grid-column: span 2; width: 100%; height: auto; aspect-ratio: 1; border-radius: 23%; box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line); }
.lineup img:nth-child(4) { grid-column: 2 / span 2; }
.season { margin-top: clamp(40px, 7vw, 80px); display: grid; gap: 12px; }
.season p { font-size: 15px; color: var(--ink-3); }
@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .lineup { grid-template-columns: repeat(5, 1fr); order: 2; }
  .lineup img, .lineup img:nth-child(4) { grid-column: auto; }
  .bars { gap: 3px; height: 16px; }
}

/* ---------- Sections ---------- */
section { padding-block: clamp(48px, 8vw, 96px); }
.section-head { display: grid; gap: 14px; margin-bottom: clamp(28px, 4vw, 44px); max-width: 40em; }
.section-head h2 { font-size: clamp(40px, 6vw, 72px); }

/* ---------- Game panels ---------- */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 22px); }
.game { --p-bg: var(--bg-raised); --p-accent: var(--amber); position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: var(--radius); background: var(--p-bg); color: #d5dae6; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07); }
.game-art { display: grid; place-items: center; min-height: 230px; padding: 28px; background: radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--p-accent) 16%, transparent), transparent 70%); }
.game-body { display: grid; gap: 14px; align-content: start; padding: 4px clamp(20px, 3vw, 32px) clamp(22px, 3vw, 32px); }
.game-id { display: flex; align-items: center; gap: 16px; }
.game-id img { width: 64px; height: 64px; border-radius: 23%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12); flex: none; }
.game-id div { min-width: 0; }
.game h3 { font-size: clamp(34px, 4vw, 46px); color: #fff; }
.genre { font-size: 14px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--p-accent); }
.game p { font-size: 17px; }
.game-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 4px; }
.play { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 999px; background: var(--p-accent); color: #14161f; font-weight: 600; font-size: 16px; line-height: 1; text-decoration: none; transition: transform 0.15s ease; }
.play:hover { transform: translateY(-1px); }
.play svg { width: 14px; height: 14px; }
.status { font-size: 15px; color: rgba(255, 255, 255, 0.62); }
.soon { display: inline-block; padding: 9px 16px; border-radius: 999px; border: 1.5px dashed color-mix(in srgb, var(--p-accent) 60%, transparent); color: var(--p-accent); font-weight: 600; font-size: 15px; line-height: 1; }

.game-wide { grid-column: 1 / -1; grid-template-rows: none; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.game-wide .game-body { padding-block: clamp(24px, 4vw, 44px); order: -1; }
.game-wide .game-art { min-height: 300px; height: 100%; background: radial-gradient(90% 90% at 70% 50%, color-mix(in srgb, var(--p-accent) 14%, transparent), transparent 70%); }
@media (max-width: 820px) {
  .games { grid-template-columns: 1fr; }
  .game-wide { grid-template-columns: 1fr; }
  .game-wide .game-body { order: 0; padding-top: 4px; }
  .game-wide .game-art { min-height: 220px; }
}

.g-unbeaten { --p-bg: #262d3d; --p-accent: #ffb400; }
.g-cricket { --p-bg: #17332b; --p-accent: #f0e3b8; }
.g-queens { --p-bg: #10142a; --p-accent: #f5c542; }
.g-stars { --p-bg: #0a0f2c; --p-accent: #4cc9f0; }
.g-orbs { --p-bg: #1e1230; --p-accent: #e2b04a; }

/* Art: Unbeaten's scoreline */
.scoreline { display: grid; gap: 14px; width: min(100%, 380px); }
.scoreline strong { font: 800 clamp(96px, 15vw, 168px)/0.8 var(--display); color: #eef1f6; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.scoreline span { font-size: 14px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }

/* Art: cricket's three formats */
.formats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 320px; }
.formats span { padding: 12px 20px; border-radius: 999px; background: rgba(240, 227, 184, 0.1); box-shadow: inset 0 0 0 1px rgba(240, 227, 184, 0.3); font: 800 26px/1 var(--display); text-transform: uppercase; letter-spacing: 0.04em; color: #f0e3b8; }

/* Art: puzzle boards, built by the script at the foot of the page */
.board { display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: 4px; width: min(100%, 190px); aspect-ratio: 1; }
.board i { display: grid; place-items: center; border-radius: 22%; background: var(--c); color: #10142a; font-style: normal; font-size: 19px; line-height: 1; }
.board-stars { gap: 3px; width: min(100%, 200px); }
.board-stars i { border-radius: 18%; background: color-mix(in srgb, var(--c) 34%, #0a0f2c); color: #ffd166; font-size: 15px; }

/* Art: vials of orbs */
.vials { display: flex; gap: 14px; align-items: flex-end; }
.vial { display: flex; flex-direction: column-reverse; gap: 3px; width: 44px; height: 172px; padding: 5px; border: 3px solid #e2b04a; border-top: 0; border-radius: 0 0 24px 24px; position: relative; }
.vial::before { content: ""; position: absolute; top: -3px; left: -8px; right: -8px; height: 3px; border-radius: 3px; background: #e2b04a; }
.vial b { width: 100%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.75), var(--c) 42%, color-mix(in srgb, var(--c) 70%, #000) 100%); }

/* ---------- Principles ---------- */
.principles { border-block: 1px solid var(--line); }
.principles-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.principles-grid div { display: grid; gap: 10px; align-content: start; }
.principles-grid h3 { font-size: clamp(28px, 3vw, 36px); }
@media (max-width: 820px) { .principles-grid { grid-template-columns: 1fr; } }

/* ---------- About + contact ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.about-grid h2 { font-size: clamp(40px, 6vw, 72px); margin-bottom: 20px; }
.about-grid p + p { margin-top: 16px; }
.contact { display: grid; gap: 16px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); background: var(--bg-raised); }
.contact h3 { font-size: 30px; }
.email { font: 600 clamp(19px, 2.4vw, 23px)/1.2 var(--body); color: var(--amber); text-decoration: none; overflow-wrap: anywhere; user-select: all; }
.email:hover { text-decoration: underline; }
.contact small { font-size: 15px; color: var(--ink-3); }
@media (max-width: 820px) { .about-grid { grid-template-columns: 1fr; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 40px 56px; font-size: 16px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.footer-grid h4 { margin: 0 0 12px; font: 600 13px/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; }
.footer-grid a:hover { color: var(--ink); text-decoration: underline; }
.footer-brand { display: grid; gap: 14px; align-content: start; justify-items: start; }
.footer-brand p { font-size: 15px; color: var(--ink-3); max-width: 26em; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- Text pages (privacy, terms, 404) ---------- */
.doc { max-width: 720px; margin-inline: auto; padding: clamp(40px, 7vw, 80px) var(--gutter) 80px; }
.doc h1 { font-size: clamp(48px, 8vw, 80px); margin-bottom: 8px; }
.doc h2 { font-size: 30px; margin: 40px 0 10px; }
.doc p, .doc ul { margin: 0 0 14px; }
.doc li { margin: 6px 0; }
.doc a { color: var(--amber); }
.doc .meta { color: var(--ink-3); font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero .bars i { animation: none; }
  .btn, .play { transition: none; }
}
