/* Ludo Unleashed — public site.
   Hand-written, no build step, no dependencies (see technical/hosting-and-web.md D6).
   Palette is the app's own LudoTheme tokens so site and game read as one product. */

:root {
  --surface-base:     #0F1020;
  --surface-raised:   #1A1B2E;
  --surface-elevated: #252741;
  --border:           #33354F;
  --brand:            #6D28D9;
  --brand-hover:      #8B5CF6;
  --brand-light:      #C4B5FD;
  --gold:             #F2B233;
  --gold-light:       #FBD27A;
  --text:             #F5F6FA;
  --text-muted:       #B4B7C9;
  --success:          #22C55E;
  --danger:           #EF4444;

  --maxw: 1080px;
  --radius: 14px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--surface-base);
  color: var(--text);
  font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  /* The stated audience includes children and elderly users — base text is deliberately
     larger than a typical marketing site, and never shrinks below 17px anywhere. */
  font-size: 18px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ── Header / nav ─────────────────────────────────────────────────── */

header.site {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 16, 32, 0.92);
  position: sticky; top: 0; z-index: 10;
  backdrop-filter: blur(8px);
}
header.site .wrap {
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand img { width: 40px; height: 40px; border-radius: 9px; }
.brand span { font-weight: 700; font-size: 20px; letter-spacing: .2px; }

nav.site { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
nav.site a {
  color: var(--text-muted); text-decoration: none;
  padding: 10px 14px; border-radius: var(--radius-sm); font-weight: 600;
}
nav.site a:hover { color: var(--text); background: var(--surface-raised); }
nav.site a[aria-current="page"] { color: var(--brand-light); background: var(--surface-raised); }

/* ── Hero ─────────────────────────────────────────────────────────── */

.hero {
  position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  /* Fills the letterbox when the art is narrower than the viewport, so `contain` does not
     expose the page background as bright bars either side of the banner. */
  background: var(--surface-base);
}
.hero img.art {
  display: block; width: 100%; height: auto;
  /* `contain`, not `cover`. The banner is 1376x768 artwork with the logo and board composed
     inside the frame — cropping it to a 520px band cut roughly a third off, including part of
     the art it exists to show. Letterboxing on very wide screens is the cheaper trade: the
     whole image is the point. */
  max-height: min(72vh, 620px); object-fit: contain; object-position: center;
}
.hero .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,16,32,.25) 0%, rgba(15,16,32,.75) 65%, var(--surface-base) 100%);
}
.hero .copy {
  position: relative; margin-top: -110px; padding-bottom: 40px; text-align: center;
}
h1 { font-size: clamp(32px, 6vw, 54px); line-height: 1.12; margin: 0 0 14px; }
.tagline { font-size: clamp(18px, 2.4vw, 22px); color: var(--text-muted); margin: 0 auto 28px; max-width: 640px; }

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  /* 44px min height — the same touch-target floor the app uses (Apple HIG). */
  min-height: 52px; padding: 12px 26px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-size: 18px; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-hover); }
.btn.secondary { background: var(--surface-elevated); color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--surface-raised); border-color: var(--brand-light); }
.btn.gold { background: var(--gold); color: #241a02; }
.btn.gold:hover { background: var(--gold-light); }
.btn[aria-disabled="true"] { background: var(--surface-raised); color: var(--text-muted); cursor: default; border-color: var(--border); }
.btn-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Sections & cards ─────────────────────────────────────────────── */

section { padding: 56px 0; }
section + section { border-top: 1px solid var(--border); }
h2 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 10px; }
h3 { font-size: 21px; margin: 0 0 8px; }
.sub { color: var(--text-muted); margin: 0 0 28px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.card h3 { color: var(--brand-light); }
.card p:last-child { margin-bottom: 0; }

.platform-card { display: flex; flex-direction: column; gap: 12px; }
.platform-card .meta { color: var(--text-muted); font-size: 15px; margin: 0; }
.platform-card .btn { width: 100%; }

.pill {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 14px; font-weight: 700; letter-spacing: .3px;
}
.pill.soon { background: rgba(242,178,51,.15); color: var(--gold); border: 1px solid rgba(242,178,51,.35); }
.pill.live { background: rgba(34,197,94,.15); color: var(--success); border: 1px solid rgba(34,197,94,.35); }

/* ── Step-by-step install guides ──────────────────────────────────── */
/* Audience is explicitly non-technical, including children and elderly users:
   one action per step, generous spacing, numbers large enough to track by eye. */

ol.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
ol.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 26px 62px;
  border-left: 2px solid var(--border);
  margin-left: 20px;
}
ol.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: -21px; top: -2px;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px;
}
ol.steps > li strong { display: block; font-size: 20px; margin-bottom: 4px; }
ol.steps > li p { margin: 0 0 8px; color: var(--text-muted); }

.notice {
  border-radius: var(--radius); padding: 18px 20px; margin: 24px 0;
  background: rgba(242,178,51,.10); border: 1px solid rgba(242,178,51,.35);
}
.notice strong { color: var(--gold); }
.notice p:last-child { margin-bottom: 0; }

kbd {
  background: var(--surface-elevated); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 8px; font-size: 16px; font-family: inherit;
}

/* ── Forms (email capture, reviews) ───────────────────────────────── */

input, textarea, select {
  width: 100%; padding: 14px 16px; font-size: 18px; font-family: inherit;
  background: #16172A; color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--brand-light); outline-offset: 1px; }
label { display: block; font-weight: 600; margin: 0 0 6px; }
.field { margin-bottom: 18px; }
.form-inline { display: flex; gap: 12px; flex-wrap: wrap; }
.form-inline input { flex: 1 1 260px; width: auto; }

/* ── Reviews ──────────────────────────────────────────────────────── */

.stars { color: var(--gold); letter-spacing: 3px; font-size: 20px; }
.review { border-bottom: 1px solid var(--border); padding: 20px 0; }
.review:last-child { border-bottom: none; }
.review .who { font-weight: 700; }
.review .when { color: var(--text-muted); font-size: 15px; }

.empty { color: var(--text-muted); text-align: center; padding: 40px 0; }

/* ── Updates ──────────────────────────────────────────────────────── */

.release { margin-bottom: 34px; }
.release h3 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.release .date { color: var(--text-muted); font-size: 16px; font-weight: 400; }
.release ul { margin: 8px 0 0; padding-left: 22px; }
.release li { margin-bottom: 8px; }

/* ── Footer ───────────────────────────────────────────────────────── */

footer.site {
  border-top: 1px solid var(--border); padding: 34px 0;
  color: var(--text-muted); font-size: 16px;
}
footer.site a { color: var(--text-muted); }
footer.site .links { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 12px; }

a { color: var(--brand-light); }

@media (max-width: 640px) {
  .hero .copy { margin-top: -60px; }
  ol.steps > li { padding-left: 54px; }
  section { padding: 40px 0; }
}

/* ── Code + checksums ─────────────────────────────────────────────── */
/* Checksums are long unbroken hex strings: without the wrap rules below they force a
   horizontal scrollbar on the whole page on a phone, which is exactly the audience most
   likely to be reading this on one. */
pre {
  background: var(--surface-raised); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; margin: 12px 0;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px; color: var(--brand-light);
  overflow-wrap: anywhere; word-break: break-all;
}
pre code { color: var(--text); white-space: pre; word-break: normal; }
