/* ═══════════════════════════════════════════════════════
   1. CUSTOM PROPERTIES
═══════════════════════════════════════════════════════ */
:root {
  --cream: #fff4cf;
  --sand: #f8d66c;
  --grass: #cfe47d;
  --mint: #8ccaa7;
  --aqua: #9edfeb;
  --coral: #ff8b62;
  --purple: #ad73dd;
  --ink: #3a2525;
  --ink-soft: rgba(58, 37, 37, 0.72);
  --paper: rgba(255, 252, 236, 0.86);
  --paper-solid: #fffbed;
  --line: rgba(58, 37, 37, 0.18);
  --shadow: 0 24px 60px rgba(58, 37, 37, 0.18);
  --radius-xl: 36px;
  --radius-md: 22px;
  --pad: clamp(18px, 4vw, 58px);
}

/* ═══════════════════════════════════════════════════════
   2. RESET & BASE
═══════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Arial Rounded MT Bold", system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(255, 139, 98, 0.35), transparent 22rem),
    radial-gradient(circle at 85% 25%, rgba(173, 115, 221, 0.24), transparent 24rem),
    linear-gradient(135deg, #fff4cf 0%, #f8d66c 42%, #cfe47d 100%);
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
}

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

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
}

::selection {
  background: var(--purple);
  color: white;
}

/* ═══════════════════════════════════════════════════════
   3. NOISE OVERLAY + CURSOR BUBBLE
═══════════════════════════════════════════════════════ */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  z-index: 0;
  background-image:
    linear-gradient(rgba(58, 37, 37, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 37, 37, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.cursor-bubble {
  position: fixed;
  z-index: 999;
  width: 18px;
  height: 18px;
  pointer-events: none;
  border-radius: 999px;
  background: var(--purple);
  border: 3px solid white;
  box-shadow: 0 4px 0 rgba(58, 37, 37, 0.22);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: width 180ms ease, height 180ms ease, opacity 180ms ease;
}

.cursor-bubble.is-large {
  width: 58px;
  height: 58px;
  opacity: 0.28;
}

/* ═══════════════════════════════════════════════════════
   4. UTILITIES
═══════════════════════════════════════════════════════ */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--pad);
  z-index: 1000;
  padding: 12px 22px;
  background: var(--purple);
  color: white;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-weight: 950;
  font-size: 15px;
  transition: top 180ms ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid white;
  outline-offset: 2px;
}

.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;
}

.section-label,
.eyebrow {
  display: block;
  margin: 0 0 18px;
  color: var(--purple);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.section-shell {
  position: relative;
  z-index: 2;
  padding: clamp(80px, 12vw, 160px) var(--pad);
}

/* ═══════════════════════════════════════════════════════
   5. BUTTONS
═══════════════════════════════════════════════════════ */
.button,
.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  font-weight: 950;
  font-size: 15px;
  background: white;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
  text-decoration: none;
}

.button:hover,
.header-action:hover {
  transform: translateY(3px);
  box-shadow: 0 3px 0 var(--ink);
}

.button:focus-visible,
.header-action:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

.button.primary {
  background: var(--purple);
  color: white;
  border-color: var(--purple);
}

.button.ghost {
  background: var(--sand);
  border-color: var(--ink);
}

.button.coral {
  background: var(--coral);
  border-color: var(--ink);
}

.button.outline {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 6px 0 rgba(255, 255, 255, 0.2);
}

.button.outline:hover {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 3px 0 rgba(255, 255, 255, 0.2);
}

/* ═══════════════════════════════════════════════════════
   6. IMAGE CARD
═══════════════════════════════════════════════════════ */
.image-card {
  position: relative;
  overflow: hidden;
  border: 4px solid white;
  border-radius: var(--radius-xl);
  background: white;
  box-shadow: 0 14px 0 rgba(58, 37, 37, 0.14), var(--shadow);
}

.image-card img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  transition: transform 550ms ease;
}

.image-card:hover img {
  transform: scale(1.06);
}

.image-card figcaption,
.image-card > span {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 36px);
  padding: 12px 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  font-weight: 950;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(58, 37, 37, 0.14);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   7. MAP PINS
