/**
 * Zone-detail CSS — additive layer on top of tokens.css + components.css.
 *
 * Source: /design-v2/wonders/makeover-castle/index.html lines 102-422.
 * Loaded ONLY on single zone CPT pages (see functions.php). Do not move
 * rules in here into components.css — they would conflict with homepage
 * styles (notably .zone-meta and .zone-tag which the homepage zone-card
 * uses for a different purpose).
 */

/* ─────────── Nav override for inner pages — sticky cream, not fixed transparent ───────────
 *
 * The homepage's components.css sets `.nav { position: fixed; background: transparent; }`
 * so the nav can sit over the hero and become opaque on scroll. Zone-detail pages have
 * no transparent hero — the nav must sit in document flow (sticky) so the breadcrumb
 * below it is not covered, and be opaque from the start.
 */
.single-zone .nav {
  position: sticky;
  top: 0;
  left: auto;
  right: auto;
  padding: 12px 4%;
  background: rgba(255, 251, 243, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 186, 1, 0.2);
}

/* ─────────── Headline sizing override (zone pages use tighter clamps) ─────────── */
.single-zone .h1 { font-size: clamp(40px, 6.4vw, 72px); line-height: 1.04; }
.single-zone .h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.05; }
.single-zone .h3 { font-size: clamp(20px, 2.2vw, 26px); line-height: 1.15; font-weight: 700; }

/* ─────────── Breadcrumb ─────────── */
.crumb {
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--mute);
}
.crumb a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--uforea-yellow); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.crumb a:hover { color: var(--gold-text); text-decoration-color: var(--gold-text); }
.crumb .sep { font-family: 'Italianno', cursive; color: var(--uforea-yellow); font-size: 22px; line-height: 1; vertical-align: middle; margin: 0 6px; display: inline-block; transform: translateY(-2px); }
.crumb .here { color: var(--ink-strong); font-weight: 600; }

/* ─────────── Hero (zone-detail variant: full-bleed photo + side card) ─────────── */
.zone-hero {
  position: relative;
  margin-top: 16px;
  /* padding-top clears the photo frame's outline (offset 8px) + corner brackets
     (-12px) so they aren't cut off by overflow:hidden when the 4:3 frame grows
     taller than the text column on wide screens (client round 2026-07). */
  padding: var(--hero-top) 0 var(--hero-bottom);
  background: var(--paper);
  overflow: hidden;
}
.zone-hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .zone-hero-grid { grid-template-columns: 1fr; gap: 32px; }
}

.zone-photo-frame {
  position: relative;
  border-radius: var(--r-photo);
  outline: 1.5px solid var(--uforea-yellow);
  outline-offset: 8px;
  box-shadow: 0 24px 60px rgba(63,63,63,.12);
  overflow: hidden;
  aspect-ratio: 4/3;
}
.zone-photo-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zone-photo-frame::before, .zone-photo-frame::after {
  content: ""; position: absolute; width: 28px; height: 28px;
  border: 1.5px solid var(--uforea-yellow);
  z-index: 4;
}
.zone-photo-frame::before { top: -12px; left: -12px; border-right: 0; border-bottom: 0; border-top-left-radius: 16px; }
.zone-photo-frame::after  { bottom: -12px; right: -12px; border-left: 0; border-top: 0; border-bottom-right-radius: 16px; }

.sticker-zone {
  position: absolute; top: 16px; right: -12px; z-index: 5;
  background: var(--blush); color: var(--passion-text);
  padding: 8px 14px; border-radius: 4px;
  font-size: 11px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  transform: rotate(3deg);
  box-shadow: 0 6px 14px rgba(63,63,63,.10);
}
.sticker-zone::before, .sticker-zone::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 8px; background: inherit; filter: brightness(.92);
}
.sticker-zone::before { left: -8px; clip-path: polygon(100% 0, 0 50%, 100% 100%); }
.sticker-zone::after  { right: -8px; clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* Zone-detail hero meta: override homepage's .zone-meta { padding: 18px 8px 8px } */
.zone-hero .zone-meta { display: flex; flex-direction: column; gap: 18px; padding: 0; }
.zone-tagline { font-size: 17px; color: var(--ink); line-height: 1.65; max-width: 50ch; }
.zone-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 4px; }
.zone-stat-card { background: var(--paper); border: var(--card-frame); border-radius: var(--r-card); padding: 12px 14px; }
.zone-stat-card .label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); margin-bottom: 4px; }
.zone-stat-card .val { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 16px; color: var(--ink-strong); line-height: 1.2; }
.zone-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }

