/* ---------------------------------------------------------
   The Wouds — base styles
   System fonts only. No external assets. Mobile-first.
--------------------------------------------------------- */

:root {
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  --font-heading: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;

  --bg-twilight-top: #070912;
  --bg-twilight-mid: #121b3a;
  --bg-forest: #122018;
  --bg-forest-deep: #0a140f;
  --ink: #f3ede0;
  --ink-muted: #cfc9ba;
  --gold: #ffcb7d;
  --gold-strong: #ffb347;
  --ember: #ff8c42;
  --card-bg: rgba(18, 22, 34, 0.55);
  --card-border: rgba(255, 203, 125, 0.22);
  --focus-ring: #ffe3ac;

  --dragon-start: #ff8a5b;
  --dragon-end: #d64545;
  --cat-start: #c79bff;
  --cat-end: #6f5ad1;
  --bird-start: #8fe9df;
  --bird-end: #3f9bc9;

  --radius-lg: 28px;
  --radius-md: 18px;
  --space-section: clamp(3rem, 6vw, 6rem);
  --max-width: 72rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg,
      var(--bg-twilight-top) 0%,
      var(--bg-twilight-mid) 45%,
      var(--bg-forest) 100%);
  overflow-x: hidden;
  line-height: 1.6;
}

img,
picture,
svg {
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-heading);
  color: var(--gold);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

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

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* ---------------------------------------------------------
   Accessibility helpers
--------------------------------------------------------- */

.skip-link {
  position: absolute;
  left: 1rem;
  top: -60px;
  background: var(--gold);
  color: #1a1408;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  z-index: 100;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 8px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(11, 16, 38, 0.75);
  border-bottom: 1px solid rgba(255, 203, 125, 0.15);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink);
}

.brand-mark {
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e1, #ffd88a 55%, var(--gold-strong) 100%);
  box-shadow: 0 0 10px 2px rgba(255, 184, 71, 0.45);
  flex: none;
}

.site-nav {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  flex-wrap: wrap;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.25rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--gold);
  border-bottom-color: var(--gold-strong);
}

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

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(4rem, 12vw, 8rem) 1.25rem clamp(6rem, 14vw, 10rem);
  text-align: center;
  isolation: isolate;
}

.hero-decor {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.stars {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(1.6px 1.6px at 12% 22%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(1.4px 1.4px at 28% 68%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.8px 1.8px at 45% 15%, rgba(255, 255, 255, 0.8), transparent 60%),
    radial-gradient(1.3px 1.3px at 62% 40%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.7px 1.7px at 78% 25%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(1.4px 1.4px at 88% 60%, rgba(255, 255, 255, 0.65), transparent 60%),
    radial-gradient(1.5px 1.5px at 8% 78%, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.6px 1.6px at 55% 82%, rgba(255, 255, 255, 0.6), transparent 60%);
  background-repeat: repeat;
  background-size: 260px 260px;
  opacity: 0.9;
  animation: twinkle 6s ease-in-out infinite;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.75;
  }

  50% {
    opacity: 1;
  }
}

.atmosphere {
  position: absolute;
  top: -10%;
  left: 50%;
  width: min(60rem, 140%);
  height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 0%,
      rgba(255, 179, 71, 0.16),
      rgba(255, 179, 71, 0.05) 45%,
      transparent 70%);
  mix-blend-mode: screen;
}

.moon {
  position: absolute;
  top: 8%;
  right: 10%;
  width: clamp(70px, 10vw, 110px);
  height: clamp(70px, 10vw, 110px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e1, #ffd88a 55%, var(--gold-strong) 100%);
  box-shadow: 0 0 60px 18px rgba(255, 184, 71, 0.35), 0 0 120px 40px rgba(255, 184, 71, 0.15);
}

.fireflies {
  position: absolute;
  inset: 0;
}

.fireflies i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #ffe6a8;
  box-shadow: 0 0 8px 3px rgba(255, 220, 140, 0.7);
  opacity: 0;
  animation: firefly-drift 7s ease-in-out infinite;
}

.fireflies i:nth-child(1) {
  left: 12%;
  top: 62%;
  animation-delay: 0s;
}

.fireflies i:nth-child(2) {
  left: 24%;
  top: 78%;
  animation-delay: 1.2s;
}

.fireflies i:nth-child(3) {
  left: 40%;
  top: 58%;
  animation-delay: 2.4s;
}

.fireflies i:nth-child(4) {
  left: 63%;
  top: 82%;
  animation-delay: 0.8s;
}

.fireflies i:nth-child(5) {
  left: 80%;
  top: 66%;
  animation-delay: 3.1s;
}

.fireflies i:nth-child(6) {
  left: 92%;
  top: 76%;
  animation-delay: 1.9s;
}

@keyframes firefly-drift {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }

  20% {
    opacity: 0.9;
  }

  50% {
    opacity: 0.4;
    transform: translate(8px, -14px);
  }

  80% {
    opacity: 0.9;
  }

  100% {
    opacity: 0;
    transform: translate(-6px, -4px);
  }
}

