/* ============================================================
   The Seaside Getaway — design tokens + styles
   Palette pulled from the actual photos: weathered cedar,
   fog blue, hydrangea periwinkle, dune sand, Atlantic ink.
   ============================================================ */

:root {
  --cedar:        #6f7a76;   /* weathered shingle gray-green */
  --fog:          #aebfca;   /* foggy Atlantic blue */
  --periwinkle:   #7e8fc4;   /* hydrangea */
  --sand:         #e4d9c4;   /* dune sand */
  --cream:        #f7f4ee;   /* page */
  --cream-deep:   #efe9dd;   /* tinted sections */
  --ink:          #26322f;   /* deep Atlantic ink — text */
  --ink-soft:     #4f5d58;
  --line:         #d9d2c4;
  --accent:       #3d5a6c;   /* deep sea — buttons, links */

  --font-display: "Fraunces", Georgia, serif;
  --font-body:    "Hanken Grotesk", -apple-system, "Segoe UI", sans-serif;

  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}

img { display: block; width: 100%; height: auto; }

a { color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; gap: 24px;
  padding: 18px var(--gutter);
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background 320ms ease, border-color 320ms ease;
}
/* Immersive mode: header floats over the film/dark sections */
body.over-dark .site-header {
  background: rgba(16, 26, 32, 0.42);
  border-bottom-color: transparent;
}
body.over-dark .wordmark { color: #fff; }
body.over-dark .anchor-nav a { color: rgba(255, 255, 255, 0.88); }
body.over-dark .anchor-nav a:hover { color: #fff; }
body.over-dark .header-guide { color: #fff; }
.wordmark {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 500;
  color: var(--ink); text-decoration: none;
  white-space: nowrap;
}
.anchor-nav { display: flex; gap: 20px; margin-left: auto; flex-wrap: wrap; }
.anchor-nav a {
  color: var(--ink-soft); text-decoration: none;
  font-size: 14px; letter-spacing: 0.01em;
  transition: color 150ms ease;
}
.anchor-nav a:hover { color: var(--ink); }

/* Brushstroke hover underline — a hand-painted swipe, not a straight rule.
   One inline SVG (~300 bytes), revealed on hover/focus. */
:root {
  --brush: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='10' viewBox='0 0 120 10'%3E%3Cpath d='M2 6 C 22 3, 42 8, 62 5 S 102 3, 118 6' fill='none' stroke='%237e8fc4' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
.anchor-nav a,
.colophon a,
.chapter-note a,
.chapter-intro a,
.stories a {
  background: var(--brush) no-repeat left bottom / 0% 6px;
  transition: color 150ms ease, background-size 450ms ease;
  text-decoration: none;
  padding-bottom: 3px;
}
.anchor-nav a:hover,
.anchor-nav a:focus-visible,
.colophon a:hover,
.colophon a:focus-visible,
.chapter-note a:hover,
.chapter-note a:focus-visible,
.chapter-intro a:hover,
.chapter-intro a:focus-visible,
.stories a:hover,
.stories a:focus-visible {
  background-size: 100% 6px;
}
.header-cta { margin-left: 4px; }
/* The header CTA earns its fill only after the hero's own button is gone */
.header-cta {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
}
.header-cta:hover { background: rgba(61, 90, 108, 0.08); transform: none; }
body.scrolled-past-hero .header-cta {
  background: #1f4e5f; color: #fff; border-color: transparent;
}
body.scrolled-past-hero .header-cta:hover { background: #153b49; }
body.over-dark .header-cta {
  background: #fff; color: var(--ink); border-color: transparent;
}
.header-guide {
  display: none;
  margin-left: auto;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 13px 26px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}
.btn-primary { background: #1f4e5f; color: #fff; }
.btn-primary:hover { background: #153b49; transform: translateY(-1px); }
.btn-lg { padding: 16px 34px; font-size: 14px; }

/* ---------- scroll-tide: a hand-thin progress line down the left edge ---------- */
.scroll-tide {
  position: fixed; left: 0; top: 0; z-index: 70;
  width: 3px; height: 100vh;
  background: linear-gradient(180deg, var(--periwinkle), var(--fog));
  transform: scaleY(0); transform-origin: top;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .scroll-tide { animation: tide-grow linear both; animation-timeline: scroll(root); }
  @keyframes tide-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
}
@media (max-width: 900px) { .scroll-tide { display: none; } }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- hero: full-bleed, the painting resolves into the real porch ---------- */
.hero {
  position: relative;
  min-height: calc(92svh - 62px);
  display: flex;
  align-items: flex-end;
  padding: 120px var(--gutter) clamp(56px, 9vh, 104px);
  overflow: hidden;
}
.hero-figure {
  position: absolute; inset: 0;
  margin: 0;
  border-radius: 0;
  background: var(--cream-deep);
}
.hero-figure .xfade-art,
.hero-figure .xfade-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,26,30,0.46) 0%, rgba(18,26,30,0.04) 28%, rgba(18,26,30,0.3) 60%, rgba(18,26,30,0.78) 100%);
  pointer-events: none;
}
.hero-text {
  position: relative; z-index: 2;
  max-width: 660px;
}
.hero .kicker { color: rgba(255, 255, 255, 0.88); }
.kicker {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cedar); margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(52px, 8.4vw, 116px);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
  color: #fff;
  text-shadow: 0 2px 34px rgba(8, 12, 18, 0.42);
}
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-soft); max-width: 46ch; }
.hero .lede {
  color: rgba(255, 255, 255, 0.95);
  max-width: 44ch;
  text-shadow: 0 1px 16px rgba(8, 12, 18, 0.5);
}
.trust-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 24px 0 30px;
  font-size: 14px; color: var(--ink-soft);
}
.hero .trust-row { color: rgba(255, 255, 255, 0.92); }
.trust-row .stars { color: #b3842f; font-weight: 600; white-space: nowrap; }
.hero .trust-row .stars { color: #f2c879; }
.trust-row .ti { white-space: nowrap; }
.trust-row .ti::before { content: "·"; margin-right: 10px; color: var(--line); }
.hero .trust-row .ti::before { color: rgba(255, 255, 255, 0.55); }
.hero-media { position: relative; }
.hero-media img { border-radius: 10px; }
.hero-media figcaption {
  margin-top: 10px; font-size: 13px; color: var(--ink-soft);
  font-style: italic;
}
.wide-figure { margin: 28px 0 0; }
.wide-figure img { border-radius: 10px; width: 100%; }
.wide-figure figcaption {
  margin-top: 10px; font-size: 13px; color: var(--ink-soft);
  font-style: italic;
}

/* ---------- illustration → photo crossfade ---------- */
.xfade {
  position: relative;
  margin: 0 0 28px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream-deep);
}
.gallery .xfade { margin: 0; }
.xfade img, .xfade video { display: block; width: 100%; }
.xfade video { height: auto; }  /* video width/height attrs are layout hints, not aspect ratios */
.xfade-art { position: relative; }
.xfade-art { filter: blur(var(--blur, 0px)); transition: filter 1400ms ease; }
.xfade-photo {
  position: absolute; inset: 0;
  height: 100%;
  object-fit: cover;
  opacity: var(--reveal, 0);
  transition: opacity 1400ms ease;
}
[data-xfade].is-real .xfade-photo { opacity: 1; }
[data-xfade].is-real .xfade-art { filter: blur(0); }
/* Scroll-scrubbed figures resolve frame-by-frame — no easing in the way */
[data-xfade][data-scrub] .xfade-photo,
[data-xfade][data-scrub] .xfade-art { transition: none; }
.xfade figcaption {
  position: absolute;
  left: 12px; right: 12px; bottom: 10px;
  z-index: 2;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  font-style: italic;
  text-shadow: 0 1px 12px rgba(8, 12, 18, 0.8);
}
.xfade-bleed figcaption {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  text-align: center;
  max-width: min(620px, calc(100% - 32px));
  color: var(--ink);
  background: rgba(247, 244, 238, 0.9);
  padding: 6px 12px;
  border-radius: 6px;
}
.xfade-wide { margin-top: 28px; }

/* ---------- the explorer: tap the painted house, see the real rooms ---------- */
.explorer {
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  background: var(--cream-deep);
}
.explorer-head { margin: 0 auto clamp(20px, 3vw, 36px); }
.explorer-prompt {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 2.2vw, 24px);
  color: var(--accent);
  margin: 18px 0 0;
}
.explorer-notes {
  max-width: 760px;
  margin: clamp(24px, 4vw, 44px) auto 0;
}
.good-to-know {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 980px;
  margin: clamp(28px, 4vw, 48px) auto 0;
}
.gtk-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.gtk-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -18px rgba(20, 32, 44, 0.35);
}
.gtk-card svg {
  width: 30px; height: 30px;
  color: var(--periwinkle);
  margin-bottom: 10px;
}
.gtk-card h3 {
  font-family: var(--font-body);
  font-size: 15px; font-weight: 700;
  margin: 0 0 4px;
  color: var(--ink);
}
.gtk-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.little-things {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 980px;
  margin: 14px auto 0;
}
.little-things p {
  background: var(--cream);
  border-left: 3px solid var(--periwinkle);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.little-things strong { color: var(--ink); }
@media (max-width: 900px) {
  .good-to-know { grid-template-columns: repeat(2, 1fr); }
  .little-things { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .good-to-know { grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 var(--gutter); }
  .gtk-card { padding: 14px 14px; }
  .gtk-card h3 { font-size: 13.5px; }
  .gtk-card p { font-size: 13px; }
  .little-things { padding: 0 var(--gutter); }
  .explorer-head { padding: 0 var(--gutter); }
}
.room-chips {
  display: none;
  gap: 10px;
  overflow-x: auto;
  padding: 0 var(--gutter) 18px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.room-chip {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(30, 40, 50, 0.18);
  background: #fff;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.room-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.explorer-house {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px -36px rgba(20, 30, 40, 0.65);
}
.hotspot {
  position: absolute;
  width: 44px; height: 44px;
  margin: -22px 0 0 -22px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px; font-weight: 700;
  display: grid; place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px -6px rgba(10, 25, 35, 0.6);
  z-index: 4;
  animation: hs-pulse 2.4s ease-in-out infinite;
  transition: transform 160ms ease;
}
.hotspot:hover, .hotspot:focus-visible { transform: scale(1.14); outline: none; }
@keyframes hs-pulse {
  0%, 100% { box-shadow: 0 8px 18px -6px rgba(10, 25, 35, 0.6), 0 0 0 0 rgba(61, 90, 108, 0.45); }
  50% { box-shadow: 0 8px 18px -6px rgba(10, 25, 35, 0.6), 0 0 0 10px rgba(61, 90, 108, 0); }
}

/* The view arrow: a wayfinding nudge off the bottom-right corner of the house */
.view-arrow {
  position: absolute;
  right: 18px; bottom: 18px;
  z-index: 4;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px -6px rgba(10, 25, 35, 0.6);
  animation: hs-pulse 2.4s ease-in-out infinite;
  transition: transform 160ms ease;
}
.view-arrow:hover, .view-arrow:focus-visible { transform: scale(1.06); outline: none; }
.view-arrow-icon { width: 20px; height: 20px; animation: arrow-nudge 1.6s ease-in-out infinite; }
@keyframes arrow-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(4px); }
}
@media (max-width: 640px) { .view-arrow { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .view-arrow { animation: none; }
  .view-arrow-icon { animation: none; }
}
.hotspot-card {
  position: absolute;
  bottom: 52px; left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 150px;
  background: #fff;
  border-radius: 10px;
  padding: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--ink);
  box-shadow: 0 18px 36px -14px rgba(10, 20, 30, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}
.hotspot-card img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: 6px; margin-bottom: 6px;
  display: block;
}
.hotspot:hover .hotspot-card,
.hotspot:focus-visible .hotspot-card { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (hover: none) { .hotspot-card { display: none; } }
@media (max-width: 640px) {
  .room-chips { display: flex; }
  .explorer { padding-left: 0; padding-right: 0; }
  .explorer-head { padding: 0 var(--gutter); }
  .explorer-notes { padding: 0 var(--gutter); }
  .explorer-house { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hotspot { animation: none; }
}

.explorer-house img { display: block; width: 100%; }
@media (max-width: 640px) {
  .explorer-house img { object-fit: contain; max-height: 56vh; }
  .hotspot { display: none; }
  .room-chips { padding-bottom: 12px; }
}

/* ---------- room lightbox ---------- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(8, 14, 20, 0.74);
  backdrop-filter: blur(4px);
  display: grid; place-items: center;
  padding: 20px;
}
.lightbox[hidden] { display: none; }
.lightbox-panel {
  position: relative;
  width: 100%; max-width: 760px;
  max-height: 90vh;
  background: var(--cream, #f7f4ee);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.6);
  display: flex; flex-direction: column;
}
.room-photos { background: #11181f; }
.room-photos img, .room-photos video {
  display: block;
  width: 100%;
  max-height: 48vh;
  object-fit: contain;
}
.lightbox-caption { padding: 14px 22px 18px; }
.lightbox-caption h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  margin: 0 0 6px;
}
.lightbox-caption p { margin: 0 0 16px; color: var(--ink-soft); max-width: 52ch; }
.lightbox-caption .btn { display: inline-block; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px;
  z-index: 3;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(247, 244, 238, 0.92);
  font-size: 24px; line-height: 1;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5);
}
.lightbox-nav {
  position: absolute; top: 35%;
  z-index: 3;
  min-width: 44px; min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(247, 244, 238, 0.92);
  font-size: 20px; font-weight: 600; line-height: 1;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  transform: translateY(-50%);
}
.photo-prev { left: 10px; }
.photo-next { right: 10px; }
@media (max-width: 640px) {
  .lightbox-nav { top: 32%; padding: 6px 12px; font-size: 18px; }
  .photo-prev { left: 14px; }
  .photo-next { right: 14px; }
}
body.lightbox-open { overflow: hidden; }
body.lightbox-open .sticky-cta { display: none; }

.room-counter {
  position: absolute; top: 12px; left: 18px; z-index: 3;
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ink-soft); background: rgba(247, 244, 238, 0.92);
  padding: 4px 10px; border-radius: 999px;
}

/* Filmstrip: real thumbnails of the current room's photos (desktop only) */
.lb-filmstrip {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  margin: 0 0 12px;
  scrollbar-width: thin;
}
.lb-thumb {
  position: relative;
  flex: 0 0 auto;
  width: 68px; height: 50px;
  padding: 0;
  border: none;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 150ms ease, box-shadow 150ms ease;
  background: #11181f;
}
.lb-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.lb-thumb:hover { opacity: 0.85; }
.lb-thumb.is-active {
  opacity: 1;
  box-shadow: 0 0 0 2px var(--accent);
}
.lb-thumb-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: #fff;
  font-size: 16px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.7);
  background: rgba(8, 14, 20, 0.25);
}
@media (max-width: 640px) { .lb-filmstrip { display: none; } }

/* Room chips: the one and only room switcher */
.lb-rooms {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin: 0 0 16px;
}
.lb-room-chip {
  font-family: var(--font-body);
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.lb-room-chip:hover { border-color: var(--accent); color: var(--accent); }
.lb-room-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}
@media (max-width: 640px) {
  .lb-rooms {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-left: -4px; margin-right: -4px;
    padding-left: 4px; padding-right: 4px;
    scrollbar-width: none;
  }
  .lb-rooms::-webkit-scrollbar { display: none; }
}

@media (max-width: 640px) {
  .lightbox { padding: 0; align-items: end; }
  .lightbox-panel {
    max-height: 88vh;
    border-radius: 16px 16px 0 0;
  }
  .room-photos img, .room-photos video { max-height: 52vh; }
}

/* ---------- scroll-scrubbed fly-in (real drone frames) ---------- */
.flyin { height: 220vh; position: relative; margin: 0; }
.flyin-sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
  background: #dfe9ec;
}
.flyin-canvas, .flyin-poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.flyin-poster { z-index: 0; }
.flyin-canvas { z-index: 1; }
.flyin-copy {
  position: absolute;
  left: var(--gutter); right: var(--gutter); bottom: 14vh;
  z-index: 2;
  text-align: left;
  pointer-events: none;
}
.flyin-line {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(26px, 4.2vw, 52px);
  font-weight: 400;
  line-height: 1.22;
  color: #fff;
  max-width: 20ch;
  margin: 0;
  text-shadow: 0 2px 26px rgba(8, 14, 20, 0.65);
  transition: opacity 500ms ease;
}
.flyin-end { opacity: 0; position: absolute; left: 0; bottom: 0; }
.flyin.is-ending .flyin-start { opacity: 0; }
.flyin.is-ending .flyin-end { opacity: 1; }
/* beat lines: all stacked, JS toggles .is-live per scroll range */
.flyin-line { position: absolute; left: 0; bottom: 0; opacity: 0; }
.flyin-line.is-live { opacity: 1; }

