/* trekka — public web pages
   Kinetic Curator: TikTok full-bleed immersion + Pinterest curation.
   No-Line Rule: boundaries come from tone + ambient shadow, never 1px dividers.
   Ghost borders capped at 15% opacity. Nothing hardcoded — extend :root instead. */

:root {
  /* Canvas + tonal tiers (tinted neutrals, never pure #fff as a page bg) */
  --canvas: #f6f6fb;
  --canvas-deep: #eeeef5;
  --surface: #ffffff;
  --surface-low: #f0f0f6;
  --surface-high: #eaeaf0;
  --surface-bright: #f8f8fd;
  --surface-dim: rgba(45, 47, 51, 0.6);

  /* Ink — never #000 */
  --ink: #2d2f33;
  --ink-2: #6b6d73;
  --ink-3: #6f7178; /* text-bearing tertiary: 4.6:1 on --canvas, still a step below --ink-2 */
  --ink-tint: #9b9da3; /* non-text only — never use for copy */
  --ink-inverse: #ffffff;
  --ink-inverse-2: rgba(255, 255, 255, 0.78);

  /* Accents */
  --accent: #137fec;
  --accent-deep: #0b5fba;
  --accent-soft: #d4e8fb;
  --accent-wash: rgba(19, 127, 236, 0.08);
  --vibe: #00c2a8;
  --vibe-deep: #009a86;
  --vibe-ink: #00655a; /* fills that carry white text: 5.5:1 */

  /* Ghost border — 15% ceiling, accessibility only */
  --ghost-border: rgba(45, 47, 51, 0.15);
  --ghost-border-soft: rgba(45, 47, 51, 0.08);
  --ghost-border-inverse: rgba(255, 255, 255, 0.15);

  /* Ambient elevation — primary-tinted, diffused */
  --shadow-ambient: 0 4px 24px rgba(10, 79, 148, 0.06);
  --shadow-sm: 0 2px 8px rgba(10, 79, 148, 0.06);
  --shadow-lift: 0 18px 48px rgba(10, 79, 148, 0.12);
  --shadow-cta: 0 2px 8px rgba(10, 79, 148, 0.10);

  /* Glass */
  --glass: rgba(255, 255, 255, 0.75);
  --glass-strong: rgba(255, 255, 255, 0.82);
  --glass-dark: rgba(45, 47, 51, 0.34);
  --glass-blur: 20px;

  /* Flat fields — no gradients anywhere in this system */
  --scrim: rgba(24, 26, 30, 0.28);     /* mood over the whole photo — the photo still does the work */
  --scrim-text: rgba(24, 26, 30, 0.7); /* only behind overlay text, where AA is needed */
  --scrim-soft: rgba(24, 26, 30, 0.42);
  --map-field: #dde5ee;                /* the map plate before tiles load */
  --ink-deep: #1b1d21;

  /* The stand-in video still in the hero (see landing.html). Flat dusk bands
     over water, warm foreground — no gradients, per the surface philosophy. */
  --reel-sky-top: #2b3757;
  --reel-sky-mid: #6d5f7f;
  --reel-sky-low: #c98a66;
  --reel-sun: #f3c48d;
  --reel-far: #384868;
  --reel-sea: #41536c;
  --reel-near: #1c2331;
  --reel-warm: #e0a273;
  --reel-edge: #33405a;

  /* Radii — sharp corners forbidden */
  --r-sm: 8px;
  --r-base: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-2xl: 20px;
  --r-3xl: 28px;
  --r-plate: 32px;
  --r-full: 9999px;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 40px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 88px;
  --edge: 20px;
  --measure: 1140px;

  /* Type — Fraunces (display) + Instrument Sans (body). No additions. */
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --fs-eyebrow: 11px;
  --fs-xs: 13px;
  --fs-sm: 14px;
  --fs-base: 16px;
  --fs-lg: 18px;
  --fs-xl: 21px;
  --fs-2xl: 26px;
  --fs-3xl: 32px;
  --fs-display: clamp(34px, 8.4vw, 52px);
  --fs-display-lg: clamp(38px, 9.6vw, 68px);

  /* Motion — spring-feeling, restrained */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (min-width: 720px) {
  :root { --edge: 36px; }
}
@media (min-width: 1080px) {
  :root { --edge: 48px; }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

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

a { color: var(--accent); text-decoration: none; transition: color 140ms var(--ease-out); }
a:hover { color: var(--accent-deep); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: calc(var(--s-3) * -4);
  z-index: 60;
  padding: var(--s-2) var(--s-3);
  background: var(--surface);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-ambient);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: top 160ms var(--ease-spring);
}
.skip-link:focus { top: var(--s-3); }

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--edge);
}
.wrap--tight { max-width: 760px; }