.hills {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 40%;
}

.hills::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
  clip-path: polygon(0 65%,
      10% 45%,
      24% 58%,
      38% 32%,
      54% 52%,
      70% 36%,
      85% 56%,
      100% 46%,
      100% 100%,
      0 100%);
}

.hills--far {
  height: 46%;
  opacity: 0.55;
  filter: blur(0.5px);
}

.hills--far::before {
  background: #1c3527;
  clip-path: polygon(0 55%,
      12% 68%,
      28% 48%,
      45% 62%,
      60% 40%,
      76% 60%,
      90% 44%,
      100% 58%,
      100% 100%,
      0 100%);
}

.hills--near {
  height: 34%;
}

.hills--near::before {
  background: #0e1f16;
  clip-path: polygon(0 72%,
      15% 56%,
      32% 70%,
      50% 50%,
      66% 66%,
      82% 50%,
      100% 64%,
      100% 100%,
      0 100%);
}

.treeline {
  position: absolute;
  left: -2%;
  right: -2%;
  bottom: -1px;
  height: 56px;
  background: linear-gradient(135deg, var(--bg-forest-deep) 25%, transparent 25%) 0 0,
    linear-gradient(225deg, var(--bg-forest-deep) 25%, transparent 25%) 0 0,
    linear-gradient(315deg, var(--bg-forest-deep) 25%, transparent 25%) 14px 0,
    linear-gradient(45deg, var(--bg-forest-deep) 25%, transparent 25%) 14px 0;
  background-size: 28px 28px;
  background-repeat: repeat-x;
}

.mist {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 30%;
  background: linear-gradient(180deg, transparent, rgba(210, 226, 255, 0.1));
  filter: blur(3px);
  animation: mist-drift 26s ease-in-out infinite;
}

@keyframes mist-drift {

  0%,
  100% {
    transform: translateX(0);
    opacity: 0.7;
  }

  50% {
    transform: translateX(3%);
    opacity: 1;
  }
}

.hero-content {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ember);
  margin-bottom: 0.75rem;
}

.hero-game-title {
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  margin-bottom: 0.35em;
  text-shadow: 0 0 40px rgba(255, 184, 71, 0.35);
}

.hero-subtitle {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--ink-muted);
  max-width: 38rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-family-intro {
  margin: 1.75rem 0 0;
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.hero-family-intro strong {
  color: var(--gold);
}

/* ---------------------------------------------------------
   Buttons
--------------------------------------------------------- */

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.75rem;
  padding: 1.15rem 2.5rem;
  min-height: 60px;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  letter-spacing: 0.01em;
  text-decoration: none;
  color: #241405;
  background: linear-gradient(135deg, var(--gold) 0%, var(--ember) 100%);
  box-shadow: 0 10px 30px rgba(255, 140, 66, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 40px rgba(255, 179, 71, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-icon {
  font-size: 0.85em;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 140, 66, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
}

/* ---------------------------------------------------------
   Game menu
--------------------------------------------------------- */

.game-menu {
  padding: var(--space-section) 1.25rem 0;
  position: relative;
}

.game-menu .section-inner {
  max-width: var(--max-width);
}

.game-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-top: 2rem;
  text-align: left;
}

.game-menu-card {
  --menu-accent: var(--gold-strong);
  display: flex;
  min-height: 220px;
  height: 100%;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2rem);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.game-menu-card:hover,
.game-menu-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--menu-accent);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 32px -8px var(--menu-accent);
}

.game-menu-card--dragon {
  --menu-accent: var(--dragon-start);
}

.game-menu-card--misdrawn {
  --menu-accent: var(--bird-start);
}

.game-menu-monogram {
  display: grid;
  place-content: center;
  width: 54px;
  min-height: 54px;
  margin-bottom: 1rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 203, 125, 0.4);
  border-radius: 16px;
  background: rgba(255, 203, 125, 0.08);
  color: var(--menu-accent);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.game-menu-logo {
  display: block;
  width: min(100%, 260px);
  height: auto;
  margin-bottom: 1rem;
  border-radius: 12px;
}

.game-menu-card h3 {
  margin-bottom: 0.45em;
  font-size: clamp(1.3rem, 3vw, 1.65rem);
}