═══════════════════════════════════════════════════════ */
.pin {
  position: absolute;
  z-index: 2;
  padding: 12px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 3px solid rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 30px rgba(58, 37, 37, 0.18);
  font-weight: 950;
  font-size: 14px;
  animation: floaty 3.5s ease-in-out infinite;
}

.pin-one  { top: 18%; left: 17%; }
.pin-two  { top: 30%; right: 14%; animation-delay: 0.6s; }
.pin-three { top: 57%; left: 58%; animation-delay: 1.2s; }

/* ═══════════════════════════════════════════════════════
   8. SITE HEADER + BRAND
═══════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 18px;
  left: var(--pad);
  right: var(--pad);
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 10px 14px;
  border: 3px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 251, 237, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 12px 0 rgba(58, 37, 37, 0.08), var(--shadow);
  transition: background 220ms ease, box-shadow 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(255, 251, 237, 0.96);
  box-shadow: 0 8px 40px rgba(58, 37, 37, 0.18);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 950;
  font-size: 15px;
  letter-spacing: -0.04em;
}

.brand-logo {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 50%;
  background: white;
}

.brand:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 999px;
}

.header-action {
  justify-self: end;
  font-size: 14px;
  min-height: 44px;
  padding: 0 18px;
}

/* ═══════════════════════════════════════════════════════
   9. SITE NAV (desktop)
═══════════════════════════════════════════════════════ */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.8vw, 28px);
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 900;
}

.site-nav a {
  position: relative;
  padding: 4px 0;
  transition: color 180ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 0;
  height: 3px;
  border-radius: 999px;
  background: var(--coral);
  transform: translateX(-50%);
  transition: width 180ms ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a:hover::after {
  width: 100%;
}

.site-nav a.is-active {
  color: var(--ink);
}

.site-nav a.is-active::after {
  width: 100%;
  background: var(--purple);
}

.site-nav a:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ═══════════════════════════════════════════════════════
   10. MOBILE MENU + TOGGLE
═══════════════════════════════════════════════════════ */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--sand);
  box-shadow: 0 4px 0 var(--ink);
  font-weight: 950;
  font-size: 13px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.menu-toggle:hover {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink);
}

.menu-toggle:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════
   11. HERO SECTION (index.php)
═══════════════════════════════════════════════════════ */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  padding: 118px var(--pad) 48px;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: 24px;
}

.hero-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-bottom: 4px solid rgba(58, 37, 37, 0.12);
}

.hero-map::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(255, 244, 207, 0.04), rgba(255, 244, 207, 0.22) 40%, rgba(255, 244, 207, 0.9) 100%),
    radial-gradient(circle at 24% 74%, rgba(255, 139, 98, 0.36), transparent 24rem);
}

.hero-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: mapDrift 20s ease-in-out infinite alternate;
}

.hero-panel {
  position: relative;
  z-index: 3;
  grid-column: 1 / 8;
  padding: clamp(24px, 4vw, 48px);
  border: 4px solid white;
  border-radius: var(--radius-xl);
  background: var(--paper);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 0 rgba(58, 37, 37, 0.13), var(--shadow);
}

.hero h1 {
  font-size: clamp(44px, 7.5vw, 108px);
  line-height: 0.88;
  letter-spacing: -0.08em;
  margin: 0 0 clamp(14px, 2vw, 24px);
}

.hero-panel p:not(.eyebrow) {
  max-width: 600px;
  color: var(--ink-soft);
  font-size: clamp(17px, 1.7vw, 21px);
  line-height: 1.45;
}

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

.quest-card {
  position: relative;
  z-index: 3;
  grid-column: 9 / 13;
  padding: 26px;
  align-self: end;
  transform: rotate(3deg);
  border-radius: var(--radius-md);
  border: 4px solid white;
  background: var(--coral);
  box-shadow: 0 12px 0 var(--ink);
}

