/* =========================================================================
   Isabel & Hudson — 05.29.2027
   Breakpoints: desktop ≥ 1200px · tablet 810–1199px · phone ≤ 809px
   ========================================================================= */

/* ---- Fonts ------------------------------------------------------------- */
@font-face { font-family: "Apfel Grotezk"; src: url("../fonts/apfel-grotezk-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Apfel Grotezk"; src: url("../fonts/apfel-grotezk-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Apfel Grotezk"; src: url("../fonts/apfel-grotezk-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bastide Celestine Serif"; src: url("../fonts/bastide-celestine-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Churchward Roundsquare"; src: url("../fonts/churchward-roundsquare.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400-latin.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400-latin-ext.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500-latin.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500-latin-ext.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600-latin.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600-latin-ext.woff2") format("woff2"); font-weight: 600; font-display: swap; unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---- Tokens ------------------------------------------------------------ */
:root {
  --cream: #fdf4e3;
  --lime: #bcd500;
  --green: #2b5d37;
  --rust: #b24e1d;
  --wine: #7f292c;
  --error: #b40030;

  --serif: "Bastide Celestine Serif", Georgia, serif;
  --display: "Churchward Roundsquare", "Arial Black", sans-serif;
  --sans: "Apfel Grotezk", system-ui, sans-serif;
  --ui: "Inter", system-ui, sans-serif;

  --text: 16.1px;          /* body copy */
  --leading: 1.2;
  --line: calc(var(--text) * var(--leading));   /* one blank line of body copy */

  /* Layout grid: one 1040px content column, centred, with fixed gutters. */
  --content: 1040px;
  --gutter: 40px;
  --col-gap: 40px;
  --section-gap: 240px;
  --title-gap: 54px;        /* section title → content */

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --shadow: 0 0.6px 0.6px -1.25px rgba(0, 0, 0, 0.18), 0 2.29px 2.29px -2.5px rgba(0, 0, 0, 0.16), 0 10px 10px -3.75px rgba(0, 0, 0, 0.06);
}
@media (max-width: 1199.98px) { :root { --col-gap: 24px; --section-gap: 160px; } }
@media (max-width: 809.98px)  { :root { --gutter: 20px; --col-gap: 32px; --section-gap: 100px; } }

/* ---- Base -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }  /* anchors clear the fixed nav */
@media (max-width: 809.98px) { html { scroll-padding-top: 96px; } }
body {
  margin: 0;
  transition: background-color 0.9s ease;
  background: var(--cream);
  color: var(--green);
  font: 400 var(--text) / var(--leading) var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p, figure, ul, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: inherit; font-size: inherit; }
ul { padding: 0; list-style: none; }
a { color: var(--rust); text-decoration: underline; text-underline-offset: 0.12em; }
a:focus-visible, button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; border-radius: 2px; }
button { font: inherit; color: inherit; }

.container { width: 100%; max-width: calc(var(--content) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.stack { display: flex; flex-direction: column; align-items: flex-start; gap: var(--title-gap); min-width: 0; }

/* Two equal columns on the content grid; stacks on phones. */
.split { display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--col-gap); row-gap: 48px; align-items: start; }
.split--center { align-items: center; }
@media (max-width: 1199.98px) {
  .split--center { align-items: start; }
  .split--stack-tablet { grid-template-columns: 1fr; }
}
@media (max-width: 809.98px) {
  .split { grid-template-columns: 1fr; row-gap: var(--col-gap); }
}

.section-title { font: 400 48px / 1.2 var(--serif); }
.section-title--wine { color: var(--wine); }
.section-title--green { color: var(--green); }
.section-title--rust { color: var(--rust); }

/* Running text: blank-line rhythm between blocks, headings sit directly on their text. */
.prose > * + * { margin-top: var(--line); }
.prose h4 { font-weight: 700; }
.prose .medium { font-weight: 500; }
.prose--green { color: var(--green); }
.link-list { margin-top: var(--line); }

/* Coloured photo frames */
.frame { padding: 16px; }
.frame img { width: 100%; border-radius: 16px; object-fit: cover; }
.frame--lime { background: var(--lime); }
.frame--wine { background: var(--wine); }

/* ---- Navigation --------------------------------------------------------- */
.nav {
  position: fixed; z-index: 10; top: 40px; left: 50%; translate: -50% 0;
  width: 80%; max-width: 1155px;
  padding: 8px; background: var(--lime); box-shadow: var(--shadow);
  transition: opacity 0.4s ease;
}
.nav.is-hidden { opacity: 0; pointer-events: none; }
.nav__panel {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; border-radius: 8px; background: var(--cream);
}
.nav__bar { display: flex; align-items: center; justify-content: space-between; height: 26px; }
.nav__logo { display: block; }
.nav__logo img { width: 117px; height: 18px; }
.nav__toggle { display: none; padding: 0; border: 0; background: none; cursor: pointer; }
.nav__toggle img { width: 22px; height: 15px; }
.nav__links { display: flex; gap: 16px; }
.nav__links a {
  font-size: 15.31px; font-weight: 500; text-decoration: none; white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat;
  transition: background-size 0.3s var(--ease-out);
}
.nav__links a:hover { background-size: 100% 1px; }
.nav__countdown { width: 117px; padding-top: 3px; text-align: right; }
.countdown { font: 400 16px / 1 var(--display); color: var(--lime); white-space: nowrap; font-variant-numeric: tabular-nums; }

@media (max-width: 809.98px) {
  .nav { top: 16px; width: 90%; }
  .nav__panel { flex-direction: column; align-items: stretch; gap: 32px; }
  .nav__bar { width: 100%; }
  .nav__toggle { display: block; }
  .nav:not(.is-open) .nav__links, .nav:not(.is-open) .nav__countdown { display: none; }
  .nav.is-open .nav__links { flex-direction: column; align-items: center; gap: 40px; }
  .nav.is-open .nav__countdown { width: 100%; padding: 8px 0; text-align: center; }
  .nav.is-open .countdown { font-size: 33px; }
  .nav:not(.is-open) { cursor: pointer; }
}

/* ---- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; height: 90vh; height: 90svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.hero__media { position: absolute; inset: 0; overflow: hidden; filter: grayscale(1) saturate(0.9); }
.hero__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shader { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; }
.shader canvas { width: 100%; height: 100%; }
.shader-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.hero__title {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 46px;
  opacity: 0; translate: 0 28px; pointer-events: none;
}
.hero__mark { width: 79px; height: 79px; }
.hero__names { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero__names img { width: 334px; height: auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25)); }
.hero__date { font: 400 24px / 1.2 var(--display); color: var(--lime); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); }  /* same lift as the names */

@media (max-width: 1199.98px) { .hero { height: 700px; } }
@media (max-width: 809.98px) {
  .hero { height: 480px; }
  .hero__names img { width: 260px; }
}

/* ---- Guest gate ----------------------------------------------------------- */
.gate-area {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  max-height: 2000px;
}
.gate {
  width: 560px; max-width: 100%;
  display: flex; flex-direction: column; padding: 24px;
  background: rgba(252, 244, 227, 0.6); border: 1px solid var(--lime); border-radius: 24px;
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  box-shadow: var(--shadow);
  font-family: var(--ui);
}
.gate__logo {
  width: 126px; aspect-ratio: 771 / 271;
  background: var(--rust); filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
  -webkit-mask: url("../img/gate-logo.svg") left center / contain no-repeat;
          mask: url("../img/gate-logo.svg") left center / contain no-repeat;
}
.gate__form { display: grid; gap: 8px; margin-top: 24px; }
.gate__fields { display: flex; flex-wrap: wrap; gap: 8px; }
.gate input {
  flex: 1 1 180px; min-width: 0; padding: 10px 12px;
  border: 1px solid var(--lime); border-radius: 16px; outline: none;
  background: #fff; color: var(--green);
  font: 400 15px / 1.2 var(--ui); letter-spacing: -0.01em;
}
.gate input::placeholder { color: #757575; }
.gate button {
  margin-top: 2px; padding: 11px 14px; width: 100%;
  border: 1px solid transparent; border-radius: 16px; cursor: pointer;
  background: var(--lime); color: var(--green);
  font: 600 14px / 1 var(--ui); letter-spacing: -0.01em;
}
.gate button:focus-visible { border-color: var(--green); }
.gate button:disabled { cursor: progress; opacity: 0.75; }
.gate__error { margin-top: 2px; color: var(--error); font: 500 15px / 1.3 var(--ui); letter-spacing: -0.01em; }
@media (max-width: 809.98px) { .gate { width: 350px; } }

/* ---- Locked / unlocked states -------------------------------------------- */
html:not(.is-unlocked) .protected { display: none !important; }
html:not(.is-unlocked) .hero { height: 100vh; height: 100svh; }
html.is-unlocking .hero { transition: height 1.2s var(--ease-in-out) 1.8s; }
html.is-unlocked:not(.is-unlocking) .gate-area { display: none; }
html.is-unlocked .hero__media { filter: grayscale(0) saturate(1); }
html.is-unlocked .hero__title { opacity: 1; translate: 0 0; pointer-events: auto; }
html.is-unlocking .hero__media { transition: filter 1.4s ease-in-out; }
html.is-unlocking .hero__title { transition: opacity 0.9s ease-out 2.1s, translate 0.9s ease-out 2.1s; }
html.is-unlocking .protected { animation: fade-in 0.6s ease-out 1.8s both; }
.gate-area.is-leaving { overflow: hidden; opacity: 0; translate: 0 -12px; max-height: 0; transition: opacity 0.5s ease-out, translate 0.5s ease-out, max-height 0.5s ease-in-out; }
@keyframes fade-in { from { opacity: 0; } }

/* Welcome party: only for guests with it ticked in the guest sheet. */
html:not(.is-welcome-guest) .welcome-only { display: none !important; }

/* Wrong name: a small shake. */
.gate.is-shaking { animation: shake 0.4s var(--ease-out); }
@keyframes shake { 20% { translate: -6px 0; } 40% { translate: 5px 0; } 60% { translate: -3px 0; } 80% { translate: 2px 0; } }
.gate button { transition: transform 0.15s var(--ease-out), opacity 0.2s; }
.gate button:active:not(:disabled) { transform: scale(0.98); }
.gate input { transition: box-shadow 0.2s var(--ease-out); }
.gate input:focus { box-shadow: 0 0 0 3px rgba(188, 213, 0, 0.35); }

/* "Welcome, Isabel!": big, centred over the hero for a moment after unlocking. */
.hero__welcome {
  position: absolute; inset: 0; z-index: 3; padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font: 400 clamp(52px, 9vw, 128px) / 1 var(--serif); color: var(--cream);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.28);
  opacity: 0; pointer-events: none;
}
.hero__welcome.is-showing { animation: welcome 2.4s var(--ease-in-out) both; }
@keyframes welcome {
  0% { opacity: 0; scale: 0.94; filter: blur(8px); }
  22% { opacity: 1; scale: 1; filter: blur(0); }
  72% { opacity: 1; scale: 1.01; filter: blur(0); }
  100% { opacity: 0; scale: 1.04; filter: blur(6px); }
}

/* ---- Motion ------------------------------------------------------------- */
/* Scroll reveals (added by site.js, so the page is fully visible without JS). */
.reveal { opacity: 0; translate: 0 24px; transition: opacity 0.9s var(--ease-out), translate 0.9s var(--ease-out); }
.reveal.is-visible { opacity: 1; translate: 0 0; }
.places.reveal .place { opacity: 0; translate: 0 10px; transition: opacity 0.6s var(--ease-out), translate 0.6s var(--ease-out); transition-delay: calc(0.15s + var(--i) * 0.05s); }
.places.reveal.is-visible .place { opacity: 1; translate: 0 0; }
.places.reveal .places__heading::after { clip-path: inset(0 100% 0 0); transition: clip-path 1.2s var(--ease-out) 0.1s; }
.places.reveal.is-visible .places__heading::after { clip-path: inset(0 0 0 0); }

/* Slowly turning suns. */
@keyframes spin { to { rotate: 360deg; } }

/* ---- Story --------------------------------------------------------------- */
.story { --band: 677px; --overlap: 276px; margin-bottom: 176px; }
.story__band {
  position: relative; overflow: hidden;
  /* Grows with its text (e.g. the guest greeting) but keeps the photo 48px below it,
     overlapping the band by --overlap. */
  min-height: var(--band); padding: 120px var(--gutter) calc(var(--overlap) + 48px);
  background: var(--lime);
}
.story__sunburst {
  position: absolute; left: 50%; translate: -50% 0;
  top: 142px; width: 1277px; max-width: none;
}
.story__intro {
  position: relative; width: 594px; max-width: 100%; margin-inline: auto;
  display: flex; flex-direction: column; align-items: center; gap: 17px;
  text-align: center;
}
.story__lede { font-size: 21.47px; }
.story__lede span { display: block; }
.story__lede .greeting__name { display: inline; }
.story__sunburst { animation: spin 240s linear infinite; }
.story__date { font: 400 var(--date-size, 110px) / 0.72 var(--display); white-space: nowrap; padding-block: 2px; }
.story__place { font: 400 32px / 1.2 var(--serif); }
.story__photo {
  position: relative; z-index: 2;
  width: 776px; max-width: calc(100% - 2 * var(--gutter)); margin: calc(-1 * var(--overlap)) auto 0;
  padding: 13.4px;
}
.story__photo img { aspect-ratio: 4 / 3; }

@media (max-width: 1199.98px) {
  .story { margin-bottom: 152px; }
  .story__sunburst { top: 237px; width: 899px; }
  .story__photo { width: 700px; }
}
@media (max-width: 809.98px) {
  .story { --band: 480px; --overlap: 127px; margin-bottom: 76px; }
  .story__band { padding-top: 72px; }
  .story__sunburst { top: 263px; width: 454px; }
  .story__intro { gap: 12px; }
  .story__date { --date-size: 63.5px; }
  .story__photo { width: auto; padding: 8px; }
}

/* ---- Main sections -------------------------------------------------------- */
.sections { display: flex; flex-direction: column; align-items: center; gap: var(--section-gap); }
.sections > * { width: 100%; }

/* Events */
.event-card {
  position: relative; width: 100%; padding: 24px; border-radius: 16px;
  background: var(--lime); color: var(--green);
  display: flex; flex-direction: column; gap: 10px;
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) scale(var(--lift, 1));
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out);
}
/* Tilts so the part under the pointer comes toward you, with a soft light following it. */
.event-card.is-tilting { transition: transform 0.12s linear, box-shadow 0.3s ease; box-shadow: var(--tilt-shadow); }
.event-card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.38), transparent 55%);
  opacity: 0; transition: opacity 0.4s ease;
}
.event-card.is-tilting::after { opacity: 1; }
.event-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.event-card__title { display: flex; flex-direction: column; gap: 10px; }
.event-card__date { font: 400 24px / 1.2 var(--display); }
.event-card h3 { font: 400 40px / 36px var(--serif); text-transform: uppercase; }
.event-cards { width: 100%; display: flex; flex-direction: column; gap: 24px; }
.event-card__icon { flex: none; width: 38px; height: 35px; }
.event-card__icon--sun {
  height: 38px; background: currentColor; animation: spin 40s linear infinite;
  -webkit-mask: url("../svg/sun.svg") center / contain no-repeat; mask: url("../svg/sun.svg") center / contain no-repeat;
}
.event-card:hover .event-card__icon--heart { animation: beat 0.9s var(--ease-out); }
@keyframes beat { 15% { scale: 1.18; } 30% { scale: 0.96; } 45% { scale: 1.1; } 70% { scale: 1; } }
.event-photo img { height: 635px; }

