/* Patrick & Shreshtha — styles
   Palette taken from the pre-wedding photographs: ivory dress, olive lawns,
   warm golden-hour light, a blush of roses. */

:root {
  --paper: #f6f1e7;
  --paper-2: #eee5d5;
  --paper-3: #e6dac5;
  --blush: #ecdbcf;
  --ink: #2b2a20;
  --ink-2: #555140;
  --olive: #3d412e;
  --olive-2: #545a40;
  --gold: #b8955c;
  --gold-deep: #84652e;
  --scrim: 20, 18, 12;

  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Jost", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;

  /* five type steps */
  --t-display: clamp(52px, 8.2vw, 140px);
  --t-xl: clamp(40px, 5.2vw, 80px);
  --t-l: clamp(27px, 2.6vw, 40px);
  --t-body: clamp(17px, 1.15vw, 19px);
  --t-small: 14px;

  --m: clamp(16px, 2.6vw, 36px);        /* the one pair of page margins */
  --gap-section: clamp(104px, 13vw, 200px);
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--nav-h); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--t-body)/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }
/* paper grain over everything, very faint */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .07; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .25 0 0 0 0 .15 0 0 0 1.4 0'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration-color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .2em; }
a:hover { color: var(--gold-deep); }
::selection { background: var(--blush); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
i { font-style: italic; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -.02em; line-height: 1.02; text-wrap: balance; }
p { margin: 0; }
figure { margin: 0; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--ink); color: var(--paper); padding: 10px 16px; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: 1480px; margin-inline: auto; padding-inline: var(--m); }
.h-xl { font-size: var(--t-xl); }
.h-l { font-size: var(--t-l); line-height: 1.1; }
.lead { font-family: var(--serif); font-size: clamp(21px, 1.75vw, 27px); line-height: 1.42; max-width: 38ch; margin-top: 28px; color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border: 0; border-radius: 0;
  font: 500 15px/1 var(--sans); letter-spacing: .02em;
  transition: transform .16s var(--ease-out), background-color .2s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--olive); color: var(--paper); }
.btn--gold { background: var(--gold); color: var(--ink); }
.btn--gold:hover { background: #c9a76d; color: var(--ink); }
.link-btn {
  background: none; border: 0; padding: 8px 0; font-size: 15px; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .3em;
  transition: color .2s;
}
.link-btn:hover { color: var(--gold-deep); }

/* photos: placeholder colour shows while loading, then the picture fades in */
.ph { position: relative; overflow: hidden; background: var(--ph, var(--paper-3)); }
.ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .7s var(--ease-out), transform 1.2s var(--ease-out); }
.ph img.is-loaded { opacity: 1; }
.zbtn { display: block; width: 100%; border: 0; padding: 0; margin: 0; background: none; color: inherit; text-align: inherit; font: inherit; }
.zoomable { cursor: zoom-in; }
@media (hover: hover) {
  .zoomable:hover img { transform: scale(1.035); }
}

/* ---------------- Reveal on scroll ---------------- */
html.js [data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0ms); }
html.js [data-reveal="photo"] { transform: none; clip-path: inset(14% 0 0 0); transition: opacity .9s var(--ease-out), clip-path 1.2s var(--ease-out); transition-delay: var(--d, 0ms); }
html.js [data-reveal].is-in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal], html.js [data-reveal="photo"] { opacity: 1; transform: none; clip-path: none; transition: none; }
}

/* ---------------- Intro ---------------- */
.intro { display: none; }
html.js .intro {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 150; background: var(--paper);
  animation: intro-out .6s var(--ease-io) 1.3s forwards; /* safety net if the script never runs */
}
.intro__mono { font: 400 clamp(48px, 9vw, 120px)/1 var(--serif); color: var(--ink); opacity: 0; transform: translateY(12px); animation: mono-in 1s var(--ease-out) .15s forwards; }
.intro__mono i, .gate__mono i, .nav__mark i, .foot__mono i, .card__mono i, .hero__title i { color: var(--gold); font-weight: 400; }
.intro.is-done { animation: intro-out .8s var(--ease-io) forwards; }
@keyframes mono-in { to { opacity: 1; transform: none; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; transform: translateY(-2%); } }
@media (prefers-reduced-motion: reduce) { html.js .intro { display: none; } }