/* ---------- Type ---------- */

.display {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 0, 'WONK' 1;
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 0.94;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.display--xl { font-size: var(--fs-display-lg); }
.display em {
  font-style: italic;
  font-variation-settings: 'SOFT' 60, 'WONK' 1;
}

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-3xl);
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.eyebrow {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow--accent { color: var(--accent-deep); } /* 5.86:1 on --canvas; --accent is a fill, not a text colour */
.eyebrow--inverse { color: var(--ink-inverse-2); }

.lede {
  margin: 0;
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: 42ch;
}
.body-sm { font-size: var(--fs-sm); line-height: 1.55; color: var(--ink-2); }

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

.site-head {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: var(--s-4);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-xl);
  letter-spacing: -0.04em;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); }
.site-head--over .wordmark,
.site-head--over .head-link { color: var(--ink-inverse); }
.head-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 9px var(--s-3);
  border-radius: var(--r-full);
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: var(--shadow-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink);
  transition: transform 140ms var(--ease-spring), background 140ms var(--ease-out);
}
.site-head--over .head-link {
  background: var(--glass-dark);
  box-shadow: none;
}
.head-link:hover { transform: translateY(-1px); background: var(--surface-bright); color: var(--ink); }
.site-head--over .head-link:hover { background: rgba(255, 255, 255, 0.22); color: var(--ink-inverse); }

/* ---------- Buttons + chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 52px;
  padding: 0 var(--s-5);
  border-radius: var(--r-full);
  font-size: var(--fs-base);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-align: center;
  transition: transform 120ms var(--ease-spring), box-shadow 160ms var(--ease-out), background 160ms var(--ease-out);
}
.btn--primary {
  background: var(--accent);
  color: var(--ink-inverse);
  box-shadow: var(--shadow-cta);
}
.btn--primary:hover { color: var(--ink-inverse); box-shadow: var(--shadow-ambient); }
.btn--primary:active { transform: scale(0.96); }
.btn--quiet {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-ambient);
}
.btn--quiet:hover { background: var(--surface-bright); color: var(--ink); }
.btn--quiet:active { transform: scale(0.96); }
.btn--ghost {
  background: transparent;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--ghost-border);
}
.btn--ghost:hover { background: var(--surface-bright); color: var(--ink); }
.btn--block { width: 100%; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-full);
  background: var(--surface-high);
  color: var(--ink-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.chip--vibe {
  background: rgba(0, 194, 168, 0.12);
  color: var(--vibe-deep);
  text-transform: lowercase;
}
.chip--glass {
  background: rgba(24, 26, 30, 0.66);
  color: var(--ink-inverse);
  box-shadow: inset 0 0 0 1px var(--ghost-border-inverse);
}
/* The only chip that carries a sentence rather than a label. .chip is a flex
   row, which lays each inline child out as its own column and shreds a
   sentence containing <strong> — so this one goes back to normal text flow. */
.chip--invite {
  display: block;
  max-width: 42ch;
  padding: 10px 16px;
  border-radius: var(--r-lg);
  background: var(--accent-wash);
  color: var(--accent-deep);
  font-weight: 500;
  white-space: normal;
  text-align: left;
  line-height: 1.4;
}
.chip--invite strong {
  font-weight: 600;
  letter-spacing: 0.04em;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.dot {
  width: 4px;
  height: 4px;
  border-radius: var(--r-full);
  background: currentColor;
  opacity: 0.4;
  flex: none;
}

/* ---------- Map plate ---------- */

.plate {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-plate);
  background: var(--map-field);
  box-shadow: var(--shadow-lift);
  isolation: isolate;
}
.plate::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--ghost-border-soft);
  border-radius: inherit;
}
.plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* The tile mosaic is 3:2, so the plate must be too — otherwise percentage
   positions distort the map. */
