/* Ludi Clash website. Colours sampled from the game's art; Poppins Bold (SIL OFL, see /assets/fonts/OFL.txt)
   for headings, system fonts for everything else. No external requests. */

@font-face {
  font-family: "Poppins";
  src: url("/assets/fonts/poppins-bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --wood-900: #24130a;
  --wood-800: #3b220e;
  --wood-700: #522f12;
  --wood-600: #673b18;
  --gold: #f4b02a;
  --orange: #ee8f29;
  --red: #cc0303;
  --green: #5bd94c;
  --green-ink: #0f2e08;
  --cream: #fff5dc;
  --ink: #2b1a0c;
  --muted: #e8d6b4;
  --radius: 14px;
  --max: 68rem;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Poppins", var(--font-body);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--cream);
  background: var(--wood-800);
  background-image: radial-gradient(120% 60% at 50% 0%, var(--wood-600) 0%, var(--wood-800) 60%, var(--wood-900) 100%);
  background-attachment: fixed;
}

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

a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: #ffd166; }

/* Visible focus for keyboard users, never removed. */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -3rem;
  padding: 0.5rem 0.9rem;
  background: var(--cream);
  color: var(--ink);
  font-weight: 700;
  border-radius: 8px;
  z-index: 10;
}
.skip-link:focus { top: 0.75rem; }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(1.9rem, 6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4.5vw, 2.1rem); }
h3 { font-size: 1.2rem; }

/* ---------- header ---------- */
.site-header { padding: 0.9rem 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--cream); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; }
.brand img { width: 40px; height: 40px; border-radius: 10px; }

/* ---------- buttons and badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.7rem 1.3rem;
  font: 700 1rem var(--font-head);
  color: var(--green-ink); background: var(--green);
  border: 2px solid #3fae31; border-radius: 999px;
  cursor: pointer; text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.btn:hover { background: #74e566; color: var(--green-ink); }
.btn:active { transform: translateY(1px); }
.btn-quiet { color: var(--cream); background: transparent; border-color: var(--muted); }
.btn-quiet:hover { background: rgba(255, 245, 220, 0.12); color: var(--cream); }

.store-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.badge {
  display: inline-flex; flex-direction: column; align-items: flex-start;
  min-width: 11rem; padding: 0.55rem 1.1rem;
  color: var(--cream); background: rgba(0, 0, 0, 0.35);
  border: 2px solid var(--muted); border-radius: 12px;
}
.badge small { font-size: 0.75rem; color: var(--muted); }
.badge strong { font-family: var(--font-head); font-size: 1.05rem; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 1.5rem 0 3rem; }
.hero-logo { width: min(100%, 26rem); margin: 0 auto 1rem; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45)); }
.tagline { font-family: var(--font-head); font-size: clamp(1.4rem, 5vw, 2.2rem); color: var(--gold); margin: 0 0 0.25rem; }
.hero-line { font-size: 1.1rem; color: var(--muted); margin: 0; }

/* ---------- sections ---------- */
.section { padding: 3rem 0; }
.section-alt { background: rgba(0, 0, 0, 0.22); }
.section-lead { color: var(--muted); max-width: 40rem; }

.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; counter-reset: step; }
.steps li { display: grid; grid-template-columns: 3rem 1fr; gap: 0.9rem; align-items: start; background: var(--cream); color: var(--ink); border-radius: var(--radius); padding: 1rem; }
.steps svg { width: 3rem; height: 3rem; }
.steps h3 { margin-bottom: 0.2rem; color: var(--wood-700); }
.steps p { margin: 0; }

.modes { display: grid; gap: 1rem; margin-top: 1.5rem; }
.mode { border: 2px solid var(--wood-600); border-radius: var(--radius); padding: 1.1rem; background: rgba(0, 0, 0, 0.25); }
.mode h3 { color: var(--gold); }
.mode p { margin: 0; color: var(--muted); }