/* ---------------- Gate ---------------- */
.gate { position: fixed; inset: 0; z-index: 180; display: grid; place-items: center; padding: var(--m); background: var(--paper); }
.gate__card { width: min(440px, 100%); display: grid; gap: 16px; }
.gate__mono { font: 400 64px/1 var(--serif); margin-bottom: 8px; }
.gate__title { font-size: var(--t-l); line-height: 1.15; }
.gate__title { font-size: var(--t-xl); }
.gate__welcome { font: 400 21px/1.45 var(--serif); max-width: 30ch; }
.gate__label { font-size: var(--t-small); color: var(--ink-2); margin-top: 8px; }
.gate__row { display: flex; gap: 8px; }
.gate__input {
  flex: 1; min-width: 0; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 0;
  background: var(--paper-2); color: var(--ink); font: 400 18px var(--sans);
}
.gate__input:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 0; }
.gate__msg { min-height: 1.6em; color: var(--gold-deep); font-size: 15px; }
.gate.is-wrong .gate__row { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.gate__hint-btn { justify-self: start; }
.gate__hint { font-family: var(--serif); font-size: 21px; font-style: italic; }

/* ---------------- Navigation ---------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-inline: var(--m);
  color: var(--paper); transition: background-color .35s, color .35s, transform .4s var(--ease-out);
}
.nav.is-solid { background: var(--paper); color: var(--ink); }
.nav.is-hidden { transform: translateY(-100%); }
.nav a { text-decoration: none; }
.nav__mark { font: 500 26px/1 var(--serif); letter-spacing: -.01em; }
.nav__links { display: flex; gap: clamp(18px, 2.2vw, 36px); font-size: 15px; }
.nav__links a { position: relative; padding: 8px 0; }
.nav__links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: var(--gold); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); } /* taste-skill-ignore: thin gold hover underline, asked for in the brief */
.nav__links a:hover { color: inherit; }
.nav__links a:hover::after, .nav__links a[aria-current="true"]::after { transform: scaleX(1); }
.nav__end { display: flex; align-items: center; gap: 8px; }
.nav__menu { display: none; background: none; border: 0; padding: 12px 4px; font-size: 15px; }
.music { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 12px 4px; font-size: 15px; }
.music__bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.music__bars i { width: 3px; height: 6px; background: var(--gold); transition: height .3s; }
.music__bars i:nth-child(2) { height: 11px; }
.music__bars i:nth-child(3) { height: 8px; }
.music.is-on .music__bars i { animation: bars 1s ease-in-out infinite alternate; }
.music.is-on .music__bars i:nth-child(2) { animation-delay: -.4s; }
.music.is-on .music__bars i:nth-child(3) { animation-delay: -.7s; }
@keyframes bars { from { height: 3px; } to { height: 14px; } }
@media (prefers-reduced-motion: reduce) { .music.is-on .music__bars i { animation: none; height: 12px; } }

@media (max-width: 860px) {
  .nav__menu { display: block; }
  .nav__links {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; justify-content: center; gap: 4px;
    padding: var(--nav-h) var(--m) var(--m); background: var(--paper); color: var(--ink);
    font: 500 clamp(36px, 10vw, 56px)/1.15 var(--serif);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s;
  }
  .nav__links a::after { display: none; }
  .nav.is-open { color: var(--ink); }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transition: opacity .3s; }
  .music__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .music { padding: 14px 10px; }
}

/* ---------------- Hero ---------------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; color: var(--paper); background: var(--olive); } /* taste-skill-ignore: 100vh is only the fallback before svh */
.hero__media { position: absolute; inset: -4% 0; will-change: transform; }
.hero__media .ph { position: absolute; inset: 0; background: transparent; }
.hero__media img { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease-in-out; }
.hero__media img.is-on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .hero__media img.is-on { animation: drift 14s linear forwards; }
}
@keyframes drift { from { transform: scale(1.07); } to { transform: scale(1); } }
.hero__petals { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__scrim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(var(--scrim), .42) 0, rgba(var(--scrim), 0) 150px), linear-gradient(90deg, rgba(var(--scrim), .58) 0%, rgba(var(--scrim), .3) 38%, rgba(var(--scrim), 0) 62%); } /* taste-skill-ignore: neutral scrim under text on a photo */
.hero__text { position: absolute; left: var(--m); top: 50%; transform: translateY(-50%); max-width: min(780px, 60vw); }
.hero__title { font-size: var(--t-display); font-weight: 400; line-height: .92; letter-spacing: -.035em; }
.hero__title span { display: block; white-space: nowrap; }
.hero__line { margin-top: 32px; font-size: clamp(18px, 1.35vw, 21px); max-width: 40ch; }
.hero__count { margin-top: 10px; font: 500 clamp(22px, 1.9vw, 30px)/1.2 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.hero__count small { font: 400 15px var(--sans); opacity: .85; margin-left: 8px; letter-spacing: .02em; }
.hero__cards { position: absolute; right: var(--m); bottom: var(--m); display: flex; gap: 16px; }
.hcard { display: block; width: 216px; color: var(--ink); text-decoration: none; transition: transform .25s var(--ease-out); }
.hcard:hover { color: var(--ink); transform: translateY(-4px); }
.hcard:active { transform: scale(.98); }
.hcard .ph { aspect-ratio: 3 / 2; }
.hcard__bar { display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 0 14px; background: var(--paper); font-size: 16px; }
.hcard__bar svg { width: 18px; height: 18px; stroke: var(--gold-deep); fill: none; stroke-width: 1.6; transition: transform .25s var(--ease-out); }
.hcard:hover .hcard__bar svg { transform: translateX(4px); }
.hero__cue { position: absolute; left: var(--m); bottom: var(--m); display: flex; align-items: center; gap: 14px; color: var(--paper); text-decoration: none; font-size: 15px; }
.hero__cue i { position: relative; display: block; width: 72px; height: 1px; background: rgba(246, 241, 231, .35); overflow: hidden; } /* taste-skill-ignore: thin gold scroll cue, asked for in the brief */
.hero__cue i::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform: translateX(-100%); animation: cue 2.4s var(--ease-io) infinite; }
.hero__cue:hover { color: var(--paper); }
@keyframes cue { 60%, 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .hero__cue i::after { animation: none; transform: none; } }

