/* ----------------------------------------------------------------------------
   Layout — portrait kiosk (WA65F 65")

      ┌───────────────────────────────┐  ← top: view zone only
      │ HEADER (110 px)               │
      ├───────────────────────────────┤
      │                               │
      │ MAP CANVAS (~48% h)           │  Pan / zoom / pins.
      │  floating zoom controls       │  Bottom edge sits at ~55% from top.
      │                               │
      ├───────────────────────────────┤
      │                               │
      │ CATEGORY TILE GRID (~40% h)   │  Primary tap zone. Top of grid sits
      │ [ ] [ ] [ ]                   │  at ~55%, bottom at ~93% — leaving a
      │ [ ] [ ] [ ]                   │  140-px footer below it so we never
      │ [ ] [ ] [ ]                   │  put taps inside the bottom 8% bend
      ├───────────────────────────────┤  zone.
      │ FOOTER PAD (140 px)           │  Decorative — never tap here.
      └───────────────────────────────┘
   ----------------------------------------------------------------------------*/

.app {
  display: grid;
  grid-template-rows:
    var(--h-header)
    minmax(0, 50fr)        /* map */
    minmax(0, 42fr)        /* category grid */
    var(--h-footer);
  height: 100vh;
  width: 100vw;
  background: var(--color-bg);
}

/* ──────────────────────────────────────────────────────────────────────
   HEADER
   ────────────────────────────────────────────────────────────────────── */
.header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: var(--s-6);
  align-items: center;
  padding: 0 var(--s-7);
  background: var(--color-bg);
  z-index: 5;
}
.header::after {
  content: '';
  position: absolute;
  left: var(--s-7);
  right: var(--s-7);
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--color-brand-gold) 30%,
    var(--color-brand-gold) 70%,
    transparent 100%
  );
  opacity: 0.5;
}
.header__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1;
  justify-self: start;
}
.header__wordmark .eyebrow {
  font-family: var(--font-label);
  font-size: 14px;
  letter-spacing: var(--ls-eyebrow);
  color: var(--color-ink-soft);
  text-transform: uppercase;
}
.header__wordmark .title {
  font-family: var(--font-serif);
  font-size: 28px;
  color: var(--color-brand);
  margin-top: var(--s-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.header__wordmark .subtitle {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: var(--ls-eyebrow);
  color: var(--color-brand-gold);
  text-transform: uppercase;
  margin-top: 6px;
}
.header__brand {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.header__logo {
  font-family: var(--font-serif);
  font-size: 50px;
  color: var(--color-brand);
  letter-spacing: var(--ls-display);
  line-height: 1;
  padding-left: var(--ls-display);
}
.header__rule {
  width: 80px;
  height: 1px;
  background: var(--color-brand-gold);
  opacity: 0.7;
}
.header__resort {
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: var(--ls-eyebrow);
  color: var(--color-ink-soft);
  text-transform: uppercase;
}

/* ──────────────────────────────────────────────────────────────────────
   MAP CANVAS
   ────────────────────────────────────────────────────────────────────── */
.map-canvas {
  position: relative;
  overflow: hidden;
  touch-action: none;
  background:
    radial-gradient(ellipse at 50% 40%, var(--color-bg-warm) 0%, var(--color-bg-deep) 100%);
}
.map-stage {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
  contain: layout style paint;
}
.map-stage svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}
.map-stage .basemap-image { pointer-events: auto; }
.map-canvas::before,
.map-canvas::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 24px;
  pointer-events: none;
  z-index: 2;
}
.map-canvas::before { top: 0;   background: linear-gradient(180deg, rgba(0,0,0,0.05), transparent); }
.map-canvas::after  { bottom: 0; background: linear-gradient(0deg, rgba(0,0,0,0.05), transparent); }

.map-controls {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  z-index: 4;
}
.map-ctl {
  width: var(--tap-lg);
  height: var(--tap-lg);
  border-radius: var(--r-md);
  background: rgba(255, 254, 244, 0.94);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-size: 36px;
  font-weight: 300;
  color: var(--color-ink);
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease-out);
}
.map-ctl:active { transform: scale(0.94); }
.map-ctl svg { width: 32px; height: 32px; color: var(--color-ink); }
.map-ctl--recenter { font-size: 22px; }

