@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&display=swap');

:root {
  /* Heraldic palette, sampled from the Gardyloo Games crest */
  --navy-edge: #060f1b;
  --page: #0e1c30;
  --hero-center: #12253f;
  --surface: #14243c;
  --surface-2: #1b2d49;
  --line: rgba(228, 178, 76, 0.18);
  --line-steel: #2a3a54;

  --cream: #f4eede;
  --cream-soft: #c2cddb;

  --gold: #e4b24c;
  --gold-light: #f2cc6a;
  --gold-deep: #b87e24;
  --blue: #3a6fe0;
  --steel: #b9c0c9;

  --display: "Cinzel", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

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

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

body {
  margin: 0;
  background: var(--page);
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- hero ---- */

.hero {
  background:
    radial-gradient(130% 100% at 50% 6%, var(--hero-center) 0%, var(--page) 58%, var(--navy-edge) 100%);
  color: var(--cream);
  padding: 56px 0 92px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

.hero-logo-heading { margin: 0; }

.hero-logo {
  display: block;
  margin: 0 auto;
  width: min(306px, 63vw);
  height: auto;
  filter: drop-shadow(0 12px 34px rgba(0, 0, 0, 0.55));
}

.wordmark {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--cream);
}

.lede {
  margin: 22px auto 0;
  max-width: 46ch;
  font-size: clamp(1rem, 2.4vw, 1.125rem);
  color: var(--cream-soft);
}

/* Single-app landing page (/crackword) — the share link's web fallback. */

.hero-app { padding-bottom: 88px; }

.hero-icon {
  display: block;
  margin: 0 auto 20px;
  width: 112px;
  height: 112px;
  border-radius: 25px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
}

.card.get { justify-content: center; text-align: center; }
.card.get .card-body { width: 100%; }
.card.get .pitch { margin-inline: auto; }
.card.get .stores { justify-content: center; }

.already {
  margin: 22px 0 0;
  font-size: 0.875rem;
  color: var(--cream-soft);
}

.back {
  margin: 28px 0 0;
  text-align: center;
  font-size: 0.9375rem;
}

.back a { color: var(--gold); }

/* ---- app cards ---- */

main { margin-top: -56px; }

.apps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 24px;
}

.card {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent, var(--gold));
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
}

.icon {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 21px;
  background: rgba(255, 255, 255, 0.05);
  object-fit: cover;
}

.card-body { min-width: 0; }

.card h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: 0.005em;
  color: var(--cream);
}

.pitch {
  margin: 10px 0 0;
  color: var(--cream-soft);
  max-width: 58ch;
}

/* ---- store badges ---- */

.stores {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.badge {
  display: block;
  border-radius: 9px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.badge:hover { transform: translateY(-2px); }
.badge:active { transform: translateY(0); opacity: 0.85; }

.badge img { display: block; }

/* Apple's black badge needs a hair of separation from the dark surface. */
.badge-apple {
  height: 40px;
  width: auto;
  border-radius: 9px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16);
}

/* Google's badge PNG carries ~10% built-in clear space; scale up and pull the
   padding back in so it optically matches Apple's 40px badge. */
.badge-play {
  height: 58px;
  width: auto;
  margin: -9px -8px;
}

:where(a):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---- footer ---- */

footer {
  margin-top: 64px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--cream-soft);
  font-size: 0.875rem;
  text-align: center;
}

footer p { margin: 0; }

.fine {
  margin-top: 8px;
  font-size: 0.75rem;
  opacity: 0.75;
}

/* ---- footer nav ---- */

.footer-nav {
  margin: 0 0 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: 0.9375rem;
}

.footer-nav a {
  color: var(--gold);
  text-decoration: none;
}

.footer-nav a:hover { text-decoration: underline; }

/* ---- content pages (privacy, support) ---- */

.hero--page { padding: 48px 0 64px; }

.eyebrow {
  margin: 0 0 12px;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.eyebrow a {
  color: var(--gold);
  text-decoration: none;
}

.eyebrow a:hover { text-decoration: underline; }

.wordmark--page {
  font-size: clamp(1.9rem, 6vw, 3rem);
  letter-spacing: 0.02em;
}

.legal {
  margin-top: -40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 44px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.38);
  max-width: 760px;
}

.legal h2 {
  margin: 36px 0 8px;
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.005em;
  color: var(--cream);
}

.legal h2:first-of-type { margin-top: 8px; }

.legal h3 {
  margin: 20px 0 4px;
  font-size: 1.0625rem;
  color: var(--cream);
}

.legal p,
.legal li { color: var(--cream); }

.legal p { margin: 8px 0; }

.legal ul { margin: 8px 0; padding-left: 22px; }

.legal li { margin: 6px 0; }

.legal a { color: var(--gold); }

.legal .updated {
  color: var(--cream-soft);
  font-size: 0.9375rem;
}

.legal .lead {
  font-size: 1.0625rem;
  color: var(--cream-soft);
}

/* ---- responsive ---- */

@media (max-width: 640px) {
  .hero { padding: 44px 0 76px; }

  .card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 24px 20px;
    gap: 18px;
  }

  .pitch { margin-inline: auto; }
  .stores { justify-content: center; }

  .legal { padding: 28px 22px; margin-top: -32px; }
}

@media (prefers-reduced-motion: reduce) {
  .badge { transition: none; }
  .badge:hover { transform: none; }
}