.quest-card__tag {
  display: inline-flex;
  padding: 8px 14px;
  margin-bottom: 18px;
  background: white;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.quest-card strong {
  display: block;
  font-size: clamp(22px, 2.8vw, 38px);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 10px;
}

.quest-card p {
  color: rgba(58, 37, 37, 0.72);
  font-weight: 800;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════
   11b. PAGE HERO (inner pages)
═══════════════════════════════════════════════════════ */
.page-hero {
  position: relative;
  z-index: 1;
  min-height: 52vh;
  padding: calc(118px + 2vw) var(--pad) clamp(60px, 8vw, 120px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
}

.page-hero__media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.page-hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  min-height: unset;
}

.page-hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255, 244, 207, 0.08) 0%, #fff4cf 88%);
}

.page-hero__content {
  position: relative;
  z-index: 2;
  max-width: 920px;
}

.page-hero h1 {
  font-size: clamp(40px, 7vw, 100px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  margin-top: 14px;
}

/* ═══════════════════════════════════════════════════════
   12. STATS / FEATURE GRID
═══════════════════════════════════════════════════════ */
.stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding: 28px var(--pad) 80px;
}

.stats article {
  min-height: 200px;
  padding: 24px;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  background: rgba(255, 251, 237, 0.76);
  box-shadow: 0 8px 0 rgba(58, 37, 37, 0.1);
}

.stats span {
  display: block;
  color: var(--coral);
  font-size: 52px;
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.stats strong {
  display: block;
  margin-top: 32px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.stats p {
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════
   13. SECTION SHELL / STORY LAYOUT
═══════════════════════════════════════════════════════ */
.story {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: center;
}

.story .section-label {
  grid-column: 1 / 3;
  align-self: start;
}

.story-copy {
  grid-column: 3 / 8;
}

.story-image {
  grid-column: 8 / 13;
}

.story h2,
.section-shell h2 {
  font-size: clamp(36px, 6vw, 88px);
  line-height: 0.9;
  letter-spacing: -0.07em;
  margin-bottom: clamp(14px, 2vw, 24px);
}

.story-copy p {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════
   14. FEATURE CARD GRID
═══════════════════════════════════════════════════════ */
.service-grid,
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 46px;
}

.feature-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.service-card,
.feature-card {
  min-height: 300px;
  padding: 26px;
  border: 3px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-md);
  background: var(--paper-solid);
  box-shadow: 0 8px 0 rgba(58, 37, 37, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.service-card:hover,
.feature-card:hover,
.service-card.is-active,
.feature-card.is-active {
  transform: translateY(-8px) rotate(-1deg);
  box-shadow: 0 16px 0 rgba(58, 37, 37, 0.16);
  background: #fff7d9;
}

.service-icon,
.feature-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 48px;
  border-radius: 16px;
  background: var(--purple);
  color: white;
  font-size: 26px;
  box-shadow: 0 5px 0 var(--ink);
}

.service-card h3,
.feature-card h3 {
  font-size: 26px;
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: 10px;
}

.service-card p,
.feature-card p {
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════
   15. WORLD CARDS + SLIDER
═══════════════════════════════════════════════════════ */
.worlds {
  position: relative;
  z-index: 2;
  padding: clamp(80px, 12vw, 150px) var(--pad);
}

.worlds-head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  margin-bottom: 38px;
}

.worlds-head .eyebrow {
  grid-column: 1 / 4;
  align-self: end;
}

.worlds-head h2 {
  grid-column: 4 / 12;
  font-size: clamp(36px, 5.5vw, 84px);
  line-height: 0.92;
  letter-spacing: -0.07em;
}

.world-slider {
  position: relative;
  min-height: min(74vh, 760px);
}

.world-card {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr;
  border: 4px solid white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: white;
  opacity: 0;
  pointer-events: none;
  transform: translateX(24px) rotate(1deg);
  transition: opacity 360ms ease, transform 360ms ease;
  box-shadow: 0 14px 0 rgba(58, 37, 37, 0.15), var(--shadow);
}

.world-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) rotate(0deg);
}

.world-card img {
  width: 100%;
  height: 100%;
  min-height: unset;
  object-fit: cover;
}

.world-caption {
  position: absolute;
  left: clamp(18px, 4vw, 56px);
  right: clamp(18px, 4vw, 56px);
  bottom: clamp(18px, 4vw, 44px);
  max-width: 780px;
  padding: clamp(18px, 3vw, 32px);
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  background: rgba(255, 251, 237, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.world-caption span {
  color: var(--purple);
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 12px;
}

.world-caption h3 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4.5vw, 66px);
  line-height: 0.95;
  letter-spacing: -0.07em;
}

.slider-btn {
  position: absolute;
  z-index: 5;
  top: 50%;
  transform: translateY(-50%);
  width: 62px;
  height: 62px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  font-size: 40px;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 6px 0 var(--ink);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: grid;
  place-items: center;
}

.slider-btn:hover {
  transform: translateY(calc(-50% + 3px));
  box-shadow: 0 3px 0 var(--ink);
}

.slider-btn:focus-visible {
  outline: 3px solid white;
  outline-offset: 3px;
}

.slider-btn.prev { left: 16px; }
.slider-btn.next { right: 16px; }

/* ═══════════════════════════════════════════════════════
   16. TIMELINE / PROCESS CARDS
═══════════════════════════════════════════════════════ */
.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 46px;
}