/* ─────────── Anchor strip (sticky on-page nav) ─────────── */
.anchors {
  position: sticky; top: 68px; z-index: 50;
  background: rgba(255, 251, 243, 0.94);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 186, 1, 0.2);
  border-bottom: 1px solid rgba(255, 186, 1, 0.2);
}
.anchors-row {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.anchors-row::-webkit-scrollbar { display: none; }
.anchors-row a {
  font-size: 13px;
  font-weight: 600;
  color: var(--mute);
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.anchors-row a:hover, .anchors-row a.active { color: var(--ink-strong); border-bottom-color: var(--uforea-yellow); }
.anchors-row .sep { width: 1px; height: 14px; background: rgba(63, 63, 63, 0.12); }

/* ─────────── At a glance (data block) ─────────── */
.glance {
  padding: var(--section-y) 0;
  background: var(--cream);
}
.glance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 900px) { .glance-grid { grid-template-columns: 1fr; } }
/* Mobile heading consistency: glance & story headings sit in a side column
   (left-aligned beside their content on desktop). When they stack on mobile,
   centre them to match the centred gallery / tips / pairs / faq / cta headers. */
@media (max-width: 900px) {
  .glance-grid > div:first-child,
  .story-text > .eyebrow-script,
  .story-text > .h2 { text-align: center; }
}

.glance-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.glance-list li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; background: var(--paper); border: 1px solid var(--uforea-yellow); border-radius: 16px; }
.glance-list .ring { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--uforea-yellow); display: grid; place-items: center; flex: 0 0 auto; background: var(--paper); }
.glance-list strong { display: block; font-family: 'Playfair Display', serif; font-size: 17px; color: var(--ink-strong); margin-bottom: 4px; font-weight: 700; }
.glance-list span { color: var(--mute); font-size: 14.5px; line-height: 1.55; }

/* ─────────── Story (what's inside) ─────────── */
.story {
  padding: var(--section-y) 0;
  background: var(--paper);
}
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 900px) { .story-grid { grid-template-columns: 1fr; gap: 32px; } }
/* Photo-less story (zones with prose but no story image) reads as a single
   centred editorial column rather than a lopsided half-width block. */
.story-grid--solo { grid-template-columns: 1fr; max-width: 760px; margin: 0 auto; }
.story-grid--solo .story-text p { max-width: none; }

.story-photo {
  position: relative;
  border-radius: 50%/55%;
  border: 1.5px solid var(--uforea-yellow);
  overflow: hidden;
  aspect-ratio: 5/4;
  box-shadow: 0 18px 40px rgba(63,63,63,.10);
}
.story-photo img { width: 100%; height: 100%; object-fit: cover; }

.story-text { display: flex; flex-direction: column; gap: 18px; }
.story-text p { color: var(--ink); font-size: 16.5px; line-height: 1.7; max-width: 60ch; }
.story-text p strong { color: var(--ink-strong); font-weight: 700; }