/* Travel */
.travel-map { width: 100%; height: auto; }
@media (max-width: 1199.98px) { .travel-map { max-width: 568px; } }
@media (min-width: 1200px) { #travel .travel-map { position: sticky; top: 140px; } }

/* Divider */
.sections > .divider { width: 129px; height: 129px; }
.sections > .divider.is-visible { animation: spin 60s linear infinite; }

/* Exploring the coast */
.explore { display: flex; flex-direction: column; align-items: center; gap: 120px; color: var(--rust); }
.explore__body {
  width: 100%; max-width: calc(660px + 2 * var(--gutter)); padding-inline: var(--gutter);
  display: flex; flex-direction: column; gap: var(--title-gap);
}
.explore .section-title, .explore__lede { text-align: center; }
.places { display: flex; flex-direction: column; gap: 24px; }
.places__heading { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; }
.places__heading::after {
  content: ""; flex: 1; height: 8px;
  background: url("../svg/squiggle.svg") center / 100% 100% no-repeat;
}
/* Rows are at least two lines tall so the rhythm stays even, but opening one place only grows its own row. */
.places__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: minmax(calc(2 * var(--line)), auto); gap: 24px; align-items: start; }
.place { min-width: 0; }
.place__toggle {
  display: grid; grid-template-columns: 1fr 16px; column-gap: 8px; align-items: start;
  width: 100%; padding: 0; border: 0; background: none; color: var(--rust);
  text-align: left; cursor: pointer;
}
.place__name { font-weight: 500; }
/* + that turns into − : the vertical bar rotates flat. */
.place__icon { position: relative; width: 16px; height: 16px; margin-top: calc((var(--line) - 16px) / 2); }
.place__icon::before, .place__icon::after {
  content: ""; position: absolute; left: 1.75px; right: 1.75px; top: 50%; height: 1.5px; margin-top: -0.75px;
  border-radius: 1px; background: currentColor; transition: rotate 0.35s var(--ease-out);
}
.place__icon::after { rotate: 90deg; }
.place__toggle[aria-expanded="true"] .place__icon::after { rotate: 0deg; }
.place__toggle:hover .place__name { text-decoration: underline; text-underline-offset: 0.12em; }
.place__toggle:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.place__panel {
  display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
  transition: grid-template-rows 0.4s var(--ease-out), opacity 0.3s ease, visibility 0s 0.4s;
}
.place__panel > div { min-height: 0; overflow: hidden; }
.place__panel p { padding-top: 8px; }
.place__map { display: inline-block; margin-top: 6px; font-size: 14px; }
.place__toggle[aria-expanded="true"] + .place__panel { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition-delay: 0s; }
.explore__further { display: flex; flex-direction: column; gap: 24px; }
.explore__further h3 { font-weight: 700; }
@media (max-width: 809.98px) {
  .explore { gap: 80px; }
  .explore__lede { text-align: left; }
  .places__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Coast collage: the bento sits on an exact 5 × 5 grid (equal tracks, gutter = padding),
   with the sea creatures overlapping its lower half. Everything scales with the figure. */
.coast {
  container-type: inline-size;
  position: relative; width: min(1165px, 100%);
  aspect-ratio: 1165 / 782;
}
.bento {
  --g: round(1.03cqi, 1px);                       /* 12px at full size, whole pixels */
  position: absolute; top: 0; left: 50%; translate: -50% 0;
  width: 80.26cqi;                               /* 935px at full size */
  aspect-ratio: 935 / 527;
  display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(5, 1fr);
  gap: var(--g); padding: var(--g);
  background: var(--rust);
}
.bento img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: var(--g); transition: scale 0.5s var(--ease-out); }
.bento img:not(.bento__title):hover { scale: 1.03; }
.bento .bento__title { object-fit: contain; border-radius: 0; grid-area: 1 / 1 / 3 / 4; }
.bento__a { grid-area: 1 / 4 / 4 / 5; }
.bento__b { grid-area: 1 / 5 / 4 / 6; }
.bento__c { grid-area: 3 / 1 / 6 / 2; }
.bento__d { grid-area: 3 / 2 / 5 / 4; }
.bento__e { grid-area: 4 / 4 / 6 / 5; }
.bento__f { grid-area: 4 / 5 / 6 / 6; }
.bento__g { grid-area: 5 / 2 / 6 / 3; }
.bento__h { grid-area: 5 / 3 / 6 / 4; }
.coast__creatures { position: absolute; left: 0; top: 44.1%; width: 100%; height: auto; pointer-events: none; }
@media (max-width: 809.98px) {
  .coast { aspect-ratio: 390 / 262; }
  .bento { width: calc(100cqi - 2 * var(--gutter)); --g: 4px; }
}