.timeline span {
  display: block;
  color: var(--coral);
  font-size: 52px;
  line-height: 0.9;
  font-weight: 950;
  letter-spacing: -0.08em;
}

.timeline article {
  padding: 26px;
  min-height: 280px;
  border-radius: var(--radius-md);
  border: 3px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 251, 237, 0.76);
  box-shadow: 0 8px 0 rgba(58, 37, 37, 0.12);
}

.timeline h3 {
  margin: 54px 0 10px;
  font-size: 26px;
  letter-spacing: -0.05em;
}

.timeline p {
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 15px;
}

/* ═══════════════════════════════════════════════════════
   17. GALLERY AUTO-SCROLL STRIP
═══════════════════════════════════════════════════════ */
.gallery-strip {
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 20px 0 80px;
}

.gallery-track {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: galleryMove 38s linear infinite;
}

.gallery-track img {
  width: min(54vw, 680px);
  height: 320px;
  object-fit: cover;
  border-radius: 28px;
  border: 4px solid white;
  box-shadow: 0 10px 0 rgba(58, 37, 37, 0.12);
  min-height: unset;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════
   18. GALLERY GRID + LIGHTBOX
═══════════════════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
  padding: clamp(40px, 6vw, 80px) var(--pad);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border: 4px solid white;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 8px 0 rgba(58, 37, 37, 0.12);
  aspect-ratio: 4 / 3;
  background: white;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: unset;
  transition: transform 550ms ease;
}

.gallery-item:hover img,
.gallery-item:focus img {
  transform: scale(1.06);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(58, 37, 37, 0.38);
  opacity: 0;
  transition: opacity 220ms ease;
}

.gallery-item:hover .gallery-item__overlay,
.gallery-item:focus .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__overlay span {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: white;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 950;
}