.plate--map { aspect-ratio: 3 / 2; background: var(--map-field); }
.map-tiles { position: absolute; inset: 0; }
.map-tiles img { position: absolute; display: block; }
.map-credit {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 3px 8px;
  border-radius: var(--r-sm) 0 0 0;
  background: rgba(255, 255, 255, 0.82);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-2);
}
/* No map tiles yet: a flat field, not a drawn imitation of streets. */
.plate-fallback {
  position: absolute;
  inset: 0;
  background: var(--map-field);
}

@keyframes pin-in {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 900px) {
  /* Desktop: the reel hangs off the plate's edge */
  .reel { left: calc(var(--s-3) * -1); height: 62%; }
}

/* The source video, overlapping the map it produced */
.reel {
  position: absolute;
  z-index: 2;
  height: 56%;
  width: auto;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--ink);
  box-shadow: 0 24px 56px rgba(10, 79, 148, 0.26);
  bottom: -48px;
  left: var(--s-2);
  transform: rotate(-4deg);
}
.reel img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }
.reel__still {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
/* Now a scrim over the still rather than a flat black fill: enough mood to keep
   the caption legible, light enough that the still still reads. The play button
   carries its own glass disc, so it needs no help from this layer. */
.reel__glyph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--scrim);
}
.reel__play {
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: var(--glass-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  display: grid;
  place-items: center;
}
.reel__play::after {
  content: '';
  width: 0;
  height: 0;
  margin-left: 3px;
  border-left: 12px solid var(--ink);
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
}
.reel__tag {
  position: absolute;
  left: var(--s-2);
  bottom: var(--s-2);
  right: var(--s-2);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-inverse);
  text-shadow: 0 1px 8px rgba(24, 26, 30, 0.6);
  text-wrap: balance;
}

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

.hero {
  position: relative;
  padding-bottom: var(--s-8);
}
.hero__inner {
  display: grid;
  gap: var(--s-6);
  padding-top: var(--s-4);
}
@media (min-width: 900px) {
  .hero__inner {
    grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
    align-items: center;
    gap: var(--s-7);
    padding-top: var(--s-5);
  }
}
.hero__copy { display: grid; gap: var(--s-4); }
.hero__display { position: relative; }
@media (min-width: 1080px) {
  /* Intentional asymmetry: the headline breaks out of the column */
  .hero__display { margin-left: calc(var(--s-4) * -1); }
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}
.hero__note {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--ink-3);
  text-wrap: pretty;
}
/* A separator that belongs to the phrase after it, so a wrap can never leave it
   dangling at the end of a line where it reads as a typo. */
.hero__note span::before {
  content: '·';
  margin-inline: 0.5em;
  opacity: 0.5;
}
.hero__stage { padding-bottom: var(--s-6); }
/* The reel is anchored HERE, not to the stage — anything added below the plate
   (the legend) must sit outside the box the reel hangs off. */
.hero__frame { position: relative; }

/* Desktop: the plate gets room to breathe and the hero fills the fold */
@media (min-width: 1200px) {
  .hero__inner { grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: var(--s-9); }
  .hero { padding-bottom: var(--s-9); }
  .demo { padding-block: var(--s-9); }
}

/* ---------- Sustained demonstration (replaces the numbered-step row) ---------- */

.demo {
  position: relative;
  padding-block: var(--s-8);
  background: var(--canvas-deep);
}
.demo__grid { display: grid; gap: var(--s-6); }
@media (min-width: 900px) {
  .demo__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
    gap: var(--s-8);
    align-items: start;
  }
  .demo__sticky { position: sticky; top: var(--s-6); }
}
.demo__beats {
  display: grid;
  gap: var(--s-6);
  margin: 0;
  padding: 0;
  list-style: none;
}
.beat {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-4) var(--s-4) var(--s-5);
  border-radius: var(--r-plate);
  background: var(--surface);
  box-shadow: var(--shadow-ambient);
}
/* Asymmetric rhythm — each beat sits differently in its column */
.beat:nth-child(1) { margin-right: 0; }
.beat:nth-child(2) { background: var(--surface-bright); }
.beat:nth-child(3) { background: var(--ink); color: var(--ink-inverse); }
.beat:nth-child(3) .beat__body { color: var(--ink-inverse-2); }
.beat:nth-child(3) .eyebrow { color: var(--ink-inverse-2); }
.beat:nth-child(3) .headline { color: var(--ink-inverse); }
@media (min-width: 900px) {
  .beat:nth-child(1) { margin-right: var(--s-7); }
  .beat:nth-child(2) { margin-left: var(--s-6); }
  .beat:nth-child(3) { margin-right: var(--s-4); }
}
.beat__body { margin: 0; color: var(--ink-2); font-size: var(--fs-base); text-wrap: pretty; }
.beat__quote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-style: italic;
  font-size: var(--fs-xl);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