/* autoplay affordances — built by JS only when the pinned section has no
   scroll travel (mobile). A thin progress line plus a Replay tap that
   fades in once the film has played through once. */
.flyin-progress {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; z-index: 3;
  background: rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.flyin-progress i {
  display: block; height: 100%; width: 100%;
  background: #fff;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 90ms linear;
}
.flyin-replay {
  position: absolute; right: var(--gutter); bottom: 4vh;
  z-index: 3;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(12, 20, 28, 0.42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #fff;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 360ms ease, transform 360ms ease;
}
.flyin-replay.is-ready { opacity: 1; transform: translateY(0); pointer-events: auto; }
.flyin-replay svg { width: 16px; height: 16px; }
.flyin-replay:active { transform: scale(0.96); }
@media (prefers-reduced-motion: reduce) {
  .flyin { height: auto; }
  .flyin-sticky { position: relative; height: 70vh; }
  .flyin-canvas { display: none; }
  .flyin-line { display: none; }
  .flyin-final { display: block; opacity: 1; position: static; }
}

/* ---------- full-bleed arrival film ---------- */
.arrival { margin: 0; padding: 0; }
.xfade-bleed {
  margin: 0;
  border-radius: 0;
  max-height: 72vh;
}
.xfade-bleed .xfade-art,
.xfade-bleed .xfade-photo {
  width: 100%;
  max-height: 72vh;
  object-fit: cover;
}
@media (max-width: 640px) {
  /* A 16:9 painting would render as a thin strip on phones — let the
     arrival fill most of the screen; the vertical cut of the film
     matches this crop. */
  .xfade-bleed .xfade-art { height: 70vh; }
}

/* ---------- the postcard: the payoff frame, sent with love ---------- */
.postcard {
  background: #dfe9ec;
  padding: clamp(56px, 10vw, 130px) var(--gutter);
  display: grid;
  place-items: center;
}
.postcard-card {
  position: relative;
  margin: 0;
  width: min(1040px, 100%);
  transform: rotate(-1.1deg);
  background: #fff;
  padding: clamp(10px, 1.6vw, 18px) clamp(10px, 1.6vw, 18px) clamp(44px, 5vw, 64px);
  border-radius: 4px;
  box-shadow: 0 36px 70px -34px rgba(20, 32, 44, 0.6);
}
.postcard-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 2px;
}
.postcard-media .xfade-art,
.postcard-media .xfade-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.postcard-stamp {
  position: absolute;
  top: 12px; right: 12px;
  width: clamp(40px, 6vw, 58px); height: auto;
  color: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 1px 4px rgba(10, 20, 30, 0.5));
  z-index: 3;
}
.postcard-card figcaption {
  position: absolute;
  right: clamp(14px, 2vw, 24px);
  bottom: clamp(12px, 1.6vw, 20px);
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(14px, 1.6vw, 19px);
  color: var(--ink-soft);
}
@media (max-width: 640px) {
  .postcard-card { transform: rotate(-0.7deg); }
  .postcard-media { aspect-ratio: 9 / 14; }
}