/* FAQ */
.faq-photo { width: 100%; aspect-ratio: 1.18; object-fit: contain; }
.faq { color: var(--wine); }
.faq > div + div { margin-top: var(--line); }
.faq dt { font-weight: 700; }

/* Gallery */
.sections > .gallery { width: min(918px, 100% - 2 * var(--gutter)); }
@media (max-width: 1199.98px) { .sections > .gallery { width: min(730px, 100% - 2 * var(--gutter)); } }

/* While the gallery fills the screen, the page dims to wine (the darkest colour). */
html.is-gallery-dark body { background-color: var(--wine); }

.photo-stack {
  --stack-1: var(--lime); --stack-2: var(--green); --stack-3: var(--rust); --ink: var(--green);
  display: flex; flex-direction: column; align-items: center; gap: 28px; color: var(--ink);
  transition: color 0.9s ease;
}
html.is-gallery-dark .photo-stack { --stack-3: var(--cream); --ink: var(--cream); }
.photo-stack__stage { position: relative; width: 100%; aspect-ratio: 1.28; touch-action: pan-y; outline: none; }
.photo-stack__card {
  position: absolute; inset: 0; margin: auto; padding: 0;
  border: 17px solid; cursor: pointer; user-select: none; -webkit-user-select: none;
  transition:
    transform 0.6s var(--ease-out), width 0.6s var(--ease-out), height 0.6s var(--ease-out),
    opacity 0.45s ease, box-shadow 0.4s ease, border-color 0.9s ease, background-color 0.9s ease, z-index 0s 0.15s;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}
