/* Word Burst landing site
 *
 * The chrome around the embedded game. Deliberately shares the game's warm,
 * ASD-friendly palette (apps/word-burst/static/styles.css): muted tones, no
 * pure black/white, rounded geometry, gentle motion. The header wordmark is
 * built from the same rounded letter tiles the player drags in the game, so
 * the page reads as one piece. Tokens are redefined here (not inherited from
 * game.css) so the chrome renders correctly even before the game stylesheet
 * loads.
 */

:root {
  --bg: #f0ece4;
  --bg-warm: #e8e2d8;
  --card-bg: #faf8f4;
  --text: #3d3832;
  --text-muted: #7a7268;
  --sage: #6b8f71;
  --accent-light: #c4b59a;
  --border: #d4cec4;
  --letter-bg: #e8e2d8;
  --radius: 14px;
  --radius-sm: 10px;
  --tile-shadow: 0 2px 6px rgba(61, 56, 50, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Header / tile wordmark ── */

.landing-header {
  text-align: center;
  padding: 2.75rem 1.5rem 1rem;
}

.wordmark {
  margin: 0 0 0.6rem;
}

.tiles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.tile-word {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  max-width: 100%;
}

.tile {
  --tile-bg: var(--letter-bg);
  --tile-text: var(--text);
  font-family: "Fredoka", "Nunito", sans-serif;
  font-weight: 600;
  font-size: clamp(1.8rem, 8vw, 3.3rem);
  line-height: 1;
  width: 1.3em;
  height: 1.4em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--tile-text);
  background: var(--tile-bg);
  border: 2px solid var(--accent-light);
  border-radius: var(--radius);
  box-shadow: var(--tile-shadow);
  animation: tile-settle 0.5s ease both;
}

.t-clay {
  --tile-bg: var(--letter-bg);
}
.t-sage {
  --tile-bg: var(--sage);
  --tile-text: var(--card-bg);
  border-color: var(--sage);
}
.t-sand {
  --tile-bg: var(--accent-light);
}

/* Gentle settle: a slow fade and small rise, nothing sudden. */
@keyframes tile-settle {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tagline {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ── Embedded game ── */

.landing-game {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2rem;
}

/* ── Copy ── */

.landing-copy {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.description {
  margin: 0 0 1rem;
  padding: 1.4rem 1.6rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-muted);
  text-align: center;
  box-shadow: var(--tile-shadow);
}

/* ── Footer ── */

.landing-footer {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem 1.5rem 3rem;
}

.terms-link {
  color: var(--sage);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.terms-link:hover {
  text-decoration: underline;
}

.terms-link:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ── Terms / Privacy pages ── */

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3.5rem;
}

/* ── Motion preferences ── */

@media (prefers-reduced-motion: reduce) {
  .tile {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