/* ─────────── Gallery ─────────── */
.gallery {
  padding: var(--section-y) 0;
  background: linear-gradient(180deg, var(--paper) 0%, var(--blush) 100%);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: 200px;
  grid-auto-flow: dense; /* backfill masonry holes (visual review 2026-07) */
  gap: 14px;
}
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; }
}
.gallery-item {
  position: relative;
  border: 1.5px solid var(--uforea-yellow);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(63,63,63,.08);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item.feature { grid-column: span 6; grid-row: span 2; }
.gallery-item.tall { grid-column: span 3; grid-row: span 2; }
.gallery-item.wide { grid-column: span 6; }
.gallery-item.std { grid-column: span 3; }
@media (max-width: 900px) {
  .gallery-item, .gallery-item.feature, .gallery-item.tall, .gallery-item.wide, .gallery-item.std { grid-column: span 1; grid-row: auto; }
}

/* ─────────── Tips for parents ─────────── */
.tips {
  padding: var(--section-y) 0;
  background: var(--cream);
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .tips-grid { grid-template-columns: 1fr; } }

.tip-card {
  background: var(--paper);
  border: 1px solid var(--uforea-yellow);
  border-radius: 16px;
  padding: 22px 22px 24px;
}
.tip-card h3 { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 18px; margin-bottom: 8px; color: var(--ink-strong); }
.tip-card p { color: var(--ink); font-size: 14.5px; line-height: 1.65; margin: 0; }
.tip-card .tip-num { font-family: 'Italianno', cursive; color: var(--uforea-yellow); font-size: 38px; line-height: 1; display: block; margin-bottom: 4px; }

/* ─────────── Pairs well with ─────────── */
.pairs {
  padding: var(--section-y) 0;
  background: var(--paper);
}
.pairs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 900px) { .pairs-grid { grid-template-columns: 1fr; } }

.pair-card {
  background: var(--paper);
  border: var(--card-frame);
  border-radius: var(--r-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease;
}
.pair-card:hover { transform: translateY(-4px); }
.pair-card .pic { aspect-ratio: 16/10; overflow: hidden; }
.pair-card .pic img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.pair-card:hover .pic img { transform: scale(1.04); }
.pair-card .pair-body { padding: 20px 22px 22px; }
.pair-card .zone-tag { margin-bottom: 12px; } /* inherit canonical .zone-tag (600 weight, inline-flex, yellow dash) — only the spacing delta here */
.pair-card h3 { margin-bottom: 8px; }
.pair-card p { color: var(--mute); font-size: 14px; line-height: 1.6; margin: 0 0 12px; }
.pair-card .step-in { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-strong); font-size: 13px; font-weight: 600; }

/* ─────────── CTA module ─────────── */
.cta-module {
  padding: var(--section-y) 0;
  background: var(--blush);
}
.cta-card {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
  padding: 36px 24px;
}
.cta-card h2 { margin-bottom: 14px; }
.cta-card p { color: var(--ink); font-size: 16px; line-height: 1.6; margin: 0 0 28px; }
.cta-card .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* FAQ — zone-detail keeps only its section background; the accordion itself
   inherits the single canonical .faq-item component from components.css
   (2026-07 consistency pass — no more per-template size drift). */
.single-zone .faq { background: var(--mint); }

/* ─────────── Section heads (shared utility — already in components.css for homepage) ─────────── */
/* .section-head already exists in components.css and works here unchanged. */

/* ─────────── Per-zone palette overrides ───────────
 *
 * The makeover-castle baseline above uses cream/blush. Each of the other 8
 * zones has a different .glance / .gallery / .cta-module palette in its
 * source HTML. We paint each variant via the body class `zone-{slug}` that
 * uforea_child_zone_body_class() adds, so a single template per zone keeps
 * its content focus and the colour comes from this stylesheet. The order
 * mirrors /design-v2/wonders/{slug}/index.html lines for each block. */

/* Each zone wears one UFOREA-logo letter colour. A zone sets three custom
 * properties; the shared consumers below read them, so the per-zone blocks stay
 * one line each and a zone can never drift out of sync (e.g. a green sticker on
 * a blue zone — the old Discovery Cove bug). Layers per the token comments:
 *   --zone-soft   pale wash  → large section fills (glance / gallery / cta)
 *   --zone-text   safe twin  → coloured text on the wash (stickers, labels)
 *   --zone-accent mid-tone   → bold touch (hero photo-frame outline + brackets)
 * Letter map: U coral · F salmon · O gold · R green · E sky · A lavender. */