.photo-stack__card.is-active { cursor: grab; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22); }
.photo-stack__card.is-leaving { pointer-events: none; }
.photo-stack__stage.is-dragging .photo-stack__card.is-active { transition: none; cursor: grabbing; box-shadow: 0 26px 54px rgba(0, 0, 0, 0.28); }
/* Fast scrubbing (time slider, opening flip-through): quicker, snappier moves. */
.photo-stack__stage.is-scrubbing .photo-stack__card {
  transition-duration: 0.22s, 0.22s, 0.22s, 0.18s, 0.2s, 0.9s, 0.9s, 0s; transition-delay: 0s;
}
.photo-stack__card img { width: 100%; height: 100%; object-fit: cover; border-radius: 14px; pointer-events: none; }
.photo-stack__stage:focus-visible .photo-stack__card.is-active { outline: 2px solid var(--ink); outline-offset: 4px; }

/* Time slider: one tick per photo (evenly spaced, oldest → newest), years marked. */
.timeline { width: 100%; max-width: 760px; display: grid; grid-template-columns: 36px 1fr 36px; align-items: center; gap: 20px; }
.timeline button {
  width: 36px; height: 36px; border: 1px solid currentColor; border-radius: 999px; background: none; color: inherit; cursor: pointer;
  font-family: system-ui, sans-serif; transition: background-color 0.2s, color 0.2s, scale 0.15s var(--ease-out);
}
.timeline button:hover { background: var(--lime); border-color: var(--lime); color: var(--green); }
.timeline button:active { scale: 0.92; }
.timeline__track { position: relative; height: 64px; cursor: pointer; touch-action: pan-y; outline: none; }
.timeline__ticks { position: absolute; left: 0; right: 0; top: 30px; height: 14px; border-bottom: 1px solid currentColor; }
.timeline__tick { position: absolute; bottom: 0; width: 1px; height: 6px; background: currentColor; opacity: 0.45; }
.timeline__tick.is-year { height: 14px; opacity: 1; }
.timeline__year { position: absolute; top: 50px; translate: -50% 0; font: 400 13px / 1 var(--display); opacity: 0.8; }
.timeline__handle {
  position: absolute; top: 0; bottom: 20px; width: 0; left: 0;
  transition: left 0.35s var(--ease-out);
}
.timeline__track.is-dragging .timeline__handle, .timeline__track.is-scrubbing .timeline__handle { transition: none; }
.timeline__handle::after {
  content: ""; position: absolute; left: -1.5px; top: 22px; bottom: 0; width: 3px; border-radius: 2px; background: var(--lime);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 25%, transparent);
}
.timeline__date {
  position: absolute; top: 0; translate: -50% 0; white-space: nowrap;
  font: 400 17px / 1 var(--display); color: var(--ink); transition: color 0.9s ease;
}
.timeline__track:focus-visible .timeline__handle::after { box-shadow: 0 0 0 3px var(--ink); }
.timeline__count { grid-column: 1 / -1; justify-self: center; margin-top: -6px; font: 12px / 1 var(--ui); letter-spacing: 0.02em; opacity: 0.7; font-variant-numeric: tabular-nums; }
@media (max-width: 809.98px) {
  .timeline { gap: 12px; }
  .timeline__year { font-size: 11px; }
}