.gallery-item:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(58, 37, 37, 0.94);
  padding: var(--pad);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__inner {
  position: relative;
  max-width: min(94vw, 1200px);
  max-height: 90vh;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  border: 4px solid white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  object-fit: contain;
  min-height: unset;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  width: 56px;
  height: 56px;
  border: 4px solid white;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  font-size: 24px;
  font-weight: 950;
  box-shadow: 0 6px 0 rgba(58, 37, 37, 0.5);
  display: grid;
  place-items: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.lightbox__close {
  top: -20px;
  right: -20px;
}

.lightbox__prev {
  top: 50%;
  left: -36px;
  transform: translateY(-50%);
}

.lightbox__next {
  top: 50%;
  right: -36px;
  transform: translateY(-50%);
}

.lightbox__close:hover {
  transform: translateY(2px);
  box-shadow: 0 4px 0 rgba(58, 37, 37, 0.5);
}

.lightbox__prev:hover {
  transform: translateY(calc(-50% + 2px));
  box-shadow: 0 4px 0 rgba(58, 37, 37, 0.5);
}

.lightbox__next:hover {
  transform: translateY(calc(-50% + 2px));
  box-shadow: 0 4px 0 rgba(58, 37, 37, 0.5);
}

.lightbox__close:focus-visible,
.lightbox__prev:focus-visible,
.lightbox__next:focus-visible {
  outline: 3px solid white;
  outline-offset: 3px;
}

/* ═══════════════════════════════════════════════════════
   19. CTA BLOCK
═══════════════════════════════════════════════════════ */
.cta-block {
  position: relative;
  z-index: 2;
  padding: clamp(80px, 12vw, 160px) var(--pad);
  text-align: center;
}

.cta-block--coral {
  background: var(--coral);
}

.cta-block--purple {
  background: var(--purple);
  color: white;
}

.cta-block--sand {
  background: var(--sand);
}

.cta-block__inner {
  max-width: 780px;
  margin: 0 auto;
}

.cta-block h2 {
  font-size: clamp(36px, 6vw, 88px);
  line-height: 0.92;
  letter-spacing: -0.07em;
  margin-bottom: clamp(14px, 2vw, 24px);
}

.cta-block p {
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.5;
  opacity: 0.88;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.cta-block__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════
   19b. CTA EYEBROW + BUTTON OVERRIDES ON COLORED BLOCKS
═══════════════════════════════════════════════════════ */
.cta-eyebrow {
  color: rgba(58, 37, 37, 0.62);
}

.cta-block--coral .button,
.cta-block--sand .button {
  background: white;
  border-color: var(--ink);
  box-shadow: 0 6px 0 var(--ink);
  color: var(--ink);
}

.cta-block--purple .button {
  background: white;
  color: var(--purple);
  border-color: white;
  box-shadow: 0 6px 0 rgba(255, 255, 255, 0.3);
}

.cta-block--purple .button:hover {
  box-shadow: 0 3px 0 rgba(255, 255, 255, 0.3);
}

/* ═══════════════════════════════════════════════════════
   20. CONTACT SECTION + FORM
═══════════════════════════════════════════════════════ */
.contact {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  padding: clamp(80px, 12vw, 160px) var(--pad);
}

.contact-card {
  grid-column: 1 / 8;
  padding: clamp(24px, 4vw, 48px);
  border: 4px solid white;
  border-radius: var(--radius-xl);
  background: var(--paper);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 0 rgba(58, 37, 37, 0.14), var(--shadow);
}

.contact-card h2 {
  font-size: clamp(32px, 4vw, 64px);
  line-height: 0.92;
  letter-spacing: -0.06em;
  margin-bottom: clamp(12px, 2vw, 20px);
}

.contact-card > p:not(.eyebrow) {
  max-width: 540px;
  color: var(--ink-soft);
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.4;
}

.contact-list {
  display: grid;
  gap: 10px;
  margin-top: 26px;
  margin-bottom: 30px;
}

.contact-list a,
.contact-list span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 12px 18px;
  border-radius: 999px;
  border: 3px solid var(--ink);
  background: white;
  box-shadow: 0 5px 0 var(--ink);
  font-weight: 950;
  font-size: 15px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.contact-list a:hover {
  transform: translateY(2px);
  box-shadow: 0 3px 0 var(--ink);
}

.contact-list a:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}

.contact-visual {
  grid-column: 8 / 13;
  min-height: 480px;
}

/* Contact form */
.contact-form {
  display: grid;
  gap: 18px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field label {
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 14px 18px;
  border: 3px solid rgba(58, 37, 37, 0.2);
  border-radius: var(--radius-md);
  background: white;
  font: inherit;
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--ink);
  transition: border-color 180ms ease, box-shadow 180ms ease;
  box-shadow: 0 4px 0 rgba(58, 37, 37, 0.08);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(173, 115, 221, 0.22), 0 4px 0 rgba(58, 37, 37, 0.08);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-privacy {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.form-privacy a {
  color: var(--purple);
  text-decoration: underline;
}

.form-message {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 15px;
  border: 3px solid transparent;
  line-height: 1.4;
}

.form-message--success {
  background: rgba(142, 202, 167, 0.22);
  border-color: var(--mint);
}

.form-message--error {
  background: rgba(255, 139, 98, 0.16);
  border-color: var(--coral);
}

.form-required-note {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: -6px;
}

.contact-form-wrap {
  margin-top: 28px;
}

/* Per-field error: space always reserved, text fades in/out — no layout shift */
.form-field__error {
  display: block;
  min-height: 1.5rem;
  padding-top: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--coral);
  opacity: 0;
  transition: opacity 180ms ease;
  line-height: 1.4;
}

.form-field__error.is-visible {
  opacity: 1;
}

.form-field--invalid input,
.form-field--invalid textarea {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 139, 98, 0.2), 0 4px 0 rgba(58, 37, 37, 0.08);
}

/* Form-level status: min-height always reserved, colors transition in — no layout shift */
.form-status {
  min-height: 58px;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  border: 3px solid transparent;
  background: transparent;
  color: transparent;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease;
  margin-bottom: 18px;
  pointer-events: none;
}

.form-status--success {
  background: rgba(142, 202, 167, 0.22);
  border-color: var(--mint);
  color: var(--ink);
  pointer-events: auto;
}

.form-status--error {
  background: rgba(255, 139, 98, 0.16);
  border-color: var(--coral);
  color: var(--ink);
  pointer-events: auto;
}

/* ═══════════════════════════════════════════════════════
   21. COOKIE BANNER
═══════════════════════════════════════════════════════ */
#cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: clamp(14px, 2vw, 24px) var(--pad);
  background: rgba(58, 37, 37, 0.97);
  color: var(--cream);
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  border-top: 3px solid rgba(255, 244, 207, 0.14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#cookie-banner.is-visible {
  display: flex;
}

.cookie-banner__text {
  flex: 1;
  min-width: 220px;
  font-size: clamp(13px, 1.3vw, 15px);
  line-height: 1.55;
  color: rgba(255, 244, 207, 0.88);
}

.cookie-banner__text a {
  color: var(--sand);
  text-decoration: underline;
}

.cookie-banner__text a:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 2px;
  border-radius: 2px;
}

