/* Hallmark · route: custom (bespoke) · structure: scroll-clock day over a fixed Burgundy landscape · idea: "scroll is the clock, sunrise to starry night"
 * paper: living sky, sunrise oklch(82% 0.042 245) to night oklch(18% 0.04 272) · accent: oklch(83% 0.145 85) sunflower gold · ink: oklch(23% 0.035 268)
 * display: Bodoni Moda · body: EB Garamond · axes: light / high-contrast-serif / chromatic-amber · nav: N9 edge-aligned · footer: Ft6 letter close
 * enrichment: tier-B hand-built SVG landscape, scroll-linked time of day, ambient sunflower sway · gates: all-pass · studied: no
 * contrast: pass (40, 41) · nav: N9 · footer: Ft6 · slop: pass (42 to 45) · honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · mobile: pass (34, 49, 50 to 57)
 */
/* Hallmark · pre-emit critique: P5 H4 E4 S5 R4 V5 */

/* ======================================================================== fonts */
@font-face {
  font-family: "Bodoni Moda";
  src: url("../fonts/bodoni-moda-latin.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-italic-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}
/* metric-matched fallbacks keep the layout still while the web fonts arrive */
@font-face {
  font-family: "Bodoni Moda Fallback";
  src: local("Georgia");
  size-adjust: 95%;
  ascent-override: 106%;
  descent-override: 26%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "EB Garamond Fallback";
  src: local("Georgia");
  size-adjust: 88%;
  ascent-override: 102%;
  descent-override: 31%;
  line-gap-override: 0%;
}

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

[hidden] {
  display: none !important;
}

html {
  overflow-x: clip;
  scroll-padding-top: calc(var(--bar-h) + var(--space-lg));
  scroll-padding-bottom: var(--land-reading);
  background: var(--color-sky-fallback);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: color-mix(in oklab, var(--color-ink) 45%, transparent) transparent;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  html.has-smooth-wheel {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  overflow-x: clip;
  min-height: 100svh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 400;
  line-height: var(--leading-body);
  color: var(--color-ink);
  font-kerning: normal;
  font-variant-numeric: proportional-nums;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--color-gold-soft);
  color: var(--color-ink);
}

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

h1,
h2,
h3,
p,
ol,
ul,
figure,
address {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

address {
  font-style: normal;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Scene colours before the script blends them: the sunrise palette */
.sky,
.land,
.bar,
.veil {
  --tod-sky-top: var(--tod-sunrise-sky-top);
  --tod-sky-low: var(--tod-sunrise-sky-low);
  --tod-glow: var(--tod-sunrise-glow);
  --tod-sun: var(--tod-sunrise-sun);
  --tod-cloud: var(--tod-sunrise-cloud);
  --tod-far: var(--tod-sunrise-far);
  --tod-haze: var(--tod-sunrise-haze);
  --tod-cote: var(--tod-sunrise-cote);
  --tod-vine: var(--tod-sunrise-vine);
  --tod-wood: var(--tod-sunrise-wood);
  --tod-plain: var(--tod-sunrise-plain);
  --tod-meadow: var(--tod-sunrise-meadow);
  --tod-stone: var(--tod-sunrise-stone);
  --tod-roof: var(--tod-sunrise-roof);
  --tod-field: var(--tod-sunrise-field);
  --tod-petal: var(--tod-sunrise-petal);
  --tod-disc: var(--tod-sunrise-disc);
  --tod-ink: var(--tod-sunrise-ink);
}

/* ======================================================================== sky (behind the words) */
.sky {
  position: fixed;
  inset: 0;
  z-index: var(--z-sky);
  overflow: hidden;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .075 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    linear-gradient(to bottom, var(--tod-sky-top) 0%, var(--tod-sky-low) 74%);
}

.sky__stars {
  position: absolute;
  inset: 0 0 18% 0;
  background: url("../img/stars.svg") center top / cover no-repeat;
  opacity: 0;
}

.sky__moon {
  --moon: clamp(26px, 3.6vmin, 40px);
  position: absolute;
  top: 17svh;
  left: 15vw;
  width: var(--moon);
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset calc(var(--moon) * -0.3) calc(var(--moon) * -0.1) 0 0 var(--color-moon);
  rotate: -18deg;
  opacity: 0;
}

.sky__sun,
.sky__halo,
.sky__horizon {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  will-change: transform;
}

.sky__sun {
  --sun: clamp(40px, 5.4vmin, 68px);
  width: var(--sun);
  height: var(--sun);
  margin: calc(var(--sun) / -2) 0 0 calc(var(--sun) / -2);
  background: radial-gradient(circle, var(--tod-sun) 0 56%, transparent 72%);
}

.sky__halo {
  --halo: clamp(360px, 70vmax, 1100px);
  width: var(--halo);
  height: var(--halo);
  margin: calc(var(--halo) / -2) 0 0 calc(var(--halo) / -2);
  background: radial-gradient(circle, color-mix(in oklab, var(--tod-glow) 72%, transparent) 0, transparent 58%);
  opacity: 0.6;
}

.sky__horizon {
  width: 170vw;
  height: 54svh;
  margin: -27svh 0 0 -85vw;
  background: radial-gradient(closest-side, var(--tod-glow) 0, transparent 100%);
  opacity: 0.5;
}

.sky__clouds {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.sky__cloud {
  position: absolute;
  height: var(--h);
  width: var(--w);
  top: var(--y);
  left: var(--x);
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--tod-cloud) 80%, transparent), transparent);
  opacity: 0.75;
}

.sky__cloud::after {
  content: "";
  position: absolute;
  inset: -40% 18% 30% 30%;
  border-radius: 50%;
  background: inherit;
}

.sky__cloud--1 { --x: 6vw; --y: 24svh; --w: 34vw; --h: 3.2svh; }
.sky__cloud--2 { --x: 50vw; --y: 33svh; --w: 46vw; --h: 2.6svh; }
.sky__cloud--3 { --x: 68vw; --y: 14svh; --w: 24vw; --h: 2svh; }

/* ======================================================================== land (in front of the words) */
.land {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--land-h);
  z-index: var(--z-land);
  pointer-events: none;
  will-change: transform;
}

.land__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
}