.map-hint {
  position: absolute;
  left: 50%;
  bottom: var(--s-5);
  transform: translateX(-50%);
  background: rgba(30, 58, 82, 0.88);
  color: #fff;
  padding: 12px var(--s-5);
  border-radius: var(--r-pill);
  font-family: var(--font-label);
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
  z-index: 3;
  box-shadow: var(--shadow-2);
}
.map-hint.hidden { opacity: 0; transform: translate(-50%, 12px); }

.map-dim {
  position: absolute;
  inset: 0;
  background: rgba(255, 254, 244, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base) var(--ease-out);
  z-index: 1;
}
.app[data-filter-active="true"] .map-dim { opacity: 1; }

/* ──────────────────────────────────────────────────────────────────────
   CATEGORY TILE GRID — primary navigation, sits in the comfort band
   ────────────────────────────────────────────────────────────────────── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--s-4);
  padding: var(--s-5) var(--s-5) 0;
  align-content: stretch;
}
.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-1);
  font-family: var(--font-label);
  font-size: 18px;
  letter-spacing: 0.06em;
  color: var(--color-ink);
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition:
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-fast) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    background-color var(--t-base) var(--ease-out),
    color var(--t-base) var(--ease-out);
  contain: layout style;
}
.cat-tile__icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--cat-tint, rgba(184, 145, 73, 0.12));
  color: var(--cat-color, var(--color-brand-gold));
  flex-shrink: 0;
}
.cat-tile__icon svg { width: 36px; height: 36px; }
.cat-tile__label {
  line-height: 1.15;
  max-width: 92%;
  font-size: 17px;
}
.cat-tile__count {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--color-ink-faint);
}
.cat-tile:active { transform: scale(0.97); }
.cat-tile[aria-pressed="true"] {
  background: var(--cat-color, var(--color-brand-gold));
  border-color: var(--cat-color, var(--color-brand-gold));
  color: #fff;
  box-shadow: var(--shadow-2);
}
.cat-tile[aria-pressed="true"] .cat-tile__icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.cat-tile[aria-pressed="true"] .cat-tile__count { color: rgba(255, 255, 255, 0.78); }

/* ──────────────────────────────────────────────────────────────────────
   FOOTER PAD — decorative, never carries a tap target. Holds a small
   brand mark so the bottom edge isn't empty.
   ────────────────────────────────────────────────────────────────────── */
.app::after {
  content: '';
  grid-row: 4;
  background: var(--color-bg);
}

/* ──────────────────────────────────────────────────────────────────────
   ATTRACT SCREEN — full-screen default. Tap anywhere → map view.
   ────────────────────────────────────────────────────────────────────── */
.attract {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--color-brand);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--t-slow) var(--ease-out),
    visibility 0s linear 0s;
}
body[data-view="attract"] .attract { /* keep visible */ }
.attract[data-open="false"] {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--t-slow) var(--ease-out),
    visibility 0s linear var(--t-slow);
}

/* Background carousel — mounted by AppSlider (see js/slider.js). The
 * universal slider lives inside this container; a fixed wash on the
 * carousel itself keeps the brand wordmark + CTA legible over any photo
 * or gradient slide that lands underneath. */
.attract__carousel {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.attract__carousel::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 30, 50, 0.55) 0%, rgba(15, 30, 50, 0.85) 100%);
  z-index: 1;
  pointer-events: none;
}

.attract__brand {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  margin-top: 12vh;
}
.attract__mark {
  font-family: var(--font-serif);
  font-size: 92px;
  letter-spacing: var(--ls-display);
  color: var(--color-brand-gold);
  line-height: 1;
  padding-left: var(--ls-display);
}
.attract__rule {
  width: 140px;
  height: 1px;
  background: var(--color-brand-gold);
  opacity: 0.8;
  margin-top: var(--s-3);
}
.attract__sub {
  font-family: var(--font-label);
  font-size: 18px;
  letter-spacing: var(--ls-eyebrow);
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
}

