/* count-nine.dabarsoft.com. The colors and the font are the game's: the night blue of its
   menu, the gold of its title, the colors of its numbered pieces, Lilita One for the
   headings. The game has no second font: the rest is written in the reader's own. */

@font-face { font-family: "Lilita One"; font-weight: 400; src: url("/assets/fonts/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }

:root {
  --top: #1f2454;
  --night: #0d0e24;
  --night-soft: #171a3d;
  --line: #2f3577;
  --white: #ffffff;
  --text: #e6e8fa;
  --muted: #aab0dc;
  --gold: #ffd14d;
  --ink: #1a1a42;
  /* The pieces, 1 to 9 (scripts/game/look.gd) */
  --n1: #1fadb3;
  --n2: #5cbd4d;
  --n3: #edc233;
  --n4: #f2852b;
  --n5: #e64f4d;
  --n6: #e05ca3;
  --n7: #996be0;
  --n8: #4580f0;
  --n9: #121229;
  --piece-ink: #fafaf5;
  --piece-ink-dark: #38240d;
  --piece-ink-gold: #facc47;
  --heading: "Lilita One", "Arial Rounded MT Bold", "Arial Black", system-ui, sans-serif;
  --page-width: 1040px;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--white); }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: 16px; top: -60px; background: var(--white); color: var(--night); padding: 10px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--page-width); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { background: var(--top); border-bottom: 1px solid var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; }
.site-header .brand { display: flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; font: 400 24px/1 var(--heading); }
.site-header .brand img { width: 40px; height: 40px; border-radius: 10px; }
.site-header nav { display: flex; align-items: center; gap: 6px 20px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.site-header nav a { color: var(--text); text-decoration: none; padding: 6px 0; }
.site-header nav a:hover { color: var(--gold); }
.site-header nav .lang-switch { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--muted); }
.site-header nav .lang-switch:hover { border-color: var(--muted); color: var(--white); }

/* Hero: the background of the menu, from its top color to its bottom one */
.hero { background: linear-gradient(180deg, var(--top) 0%, var(--night) 100%); color: var(--white); }
.hero .container { display: grid; grid-template-columns: 1.1fr 0.9fr; align-items: center; gap: 24px 48px; padding-top: 56px; padding-bottom: 56px; }
.hero h1 { font: 400 clamp(48px, 10vw, 92px) / 1 var(--heading); color: var(--gold); margin: 0 0 16px; text-shadow: 0 4px 0 rgba(13, 14, 36, 0.55); overflow-wrap: anywhere; }
.hero p { margin: 0 0 14px; max-width: 40ch; font-size: 20px; }
.hero .tagline { font: 400 28px/1.2 var(--heading); }
.hero .soon { display: inline-block; background: var(--night); color: var(--gold); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; font-size: 15px; font-weight: 700; margin: 8px 0 0; }
.hero .icon { justify-self: center; width: 100%; max-width: 380px; border-radius: 22%; box-shadow: 0 18px 40px rgba(5, 6, 18, 0.6); }

/* The pieces of the game, 1 to 9: a row of them in the hero, and the number of each step */
.tiles { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 14px; }
.tiles span, .steps li::before { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 11px; font: 400 26px/1 var(--heading); color: var(--piece-ink); background: var(--n1); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2); text-shadow: 0 2px 0 rgba(13, 14, 36, 0.4); }
.tiles .n2, .steps li:nth-child(2)::before { background: var(--n2); }
.tiles .n3, .steps li:nth-child(3)::before { background: var(--n3); color: var(--piece-ink-dark); text-shadow: none; }
.tiles .n4, .steps li:nth-child(4)::before { background: var(--n4); }
.tiles .n5 { background: var(--n5); }
.tiles .n6 { background: var(--n6); }
.tiles .n7 { background: var(--n7); }
.tiles .n8 { background: var(--n8); }
.tiles .n9 { background: var(--n9); color: var(--piece-ink-gold); box-shadow: inset 0 0 0 2px rgba(250, 204, 71, 0.8); text-shadow: none; }

/* Sections */
section { padding: 60px 0; }
section + section { border-top: 1px solid var(--line); }
h2 { font: 400 36px/1.1 var(--heading); color: var(--white); margin: 0 0 18px; }
h3 { font: 400 22px/1.25 var(--heading); color: var(--white); margin: 0 0 6px; }
p { margin: 0 0 16px; }
.text { max-width: 68ch; }

.steps { list-style: none; counter-reset: step; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 0; padding: 0; }
.steps li { counter-increment: step; background: var(--night-soft); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.steps li::before { content: counter(step); margin: 0 0 14px; }
.steps p { margin: 0; color: var(--muted); }

.features { display: grid; gap: 10px 32px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 0; padding: 0 0 0 22px; max-width: 960px; }
.features li::marker { color: var(--gold); }

.shots { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); list-style: none; margin: 0; padding: 0; }
.shots img { width: 100%; border-radius: 16px; border: 1px solid var(--line); }

/* Buttons */
.button { display: inline-block; background: var(--gold); color: var(--ink); text-decoration: none; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 16px; }
.button:hover { background: var(--white); color: var(--ink); }
.button.secondary { background: transparent; color: var(--white); border: 1px solid var(--line); }
.button.secondary:hover { border-color: var(--muted); background: transparent; color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Legal documents */
.document { padding: 48px 0 72px; }
.document .container { max-width: 760px; }
.document h1 { font: 400 clamp(36px, 7vw, 56px) / 1.05 var(--heading); color: var(--white); margin: 0 0 8px; overflow-wrap: anywhere; }
.document .product-name { color: var(--gold); font-size: 14px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 10px; }
.document .date { color: var(--muted); font-size: 15px; margin: 0 0 30px; }
.document h2 { font: 400 24px/1.25 var(--heading); margin: 36px 0 10px; }
.document ul { padding-left: 22px; margin: 0 0 16px; }
.document li { margin-bottom: 6px; }
.document code { font: 15px ui-monospace, Consolas, monospace; color: var(--gold); overflow-wrap: anywhere; }
.document .summary { border: 1px solid var(--line); border-left: 4px solid var(--gold); background: var(--night-soft); border-radius: 12px; padding: 18px 20px; margin: 0 0 8px; }
.document .summary p { color: var(--white); margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--white); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer .studio { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.site-footer .studio img { width: 151px; height: 30px; }

/* Page not found */
.not-found { text-align: center; padding: 90px 0; }
.not-found h1 { font: 400 clamp(64px, 14vw, 120px) / 1 var(--heading); margin: 0 0 12px; color: var(--gold); }
.not-found p { color: var(--muted); margin: 0 auto 10px; max-width: 46ch; }
.not-found .actions { justify-content: center; margin-top: 26px; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero .container { grid-template-columns: 1fr; padding-top: 32px; padding-bottom: 40px; }
  .hero .icon { order: -1; max-width: 220px; }
  .hero p { font-size: 18px; }
  .hero .tagline { font-size: 24px; }
  .tiles { gap: 5px; }
  .tiles span { width: 30px; height: 30px; border-radius: 8px; font-size: 18px; }
  section { padding: 44px 0; }
  h2 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