/* ---------- plain figures: real photos, no crossfade ---------- */
.plain-figure {
  position: relative;
  margin: 0 0 28px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream-deep);
}
.plain-figure img { display: block; width: 100%; height: auto; }
.plain-figure figcaption {
  position: absolute;
  left: 12px; right: 12px; bottom: 10px;
  z-index: 2;
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: #fff;
  font-style: italic;
  text-shadow: 0 1px 12px rgba(8, 12, 18, 0.8);
}
.gallery .plain-figure { margin: 0; border-radius: 8px; }
.gallery .plain-figure img { aspect-ratio: 3 / 4; object-fit: cover; }
.winter-gallery .plain-figure video {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

/* ---------- beach ambient: a wide drone moment mid-chapter ---------- */
.beach-ambient {
  position: relative;
  margin: clamp(24px, 4vw, 40px) 0 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 48px -30px rgba(20, 32, 44, 0.5);
}
.beach-ambient video {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
.beach-ambient figcaption {
  position: absolute;
  left: 50%; bottom: 18px;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  width: min(620px, calc(100% - 32px));
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(18px, 2.4vw, 26px);
  color: #fff;
  text-shadow: 0 2px 24px rgba(8, 14, 20, 0.7);
}
.beach-ambient::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,14,20,0) 60%, rgba(8,14,20,0.4) 100%);
  pointer-events: none;
}
@media (max-width: 640px) {
  .beach-ambient video { aspect-ratio: 4 / 5; }
}