/* ---------- Collection page ---------- */

.coll-hero { position: relative; padding-bottom: var(--s-5); }
.coll-hero__plate { position: relative; }
/* Deliberately NOT re-shaped per breakpoint: .plate--map stays 3:2 because the
   tile mosaic is 3:2 and the pins are positioned as percentages of the same
   box. Any other aspect stretches the map and slides every pin off its place. */
/* Push the overlap further: the card rides up over the map */
.coll-card {
  position: relative;
  z-index: 3;
  width: min(100%, 620px);
  margin-top: -64px;
  margin-left: 0;
  padding: var(--s-5) var(--s-4) var(--s-5);
  border-radius: var(--r-plate);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  display: grid;
  gap: var(--s-3);
}
@media (min-width: 720px) {
  .coll-card {
    margin-top: -120px;
    margin-left: var(--s-6);
    padding: var(--s-6);
  }
}
.coll-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.coll-card__desc { margin: 0; color: var(--ink-2); text-wrap: pretty; }

/* ---------- Attribution (who curated it) ---------- */

.attrib {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  flex-wrap: wrap;
}
.attrib__who {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 3px var(--surface), var(--shadow-sm);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 30px; height: 30px; font-size: var(--fs-xs); }
.avatar--vibe { background: rgba(0, 194, 168, 0.16); color: var(--vibe-deep); }
/* Overlap, per the no-perfect-grid rule */
.avatar-stack { display: flex; }
.avatar-stack .avatar + .avatar { margin-left: -10px; }

.attrib__name {
  display: grid;
  gap: 0;
  min-width: 0;
}
.attrib__label { font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.attrib__handle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  letter-spacing: -0.025em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Geo-projected pins over the map ---------- */

.map-mark {
  position: absolute;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 7px;
}
.map-mark__dot {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: var(--r-full);
  background: var(--accent-deep);
  color: var(--ink-inverse);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 0 0 4px rgba(19, 127, 236, 0.16), var(--shadow-sm);
  animation: pin-in 560ms var(--ease-spring) both;
}
.map-mark__dot--vibe { background: var(--vibe-ink); box-shadow: 0 0 0 4px rgba(0, 194, 168, 0.18), var(--shadow-sm); }

/* Sits in the legend row, where it can never collide with a pin or the card. */
.map-legend__note {
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink-3);
  padding-left: var(--s-2);
  font-size: var(--fs-xs);
}

/* The legend is the caption: it names every pin, at every width, so clustered
   maps never depend on labels that would collide. */
.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
}
/* Clears the reel, which hangs 48px below the frame it's anchored to. */
.hero__frame + .map-legend {
  margin-top: var(--s-8);
}
@media (min-width: 720px) {
  /* Aligns with .coll-card's inset — scoped, so the landing legend stays flush
     with the plate it captions. */
  .coll-hero__plate ~ .map-legend { margin-left: var(--s-6); }
}
.map-legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 6px;
  border-radius: var(--r-full);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: var(--fs-xs);
  font-weight: 500;
}
.map-legend b {
  width: 20px;
  height: 20px;
  border-radius: var(--r-full);
  background: var(--accent-deep);
  color: var(--ink-inverse);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}
.map-legend b.is-vibe { background: var(--vibe-ink); }
/* Present in the collection, but not placed on this frame. */
.map-legend b.is-off {
  background: transparent;
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--ghost-border);
}
.map-legend li.is-off { color: var(--ink-2); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-2) var(--s-3);
  padding-block: var(--s-6) var(--s-4);
}

/* Curated masonry — varied heights, photo does the work */
.places {
  columns: 2;
  column-gap: var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 720px) {
  .places { columns: 3; column-gap: var(--s-4); }
}
@media (min-width: 1080px) {
  .places { columns: 3; column-gap: var(--s-4); }
}
.places > li {
  break-inside: avoid;
  margin-bottom: var(--s-3);
}
@media (min-width: 720px) {
  .places > li { margin-bottom: var(--s-4); }
}