@media (max-width: 760px) {
  .hero__scrim { background: linear-gradient(180deg, rgba(var(--scrim), .38) 0, rgba(var(--scrim), 0) 16%, rgba(var(--scrim), 0) 42%, rgba(var(--scrim), .55) 66%, rgba(var(--scrim), .62) 100%); } /* taste-skill-ignore: neutral scrim under text on a photo */
  .hero__text { top: auto; bottom: calc(var(--m) + (100vw - 2 * var(--m) - 12px) / 3 + 40px + 32px); transform: none; max-width: none; right: var(--m); }
  .hero__title { font-size: clamp(48px, 14.5vw, 76px); }
  .hero__line { margin-top: 20px; font-size: 18px; }
  .hero__count { font-size: 23px; }
  .hero__cards { left: var(--m); gap: 12px; }
  .hcard { flex: 1; width: auto; }
  .hcard__bar { height: 40px; font-size: 15px; padding: 0 12px; }
  .hero__cue { display: none; }
}

/* ---------------- Story ---------------- */
.story { padding-block: var(--gap-section) calc(var(--gap-section) * .7); }
.story__head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: end; }
.story__head .h-xl { grid-column: 1 / 7; font-size: clamp(48px, 7vw, 120px); line-height: .95; }
.story__head .lead { grid-column: 7 / 13; margin-top: 0; max-width: 34ch; }
@media (max-width: 860px) { .story__head { grid-template-columns: 1fr; } .story__head .h-xl, .story__head .lead { grid-column: auto; } .story__head .lead { margin-top: 24px; } }
.story__mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 72px; }
.story__photo { grid-column: 1 / 9; position: relative; }
.story__photo .ph { aspect-ratio: 16 / 10; }
.story__note { position: absolute; top: 0; right: 0; width: 340px; padding: 22px 24px; background: var(--paper); font-family: var(--serif); font-size: 20px; line-height: 1.45; }
.story__side { grid-column: 9 / 13; display: grid; grid-template-rows: auto 1fr; gap: 28px; }
.story__tile { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1.02; max-height: 340px; width: 100%; background: var(--olive); color: var(--gold); }
.story__tile svg { width: 52%; height: auto; }
.story__date { position: absolute; left: 20px; bottom: 16px; font: 500 20px var(--serif); color: var(--paper); letter-spacing: .04em; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; margin: 0; align-content: start; }
.facts dt { font-size: var(--t-small); color: var(--ink-2); }
.facts dd { margin: 2px 0 0; font: 500 24px/1.15 var(--serif); font-variant-numeric: lining-nums; }

.timeline__title { margin-top: calc(var(--gap-section) * .8); }
.timeline { list-style: none; margin: 56px 0 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--gold); opacity: .55; transform-origin: top; transform: scaleY(var(--line, 0)); }
.tl { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 7vw, 120px); align-items: center; position: relative; }
.tl + .tl { margin-top: clamp(56px, 7vw, 104px); }
.tl::before { content: ""; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--gold); outline: 6px solid var(--paper); }
.tl__photo .ph { aspect-ratio: 4 / 5; }
.tl__photo .zbtn { max-width: 440px; }
.tl:nth-child(odd) .tl__photo .zbtn { margin-left: auto; }
.tl:nth-child(odd) .tl__photo { padding-right: 4%; }
.tl:nth-child(even) .tl__photo { order: 2; padding-left: 4%; }
.tl:nth-child(even) .tl__text { text-align: right; justify-items: end; }
.tl__text { display: grid; gap: 14px; max-width: 30em; }
.tl:nth-child(odd) .tl__text { padding-left: 4%; }
.tl:nth-child(even) .tl__text { padding-right: 4%; justify-self: end; }
.tl__when { font: italic 400 20px/1.3 var(--serif); color: var(--gold-deep); }
.tl__title { font-size: var(--t-l); }
.tl__body { max-width: 34em; }

@media (max-width: 860px) {
  .story__mosaic { grid-template-columns: 1fr; gap: 0; margin-top: 48px; }
  .story__photo, .story__side { grid-column: auto; }
  .story__photo .ph { aspect-ratio: 4 / 3; }
  .story__note { position: static; width: auto; padding: 20px 0 32px; background: none; font-size: 20px; }
  .story__tile { aspect-ratio: 3 / 2; max-height: none; }
  .story__tile svg { width: 34%; }
  .timeline::before, .tl::before { left: 6px; }
  .tl { grid-template-columns: 1fr; gap: 20px; padding-left: 32px; }
  .tl:nth-child(n) .tl__photo { order: 0; padding: 0; }
  .tl:nth-child(n) .tl__photo .zbtn { margin: 0; max-width: 480px; }
  .tl:nth-child(n) .tl__text { text-align: left; justify-items: start; justify-self: start; padding: 0; }
  .tl::before { top: 0; margin-top: 0; }
  .tl__photo .ph { aspect-ratio: 4 / 4.4; }
}