.zone-makeover-castle     { --zone-soft: var(--blush);       --zone-text: var(--passion-text);     --zone-accent: var(--logo-coral); }    /* U coral — dress-up */
.zone-mini-town           { --zone-soft: var(--peach);       --zone-text: var(--playful-text);     --zone-accent: var(--logo-salmon); }   /* F salmon — busy little town */
.zone-adventure-trails    { --zone-soft: var(--peach);       --zone-text: var(--playful-text);     --zone-accent: var(--logo-salmon); }   /* F salmon — high energy */
.zone-little-paradise     { --zone-soft: var(--mint);        --zone-text: var(--generous-text);    --zone-accent: var(--logo-green); }    /* R green — mushroom forest */
.zone-discovery-cove      { --zone-soft: var(--sky);         --zone-text: var(--trustworthy-text); --zone-accent: var(--logo-sky); }      /* E sky — water cove */
.zone-cozy-nook           { --zone-soft: var(--sky);         --zone-text: var(--trustworthy-text); --zone-accent: var(--logo-sky); }      /* E sky — calm lounge */
.zone-light-fantasy       { --zone-soft: var(--lavender);    --zone-text: var(--imaginative);      --zone-accent: var(--logo-lavender); } /* A lavender — magical lights */
.zone-galaxy-zone         { --zone-soft: var(--lavender);    --zone-text: var(--imaginative);      --zone-accent: var(--logo-lavender); } /* A lavender — cosmic */
.zone-birthday-party-zone { --zone-soft: var(--yellow-soft); --zone-text: var(--ink-strong);       --zone-accent: var(--uforea-yellow); } /* O gold — celebration (dark text = brand yellow+ink pattern, AA-safe) */

/* Shared consumers — scoped to single zone bodies; cream fallback off-zone */
.single-zone .glance      { background: var(--zone-soft, var(--cream)); }
.single-zone .gallery     { background: linear-gradient(180deg, var(--paper) 0%, var(--zone-soft, var(--cream)) 100%); }
.single-zone .cta-module  { background: var(--zone-soft, var(--cream)); }
.single-zone .sticker-zone { background: var(--zone-soft); color: var(--zone-text); }
/* Bold per-zone touch: the hero photo frame + corner brackets in the world's colour */
.single-zone .zone-photo-frame { outline-color: var(--zone-accent, var(--uforea-yellow)); }
.single-zone .zone-photo-frame::before,
.single-zone .zone-photo-frame::after { border-color: var(--zone-accent, var(--uforea-yellow)); }

/* Per-zone structural exceptions (shape, not colour) */
.zone-light-fantasy .zone-photo-frame { border-radius: 50% / 55%; outline: none; }

/* ─────────── Cozy Nook signature "for the grown-ups" Italianno eyebrow ───────────
 *
 * Unique to /design-v2/wonders/cozy-nook/index.html line 81 — sits in the
 * zone-meta above the H1. Italianno script, brand yellow. */
.grown-up-eyebrow {
  font-family: 'Italianno', cursive;
  color: var(--gold-text);
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1;
  display: block;
  margin-bottom: 4px;
}

/* ─────────── Zone archive (/wonders/) ───────────
 *
 * Source: /design-v2/wonders/index.html lines 135–278. The reusable frame*,
 * zones-grid, zone-card, zone-tag, step-in classes already exist in
 * components.css (shared with the homepage zone grid). The archive-only
 * styles below — archive-hero, stats-strip, cta-strip — are unique to the
 * /wonders/ landing and live here. */