/* ---------- the dusk band: a wide cinematic strip ---------- */
.dusk-band { padding-top: clamp(32px, 5vw, 56px); padding-bottom: clamp(32px, 5vw, 56px); }
.dusk-figure {
  position: relative;
  margin: 0 auto;
  max-width: var(--maxw);
  height: clamp(280px, 42vh, 460px);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 48px -30px rgba(20, 32, 44, 0.5);
}
.dusk-figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 62%;
}
/* The dusk photo is a portrait — on desktop show it as a centered portrait
   card instead of cropping it into a wide banner (mobile stays full-width). */
@media (min-width: 760px) {
  .dusk-figure { max-width: 520px; height: auto; aspect-ratio: 3 / 4; }
  .dusk-figure img { object-position: center center; }
}
.dusk-figure::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,14,20,0) 55%, rgba(8,14,20,0.45) 100%);
  pointer-events: none;
}
.dusk-line {
  position: absolute;
  left: 50%; bottom: 22px;
  transform: translateX(-50%);
  z-index: 2;
  margin: 0;
  width: min(680px, calc(100% - 32px));
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.8vw, 30px);
  color: #fff;
  text-shadow: 0 2px 24px rgba(8, 14, 20, 0.7);
}

/* ---------- the coast: zoom out ---------- */
.coastmap {
  position: relative;
  margin: 0;
  background: #dfe9ec;
}
.coastmap-figure {
  position: relative;
  margin: 0;
  height: 52vh;
  overflow: hidden;
}
.coastmap-figure::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, rgba(8,14,20,0) 45%, rgba(8,14,20,0.55) 100%);
  pointer-events: none;
}
.coastmap-figure .xfade-art,
.coastmap-figure .xfade-photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.coastmap-line {
  position: absolute;
  left: 50%; bottom: 12%;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  width: min(680px, calc(100% - 32px));
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 3vw, 34px);
  line-height: 1.3;
  color: #fff;
  text-shadow: 0 2px 24px rgba(8, 14, 20, 0.7);
  pointer-events: none;
}
@media (max-width: 640px) {
  .coastmap-figure { height: 64vh; }
}