.land__flowers {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.flower {
  position: absolute;
  bottom: -3%;
  left: var(--fx);
  height: var(--fh);
  aspect-ratio: 240 / 700;
  transform-origin: 50% 100%;
  rotate: calc(var(--ft) + var(--lean, 0) * 3.5deg);
}

.flower svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  max-width: none;
  transform-origin: 50% 100%;
}

.flower--1 { --fx: -7%; --fh: 74%; --ft: 5deg; --fd: -1.5s; }
.flower--2 { --fx: 7%; --fh: 56%; --ft: -3deg; --fd: -4s; }
.flower--3 { --fx: 17%; --fh: 40%; --ft: 2deg; --fd: -6.2s; display: none; }
.flower--4 { --fx: 78%; --fh: 42%; --ft: -2deg; --fd: -2.4s; display: none; }
.flower--5 { --fx: 84%; --fh: 62%; --ft: 3deg; --fd: -5.1s; }
.flower--6 { --fx: 95%; --fh: 50%; --ft: -5deg; --fd: -0.6s; display: none; }

.veil {
  position: fixed;
  inset: 0 0 auto 0;
  height: calc(var(--bar-h) + var(--space-lg));
  z-index: var(--z-veil);
  pointer-events: none;
  background: linear-gradient(to bottom, var(--tod-sky-top) 0 52%, transparent);
  transition: opacity var(--dur-short) var(--ease-out);
}

/* while the reply card passes under it, the bar steps aside */
.bar.is-over-card,
.veil.is-over-card {
  opacity: 0;
  visibility: hidden;
}