.place-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-2xl);
  background: var(--surface-high);
  box-shadow: var(--shadow-ambient);
  color: var(--ink-inverse);
  transition: transform 140ms var(--ease-spring), box-shadow 200ms var(--ease-out);
}
.place-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); color: var(--ink-inverse); }
.place-card:active { transform: scale(0.97); }
.place-card__media { position: relative; aspect-ratio: 4 / 5; }
.place-card__media img { width: 100%; height: 100%; object-fit: cover; }
/* Varied rhythm without a rigid grid */
.places > li:nth-child(4n + 1) .place-card__media { aspect-ratio: 3 / 4; }
.places > li:nth-child(4n + 2) .place-card__media { aspect-ratio: 1 / 1; }
.places > li:nth-child(4n + 3) .place-card__media { aspect-ratio: 4 / 5; }
.places > li:nth-child(4n + 4) .place-card__media { aspect-ratio: 5 / 7; }

.place-card__none {
  position: absolute;
  inset: 0;
  background: var(--surface-high);
}
/* No photo means no photo to protect — the mood layer would just make the
   placeholder read as a failed image load. */
.place-card__none + .place-card__veil { display: none; }
.place-card__veil {
  position: absolute;
  inset: 0;
  background: var(--scrim);
}
.place-card__text {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: 3px;
  padding: var(--s-4) var(--s-3) var(--s-3);
  background: var(--scrim-text);
}
.place-card__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-lg);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--ink-inverse);
  text-wrap: balance;
  text-shadow: 0 1px 12px rgba(24, 26, 30, 0.5);
}
.place-card__where {
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--ink-inverse);
  text-shadow: 0 1px 12px rgba(24, 26, 30, 0.5);
}
.place-card__tag {
  position: absolute;
  top: var(--s-2);
  left: var(--s-2);
}

/* One feature card breaks the column rhythm */
.place-feature {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--r-plate);
  background: var(--surface-high);
  box-shadow: var(--shadow-lift);
  color: var(--ink-inverse);
  margin-bottom: var(--s-4);
  transition: transform 140ms var(--ease-spring);
}
.place-feature:hover { transform: translateY(-3px); color: var(--ink-inverse); }
.place-feature:active { transform: scale(0.98); }
.place-feature__media { position: relative; aspect-ratio: 4 / 3; }
@media (min-width: 720px) {
  .place-feature__media { aspect-ratio: 21 / 10; }
}
.place-feature__media img { width: 100%; height: 100%; object-fit: cover; }
.place-feature__text {
  position: absolute;
  inset: auto 0 0 0;
  display: grid;
  gap: var(--s-2);
  padding: var(--s-5) var(--s-4) var(--s-4);
  background: var(--scrim-text);
}
.place-feature__name {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(26px, 6.4vw, 42px);
  line-height: 1.02;
  letter-spacing: -0.032em;
  color: var(--ink-inverse);
  text-wrap: balance;
}

.empty {
  display: grid;
  gap: var(--s-3);
  justify-items: start;
  padding: var(--s-7) var(--s-4);
  border-radius: var(--r-plate);
  background: var(--surface);
  box-shadow: var(--shadow-ambient);
}

/* ---------- Location page ---------- */

.loc-hero { position: relative; }
.loc-hero__media {
  position: relative;
  width: 100%;
  height: 74vh;
  min-height: 460px;
  max-height: 620px;
  overflow: hidden;
  background: var(--surface-high);
}
@media (min-width: 720px) {
  .loc-hero__media { height: 72vh; min-height: 520px; max-height: 760px; }
}
.loc-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.loc-hero__veil {
  position: absolute;
  inset: 0;
  background: var(--scrim-soft);
}
.loc-hero__chrome {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
}
.loc-hero__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.035em;
  color: var(--ink-inverse);
  text-wrap: balance;
  overflow-wrap: break-word;
  max-width: 22ch;
  text-shadow: 0 1px 12px rgba(24, 26, 30, 0.5);
}
.loc-hero__foot {
  position: relative;
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4) 0 calc(var(--s-6) + var(--s-4));
}
/* Overlay text carries its own backing — the hero's mood veil is deliberately
   light, so protection is scoped to the text zone exactly as on the cards. */