/* ---------- twilight final CTA ---------- */
.final-cta-twilight {
  position: relative;
  padding: clamp(72px, 12vw, 140px) var(--gutter);
  color: #fff;
  overflow: hidden;
  text-align: left;
}
.final-cta-twilight .final-cta-inner {
  position: relative;
  z-index: 2;
  max-width: 60ch;
  margin: 0 auto;
}
.final-cta-twilight > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.final-cta-twilight::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,28,40,0.82) 0%, rgba(20,28,40,0.68) 50%, rgba(20,28,40,0.38) 100%);
  z-index: 1;
}
.final-cta-twilight h2 { color: #fff; text-shadow: 0 1px 18px rgba(10,14,20,0.45); font-size: clamp(34px, 5.6vw, 74px); max-width: 17ch; }
.final-cta-twilight p { color: rgba(255,255,255,0.92); margin-bottom: 28px; text-shadow: 0 1px 12px rgba(10,14,20,0.5); }
.final-cta-twilight .final-cta-copy { font-size: clamp(1.1rem, 1.8vw, 1.35rem); margin-bottom: 14px; }
.final-cta-twilight .final-cta-fineprint {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62);
  margin-bottom: 28px;
  text-shadow: none;
}
.final-cta-twilight .btn-primary { background: #fff; color: var(--ink); }
.final-cta-twilight .btn-primary:hover { background: var(--sand); }

/* ---------- chapters ---------- */
.chapter {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter);
}
.chapter-tint {
  max-width: none;
  background: var(--cream-deep);
}
.chapter-tint > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.chapter-head { max-width: none; margin-bottom: 40px; }
.chapter-intro, .chapter-note { max-width: 62ch; }
/* Full-bleed film sections run flush; the chapters around them breathe tighter */
.flyin + .chapter { padding-top: clamp(44px, 6vw, 72px); }