/* ======================================================================== bar (N9 edge-aligned) */
.bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: var(--z-bar);
  height: var(--bar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
  color: var(--tod-ink);
  pointer-events: none;
  transition: color var(--dur-short) var(--ease-out), opacity var(--dur-short) var(--ease-out), visibility 0s linear;
}

.bar a {
  pointer-events: auto;
}

.bar__mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-inline-start: calc(var(--space-2xs) * -1);
  border-radius: 50%;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-short) var(--ease-out), visibility 0s linear var(--dur-short);
}

.bar__mark svg {
  width: 38px;
  height: 38px;
}

.bar.is-past-hero .bar__mark {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--dur-long) var(--ease-out), visibility 0s;
}

.bar__rsvp {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-md);
  border: 1px solid color-mix(in oklab, currentColor 55%, transparent);
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .bar__rsvp:hover {
    border-color: currentColor;
    background: color-mix(in oklab, currentColor 10%, transparent);
  }
}

.bar__rsvp:active {
  transform: translateY(1px);
}

/* ======================================================================== shared pieces */
main {
  position: relative;
}

/* main.js fades the words out just above the ridge line (a mask on main), so the hills never slice a sentence */

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 400;
  line-height: var(--leading-head);
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}

.link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.28em;
  text-decoration-color: color-mix(in oklab, currentColor 45%, transparent);
  white-space: nowrap;
  cursor: pointer;
  transition: text-decoration-color var(--dur-short) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .link:hover {
    text-decoration-color: currentColor;
    text-decoration-thickness: 2px;
  }
}

.link:active,
.hero__index a:active,
.close__top:active,
.bar__mark:active {
  transform: translateY(1px);
}

.link[target="_blank"]::after {
  content: "";
  width: 0.62em;
  height: 0.62em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3 1h6v6M9 1 1 9' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3 1h6v6M9 1 1 9' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-height: 48px;
  padding: 0 var(--space-xl);
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--dur-short) var(--ease-out), transform var(--dur-micro) var(--ease-out);
}

.btn:active {
  transform: translateY(1px);
}

.btn--ink {
  background: var(--color-ink);
  color: var(--color-paper);
}

@media (hover: hover) and (pointer: fine) {
  .btn--ink:hover {
    background: var(--color-ink-2);
  }
  .btn--gold:hover {
    background: var(--color-gold-2);
  }
}

.btn--gold {
  background: var(--color-gold);
  color: var(--color-gold-ink);
}

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn__spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
}

.btn[aria-busy="true"] {
  cursor: progress;
}

.btn[aria-busy="true"] .btn__label {
  opacity: 0;
}

.btn[aria-busy="true"] .btn__spinner {
  opacity: 1;
  animation: spin 800ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(1turn);
  }
}