.cookie-banner__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ═══════════════════════════════════════════════════════
   22. STORE BADGES
═══════════════════════════════════════════════════════ */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 28px;
}

.store-badge {
  display: inline-flex;
  transition: transform 180ms ease, filter 180ms ease;
}

.store-badge:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 6px 12px rgba(58, 37, 37, 0.2));
}

.store-badge:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 4px;
  border-radius: 10px;
}

.store-badge img {
  height: 54px;
  width: auto;
  min-height: unset;
}

/* ═══════════════════════════════════════════════════════
   23. WORLDS GRID (static, worlds.php)
═══════════════════════════════════════════════════════ */
.worlds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  padding: clamp(40px, 6vw, 80px) var(--pad);
}

.worlds-grid__item {
  position: relative;
  overflow: hidden;
  border: 4px solid white;
  border-radius: var(--radius-xl);
  box-shadow: 0 14px 0 rgba(58, 37, 37, 0.14), var(--shadow);
  background: white;
  transition: transform 220ms ease;
}

.worlds-grid__item:hover {
  transform: translateY(-6px);
}

.worlds-grid__item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  min-height: unset;
  transition: transform 550ms ease;
}

.worlds-grid__item:hover img {
  transform: scale(1.04);
}

.worlds-grid__caption {
  padding: 22px 26px 26px;
}

.worlds-grid__caption h3 {
  font-size: clamp(20px, 2.5vw, 30px);
  letter-spacing: -0.05em;
  margin-bottom: 8px;
}

.worlds-grid__caption p {
  font-size: clamp(14px, 1.4vw, 16px);
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ═══════════════════════════════════════════════════════
   24. FOOTER
═══════════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 40px 32px;
  padding: 52px var(--pad) 0;
  background: rgba(58, 37, 37, 0.94);
  color: var(--cream);
}

.footer-brand .brand {
  color: var(--cream);
  margin-bottom: 12px;
}

.footer-brand .brand-logo {
  border: 2px solid rgba(255, 244, 207, 0.3);
}

.footer-brand p {
  font-size: 14px;
  color: rgba(255, 244, 207, 0.55);
  line-height: 1.5;
}

.footer-nav strong,
.footer-legal strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 244, 207, 0.42);
  margin-bottom: 16px;
}

.footer-nav ul,
.footer-legal ul {
  display: grid;
  gap: 9px;
}