.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(0, 0, 0, 0.74); opacity: 0; transition: opacity 0.25s ease;
}
.lightbox.is-open { opacity: 1; }
.lightbox img {
  max-width: min(92vw, 1200px); max-height: 88vh; border: 7.65px solid #fff; border-radius: 12.6px; object-fit: contain;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55); transition: opacity 0.2s ease, scale 0.35s var(--ease-out); scale: 0.96;
}
.lightbox.is-open img { scale: 1; }
.lightbox img.is-switching { opacity: 0.4; }
.lightbox button { position: absolute; width: 40px; height: 40px; border: 1px solid rgba(255, 255, 255, 0.65); border-radius: 999px; background: rgba(0, 0, 0, 0.35); color: #fff; cursor: pointer; transition: background-color 0.2s; }
.lightbox button:hover { background: rgba(0, 0, 0, 0.6); }
.lightbox__close { top: 16px; right: 16px; font-size: 18px; }
.lightbox__prev, .lightbox__next { top: 50%; translate: 0 -50%; }
.lightbox__prev { left: 16px; }
.lightbox__next { right: 16px; }
.lightbox__count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, 0.8); font: 13px / 1 var(--ui); }

/* ---- Footer -------------------------------------------------------------- */
.footer {
  position: relative; margin-top: var(--section-gap); padding: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 24px;
}
.footer__shader { inset: 16px; border-radius: 24px; }
.footer__mark, .footer__date { position: relative; }
.footer__mark { width: 145px; height: 145px; }
.footer__date { font: 400 40px / 1.2 var(--display); color: var(--cream); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation: none !important; transition-delay: 0s !important; }
}
