/* ==========================================================================
   PlayItAgain — marketing site
   Palette and typography mirror the app itself (see BoardTheme.swift):
   warm parchment background, terracotta accent, wood-brown rules, a single
   violet "highlight" used the same way the app uses it — to mark focus,
   not decoration — and the same terrain hues as the board tiles.
   ========================================================================== */

:root {
  --parchment: #F7EBCC;
  --parchment-soft: #FBF4E3;
  --paper: #FFFDF7;
  --accent: #C76B24;
  --accent-dark: #A6551A;
  --wood: #785430;
  --wood-soft: #785430;
  --highlight: #9440BF;
  --ink: #2E2013;
  --ink-soft: #5A4A38;

  --wood-terrain: #216130;
  --sheep: #A3BD61;
  --wheat: #EDB533;
  --brick: #C75C33;
  --ore: #8C94A1;
  --desert: #DEC794;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --max-width: 1120px;
  --radius: 18px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ink);
  background: var(--parchment-soft);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
  background: var(--paper);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 999;
}

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

.wrap-narrow {
  max-width: 720px;
}

section[id] {
  scroll-margin-top: 84px;
}

/* ---------------------------------- Header ---------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 235, 204, 0.86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid rgba(120, 84, 48, 0.18);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  border-radius: 22%;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
}

.brand-sub {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--wood);
  font-weight: 600;
}


.primary-nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.98rem;
}

.primary-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
}

.primary-nav a:hover {
  color: var(--accent);
}

.nav-cta {
  background: var(--accent);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
}

.nav-cta:hover {
  background: var(--accent-dark);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  display: block;
  border-radius: 2px;
}

/* ---------------------------------- Hero ---------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 96px;
}

.hero-hexfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.55;
  background-image:
    linear-gradient(135deg, var(--wood-terrain) 0 10%, transparent 10%),
    linear-gradient(135deg, transparent 0, transparent 100%);
  background: radial-gradient(circle at 85% 12%, rgba(199,107,36,0.16), transparent 45%),
              radial-gradient(circle at 8% 85%, rgba(148,64,191,0.10), transparent 45%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 56px;
}

.hero-copy { flex: 1 1 420px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--wood);
  margin: 0 0 14px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.08;
  margin: 0 0 20px;
  color: var(--ink);
}

.lede {
  font-size: 1.14rem;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 0 30px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid rgba(120, 84, 48, 0.4);
  color: var(--ink-soft);
  background: var(--paper);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
}

.store-badge:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.store-badge:hover .apple-mark {
  fill: var(--accent);
}

.apple-mark { width: 18px; height: 18px; fill: var(--ink-soft); }

.hero-media { flex: 1.4 1 540px; display: flex; justify-content: center; }

.device-frame {
  border: 1px solid rgba(120, 84, 48, 0.35);
  border-radius: 28px;
  padding: 10px;
  background: linear-gradient(160deg, #fff, #F3E7C9);
  box-shadow: 0 18px 40px rgba(46, 32, 19, 0.18);
  max-width: 100%;
  width: 560px;
}

.device-frame img {
  border-radius: 20px;
  width: 100%;
}

.device-frame.small {
  max-width: 260px;
  padding: 8px;
  border-radius: 22px;
}

.device-frame.small img {
  border-radius: 16px;
}

/* ---------------------------------- Section shells ---------------------------------- */

.section-title {
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  margin: 0 0 8px;
  text-align: center;
}

.section-lede {
  text-align: center;
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto 56px;
  font-size: 1.05rem;
}

.how-it-works, .features {
  padding: 88px 0;
}

.how-it-works { background: var(--paper); }

/* ---------------------------------- Story ---------------------------------- */

.story {
  padding: 88px 0 72px;
  text-align: center;
}

.eyebrow.center {
  text-align: center;
}

.story-text {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 20px auto 22px;
}

.story-signoff {
  font-style: italic;
  color: var(--wood);
  font-weight: 600;
  margin: 0;
}

/* ---------------------------------- Steps ---------------------------------- */