.game-menu-card p {
  margin-bottom: 1.25rem;
  color: var(--ink-muted);
}

.game-menu-action {
  margin-top: auto;
  color: var(--menu-accent);
  font-weight: 800;
}

/* ---------------------------------------------------------
   Featured game
--------------------------------------------------------- */

.featured-game {
  padding: var(--space-section) 1.25rem;
  position: relative;
}

.featured-game::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(50rem, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 203, 125, 0.35), transparent);
}

.featured-game .section-inner {
  max-width: var(--max-width);
  text-align: center;
}

.game-story {
  max-width: 42rem;
  margin: 0 auto 1rem;
  color: var(--ink-muted);
  font-size: clamp(1rem, 2vw, 1.1rem);
}

.hero-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  margin: 2.5rem 0;
  text-align: left;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.25rem) clamp(1.5rem, 3vw, 2rem);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.hero-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-start, var(--gold-strong));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 32px -8px var(--accent-start, var(--gold-strong));
}

.hero-card--dragon {
  --accent-start: var(--dragon-start);
  --accent-end: var(--dragon-end);
}

.hero-card--cat {
  --accent-start: var(--cat-start);
  --accent-end: var(--cat-end);
}

.hero-card--bird {
  --accent-start: var(--bird-start);
  --accent-end: var(--bird-end);
}

.hero-card-shape {
  display: block;
  width: 48px;
  height: 48px;
  margin-bottom: 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-start), var(--accent-end));
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  transform: rotate(45deg);
  position: relative;
}

.hero-card-shape::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 8px;
  background: #10151f;
}

.hero-card-monogram {
  position: absolute;
  top: -0.35em;
  right: 0.5rem;
  font-family: var(--font-heading);
  font-size: 5.5rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent-start, var(--gold));
  opacity: 0.1;
  pointer-events: none;
}

.hero-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5em;
}

.hero-card p {
  color: var(--ink-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
  position: relative;
}

.game-screen {
  max-width: 42rem;
  margin: 0 auto;
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 2px dashed rgba(255, 203, 125, 0.35);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.game-screen-label {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ember);
  margin-bottom: 0.5rem;
}

.game-screen p:last-child {
  margin-bottom: 0;
  color: var(--ink-muted);
}

/* ---------------------------------------------------------
   Our family
--------------------------------------------------------- */

.our-family {
  padding: 0 1.25rem var(--space-section);
  position: relative;
}

.section-inner {
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}

/* ---------------------------------------------------------
   More games
--------------------------------------------------------- */

.more-games {
  padding: 0 1.25rem var(--space-section);
  position: relative;
}

.more-games::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(50rem, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(255, 203, 125, 0.35), transparent);
}

.more-games .section-inner {
  max-width: var(--max-width);
}

.game-teaser-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.teaser-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  text-align: center;
  opacity: 0.8;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.teaser-card:hover {
  opacity: 1;
  transform: translateY(-3px);
  border-color: rgba(255, 203, 125, 0.4);
}

.teaser-monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 203, 125, 0.4);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold);
  background: rgba(255, 203, 125, 0.08);
}

.teaser-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4em;
}

.teaser-card p {
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 203, 125, 0.15);
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.site-footer {
  padding: 2rem 1.25rem;
  text-align: center;
  border-top: 1px solid rgba(255, 203, 125, 0.15);
}

.footer-inner p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

/* ---------------------------------------------------------
   Entrance animation (progressive enhancement)
   Without JS, .reveal stays fully visible.
--------------------------------------------------------- */

.js-enabled .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js-enabled .reveal.is-visible {
  animation: fade-in-up 0.7s ease forwards;
}

@keyframes fade-in-up {
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------------------------------------------------------
   Reduced motion
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js-enabled .reveal {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .stars,
  .mist,
  .fireflies i {
    animation: none;
    opacity: 0.8;
  }

  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

/* ---------------------------------------------------------
   Breakpoints
--------------------------------------------------------- */

@media (min-width: 600px) {
  .hero {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (min-width: 768px) {
  .site-nav {
    gap: 2rem;
  }
}

@media (min-width: 1024px) {

  .header-inner,
  .hero-content,
  .featured-game,
  .our-family .section-inner,
  .more-games .section-inner {
    padding-left: 0;
    padding-right: 0;
  }

  .treeline {
    height: 72px;
    background-size: 36px 36px;
  }
}

/* iPad portrait and landscape */
@media (min-width: 768px) and (max-width: 1366px) {
  .hero {
    padding-top: clamp(4rem, 8vw, 6rem);
  }

  .hero-cards-grid {
    gap: 1.5rem;
  }
}