/* Chapter numerals — a magazine folio, big and quiet */
main { counter-reset: chapter; }
.chapter-head { counter-increment: chapter; position: relative; }
.chapter-head h2 {
  position: relative;
}
.chapter-head h2::before {
  content: counter(chapter, lower-roman) ".";
  display: inline;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  color: var(--sand);
  letter-spacing: 0;
  margin-right: 14px;
  vertical-align: baseline;
}
.chapter-loud .chapter-head h2::before { color: var(--fog); }
#seasons.is-winter .chapter-head h2::before { color: var(--fog); }
.chapter-head::before { content: none; }
#seasons.is-winter .chapter-head::before { content: none; }
.chapter h2, .final-cta h2, .host-text h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 4.8vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.005em;
  margin-bottom: 22px;
}
/* "Morning starts on the porch." is short — keep it on one line. */
#porch .chapter-head h2 { font-size: clamp(30px, 4vw, 48px); }
#porch .chapter-head h2::before { font-size: clamp(28px, 3.8vw, 44px); }
/* Loud chapters: the magazine-cover moments */
.chapter-loud .chapter-head { max-width: none; }
.chapter-loud h2 {
  font-size: clamp(40px, 7vw, 100px);
  max-width: 15ch;
}
.chapter-intro { color: var(--ink-soft); font-size: 18px; max-width: 62ch; }
.chapter-loud .chapter-intro { font-size: clamp(18px, 1.9vw, 21px); }
.chapter-note { margin-top: 28px; color: var(--ink-soft); font-size: 15px; max-width: 68ch; }
.chapter-note.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ---------- galleries (source photos are all 3:4 portraits — show them whole) ---------- */
.gallery { display: grid; gap: 14px; }
.gallery-2up { grid-template-columns: 1fr 1fr; }
.gallery-3up { grid-template-columns: 1fr 1fr 1fr; }
.gallery img {
  border-radius: 8px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
.gallery figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  font-style: italic;
  text-align: center;
}
.beach-gallery img,
.harbor-gallery img,
.food-gallery img { aspect-ratio: 3 / 4; object-fit: cover; }
.beach-gallery figure:first-child img,
.harbor-gallery figure:first-child img,
.food-gallery figure:first-child img { aspect-ratio: 4 / 3; }