/* ---------------- Gallery ---------------- */
.gallery { padding-block: calc(var(--gap-section) * .55) var(--gap-section); }
.gallery__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.gallery__count { font: italic 400 22px var(--serif); color: var(--gold-deep); white-space: nowrap; }
.gallery__row {
  display: flex; gap: 12px; height: 70vh; height: 70svh; min-height: 420px; max-height: 860px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  padding-inline: max(var(--m), 6vw); scroll-padding-inline: max(var(--m), 6vw);
  cursor: grab; -webkit-overflow-scrolling: touch;
}
.gallery__row::-webkit-scrollbar { display: none; }
.gallery__row.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery__row.is-dragging .ph { pointer-events: none; }
.gm { flex: none; height: 100%; scroll-snap-align: start; display: flex; flex-direction: column; gap: 12px; }
.gm .ph { flex: 1; min-height: 0; }
.gm--tall { aspect-ratio: 3 / 4; }
.gm--pair { aspect-ratio: 3 / 4.6; }
.gm--wide { aspect-ratio: 16 / 10.5; }
.gm button { all: unset; display: block; flex: 1; min-height: 0; cursor: zoom-in; }
.gm button:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.gm button .ph { height: 100%; }
.gallery__tip { margin-top: 18px; font-size: var(--t-small); color: var(--ink-2); }
@media (max-width: 760px) {
  .gallery__head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .gallery__row { height: 62svh; min-height: 360px; gap: 8px; padding-inline: 20px; scroll-padding-inline: 20px; }
  .gm { gap: 8px; }
  .gm--tall { aspect-ratio: auto; width: 72vw; }
  .gm--pair { aspect-ratio: auto; width: 64vw; }
  .gm--wide { aspect-ratio: auto; width: 88vw; height: 74%; align-self: center; }
}

/* ---------------- Charleston ---------------- */
.chs { padding-bottom: var(--gap-section); background: var(--paper-2); padding-top: var(--gap-section); }
.chs__head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 64px; }
.chs__head .h-xl { padding-left: 12vw; }
.chs__dates { font: italic 400 var(--t-l) var(--serif); color: var(--gold-deep); }
.band { display: flex; height: 70vh; height: 70svh; min-height: 440px; max-height: 820px; }
.band__panel { position: relative; height: 100%; flex: var(--g, 2) 1 0; min-width: 0; transition: flex-grow .5s var(--ease-out); }
.band__panel .ph { height: 100%; }
.band__panel:nth-child(1) { --g: 5; } .band__panel:nth-child(2) { --g: 2; } .band__panel:nth-child(3) { --g: 3; } .band__panel:nth-child(4) { --g: 2; }
@media (hover: hover) and (min-width: 761px) { .band__panel:hover { --g: 6; } }
.band__title { position: absolute; left: 0; top: 0; padding: 24px 28px 40px 24px; color: var(--paper); font: 500 var(--t-l)/1.08 var(--serif); background: radial-gradient(ellipse at top left, rgba(var(--scrim), .5), rgba(var(--scrim), 0) 70%); pointer-events: none; } /* taste-skill-ignore: neutral scrim under the band title */
.band__title small { display: block; margin-top: 6px; font: 400 16px var(--sans); }
.band__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; pointer-events: none; }
.band__video.is-on { opacity: 1; }
.band__cap { margin-top: 18px; font-size: var(--t-small); color: var(--ink-2); }
@media (max-width: 760px) {
  .chs__head { margin-bottom: 40px; flex-direction: column; gap: 8px; }
  .chs__head .h-xl { padding-left: 0; }
  /* two-by-two block; the second row flips its split: 64/36 then 36/64 */
  .band { display: grid; grid-template-columns: repeat(100, minmax(0, 1fr)); grid-template-rows: 1fr 1fr; height: 84svh; min-height: 520px; }
  .band__panel:nth-child(1) { grid-column: 1 / 65; grid-row: 1; }
  .band__panel:nth-child(2) { grid-column: 65 / 101; grid-row: 1; }
  .band__panel:nth-child(3) { grid-column: 1 / 37; grid-row: 2; }
  .band__panel:nth-child(4) { grid-column: 37 / 101; grid-row: 2; }
}