.step {
  display: flex;
  align-items: center;
  gap: 56px;
  margin-bottom: 88px;
}

.step:last-child { margin-bottom: 0; }

.step.reverse { flex-direction: row-reverse; }

.step-copy { flex: 1 1 380px; }

.step-number {
  display: inline-block;
  font-weight: 700;
  color: var(--highlight);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.step-copy h3 {
  font-size: 1.6rem;
  margin: 0 0 14px;
}

.step-copy p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  max-width: 46ch;
}

.step-media {
  flex: 1 1 420px;
}

.step-media.two-up {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------------------------------- Feature grid ---------------------------------- */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
  margin-bottom: 72px;
}

.feature-card {
  background: var(--paper);
  border: 1px solid rgba(120, 84, 48, 0.18);
  border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: 0 8px 20px rgba(46, 32, 19, 0.06);
}

.feature-icon {
  font-size: 1.7rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1.12rem;
  margin: 0 0 8px;
}

.feature-card p {
  color: var(--ink-soft);
  margin: 0;
  font-size: 0.98rem;
}


/* ---------------------------------- Privacy ---------------------------------- */

.privacy {
  padding: 88px 0 100px;
  background: var(--parchment);
}

.privacy h3 {
  margin: 34px 0 10px;
  font-size: 1.2rem;
  color: var(--ink);
}

.privacy p {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.privacy-updated {
  text-align: center;
  color: var(--wood);
  font-weight: 600;
  margin-top: 14px;
  margin-bottom: 34px;
}

.privacy a {
  color: var(--accent-dark);
  font-weight: 600;
}

/* ---------------------------------- Footer ---------------------------------- */

.site-footer {
  background: var(--wood);
  color: #F3E7CE;
  padding: 44px 0 36px;
}

.footer-inner {
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.footer-brand img { border-radius: 22%; }

/* Mirrors the header's brand lockup (icon + stacked name/subtitle)
   instead of cramming "PlayItAgain KOLONIE" onto one line — and gives
   the subtitle a color that's actually visible against this section's
   wood-brown background (it was previously the same wood-brown as the
   background itself, which is why "KOLONIE" looked like it had
   vanished). */
.footer-brand-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
}

.footer-brand-name {
  font-weight: 700;
  font-size: 1.08rem;
  color: #FBF4E3;
}

.footer-sub {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: #D9BFA0;
  font-weight: 600;
}

.footer-note {
  max-width: 56ch;
  margin: 0 auto 14px;
  color: #E4D2AE;
  font-size: 0.88rem;
}

.footer-links {
  margin: 0 0 10px;
  font-size: 0.92rem;
}

.footer-links a {
  text-decoration: underline;
}

.footer-copyright {
  margin: 0;
  font-size: 0.82rem;
  color: #CBB48A;
}

/* ---------------------------------- Responsive ---------------------------------- */

@media (max-width: 880px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--parchment-soft);
    border-bottom: 1px solid rgba(120,84,48,0.18);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 24px 20px;
    display: none;
  }

  .primary-nav.open { display: flex; }

  .primary-nav a { padding: 10px 0; width: 100%; }

  .nav-cta { text-align: center; }

  .hero-inner { flex-direction: column; text-align: center; }
  .hero-copy { flex: none; }
  .lede { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  /* .hero-media's base rule sets `flex: 1.4 1 540px` for the desktop
     row layout, where that 540px is a preferred *width*. Once
     `.hero-inner` switches to a column here, flexbox reinterprets the
     same flex-basis along the now-vertical main axis — i.e. as a
     minimum *height* — which stretched this box (and the big blank
     gap below the actual image) to ~540px regardless of how tall the
     image itself is. `flex: none` makes it size to its content again. */
  .hero-media {
    flex: none;
    width: 100%;
  }
  .hero-media .device-frame {
    width: 280px;
    max-width: 72%;
    margin: 0 auto;
  }

  .step, .step.reverse {
    flex-direction: column;
    text-align: center;
    gap: 28px;
  }
  .step-copy p { margin-left: auto; margin-right: auto; }

  .feature-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
  .header-inner { height: 60px; }
}