/* visible placeholders: copy the couple still has to write */
.tbd {
  padding: 0 var(--space-3xs);
  border-radius: var(--radius-sm);
  background: color-mix(in oklab, var(--color-tbd) 10%, transparent);
  color: var(--color-tbd);
  font-style: italic;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ======================================================================== sections */
.hero,
.story,
.weekend,
.travel,
.stay,
.rsvp,
.close {
  padding-inline: max(var(--gutter), env(safe-area-inset-left)) max(var(--gutter), env(safe-area-inset-right));
}

.story,
.weekend,
.travel,
.stay,
.rsvp {
  margin-top: clamp(9rem, 34svh, 18rem);
}

/* ---------------------------------------------------------------- hero */
.hero {
  --i: 0;
  --hero-w: min(100%, max(34rem, calc(var(--text-display) * 6.6)));
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: calc(var(--bar-h) + var(--space-md));
  padding-bottom: calc(max(var(--land-h) * 0.6, 12.8vw) + var(--space-md));
  text-align: center;
}

.hero__mark {
  width: clamp(3.25rem, min(3rem + 4vw, 10svh), 6.5rem);
  height: auto;
  aspect-ratio: 1;
  margin-bottom: clamp(0.75rem, 2.6svh, 2rem);
  color: var(--color-ink);
}

.hero__names {
  display: grid;
  width: var(--hero-w);
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: 400;
  line-height: var(--leading-display);
  letter-spacing: var(--tracking-display);
  overflow-wrap: anywhere;
  min-width: 0;
}

.hero__name--a {
  justify-self: start;
}

.hero__amp {
  justify-self: center;
  font-size: 0.5em;
  line-height: 0.92;
  color: var(--color-ink-2);
}

.hero__name--b {
  justify-self: end;
}

.hero__lede {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  width: var(--hero-w);
  margin-top: clamp(0.75rem, 2.2svh, 1.6rem);
  font-size: var(--text-md);
  letter-spacing: 0.01em;
  color: var(--color-ink-2);
}

.hero__lede::before,
.hero__lede::after {
  content: "";
  flex: 1;
  height: var(--rule-hair);
  background: var(--color-rule);
}

.hero__when {
  display: flex;
  flex-direction: column;
  width: var(--hero-w);
  margin-top: var(--space-xs);
  font-size: var(--text-md);
  line-height: 1.4;
}

.hero__when > time {
  align-self: flex-start;
}

.hero__when > span:last-child {
  align-self: flex-end;
}

.hero__when time {
  font-weight: 500;
}

.hero__dot {
  display: none;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-gold-2);
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  width: var(--hero-w);
  margin-top: clamp(1rem, 3svh, 2.25rem);
}

.hero__index {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  column-gap: var(--space-md);
  width: 100%;
}

.hero__index a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(currentColor, currentColor) 0 calc(50% + 0.75em) / 0 1px no-repeat;
  transition: background-size var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .hero__index a:hover {
    color: var(--color-ink);
    background-size: 100% 1px;
  }
}

/* ---------------------------------------------------------------- story */
.story {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 68rem;
  margin-inline: auto;
  align-items: center;
}

.story__photo {
  position: relative;
  justify-self: center;
  width: min(78vw, 22rem);
}

.arch {
  display: block;
  aspect-ratio: 4 / 5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500'%3E%3Cpath d='M0 500V128C0 82 58 66 112 46C152 31 186 18 200 0C214 18 248 31 288 46C342 66 400 82 400 128V500Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500'%3E%3Cpath d='M0 500V128C0 82 58 66 112 46C152 31 186 18 200 0C214 18 248 31 288 46C342 66 400 82 400 128V500Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  background: var(--color-ink);
}

.arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 46% 0;
}

/* a second, finer arch line around the photo, like the line of the monogram */
.story__photo::after {
  content: "";
  position: absolute;
  inset: calc(var(--space-sm) * -1) calc(var(--space-sm) * -1) 0;
  background: var(--color-ink);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 428 514' preserveAspectRatio='none'%3E%3Cpath d='M.8 514V131.6C.8 84.3 62.1 67.8 119.8 47.3C162.6 31.9 199 18.5 214 .9C229 18.5 265.4 31.9 308.2 47.3C365.9 67.8 427.2 84.3 427.2 131.6V514' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 428 514' preserveAspectRatio='none'%3E%3Cpath d='M.8 514V131.6C.8 84.3 62.1 67.8 119.8 47.3C162.6 31.9 199 18.5 214 .9C229 18.5 265.4 31.9 308.2 47.3C365.9 67.8 427.2 84.3 427.2 131.6V514' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  opacity: 0.5;
  pointer-events: none;
}

.story__text {
  max-width: 34rem;
}

.story__lede {
  margin-top: var(--space-lg);
  font-size: var(--text-md);
  line-height: 1.5;
}

.story__text p + p {
  margin-top: var(--space-md);
}

/* ---------------------------------------------------------------- weekend */
.weekend {
  max-width: 76rem;
  margin-inline: auto;
}

.weekend__sub {
  margin-top: var(--space-sm);
  max-width: 34rem;
  color: var(--color-ink-2);
}

.days {
  display: grid;
  gap: var(--space-2xl);
  margin-top: var(--space-2xl);
}