.journal { margin-top: calc(var(--gap-section) * .75); }
.journal__title { margin-bottom: 48px; }
.journal__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.journal__days { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.day { background: var(--paper); padding: clamp(22px, 3vw, 40px); transition: background-color .4s; }
.day.is-active { background: #fbf8f1; }
.day__date { font: italic 400 21px var(--serif); color: var(--gold-deep); }
.day__title { font-size: var(--t-l); margin-top: 6px; }
.day__text { margin-top: 16px; max-width: 40em; }
.collage { display: grid; gap: 8px; margin-top: 24px; }
.collage .ph { height: 100%; }
.collage button { all: unset; display: block; cursor: zoom-in; min-height: 0; }
.collage button:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.collage--a { grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 180px 180px; }
.collage--a > :first-child { grid-row: span 2; }
.collage--a > :nth-child(4) { grid-column: 2 / 4; }
.collage--b { grid-template-columns: 1fr 1fr 1.4fr; grid-template-rows: 320px; }
.collage--c { grid-template-columns: 1fr 1fr; grid-template-rows: 260px 160px; }
.collage--c > :nth-child(3) { grid-column: 1 / 3; }
.collage--d { grid-template-columns: 1.2fr 1fr; grid-template-rows: 340px; }
.day__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 22px; }
.stops { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.stop {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px 8px 12px; border: 0;
  background: var(--paper-2); font-size: 15px; transition: background-color .2s, transform .16s var(--ease-out);
}
.stop::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.stop:hover { background: var(--blush); }
.stop:active { transform: scale(.97); }
.day__all { font-size: 15px; }
.journal__mapcol { position: sticky; top: calc(var(--nav-h) + 24px); }
.map { position: relative; height: calc(100vh - var(--nav-h) - 120px); height: calc(100svh - var(--nav-h) - 120px); min-height: 420px; background: var(--paper-3); }
.map__fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--ink-2); font-size: 15px; }
.map__days { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.map__days button { min-height: 40px; padding: 8px 14px; border: 0; background: var(--paper); font-size: 15px; transition: background-color .2s, color .2s; }
.map__days button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.map__days button:hover:not([aria-pressed="true"]) { background: var(--blush); }
/* leaflet look */
.map .leaflet-container { background: var(--paper-3); font-family: var(--sans); }
.map .leaflet-tile-pane { filter: grayscale(.55) sepia(.38) saturate(.85) brightness(1.04) contrast(.92); }
.map .leaflet-control-attribution { font-size: 13px; background: rgba(246, 241, 231, .85); }
.map .leaflet-control-zoom a { background: var(--paper); color: var(--ink); border-radius: 0 !important; }
.pin { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--gold); color: var(--ink); font: 600 14px/1 var(--sans); border: 2px solid var(--paper); transition: transform .25s var(--ease-out), background-color .25s; }
.pin.is-dim { background: var(--paper-3); color: var(--ink-2); transform: scale(.72); }
.pin.is-hot { background: var(--ink); color: var(--paper); transform: scale(1.18); }
.leaflet-popup-content-wrapper { border-radius: 0; background: var(--paper); color: var(--ink); box-shadow: 0 10px 30px rgba(20, 18, 12, .22); } /* taste-skill-ignore: map popup is a real floating overlay */
.leaflet-popup-tip { background: var(--paper); }
.leaflet-popup-content { margin: 10px; width: 200px !important; }
.pop img { width: 200px; height: 130px; object-fit: cover; display: block; background: var(--paper-3); }
.pop p { margin-top: 8px; font: 500 18px/1.2 var(--serif); }
.pop small { display: block; font: 400 13px var(--sans); color: var(--ink-2); margin-top: 2px; }

@media (max-width: 1000px) {
  .journal__grid { grid-template-columns: 1fr; }
  .journal__mapcol { position: relative; top: 0; order: -1; }
  .map { height: 58svh; min-height: 340px; }
}
@media (max-width: 760px) {
  .collage--a { grid-template-columns: 1fr 1fr; grid-template-rows: 220px 140px; }
  .collage--a > :first-child { grid-row: auto; grid-column: 1 / 3; }
  .collage--a > :nth-child(4) { display: none; }
  .collage--b { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 150px; }
  .collage--b > :nth-child(3) { grid-column: 1 / 3; }
  .collage--c { grid-template-rows: 200px 140px; }
  .collage--d { grid-template-rows: 240px; }
}