.attract__cta {
  position: relative;
  z-index: 2;
  margin-top: auto;
  margin-bottom: 18vh;       /* sits in the comfort tap band */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-4);
}
.attract__cta-eyebrow {
  font-family: var(--font-label);
  font-size: 18px;
  letter-spacing: var(--ls-eyebrow);
  color: var(--color-brand-gold);
  text-transform: uppercase;
}
.attract__cta-title {
  font-family: var(--font-serif);
  font-size: 88px;
  margin: 0;
  letter-spacing: 0.1em;
  color: #fff;
  text-transform: uppercase;
  line-height: 1.05;
}
.attract__cta-sub {
  font-family: var(--font-sans);
  font-size: 22px;
  color: rgba(255, 255, 255, 0.75);
  margin: var(--s-2) 0 0 0;
  letter-spacing: 0.04em;
}
.attract__pulse {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-brand-gold);
  margin-top: var(--s-5);
  animation: attract-pulse 1700ms ease-out infinite;
}
@keyframes attract-pulse {
  0%   { transform: scale(1);    opacity: 1;   box-shadow: 0 0 0 0 rgba(184,145,73, 0.6); }
  100% { transform: scale(1);    opacity: 1;   box-shadow: 0 0 0 22px rgba(184,145,73, 0); }
}

/* ──────────────────────────────────────────────────────────────────────
   SIDE-MOUNTED NAV CIRCLES (Lands End pattern)
   Vertical centre = adult shoulder height. Both circles are reserved
   gutters; .detail-view content has matching padding so neither circle
   overlaps any name, body copy, or image.
   ────────────────────────────────────────────────────────────────────── */
.nav-circle {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 110px;
  height: 110px;
  border: 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-3);
  display: none;
  align-items: center;
  justify-content: center;
  color: var(--color-brand);
  cursor: pointer;
  z-index: 70;
  transition: transform var(--t-fast) var(--ease-out),
              background-color var(--t-base) var(--ease-out),
              color var(--t-base) var(--ease-out);
}
.nav-circle svg { width: 44px; height: 44px; }
.nav-circle:active { transform: translateY(-50%) scale(0.94); }

.nav-home {
  left: 0;
  border-radius: 0 50% 50% 0;
  padding-right: 12px;
}
.nav-back {
  right: 0;
  border-radius: 50% 0 0 50%;
  padding-left: 12px;
}

/* Home is visible on home + detail (always offers a way back to attract).
 * Back is visible only on detail (one step back to the map). */
body[data-view="home"]   .nav-home,
body[data-view="detail"] .nav-home { display: flex; }
body[data-view="detail"] .nav-back { display: flex; }

/* When the POI modal is open over the map, hide the side nav circles so
 * they don't compete with the modal backdrop. */
.poi-modal[data-open="true"] ~ .nav-home,
.poi-modal[data-open="true"] ~ .nav-back {
  opacity: 0;
  pointer-events: none;
}

/* ── Theme toggle (part of the floating map-controls stack) ─────────── */
.map-ctl--theme { font-size: 22px; }
.map-ctl--theme svg { width: 30px; height: 30px; }

/* ──────────────────────────────────────────────────────────────────────
   ORIENTATION GUARD
   ────────────────────────────────────────────────────────────────────── */
.orientation-guard { display: none; }

@media (orientation: landscape) {
  .app, .detail-view, .poi-modal, .attract, .nav-back { display: none !important; }
  .orientation-guard {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--s-5);
    height: 100vh;
    width: 100vw;
    background: var(--color-brand);
    color: #fff;
    text-align: center;
    padding: var(--s-7);
  }
  .orientation-guard h1 {
    font-family: var(--font-serif);
    font-size: 56px;
    margin: 0;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
  .orientation-guard p {
    font-family: var(--font-sans);
    font-size: 22px;
    max-width: 600px;
    line-height: 1.5;
    opacity: 0.85;
  }
  .orientation-guard .mark {
    width: 64px;
    height: 4px;
    background: var(--color-brand-gold);
    margin-top: var(--s-3);
  }
}