.loc-hero__foot > * {
  position: relative;
}
.loc-hero__foot::before {
  content: '';
  position: absolute;
  /* Full-bleed: .wrap is centred, so insetting by --edge alone leaves the band
     floating short of both screen edges on anything wider than --measure. */
  inset: calc(var(--s-4) * -1) calc(50% - 50vw) 0;
  background: var(--scrim-text);
  pointer-events: none;
}
.loc-hero__foot .eyebrow {
  color: var(--ink-inverse);
  text-shadow: 0 1px 12px rgba(24, 26, 30, 0.5);
}

.loc-body {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--s-6) * -1);
  padding: var(--s-5) var(--s-4) var(--s-6);
  border-radius: var(--r-plate) var(--r-plate) 0 0;
  background: var(--canvas);
  display: grid;
  gap: var(--s-5);
}
@media (min-width: 720px) {
  .loc-body { padding: var(--s-7) var(--s-6) var(--s-8); }
}
@media (min-width: 980px) {
  /* Desktop: the facts and the map sit side by side */
  .loc-body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
    column-gap: var(--s-7);
    align-items: start;
  }
}
.loc-facts {
  display: grid;
  gap: var(--s-3);
  margin: 0;
  padding: 0;
}
@media (min-width: 560px) {
  .loc-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--s-4); }
}
@media (min-width: 980px) {
  .loc-facts { grid-template-columns: minmax(0, 1fr); align-content: start; }
}
.fact {
  display: grid;
  gap: 2px;
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.fact dt { font-size: var(--fs-eyebrow); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.fact dd { margin: 0; font-size: var(--fs-base); font-weight: 500; }
.loc-map .plate { aspect-ratio: 3 / 2; }

/* ---------- Sticky CTA dock — native-app glass ---------- */

.cta-dock {
  position: sticky;
  bottom: 0;
  z-index: 40;
  padding: var(--s-3) var(--edge) calc(var(--s-3) + env(safe-area-inset-bottom, 0px));
  background: var(--glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  box-shadow: 0 -1px 0 var(--ghost-border-soft), 0 -12px 32px rgba(10, 79, 148, 0.08);
}
.cta-dock__inner {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.cta-dock__copy { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
.cta-dock__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-base);
  letter-spacing: -0.025em;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cta-dock__sub {
  font-size: var(--fs-xs);
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 720px) {
  .cta-dock__title { -webkit-line-clamp: 1; font-size: var(--fs-lg); }
}
.cta-dock .btn { flex: none; min-height: 48px; padding-inline: var(--s-4); }
@media (max-width: 400px) {
  .cta-dock__sub { display: none; }
}

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

.site-foot {
  padding-block: var(--s-7) var(--s-8);
  color: var(--ink-3);
  font-size: var(--fs-sm);
  display: grid;
  gap: var(--s-3);
}
.site-foot a { color: var(--ink-2); font-weight: 500; }
.site-foot a:hover { color: var(--accent); }

/* ---------- Unavailable ---------- */

.quiet {
  min-height: 68vh;
  display: grid;
  align-content: center;
  gap: var(--s-4);
  padding-block: var(--s-8);
  justify-items: start;
}

/* ---------- Entrance reveals ----------
   These pages carry no JavaScript (see PAGE_CSP: there is no script-src, so
   default-src 'none' blocks every script). The design's scroll-triggered
   reveal is therefore a load-triggered one: a single keyframe with fill-mode
   both, staggered by position so sections still arrive in sequence rather than
   all at once. Nothing depends on it — every .reveal ends at its natural
   position, so a browser that skips the animation entirely loses nothing. */

.reveal { animation: reveal-in 620ms var(--ease-spring) both; }
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
.demo__beats > .reveal:nth-child(2) { animation-delay: 110ms; }
.demo__beats > .reveal:nth-child(3) { animation-delay: 220ms; }
.places > li.reveal:nth-child(2) { animation-delay: 60ms; }
.places > li.reveal:nth-child(3) { animation-delay: 120ms; }
.places > li.reveal:nth-child(n + 4) { animation-delay: 180ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { animation: none; opacity: 1; transform: none; }
  .reel { transform: none; }
}