/* ---------------- Reasons ---------------- */
.reasons { background: var(--blush); padding-block: var(--gap-section); overflow: hidden; }
.reasons__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: center; }
.reasons__copy { grid-column: 1 / 6; }
.reasons__ctrl { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-top: 40px; }
.deck { grid-column: 7 / 13; position: relative; justify-self: center; width: min(460px, 100%); aspect-ratio: 5 / 6.4; perspective: 1400px; }
.deck__under { position: absolute; inset: 0; background: var(--paper-2); transform: rotate(-4deg) translate(-10px, 8px); }
.deck__under--2 { background: var(--paper-3); transform: rotate(3deg) translate(12px, 4px); }
.card { position: absolute; inset: 0; border: 0; padding: 0; background: none; text-align: left; transform-style: preserve-3d; }
.card__inner { position: absolute; inset: 0; display: block; transform-style: preserve-3d; transition: transform .8s var(--ease-io); }
.card.is-flipped .card__inner { transform: rotateY(180deg); }
.card__face { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(24px, 3.4vw, 44px); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card__front { background: var(--olive); color: var(--paper); align-items: center; justify-content: center; gap: 20px; }
.card__front::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(184, 149, 92, .55); pointer-events: none; } /* taste-skill-ignore: thin gold invitation frame, asked for in the brief */
.card__mono { font: 400 clamp(64px, 8vw, 104px)/1 var(--serif); }
.card__tap { font-size: 15px; letter-spacing: .02em; opacity: .9; }
.card__back { background: var(--paper); transform: rotateY(180deg); visibility: hidden; transition: visibility 0s .4s; }
.card.is-flipped .card__back { visibility: visible; transition-delay: 0s; }
.card__front { transition: visibility 0s 0s; }
.card.is-flipped .card__front { visibility: hidden; transition-delay: .4s; }
.card__back::before { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(184, 149, 92, .55); pointer-events: none; } /* taste-skill-ignore: thin gold invitation frame, asked for in the brief */
.card__num { font: italic 400 20px var(--serif); color: var(--gold-deep); }
.card__text { font: 500 clamp(22px, 2.2vw, 32px)/1.2 var(--serif); letter-spacing: -.015em; }
.card.is-dealing .card__inner { animation: deal .6s var(--ease-out); }
@keyframes deal { from { transform: rotateY(180deg) translate(-40px, 30px) rotate(-6deg); opacity: 0; } to { transform: rotateY(180deg); opacity: 1; } }
@media (hover: hover) { .card:hover .card__inner { transform: translateY(-6px) rotate(-1deg); } .card.is-flipped:hover .card__inner { transform: rotateY(180deg) translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .card__inner { transition: none; }
  .card.is-dealing .card__inner { animation: none; }
}
@media (max-width: 860px) {
  .reasons__grid { grid-template-columns: 1fr; gap: 48px; }
  .reasons__copy, .deck { grid-column: auto; }
  .deck { width: min(360px, 86vw); }
}

/* ---------------- Surprises ---------------- */
.surprises { padding-top: var(--gap-section); }
.openwhen { margin-top: 80px; }
.envelopes { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); }
.env { position: relative; width: 100%; aspect-ratio: 16 / 10.4; border: 0; padding: 0; background: var(--paper-2); color: var(--ink); text-align: left; perspective: 900px; transition: transform .3s var(--ease-out); }
.env::before { /* the flap */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 58%; background: var(--paper-3);
  clip-path: polygon(0 0, 100% 0, 50% 100%); transform-origin: top; transition: transform .5s var(--ease-out);
}
.env__seal { position: absolute; left: 50%; top: 58%; width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%; background: var(--gold); color: var(--ink); display: grid; place-items: center; font: 500 17px/1 var(--serif); transition: transform .4s var(--ease-out); }
.env__label { position: absolute; left: 20px; right: 20px; bottom: 16px; display: flex; flex-direction: column; }
.env__label small { font-size: var(--t-small); color: var(--ink-2); }
.env__label span { font: 500 clamp(22px, 2vw, 28px)/1.1 var(--serif); }
.env.is-read .env__seal { background: var(--olive-2); color: var(--paper); }
@media (hover: hover) {
  .env:hover { transform: translateY(-4px); }
  .env:hover::before { transform: rotateX(28deg); }
  .env:hover .env__seal { transform: rotate(-12deg) scale(1.06); }
}
.env:active { transform: scale(.98); }
@media (max-width: 760px) {
  .envelopes { grid-template-columns: 1fr 1fr; gap: 12px; }
  .env { aspect-ratio: 1 / 1; }
  .env::before { height: 40%; }
  .env__seal { top: 40%; width: 40px; height: 40px; margin: -20px 0 0 -20px; font-size: 13px; }
  .env__label { left: 12px; right: 12px; bottom: 10px; }
  .env__label span { font-size: 19px; }
  .env__label small { font-size: 13px; }
}

.play { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); margin-top: calc(var(--gap-section) * .8); align-items: start; }
.quiz__body { margin-top: 32px; }
.quiz__progress { font: italic 400 20px var(--serif); color: var(--gold-deep); }
.quiz__q { margin-top: 10px; font: 500 clamp(26px, 2.2vw, 34px)/1.15 var(--serif); }
.quiz__opts { display: grid; gap: 8px; margin-top: 24px; list-style: none; padding: 0; }
.quiz__opt { width: 100%; min-height: 54px; padding: 12px 18px; border: 0; background: var(--paper-2); text-align: left; font-size: 17px; display: flex; justify-content: space-between; align-items: center; gap: 12px; transition: background-color .2s, color .2s, transform .16s var(--ease-out); }
.quiz__opt:hover:not(:disabled) { background: var(--blush); }
.quiz__opt:active:not(:disabled) { transform: scale(.985); }
.quiz__opt:disabled { cursor: default; }
.quiz__opt.is-right { background: var(--olive); color: var(--paper); }
.quiz__opt.is-wrong { background: var(--paper-3); color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--gold-deep); }
.quiz__opt em { font-style: normal; font-size: 14px; }
.quiz__next { margin-top: 24px; }
.quiz__score { font: 500 var(--t-display)/1 var(--serif); font-size: clamp(72px, 9vw, 128px); font-variant-numeric: lining-nums; color: var(--gold-deep); }
.quiz__score small { font-size: .35em; color: var(--ink-2); }
.quiz__result h4 { font-size: var(--t-l); margin-top: 8px; }
.quiz__result p { margin-top: 14px; max-width: 32em; }
.quiz__result .btn { margin-top: 28px; }