.route-map {
  max-width: 680px;
  margin: clamp(24px, 4vw, 40px) auto 0;
}
.route-row {
  display: flex; align-items: center; gap: 0;
}
.route-dot {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--accent); flex: none;
}
.route-line {
  flex: 1; height: 2px; background: var(--line);
}
.route-labels {
  display: flex; justify-content: space-between;
  margin-top: 10px;
  font-size: 14px; color: var(--ink-soft);
}

/* ---------- stats: giant quiet numerals on hairline rules ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  margin-bottom: 48px;
}
.stats > div { border-left: 1px solid var(--line); padding-left: 22px; }
.stats > div:first-child { border-left: none; padding-left: 0; }
.stats dt { font-size: 12px; color: var(--periwinkle); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.stats dd {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.6vw, 68px); font-weight: 400; color: var(--ink);
  line-height: 1.05;
}

/* ---------- pull quotes: a guest's voice interrupts the column ---------- */
.pull-quote {
  margin: 48px 0 0 clamp(0px, 8vw, 110px);
  font-family: var(--font-display);
  font-size: clamp(20px, 2.3vw, 27px);
  line-height: 1.4;
  max-width: 40ch;
  color: var(--ink);
}
.pull-quote cite {
  display: block; margin-top: 12px;
  font-family: var(--font-body); font-style: normal;
  font-size: 14px; color: var(--ink-soft);
}

/* ---------- seasons: the toggle changes the weather of the chapter ---------- */
#seasons { transition: background-color 600ms ease; }
#seasons.is-winter { background: #e4eaef; }
#seasons.is-winter .chapter-head::before { color: var(--fog); }
.season-toggle { display: flex; gap: 8px; margin-bottom: 28px; }
.season-tab {
  font-family: var(--font-body); font-size: 15px;
  padding: 12px 22px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-soft);
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.season-tab.is-active { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.season-panel.is-hidden { display: none; }
.season-panel p { margin-top: 24px; color: var(--ink-soft); max-width: 68ch; }

/* Real surf footage, portrait — keep it phone-sized even on desktop */
.surf-clip { max-width: 460px; margin: 28px auto 0; }

/* ---------- guide list ---------- */
.guide-list { display: grid; gap: 28px; max-width: 72ch; }
.guide-item h3 {
  font-family: var(--font-display);
  font-weight: 500; font-size: 22px;
  margin-bottom: 6px;
}
.guide-item p { color: var(--ink-soft); }

/* ---------- stories: one loud voice, then the whispers ---------- */
.stories {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px 48px;
}
.stories blockquote {
  margin: 0;
  padding-left: 20px;
  border-left: 2px solid var(--periwinkle);
}
.stories blockquote:first-child {
  grid-column: 1 / -1;
  border-left: none;
  padding-left: 0;
  text-align: center;
  margin: 0 auto 12px;
}
.stories blockquote:first-child p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(26px, 3.6vw, 42px);
  line-height: 1.3;
  max-width: 22ch; /* measured in the display face, not the 17px body */
  margin-inline: auto;
}
.stories blockquote:first-child cite {
  color: var(--periwinkle);
  font-size: 15px;
  margin-top: 18px;
}
.stories p { font-size: 17px; }
.stories cite { display: block; margin-top: 10px; font-size: 14px; font-style: normal; color: var(--ink-soft); }

/* ---------- host: the most human section gets a real portrait ---------- */
.host-block { max-width: 900px; display: flex; gap: clamp(24px, 4vw, 56px); align-items: center; }
.host-photo {
  width: clamp(148px, 19vw, 228px); flex: none;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  object-fit: cover;
}
/* The host note reads as a personal letter, not a chapter heading:
   one typeface (body) for the signature line and the note together. */
.host-text h2 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(20px, 2vw, 24px);
  letter-spacing: 0;
  margin-bottom: 10px;
}
.host-text p { color: var(--ink-soft); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.6; }

