/* CloudBurst website — shared styles. site/DESIGN.md owns the decisions.
   Layout: the game's own night sky. Full-bleed hero, then sections in a centred
   column ruled in brass; cards are glass panels like the game's menus. */

@font-face {
  font-family: "Roboto";
  src: url("fonts/roboto.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --sky: #15153a;
  --sky-deep: #0e0e2c;
  --glass: rgba(48, 49, 111, 0.55);
  --line: rgba(180, 178, 240, 0.18);
  --text: #f3ecff;
  --muted: #b4b2f0;
  --brass: #e2b85a;
  --brass-hi: #fbd067;
  --on-brass: #2a1c08;
  --glow: rgba(122, 92, 200, 0.35);
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--sky);
  color: var(--text);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--brass-hi); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brass-hi); outline-offset: 3px; }

.wrap { max-width: 1180px; margin-inline: auto; padding-inline: var(--gutter); }

/* ---- type ---- */
h1, h2, h3 { font-stretch: 75%; font-weight: 800; letter-spacing: 0.01em; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.1; }
h3 { font-size: 1.25rem; line-height: 1.25; font-weight: 700; }
.lede { color: var(--muted); max-width: 62ch; margin: 0; text-wrap: pretty; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font: 700 1rem/1 var(--font); font-stretch: 85%; letter-spacing: 0.02em;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.12s ease, background-color 0.12s ease;
}
.btn-primary { background: var(--brass); color: var(--on-brass); box-shadow: 0 6px 20px rgba(226, 184, 90, 0.25); }
.btn-primary:hover { background: var(--brass-hi); transform: translateY(-1px); }
.btn-ghost { color: var(--text); border: 1px solid rgba(180, 178, 240, 0.45); background: rgba(21, 21, 58, 0.45); }
.btn-ghost:hover { border-color: var(--muted); transform: translateY(-1px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .btn, .btn:hover { transition: none; transform: none; } }

/* ---- top bar (inner pages) ---- */
.topbar { border-bottom: 1px solid var(--line); background: rgba(14, 14, 44, 0.6); }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.topbar .home img { display: block; width: 150px; }
.topbar .btn { padding: 9px 16px; font-size: 0.9375rem; }

/* ---- sections ---- */
.section { padding-block: clamp(48px, 8vw, 88px) 0; }
.section-head { display: grid; gap: 10px; padding-block-end: 16px; margin-block-end: 28px; border-bottom: 2px solid var(--brass); }
.eyebrow { margin: 0; font-weight: 700; font-stretch: 75%; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--brass); }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); }

/* ---- hero (landing) ---- */
.hero {
  position: relative;
  background:
    radial-gradient(60% 70% at 50% 42%, rgba(14, 14, 44, 0.72), rgba(14, 14, 44, 0.2) 70%, transparent),
    linear-gradient(to bottom, rgba(21, 21, 58, 0.35), rgba(21, 21, 58, 0.15) 45%, var(--sky)),
    url("img/hero.jpg") center / cover no-repeat,
    var(--sky);
}
.hero .wrap { display: grid; justify-items: center; text-align: center; gap: 22px; padding-block: clamp(56px, 10vw, 120px) clamp(64px, 10vw, 112px); }
.hero .logo { width: min(560px, 88%); filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5)); }
.hero .pitch { font-size: clamp(1.05rem, 2.2vw, 1.3rem); line-height: 1.5; max-width: 52ch; margin: 0; text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6); text-wrap: pretty; }
.facts { margin: 0; color: var(--muted); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }

/* ---- about ---- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.split .copy { display: grid; gap: 16px; }
.split .copy p { margin: 0; max-width: 60ch; }
.shot { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(226, 184, 90, 0.45); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); }
.shot img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---- modes ---- */
.modes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.mode { overflow: hidden; display: grid; grid-template-rows: auto 1fr; }
.mode img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--line); }
.mode .body { padding: 16px 18px 18px; display: grid; gap: 6px; align-content: start; }
.mode p { margin: 0; color: var(--muted); }

/* ---- features ---- */
.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 40px; }
.features li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.features li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brass); box-shadow: 0 0 0 3px rgba(226, 184, 90, 0.2); transform: translateY(-1px); }

/* ---- achievements teaser ---- */
.teaser { padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: center; }
.teaser .copy { display: grid; gap: 12px; justify-items: start; }
.portholes { display: grid; grid-template-columns: repeat(4, auto); justify-content: start; gap: 10px; }
.portholes img { width: 100px; height: 100px; border-radius: 50%; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); }

/* ---- closing call ---- */
.closing { text-align: center; display: grid; justify-items: center; gap: 16px; padding-block: clamp(56px, 9vw, 96px); }
.closing .lede { text-align: center; }

/* ---- footer ---- */
.footer { border-top: 1px solid var(--line); background: var(--sky-deep); }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 28px; color: var(--muted); font-size: 0.875rem; }
.footer p { margin: 0; max-width: 70ch; }
.footer nav { display: flex; gap: 18px; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); }

/* ---- achievements page ---- */
.page-head { display: grid; justify-items: center; text-align: center; gap: 12px; padding-block: 40px 8px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding-block: 16px; margin-block-start: 24px; border-block: 1px solid var(--line); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: rgba(0, 0, 0, 0.2); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label { padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 0.875rem; }
.seg input:checked + label { background: var(--brass); color: var(--on-brass); }
.seg input:focus-visible + label { outline: 2px solid var(--brass-hi); outline-offset: 2px; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.8125rem; }
.jump a { color: var(--muted); text-decoration: none; padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; }
.jump a:hover, .jump a:focus-visible { border-color: var(--line); color: var(--text); outline: none; }

.group { padding-block: 32px 0; }
.group:last-child { padding-block-end: clamp(48px, 8vw, 88px); }
.group .section-head { margin-block-end: 18px; }
.group h2 { font-size: 1.6rem; }
.group h2 .count { font-weight: 600; font-size: 1rem; color: var(--brass); margin-inline-start: 8px; font-variant-numeric: tabular-nums; }
.ach-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ach { display: grid; justify-items: center; align-content: start; text-align: center; gap: 12px; padding: 20px 16px; }
.port { width: 112px; height: 112px; border-radius: 50%; overflow: hidden; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45); flex: none; }
.port img { display: block; width: 100%; height: 100%; }
.ach .txt { min-width: 0; display: grid; gap: 4px; }
.ach h3 { font-size: 1.125rem; font-weight: 700; }
.ach p { margin: 0; color: var(--muted); }
.ic-locked { display: none; }
:root[data-icons="locked"] .ic-earned { display: none; }
:root[data-icons="locked"] .ic-locked { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .port { transition: transform 0.15s ease; }
  .ach:hover .port { transform: rotate(-4deg); }
}

/* ---- narrow screens ---- */
@media (max-width: 900px) {
  .modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modes.terrains { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .teaser { grid-template-columns: minmax(0, 1fr); }
  .ach-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ach { grid-template-columns: 80px minmax(0, 1fr); justify-items: start; align-items: center; text-align: left; gap: 14px; padding: 14px; }
  .port { width: 80px; height: 80px; }
}
@media (max-width: 720px) {
  .modes.terrains { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .modes, .features { grid-template-columns: minmax(0, 1fr); }
  .portholes img { width: 64px; height: 64px; }
  .topbar .home img { width: 120px; }
  .ach-grid { grid-template-columns: minmax(0, 1fr); }
  .port { width: 72px; height: 72px; }
}