.memory__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.memory__stats { font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.memory__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(6px, 1vw, 12px); margin-top: 32px; position: relative; }
.mcard { position: relative; aspect-ratio: 1; border: 0; padding: 0; background: none; perspective: 800px; }
.mcard__in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .5s var(--ease-io); }
.mcard.is-up .mcard__in, .mcard.is-done .mcard__in { transform: rotateY(180deg); }
.mcard__back, .mcard__front { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.mcard__back { background: var(--olive); color: var(--gold); display: flex; align-items: center; justify-content: center; gap: .08em; font: 400 clamp(18px, 2vw, 26px)/1 var(--serif); }
.mcard__back::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(184, 149, 92, .45); } /* taste-skill-ignore: thin gold invitation frame, asked for in the brief */
.mcard__front { transform: rotateY(180deg); }
.mcard__front .ph { height: 100%; }
.mcard.is-done .mcard__front::after { content: ""; position: absolute; inset: 0; outline: 3px solid var(--gold); outline-offset: -3px; }
@media (hover: hover) { .mcard:not(.is-up):not(.is-done):hover .mcard__in { transform: rotateY(14deg); } }
.memory__win { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; background: rgba(246, 241, 231, .94); font: 500 var(--t-l)/1.2 var(--serif); }
.memory__again { margin-top: 16px; }
@media (prefers-reduced-motion: reduce) { .mcard__in { transition: none; } }
@media (max-width: 860px) {
  .play { grid-template-columns: 1fr; gap: calc(var(--gap-section) * .7); }
}

.countdown { margin-top: var(--gap-section); background: var(--olive); color: var(--paper); padding-block: clamp(88px, 11vw, 160px); }
.countdown__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 360px); gap: 12px clamp(32px, 6vw, 96px); align-items: center; }
.countdown__text { display: grid; gap: 12px; }
.countdown__photo .ph { aspect-ratio: 4 / 5; }
@media (max-width: 900px) { .countdown__inner { grid-template-columns: 1fr; } .countdown__photo { width: min(62%, 360px); justify-self: end; margin-top: 40px; } }
.countdown__label { font: italic 400 var(--t-l) var(--serif); color: var(--gold); }
.countdown__clock { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 32px clamp(18px, 3.4vw, 56px); font-family: var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.countdown__clock span { display: flex; align-items: baseline; gap: 10px; }
.countdown__clock b { font-weight: 400; font-size: clamp(44px, 7.4vw, 128px); line-height: .95; letter-spacing: -.03em; }
.countdown__clock em { font: 400 17px var(--sans); opacity: .9; font-style: normal; }

/* ---------------- Letter ---------------- */
.letter { padding-bottom: var(--gap-section); }
.letter__stage { position: relative; min-height: 136vh; min-height: 136svh; }
.letter__photo { position: absolute; right: 0; top: 36vh; top: 36svh; width: min(720px, 50vw); }
.letter__photo .ph { aspect-ratio: 4 / 5.2; }
.letter__title { position: relative; z-index: 2; padding: 24vh var(--m) 0; padding-top: 24svh; font-size: clamp(64px, 8.6vw, 148px); font-weight: 400; line-height: 1.02; letter-spacing: -.03em; }
.letter__title .l { display: block; white-space: nowrap; }
.letter__title .tw { position: relative; display: block; }
.letter__title .tw > span { display: inline-block; }
.letter__title .tw > span + span { position: absolute; inset: 0; color: var(--paper); clip-path: inset(var(--cy, 100%) 0 0 var(--cx, 100%)); }
.letter__title .tw > span:first-child { clip-path: polygon(0 0, 100% 0, 100% var(--cy, 100%), var(--cx, 100%) var(--cy, 100%), var(--cx, 100%) 100%, 0 100%); }
.letter__intro { position: relative; z-index: 2; margin: 28px 0 0 var(--m); max-width: 32ch; font: 400 clamp(20px, 1.6vw, 24px)/1.4 var(--serif); }
.letter__small { position: absolute; left: var(--m); bottom: 0; width: min(360px, 28vw); }
.letter__small .ph { aspect-ratio: 9 / 10; }
.paper {
  position: relative; max-width: 720px; margin: calc(var(--gap-section) * .7) auto 0; padding: clamp(32px, 6vw, 72px);
  background: var(--paper-2); font: 400 clamp(20px, 1.5vw, 23px)/1.62 var(--serif); color: var(--ink);
}
.paper::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(184, 149, 92, .5); pointer-events: none; } /* taste-skill-ignore: thin gold invitation frame, asked for in the brief */
.paper__hello { font: 400 clamp(40px, 4vw, 56px)/1.1 var(--script); color: var(--olive); margin-bottom: 20px; }
.paper p + p { margin-top: 18px; }
.paper__sign { margin-top: 36px; }
.paper__name { font: 400 clamp(44px, 4.6vw, 64px)/1 var(--script); color: var(--olive); margin-top: 6px; }
@media (max-width: 760px) {
  .letter__stage { min-height: 0; padding-bottom: 32px; display: flex; flex-direction: column; }
  .letter__title { order: 1; padding-top: 96px; font-size: clamp(54px, 15vw, 80px); }
  .letter__photo { order: 2; position: relative; top: auto; right: auto; width: 75%; align-self: flex-end; margin-top: calc(clamp(54px, 15vw, 80px) * -.72); z-index: 1; }
  .letter__intro { order: 3; margin-top: 24px; font-size: 19px; }
  .letter__small { order: 4; position: relative; left: auto; bottom: auto; width: 50%; margin: 32px 0 0 var(--m); }
  .paper { margin-inline: var(--m); }
}