.footer-nav a,
.footer-legal a {
  font-size: 14px;
  color: rgba(255, 244, 207, 0.76);
  transition: color 180ms ease;
}

.footer-nav a:hover,
.footer-legal a:hover {
  color: var(--sand);
}

.footer-nav a:focus-visible,
.footer-legal a:focus-visible {
  outline: 2px solid var(--sand);
  outline-offset: 2px;
  border-radius: 2px;
}

.footer-contact {
  margin-top: 20px;
  display: grid;
  gap: 8px;
}

.footer-contact a {
  font-size: 13px;
  color: rgba(255, 244, 207, 0.55);
  transition: color 180ms ease;
}

.footer-contact a:hover {
  color: var(--sand);
}

.site-footer__bottom {
  grid-column: 1 / -1;
  padding: 20px 0 36px;
  border-top: 1px solid rgba(255, 244, 207, 0.1);
}

.site-footer__bottom p {
  font-size: 13px;
  color: rgba(255, 244, 207, 0.36);
  margin: 0;
}

/* ═══════════════════════════════════════════════════════
   24b. GALLERY PAGE HEAD
═══════════════════════════════════════════════════════ */
.gallery-page-head {
  padding: calc(118px + 4vw) var(--pad) clamp(40px, 6vw, 80px);
  text-align: center;
}

.gallery-page-head h1 {
  font-size: clamp(40px, 7vw, 100px);
  line-height: 0.9;
  letter-spacing: -0.08em;
  margin: 12px 0 18px;
}

.gallery-page-head p:not(.eyebrow) {
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════
   24c. DOWNLOAD SECTION
═══════════════════════════════════════════════════════ */
.download-section {
  position: relative;
  z-index: 2;
  padding: clamp(60px, 10vw, 130px) var(--pad);
  text-align: center;
}

.download-section__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(32px, 5vw, 64px);
  border: 4px solid white;
  border-radius: var(--radius-xl);
  background: var(--paper);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 0 rgba(58, 37, 37, 0.14), var(--shadow);
}

.download-section h2 {
  font-size: clamp(28px, 4vw, 56px);
  letter-spacing: -0.06em;
  line-height: 0.95;
  margin-bottom: 16px;
}