.day__title {
  font-weight: 400;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: var(--rule-hair) solid var(--color-rule);
}

.day__name,
.card__title,
.close__line,
.thanks__title,
.route__name,
.venue__name {
  overflow-wrap: anywhere;
  min-width: 0;
}

.day__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
}

.day__date {
  font-family: var(--font-display);
  font-size: var(--text-md);
  color: var(--color-ink-2);
}

.day__list {
  display: grid;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.event {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  column-gap: var(--space-md);
  align-items: baseline;
}

.event__time {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-variant-numeric: tabular-nums lining-nums;
  text-align: end;
  white-space: nowrap;
}

.ampm {
  margin-inline-start: var(--space-3xs);
  font-family: var(--font-body);
  font-size: 0.62em;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-2);
}

.event__what {
  font-size: var(--text-base);
}

.event__note {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

.event--key .event__what {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.2;
}

.event--key .event__time {
  position: relative;
}

.event--key .event__time::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -0.25rem;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--color-gold-2);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-gold) 35%, transparent);
}

/* ---------------------------------------------------------------- travel */
.travel {
  display: grid;
  gap: var(--space-2xl);
  max-width: 76rem;
  margin-inline: auto;
}

.venue__address {
  margin-top: var(--space-lg);
  font-size: var(--text-md);
  line-height: 1.45;
}

.venue__name {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-lg);
}

.venue__note {
  margin-top: var(--space-md);
  max-width: 30rem;
  color: var(--color-ink-2);
}

.venue .link {
  margin-top: var(--space-xs);
}

.venue__photos {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.62fr);
  align-items: end;
  max-width: 34rem;
}

.venue__photo,
.stay__photo img {
  filter: saturate(0.86) contrast(0.97);
}

.venue__photo {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.venue__photo--main {
  grid-column: 1 / 2;
  grid-row: 1;
  aspect-ratio: 604 / 800;
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px -24px color-mix(in oklab, var(--color-ink) 70%, transparent);
}

.venue__photo--tower {
  grid-column: 2 / 3;
  grid-row: 1;
  margin: 0 0 -12% -26%;
  aspect-ratio: 4 / 5;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500'%3E%3Cpath d='M0 500V128C0 82 58 66 112 46C152 31 186 18 200 0C214 18 248 31 288 46C342 66 400 82 400 128V500Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 500'%3E%3Cpath d='M0 500V128C0 82 58 66 112 46C152 31 186 18 200 0C214 18 248 31 288 46C342 66 400 82 400 128V500Z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  object-position: 50% 30%;
}

.routes {
  display: grid;
  gap: var(--space-xl) var(--space-2xl);
}

.route {
  padding-top: var(--space-md);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.route__name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 1.2;
  text-wrap: balance;
}

.route__or {
  font-family: var(--font-body);
  font-size: 0.75em;
  color: var(--color-ink-2);
}

.route__why {
  margin-top: var(--space-xs);
  color: var(--color-ink-2);
}

.route__best {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  margin-inline-end: var(--space-2xs);
  font-weight: 500;
  color: var(--color-ink);
}

.route__best::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--color-gold-2);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--color-gold) 35%, transparent);
}

.route__far {
  margin-top: var(--space-2xs);
}

.num {
  font-variant-numeric: lining-nums tabular-nums;
}

/* ---------------------------------------------------------------- stay */
.stay {
  display: grid;
  gap: clamp(2rem, 5vw, 4.5rem);
  max-width: 72rem;
  margin-inline: auto;
  align-items: center;
}

.stay__photo {
  align-self: end;
}

.stay__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px -24px color-mix(in oklab, var(--color-ink) 70%, transparent);
}

.stay__text {
  max-width: 32rem;
}

.stay__text > p + p,
.stay__lead {
  margin-top: var(--space-md);
}

.stay__lead {
  font-size: var(--text-md);
  line-height: 1.45;
}

.stay__price {
  padding-block: var(--space-md);
  border-block: var(--rule-hair) solid var(--color-rule);
}

