/* Merge 42 — legal pages (privacy / support)
   Same palette + type pairing as the app itself (src/theme.ts, src/typography.ts):
   Sora for display, Outfit for body, on the game's dark indigo ground. */

:root {
  --bg: #181a2a;
  --surface: #232640;
  --surface-alt: #2e3157;
  --border: #3a3e68;
  --text: #f4f5fb;
  --text-dim: #9ea2c7;
  --accent: #7c8cff;
  --accent-soft: rgba(124, 140, 255, 0.14);
  --radius: 16px;
  --max-w: 720px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  background-image: radial-gradient(60% 40% at 50% 0%, rgba(124, 140, 255, 0.12), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* ---------- brand mark: a small CSS/SVG marble, matching Ball.tsx ---------- */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.marble {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  /* The real "La Réponse" ball — the app's own icon.png, not a redrawn
     stand-in — so this is exactly the same asset the App Store listing
     itself uses, cropped tight around the sphere. */
  background-image: url("img/ball-42.png");
  background-size: cover;
  box-shadow: 0 2px 14px rgba(124, 140, 255, 0.45);
}

.brand-name {
  display: block;
}

/* Filled by brand.js with the real wordmark SVG — sized to sit level with
   the 34px ball beside it. */
.brand-name svg {
  display: block;
  height: 22px;
  width: auto;
}

header.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}

nav.pages {
  display: flex;
  gap: 8px;
  align-items: center;
}

nav.pages a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

nav.pages a:hover {
  color: var(--text);
}

nav.pages a[aria-current="page"] {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
}

/* ---------- language toggle ---------- */
#lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  background: var(--surface);
}

#lang-toggle button {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 6px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

#lang-toggle button.active {
  background: var(--accent);
  color: #0e0f1c;
}

[data-lang-panel] {
  display: none;
}

[data-lang-panel].active {
  display: block;
}

/* ---------- glass wordmark hero (support page) ---------- */
.wordmark-hero {
  display: flex;
  justify-content: center;
  margin: 8px 0 36px;
}

.wordmark-hero svg {
  width: 100%;
  max-width: 300px;
  height: auto;
  filter: drop-shadow(0 0 26px rgba(190, 197, 255, 0.4));
}

/* ---------- typography ---------- */
h1 {
  font-family: "Sora", sans-serif;
  font-weight: 800;
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  text-wrap: balance;
}

.kicker {
  color: var(--accent);
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.updated {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 40px;
}

h2 {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.005em;
  margin: 40px 0 12px;
}

section:first-of-type h2 {
  margin-top: 0;
}

p {
  color: var(--text);
  margin: 0 0 14px;
}

ul {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin: 0 0 8px;
  color: var(--text);
}

li::marker {
  color: var(--accent);
}

strong {
  font-weight: 600;
}

a.inline {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(124, 140, 255, 0.4);
}

a.inline:hover {
  border-bottom-color: var(--accent);
}

/* ---------- cards (support page contact block, index links) ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 16px;
}

.card h3 {
  font-family: "Sora", sans-serif;
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 6px;
}

.card p {
  color: var(--text-dim);
  margin: 0;
  font-size: 14.5px;
}

.contact-card {
  background: var(--accent-soft);
  border: 1px solid rgba(124, 140, 255, 0.35);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin: 4px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.contact-card .label {
  color: var(--text-dim);
  font-size: 13px;
  margin: 0 0 4px;
}

.contact-card .email {
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}

.contact-card .email:hover {
  color: var(--accent);
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #0e0f1c;
  font-family: "Sora", sans-serif;
  font-weight: 700;
  font-size: 14.5px;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  white-space: nowrap;
}

.index-links {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.index-links a.card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.index-links a.card:hover {
  border-color: var(--accent);
  background: var(--surface-alt);
}

.index-links a.card .arrow {
  color: var(--accent);
  font-size: 20px;
  flex: none;
}

footer.foot {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

footer.foot a {
  color: var(--text-dim);
}

@media (max-width: 480px) {
  h1 {
    font-size: 28px;
  }
  .wrap {
    padding: 40px 18px 60px;
  }
  .contact-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