.archive-hero {
  padding: var(--hero-top) 0 var(--hero-bottom);
  background: var(--paper);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.archive-hero .eyebrow-script { color: var(--gold-text); }
.archive-hero h1 { margin: 8px auto 18px; max-width: 18ch; }
.archive-hero p.lede { margin: 0 auto; }
.archive-hero .stats-strip {
  display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 18px 28px;
  margin-top: 32px;
  font-size: 14px; color: var(--mute);
  padding: 14px 24px;
  background: var(--cream);
  border: 1px solid rgba(255, 186, 1, 0.3);
  border-radius: 999px;
}
.archive-hero .stats-strip strong { color: var(--ink-strong); font-weight: 700; }

.archive-wonders .zones { padding: var(--section-y) 0; background: var(--paper); position: relative; }

/* ─────────── Facilities ("the practical magic") — /wonders/ only ───────────
 *
 * Parent-trust band between the zones grid and the CTA strip. Paper cards on
 * the sky pastel band; NOT links (no hover-lift) — informational photo cards
 * following the pair-card pic/body anatomy under their own class so pair-card
 * semantics stay untouched. */
.archive-wonders .facilities {
  padding: var(--section-y) 0;
  background: var(--sky);
}
.archive-wonders .facilities-grid {
  display: grid;
  /* auto-fit so the 5 facility cards (incl. Lockers, client round 2026-07) flow
     evenly on one row on desktop and wrap cleanly on smaller screens. */
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 22px;
}
@media (max-width: 1000px) { .archive-wonders .facilities-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .archive-wonders .facilities-grid { grid-template-columns: 1fr; } }
.archive-wonders .facility-card {
  background: var(--paper);
  border: 1px solid var(--uforea-yellow);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.archive-wonders .facility-card .pic { aspect-ratio: 4/3; overflow: hidden; }
.archive-wonders .facility-card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.archive-wonders .facility-card .facility-body { padding: 18px 20px 22px; }
.archive-wonders .facility-card h3 { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 18px; line-height: 1.2; color: var(--ink-strong); margin-bottom: 8px; }
.archive-wonders .facility-card p { color: var(--ink); font-size: 14px; line-height: 1.6; margin: 0; }

.cta-strip {
  padding: var(--section-y) 0;
  background: var(--blush);
  text-align: center;
}
.cta-strip h2 { margin-bottom: 14px; }
.cta-strip p { color: var(--ink); font-size: 16px; line-height: 1.6; margin: 0 auto 28px; max-width: 56ch; }
.cta-strip .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ─────────── Mobile rhythm — compress this file's 80–100px section paddings ───────────
 *
 * Grouped override per the 2026-06 refinement round: every zone.css-owned
 * section that breathes 80–100px on desktop settles to ~56px on small screens. */
@media (max-width: 720px) {
  .zone-hero { padding: var(--hero-top) 0 var(--hero-bottom); }
  .glance,
  .story,
  .gallery,
  .tips,
  .pairs,
  .cta-module,
  .single-zone .faq { padding: var(--section-y) 0; }
  .archive-wonders .zones { padding: var(--section-y) 0; }
  .archive-wonders .facilities { padding: var(--section-y) 0; }
  .cta-strip { padding: var(--section-y) 0; }
}

/* Zone/pairs cards: pin the "Step inside" CTA to the card bottom so 2-line
   titles/descriptions don't stagger the links across a row (visual review). */
.zone-card { display: flex; flex-direction: column; }
.zone-card .step-in { margin-top: auto; }
/* The card CTA (.step-in / .zlink) often nests inside .body — flex the body
   so the link pins to the card bottom regardless of title/copy length. */
.zone-card .body { display: flex; flex-direction: column; flex: 1; }
.zone-card .body .zlink, .zone-card .body .step-in { margin-top: auto; }

/* Stats strip: segments never break mid-fact; on phones each fact gets its
   own line and the mid-dot separators disappear (no dangling/leading dots). */
.archive-hero .stats-strip .st { white-space: nowrap; }
@media (max-width: 600px) {
  .archive-hero .stats-strip .st { display: block; }
  .archive-hero .stats-strip .sep { display: none; }
}

/* ── /wonders/ archive (client 2026-07-17): every photo is a clean rounded
   RECTANGLE — the hand-drawn blob/scallop/storybook frame shapes stay on the
   homepage but are overridden here. ── */
.archive-wonders .zone-card .frame {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 14px !important;
  border: 1.5px solid var(--frame-tint, var(--uforea-yellow)) !important;
  outline: none !important;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(63, 63, 63, .10);
}
.archive-wonders .zone-card .frame::before,
.archive-wonders .zone-card .frame::after { display: none !important; }
.archive-wonders .zone-card .frame img {
  border-radius: 12px !important;
  width: 100%; height: 100%; object-fit: cover;
  clip-path: none !important;
}