.stay__amount {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1;
  font-variant-numeric: lining-nums;
}

.stay .link {
  margin-top: var(--space-xs);
}

/* ---------------------------------------------------------------- RSVP: the reply card */
.rsvp {
  display: grid;
  justify-items: start;
  max-width: 76rem;
  margin-inline: auto;
}

.card {
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  width: 100%;
  max-width: 37rem;
  color: var(--color-paper);
  caret-color: var(--color-gold);
}

/* the black paper: an ogee arch like the petals of the monogram, then straight sides */
.card__paper {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-card);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='150' viewBox='0 0 600 150'%3E%3Cpath d='M0 150V96C0 64 92 54 176 36C236 23 282 13 300 0C318 13 364 23 424 36C508 54 600 64 600 96V150Z'/%3E%3C/svg%3E") top / 100% auto no-repeat, linear-gradient(#000 0 0) bottom / 100% calc(100% - 20cqw) no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='150' viewBox='0 0 600 150'%3E%3Cpath d='M0 150V96C0 64 92 54 176 36C236 23 282 13 300 0C318 13 364 23 424 36C508 54 600 64 600 96V150Z'/%3E%3C/svg%3E") top / 100% auto no-repeat, linear-gradient(#000 0 0) bottom / 100% calc(100% - 20cqw) no-repeat;
}

/* a fine inner line that follows the arch, as on letterpress stationery */
.card__paper::before,
.card__paper::after {
  content: "";
  position: absolute;
  left: var(--space-sm);
  right: var(--space-sm);
  pointer-events: none;
}

.card__paper::before {
  top: var(--space-sm);
  height: calc((100cqw - 2 * var(--space-sm)) * 0.25);
  background: var(--color-card-rule);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 150' preserveAspectRatio='none'%3E%3Cpath d='M.6 150V96.5C.6 64.7 92.3 54.7 176.1 36.7C236.2 23.7 282.2 13.7 300 .8C317.8 13.7 363.8 23.7 423.9 36.7C507.7 54.7 599.4 64.7 599.4 96.5V150' fill='none' stroke='%23000' stroke-width='1.15'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 150' preserveAspectRatio='none'%3E%3Cpath d='M.6 150V96.5C.6 64.7 92.3 54.7 176.1 36.7C236.2 23.7 282.2 13.7 300 .8C317.8 13.7 363.8 23.7 423.9 36.7C507.7 54.7 599.4 64.7 599.4 96.5V150' fill='none' stroke='%23000' stroke-width='1.15'/%3E%3C/svg%3E") 0 0 / 100% 100% no-repeat;
}