.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; margin-top: 1.5rem; }
.shot { aspect-ratio: 9 / 19.5; border: 3px solid var(--wood-600); border-radius: 22px; background: rgba(0, 0, 0, 0.35); display: grid; place-items: center; color: var(--muted); font-size: 0.85rem; text-align: center; padding: 0.5rem; }

/* ---------- mailing list ---------- */
.signup { background: var(--cream); color: var(--ink); border-radius: var(--radius); padding: 1.4rem; max-width: 34rem; margin-top: 1.5rem; }
.signup h3 { color: var(--wood-700); }
.field { display: grid; gap: 0.3rem; margin-bottom: 0.9rem; }
.field label { font-weight: 700; }
.field input { font: inherit; min-height: 46px; padding: 0.55rem 0.75rem; border: 2px solid #b89b6c; border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus-visible { outline-color: var(--wood-700); }
.consent { display: grid; grid-template-columns: 1.4rem 1fr; gap: 0.6rem; align-items: start; margin: 0.4rem 0 1rem; }
.consent input { width: 1.3rem; height: 1.3rem; margin-top: 0.2rem; accent-color: var(--wood-700); }
.signup a { color: var(--wood-700); font-weight: 700; }
.form-note { font-size: 0.9rem; color: #5a4128; margin: 0.8rem 0 0; }
.thanks { display: none; }
.signup.is-done form { display: none; }
.signup.is-done .thanks { display: block; }
.embed-slot { border: 2px dashed #b89b6c; border-radius: 10px; padding: 0.6rem; margin-bottom: 1rem; font-size: 0.85rem; color: #5a4128; }

dialog.signup-dialog { border: 0; border-radius: var(--radius); padding: 0; max-width: min(34rem, calc(100% - 2rem)); background: transparent; }
dialog.signup-dialog::backdrop { background: rgba(20, 10, 4, 0.7); }
dialog.signup-dialog .signup { margin: 0; position: relative; }
.dialog-close { position: absolute; top: 0.6rem; right: 0.6rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: transparent; color: var(--wood-700); font-size: 1.6rem; line-height: 1; cursor: pointer; }

/* ---------- legal pages ---------- */
.legal { background: var(--cream); color: var(--ink); border-radius: var(--radius); padding: clamp(1.2rem, 4vw, 2.5rem); margin: 1rem auto 3rem; max-width: 48rem; }
.legal h1 { color: var(--wood-700); }
.legal h2 { color: var(--wood-700); font-size: 1.35rem; margin-top: 2rem; }
.legal a { color: #7a3d00; font-weight: 600; }
.legal table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.95rem; }
.legal th, .legal td { text-align: left; vertical-align: top; border-bottom: 1px solid #d9c49c; padding: 0.55rem 0.4rem; }
.legal th { color: var(--wood-700); }
.updated { color: #5a4128; font-size: 0.95rem; }
.placeholder { background: #ffe08a; color: #3d2600; padding: 0 0.25em; border-radius: 4px; font-weight: 700; }
.draft-banner { background: var(--red); color: #fff; text-align: center; padding: 0.5rem 1rem; font-weight: 700; }

/* ---------- footer ---------- */
.site-footer { padding: 2rem 0 2.5rem; color: var(--muted); font-size: 0.95rem; border-top: 1px solid rgba(255, 245, 220, 0.15); }
.site-footer nav ul { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer p { margin: 0.3rem 0; }

@media (min-width: 44rem) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .modes { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .btn, .badge, .mode, .shot, .signup, .legal { border: 1px solid CanvasText; }
}

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.legal-centre { text-align: center; }
/* Draft review only: statements that will be true only once a build that doesn't exist yet ships. Remove with the DRAFT banner. */
.needs-build { background: #d6ebff; color: #0b2a4a; padding: 0 0.2em; border-radius: 4px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.draft-banner .needs-build, .draft-banner .placeholder { font-weight: 700; }