/* ---------------- Footer ---------------- */
.foot { min-height: 92vh; min-height: 92svh; display: flex; flex-direction: column; background: var(--olive); color: var(--paper); padding-block: 40px 28px; }
.foot a { color: var(--paper); }
.foot a:hover { color: var(--gold); }
.foot__top { display: flex; justify-content: space-between; gap: 24px; font-size: 15px; }
.foot__mono {
  margin: auto var(--m) 0; padding: 0; border: 0; background: none; color: var(--paper); text-align: left; align-self: flex-start;
  font: 400 clamp(120px, 30vw, 460px)/.85 var(--serif); letter-spacing: -.04em; transition: transform .2s var(--ease-out);
}
.foot__mono:active { transform: scale(.985); }
.foot__mono.is-tapped i { display: inline-block; animation: beat .5s var(--ease-out); }
@keyframes beat { 40% { transform: scale(1.25); } }
.foot__meta { display: flex; justify-content: space-between; gap: 12px 24px; margin-top: 32px; font-size: var(--t-small); flex-wrap: wrap; }
.foot__credit { opacity: .8; }
@media (max-width: 760px) {
  .foot__top { flex-direction: column; gap: 8px; }
  .foot__meta { flex-direction: column; gap: 6px; font-size: 13px; }
  .foot__mono { font-size: 34vw; }
}

/* ---------------- Lightbox ---------------- */
.lb { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; background: rgba(24, 22, 16, .97); color: var(--paper); touch-action: pan-y; }
.lb[hidden] { display: none; }
.lb.is-open { animation: fade .25s var(--ease-out); }
.lb__fig { display: grid; justify-items: center; gap: 14px; max-width: 94vw; }
.lb__img { max-width: 92vw; max-height: 80vh; max-height: 80svh; width: auto; height: auto; object-fit: contain; transition: opacity .25s, transform .25s var(--ease-out); }
.lb__img.is-swapping { opacity: 0; transform: scale(.985); }
.lb__cap { max-width: 60ch; text-align: center; font-size: 15px; padding-inline: 16px; }
.lb__count { color: var(--gold); margin-left: 8px; font-variant-numeric: tabular-nums; }
.lb__btn { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; border: 0; border-radius: 50%; background: rgba(246, 241, 231, .12); display: grid; place-items: center; transition: background-color .2s, transform .16s var(--ease-out); }
.lb__btn:hover { background: rgba(246, 241, 231, .24); }
.lb__btn:active { transform: scale(.94); }
.lb__btn svg { width: 22px; height: 22px; stroke: var(--paper); fill: none; stroke-width: 1.6; }
.lb__prev { left: var(--m); } .lb__next { right: var(--m); }
.lb__close { position: absolute; top: 14px; right: var(--m); min-height: 44px; padding: 8px 4px; border: 0; background: none; color: var(--paper); font-size: 15px; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .3em; }
@media (max-width: 760px) { .lb__btn { top: auto; bottom: 18px; margin: 0; } .lb__img { max-height: 70svh; } }
@keyframes fade { from { opacity: 0; } }

/* ---------------- Modal (letters, secret) ---------------- */
.modal { position: fixed; inset: 0; z-index: 130; display: grid; place-items: center; padding: var(--m); background: rgba(24, 22, 16, .6); overflow-y: auto; }
.modal.is-open { animation: fade .3s var(--ease-out); }
.modal__paper { position: relative; width: min(620px, 100%); padding: clamp(32px, 6vw, 64px); background: var(--paper); box-shadow: 0 30px 80px rgba(20, 18, 12, .35); } /* taste-skill-ignore: dialog is a real floating overlay */
.modal.is-open .modal__paper { animation: rise .5s var(--ease-out); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.modal__paper::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(184, 149, 92, .5); pointer-events: none; } /* taste-skill-ignore: thin gold invitation frame, asked for in the brief */
.modal__kicker { font: 400 clamp(32px, 3.4vw, 44px)/1.1 var(--script); color: var(--gold-deep); }
.modal__title { font-size: var(--t-l); margin-top: 6px; }
.modal__text { margin-top: 20px; font: 400 clamp(20px, 1.6vw, 23px)/1.6 var(--serif); }
.modal__close { margin-top: 32px; }
@media (prefers-reduced-motion: reduce) { .modal.is-open .modal__paper, .lb.is-open, .modal.is-open { animation: none; } }

.noscript { padding: 120px var(--m); font: 400 24px var(--serif); }