.download-section > .download-section__inner > p {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.store-badge--large img {
  height: 66px;
  width: auto;
}

/* CTA block: text/eyebrow overrides on colored backgrounds */
.cta-block--purple .eyebrow,
.cta-block--purple .cta-eyebrow {
  color: rgba(255, 244, 207, 0.65);
}

.cta-block--purple p {
  color: rgba(255, 244, 207, 0.88);
}

/* ═══════════════════════════════════════════════════════
   25. LEGAL PAGES
═══════════════════════════════════════════════════════ */
.legal-page {
  padding: clamp(80px, 12vw, 140px) var(--pad) clamp(60px, 8vw, 100px);
}

.legal-content {
  max-width: 860px;
  margin: 0 auto;
}

.legal-content h1 {
  font-size: clamp(34px, 5.5vw, 68px);
  line-height: 0.9;
  letter-spacing: -0.06em;
  margin-bottom: clamp(22px, 3vw, 40px);
}

.legal-content h2 {
  font-size: clamp(20px, 2.8vw, 30px);
  letter-spacing: -0.04em;
  margin: 2.2em 0 0.7em;
  line-height: 1.1;
}

.legal-content h3 {
  font-size: clamp(17px, 2vw, 22px);
  letter-spacing: -0.03em;
  margin: 1.6em 0 0.5em;
}

.legal-content p,
.legal-content li {
  font-size: clamp(15px, 1.5vw, 17px);
  line-height: 1.7;
  color: var(--ink-soft);
}

.legal-content ul,
.legal-content ol {
  padding-left: 1.4em;
  list-style: disc;
  margin: 0 0 1em;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content a {
  color: var(--purple);
  text-decoration: underline;
}

.legal-content a:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.legal-meta {
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: clamp(28px, 4vw, 52px);
  padding-bottom: clamp(18px, 2.5vw, 32px);
  border-bottom: 2px solid var(--line);
}

/* ═══════════════════════════════════════════════════════
   26. 404 PAGE
═══════════════════════════════════════════════════════ */
.error-page {
  display: grid;
  place-items: center;
  min-height: 80vh;
  padding: clamp(80px, 12vw, 160px) var(--pad);
  text-align: center;
}

.error-page__code {
  display: block;
  font-size: clamp(120px, 26vw, 300px);
  font-weight: 950;
  line-height: 0.8;
  letter-spacing: -0.1em;
  color: var(--coral);
}

.error-page h1 {
  font-size: clamp(26px, 4.5vw, 56px);
  letter-spacing: -0.06em;
  margin: 0.4em 0 0.5em;
  line-height: 1;
}

.error-page p {
  font-size: clamp(15px, 1.5vw, 19px);
  color: var(--ink-soft);
  margin-bottom: clamp(26px, 4vw, 44px);
  max-width: 480px;
}

.error-page__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════
   27. KEYFRAMES
═══════════════════════════════════════════════════════ */
@keyframes mapDrift {
  from { transform: scale(1.08) translate3d(-1%, -1%, 0); }
  to   { transform: scale(1.16) translate3d(2%, 1%, 0); }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

@keyframes galleryMove {
  to { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════
   28. MEDIA QUERIES
═══════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .service-grid,
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-panel {
    grid-column: 1 / 9;
  }

  .quest-card {
    grid-column: 8 / 13;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .menu-toggle {
    display: inline-flex;
    justify-self: end;
  }

  .site-nav {
    position: fixed;
    top: 86px;
    left: var(--pad);
    right: var(--pad);
    flex-direction: column;
    gap: 0;
    padding: 14px;
    border: 4px solid white;
    border-radius: 30px;
    background: var(--paper-solid);
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav a {
    padding: 15px 16px;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }

  .site-nav a:last-child {
    border-bottom: 0;
  }

  .site-nav a::after {
    display: none;
  }

  .header-action {
    display: none;
  }

  .hero,
  .story,
  .worlds-head,
  .contact {
    grid-template-columns: repeat(6, 1fr);
  }

  .hero {
    padding-top: 110px;
    align-items: end;
  }

  .hero-panel,
  .quest-card,
  .story .section-label,
  .story-copy,
  .story-image,
  .worlds-head .eyebrow,
  .worlds-head h2,
  .contact-card,
  .contact-visual {
    grid-column: 1 / -1;
  }

  .quest-card {
    transform: none;
  }

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

  .service-grid,
  .feature-grid,
  .feature-grid--3,
  .timeline {
    grid-template-columns: 1fr;
  }

  .world-slider {
    min-height: 580px;
  }

  .contact-visual {
    min-height: 340px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .lightbox__prev { left: -20px; }
  .lightbox__next { right: -20px; }

  .lightbox__close {
    top: -14px;
    right: -14px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (max-width: 560px) {
  :root {
    --pad: 16px;
    --radius-xl: 26px;
  }

  .brand span {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .hero h1,
  .page-hero h1 {
    font-size: clamp(38px, 13vw, 70px);
  }

  .story h2,
  .section-shell h2 {
    font-size: clamp(32px, 11vw, 60px);
  }

  .hero-panel {
    padding: 22px;
  }

  .pin {
    display: none;
  }

  .world-slider {
    min-height: 500px;
  }

  .world-caption {
    padding: 16px 18px;
  }

  .slider-btn {
    top: auto;
    bottom: 18px;
    width: 54px;
    height: 54px;
    font-size: 34px;
    transform: none;
  }

  .slider-btn:hover {
    transform: translateY(2px);
  }

  .slider-btn.prev { left: 20px; }
  .slider-btn.next { right: 20px; }

  .gallery-track img {
    width: 84vw;
    height: 240px;
  }

  .cursor-bubble {
    display: none;
  }

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

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

  .lightbox__prev,
  .lightbox__next {
    display: none;
  }

  .store-badge img {
    height: 46px;
  }
}

/* ═══════════════════════════════════════════════════════
   29. PREFERS-REDUCED-MOTION
═══════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-map img,
  .pin,
  .gallery-track {
    animation: none;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