.card__paper::after {
  top: calc(var(--space-sm) + (100cqw - 2 * var(--space-sm)) * 0.25);
  bottom: var(--space-sm);
  border: var(--rule-hair) solid var(--color-card-rule);
  border-top: 0;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.card__body {
  padding: 4rem 1.75rem 2.25rem;
  padding: max(9cqw, 2.5rem) clamp(1.75rem, 8cqw, 3.25rem) clamp(2.25rem, 8cqw, 3.5rem);
}

.card ::selection {
  background: var(--color-gold);
  color: var(--color-gold-ink);
}

.card :focus-visible {
  outline-color: var(--color-focus-card);
}

.card .tbd {
  background: color-mix(in oklab, var(--color-gold) 14%, transparent);
  color: var(--color-gold);
}

.card__mark {
  width: 3.75rem;
  height: auto;
  aspect-ratio: 1;
  margin-inline: auto;
  color: var(--color-gold);
}

.card__title {
  margin-top: var(--space-md);
  text-align: center;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.card__lede {
  margin-top: var(--space-xs);
  text-align: center;
  color: var(--color-paper-2);
}

.form {
  display: grid;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.form__pair {
  display: grid;
  gap: var(--space-lg);
}

@container (min-width: 34rem) {
  .form__pair {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--space-md);
  }
}

.form__more {
  display: grid;
  gap: var(--space-lg);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.form__more[hidden],
.field[hidden],
.thanks[hidden] {
  display: none;
}

.field,
.choice {
  display: grid;
  gap: var(--space-2xs);
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.field__label {
  padding: 0;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--color-paper);
}

.field__opt {
  margin-inline-start: var(--space-xs);
  font-weight: 400;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-paper-2);
}

.field__input {
  width: 100%;
  min-height: 48px;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-card-rule);
  border-radius: var(--radius-sm);
  outline: 2px solid transparent;
  outline-offset: 1px;
  background: var(--color-card-2);
  color: var(--color-paper);
  font-family: var(--font-body);
  font-size: max(16px, var(--text-base));
  line-height: 1.35;
  transition: background-color var(--dur-short) var(--ease-out), border-color var(--dur-short) var(--ease-out);
}

.field__input--area {
  min-height: 6.5rem;
  resize: vertical;
}

select.field__input {
  appearance: none;
  padding-inline-end: var(--space-xl);
}

.select {
  position: relative;
  display: block;
  width: fit-content;
}

.select::after {
  content: "";
  position: absolute;
  top: 50%;
  right: var(--space-md);
  width: var(--space-sm);
  height: var(--space-xs);
  margin-top: calc(var(--space-2xs) * -1);
  background: var(--color-paper);
  pointer-events: none;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23000' stroke-width='1.4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.field--short .field__input {
  width: 7rem;
}

@media (hover: hover) and (pointer: fine) {
  .field__input:hover {
    background-color: color-mix(in oklab, var(--color-card-2) 88%, var(--color-paper));
  }
}

.field__input:focus-visible {
  outline: 2px solid var(--color-focus-card);
  border-color: color-mix(in oklab, var(--color-paper) 55%, transparent);
}

.field__input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.field__msg:empty {
  display: none;
}

.field__msg {
  font-size: var(--text-sm);
  color: var(--color-paper-2);
}

.is-invalid .field__msg {
  color: var(--color-error-card);
}

.is-invalid .field__input {
  border-color: var(--color-error-card);
}

.is-invalid .field__msg::before {
  content: "";
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  margin-inline-end: 0.4em;
  vertical-align: -0.08em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M8 4v5' stroke='%23000' stroke-width='1.8'/%3E%3Ccircle cx='8' cy='11.6' r='1.1'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='7' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3Cpath d='M8 4v5' stroke='%23000' stroke-width='1.8'/%3E%3Ccircle cx='8' cy='11.6' r='1.1'/%3E%3C/svg%3E") center / contain no-repeat;
}

.choice__row,
.choice__col {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin-top: var(--space-2xs);
}

.choice__col {
  flex-direction: column;
  gap: 0;
}

.choice__help {
  font-size: var(--text-sm);
  color: var(--color-paper-2);
}

.opt {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  min-height: 44px;
  cursor: pointer;
}

.opt input {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0;
  accent-color: var(--color-gold);
  cursor: pointer;
}

.opt input:focus-visible {
  outline: 2px solid var(--color-focus-card);
  outline-offset: 2px;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  margin-top: var(--space-xs);
}

.form__status {
  flex: 1 1 14rem;
  font-size: var(--text-sm);
  color: var(--color-paper-2);
}

.form__status[data-tone="error"] {
  color: var(--color-error-card);
}

.thanks {
  margin-top: var(--space-xl);
  outline: none;
}

.thanks__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.15;
}

.thanks__body {
  margin-top: var(--space-sm);
  max-width: 30rem;
  color: var(--color-paper-2);
}

.thanks .link {
  margin-top: var(--space-md);
}

/* ---------------------------------------------------------------- close (Ft6 letter close, at night) */
.close {
  position: relative;
  min-height: 100svh;
  color: var(--color-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: clamp(8rem, 30svh, 16rem);
  padding-bottom: calc(max(var(--land-h) * 0.62, 13.2vw) + var(--space-xl));
  text-align: center;
}

.scene-on .close {
  color: var(--color-paper);
}

.scene-on .close :focus-visible {
  outline-color: var(--color-focus-card);
}

.close__mark {
  color: var(--color-ink);
}

.close__mark {
  width: 4.5rem;
  height: auto;
  aspect-ratio: 1;
}

.scene-on .close__mark {
  color: var(--color-gold);
}

.close__line {
  margin-top: var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.close__sign {
  margin-top: var(--space-sm);
  font-size: var(--text-md);
}

.close__meta {
  margin-top: var(--space-2xs);
  font-size: var(--text-sm);
  color: var(--color-ink-2);
}

.scene-on .close__meta {
  color: var(--color-paper-2);
}

.close__top {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: var(--space-md);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: color-mix(in oklab, currentColor 40%, transparent);
  text-underline-offset: 0.4em;
}

/* ======================================================================== wider screens */
@media (min-width: 40rem) {
  .hero__when {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .hero__dot {
    display: block;
  }

  .hero__actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
  }

  .hero__index {
    width: auto;
    justify-content: flex-end;
    column-gap: var(--space-lg);
  }

  .days {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .day--main {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .routes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flower--6 {
    display: block;
  }
}

@media (min-width: 60rem) {
  .story {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .story__photo {
    width: min(100%, 25rem);
  }

  .days {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr) minmax(0, 1fr);
    gap: var(--space-2xl) clamp(2rem, 4vw, 4rem);
  }

  .day--main {
    grid-column: auto;
    grid-row: auto;
  }

  .travel {
    grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
    align-items: center;
    column-gap: clamp(2rem, 5vw, 5rem);
  }

  .venue__photos {
    justify-self: end;
    width: 100%;
  }

  .routes {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(2rem, 6vw, 6rem);
  }

  .stay {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .stay__photo {
    order: 2;
  }

  .rsvp {
    padding-inline-start: max(var(--gutter), 6vw);
  }

  .flower--3,
  .flower--4 {
    display: block;
  }

  .flower--1 { --fh: 96%; }
  .flower--2 { --fh: 74%; }
  .flower--5 { --fh: 84%; }
  .flower--6 { --fh: 66%; }
}

@media (min-width: 90rem) {
  .flower--1 { --fx: -3%; }
  .flower--2 { --fx: 6%; }
  .flower--3 { --fx: 13.5%; }
  .flower--4 { --fx: 81%; }
  .flower--5 { --fx: 88%; }
  .flower--6 { --fx: 96%; }
}

/* short phones: keep the names, date, place and RSVP above the hills; the section index can wait */
@media (max-width: 40rem) and (max-height: 46rem) {
  :root {
    --land-h: 36svh;
  }

  .hero__index {
    display: none;
  }
}

@media (max-height: 34rem) {
  :root {
    --land-h: 30svh;
  }

  .hero__mark,
  .hero__index {
    display: none;
  }
}

/* ======================================================================== motion */
@media (prefers-reduced-motion: no-preference) {
  .flower svg {
    animation: sway var(--dur-sway) var(--ease-in-out) var(--fd) infinite alternate;
  }

  .js .hero__mark,
  .js .hero__names,
  .js .hero__lede,
  .js .hero__when,
  .js .hero__actions {
    animation: rise 1100ms var(--ease-out) both;
    animation-delay: calc(var(--i) * 110ms + 380ms);
  }

  .js .hero__names { --i: 1; }
  .js .hero__lede { --i: 2; }
  .js .hero__when { --i: 3; }
  .js .hero__actions { --i: 4; }
}

@keyframes sway {
  from {
    transform: rotate(-1.1deg);
  }
  to {
    transform: rotate(1.4deg);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .btn[aria-busy="true"] .btn__spinner {
    animation: spin 1.6s linear infinite !important;
  }
}

@media print {
  .sky,
  .land,
  .veil,
  .bar {
    display: none;
  }
}

[tabindex="-1"]:focus {
  outline: none;
}