/* ---------- final CTA ---------- */
.final-cta {
  text-align: center;
  padding: clamp(64px, 10vw, 120px) var(--gutter);
}
.final-cta p { color: var(--ink-soft); margin-bottom: 28px; }
.final-cta.final-cta-twilight { text-align: left; }

/* ---------- colophon ---------- */
.colophon {
  border-top: 1px solid var(--line);
  padding: 40px var(--gutter);
  max-width: var(--maxw);
  margin: 0 auto;
  font-size: 13px;
  color: var(--ink-soft);
  display: grid; gap: 8px;
}

/* ---------- sticky mobile CTA: only earns its place between the two big buttons ---------- */
.sticky-cta {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 60;
  text-align: center;
  display: none;
  box-shadow: 0 4px 20px rgba(38, 50, 47, 0.22);
  transform: translateY(150%);
  transition: transform 280ms ease;
}
body.sticky-on .sticky-cta { transform: none; }
body.cta-hidden .sticky-cta { transform: translateY(150%); }

/* ---------- reveal on scroll: everything comes into focus, like the paintings ---------- */
.reveal { opacity: 0; transform: translateY(4px); filter: blur(6px); transition: opacity 500ms ease, transform 500ms ease, filter 500ms ease; }
.reveal.is-visible { opacity: 1; transform: none; filter: blur(0); }

/* ---------- tablet ---------- */
@media (min-width: 641px) and (max-width: 1024px) {
  .chapter { padding: clamp(32px, 5vw, 56px) var(--gutter); }
  .chapter-head h2::before { font-size: clamp(30px, 4.4vw, 48px); }
  .chapter h2 { font-size: clamp(30px, 4.2vw, 46px); }
  .chapter-loud h2 { font-size: clamp(38px, 6vw, 72px); }
  .hero h1 { font-size: clamp(48px, 7vw, 84px); }
  .gallery-3up { grid-template-columns: 1fr 1fr; }
  .gallery-3up > *:nth-child(3) { grid-column: 1 / -1; max-width: 50%; margin: 0 auto; }
  .stories { grid-template-columns: 1fr; }
  .house-highlights { grid-template-columns: repeat(2, 1fr); }
  .hotspot { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
  .postcard-card { width: min(760px, 100%); }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .anchor-nav { display: none; }
  .header-cta { display: none; }
  .header-guide { display: inline-block; padding: 12px 8px; } /* ≥44px tap target */
  .site-header { padding-top: 10px; padding-bottom: 10px; }   /* offset the link padding so the bar stays slim */
  .sticky-cta { display: block; }
  .final-cta, .colophon { padding-bottom: 96px; }
  .stories { grid-template-columns: 1fr; }
  .stories blockquote:first-child { text-align: left; margin: 0; max-width: none; }
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 28px; }
  .stats > div:nth-child(4) { border-left: none; padding-left: 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero { min-height: 60svh; padding-top: 72px; padding-bottom: 32px; }
  .hero h1 { font-size: clamp(38px, 9vw, 48px); margin-bottom: 12px; }
  .hero .lede { font-size: 17px; }
  .chapter { padding-top: 24px; padding-bottom: 24px; }
  .chapter-head { margin-bottom: 20px; }
  .chapter h2 { font-size: clamp(28px, 7vw, 36px); margin-bottom: 12px; }
  .chapter-intro { font-size: 16px; }
  .flyin { height: 100vh; }
  .postcard { padding: 28px var(--gutter); }
  .final-cta { padding: 36px var(--gutter); }
  .final-cta-twilight h2 { font-size: clamp(30px, 7vw, 42px); }
  .pull-quote { margin: 24px 0 0; font-size: 18px; }
  .gallery-2up, .gallery-3up { grid-template-columns: 1fr; }
  .host-block { flex-direction: column; gap: 18px; align-items: flex-start; }
  .host-photo { width: 150px; }
  .xfade-bleed .xfade-art,
  .xfade-bleed .xfade-photo { object-position: center 68%; }
  .final-cta-twilight::after {
    background: linear-gradient(180deg, rgba(20,28,40,0.5) 0%, rgba(20,28,40,0.88) 60%);
  }
  .colophon a { line-height: 2.2; }
  .dusk-band { padding-top: 24px; padding-bottom: 24px; }
  .dusk-figure { max-width: 420px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  .btn, .anchor-nav a, .season-tab { transition: none; }
  .xfade-photo, .xfade-art { transition: none; filter: none; }
  .scroll-tide { display: none; }
  .btn-primary:hover { transform: none; }
}
