html {
  height: auto;
  overflow: visible;
  overflow-anchor: none;
}

.home-body {
  overflow-x: hidden;
  overflow-y: visible;
  display: block;
  height: auto;
  background: var(--page);
}

:root {
  --sage-deep: color-mix(in srgb, var(--sage) 80%, black);
  --sage-light: color-mix(in srgb, var(--sage) 86%, white);
  --paper-fiber: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='420' height='420'><filter id='f'><feTurbulence type='fractalNoise' baseFrequency='0.09 0.035' numOctaves='3' seed='3' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.3 -0.05'/></filter><rect width='100%25' height='100%25' filter='url(%23f)'/></svg>");
  --ink-red: #b23a2b;
  /* The cream paper of the date-and-time section and the pages after it. */
  --page: #efecdf;
  /* The one paper texture used on every surface. */
  --paper-tex: url("images/paper-texture.png?v=2");
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='matrix' values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- Stage ---------- */

.hero {
  position: relative;
  /* Above the date-and-time section, which it slides away from. */
  z-index: 1;
  /* Room to scroll through the opening and hold on the invitation;
     each moment plays by itself once scroll sets it off (home.js). */
  height: 300vh;
}

.hero-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  /* The same cream paper as the date-and-time section below. */
  background: var(--page);
  display: flex;
  align-items: center;
  justify-content: center;
  /* Clip the card rising from below, but let its shadow fall past the edge. */
  overflow: hidden;
  overflow: clip;
  overflow-clip-margin: 90px;
  isolation: isolate;
}

.hero-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--paper-tex);
  background-size: 512px 512px;
  background-attachment: fixed;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* The green paper the verse is typed on — the same surface as the map.
   It stays behind the card, darkening on scroll so the card stands off it. */
.hero-green {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: var(--olive);
  isolation: isolate;
  pointer-events: none;
}

.hero-green::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--paper-tex);
  background-size: 512px 512px;
  mix-blend-mode: soft-light;
  opacity: 0.8;
}

/* ---------- Opening ---------- */

/* Two moments, as in the reference frames:
   1. On arrival the bars draw down the page and the line fades in, in a gap
      between them: "His perfect time / His perfect doing".
   2. On scroll (home.js renderHero) the line fades, the gap closes, the bars
      draw up to the top and the verse rises slowly into the space beneath. */
.hero-verse {
  --bar: color-mix(in srgb, var(--olive) 72%, #c8dc8a);
  --bars-top: 5.3%;
  --bars-h: 89.4%;
  --settled: 0.7; /* the bars' height once drawn up; matches BARS_SETTLED in home.js */
  position: absolute;
  inset: 0;
  z-index: 6;
  margin: 0;
  font-family: var(--font-type);
  letter-spacing: 0.04em;
  text-align: center;
  text-transform: uppercase;
  color: var(--cream);
  pointer-events: none;
}

.hero-bars {
  position: absolute;
  top: var(--bars-top);
  left: 3.4%;
  right: 3.4%;
  height: var(--bars-h);
  transform-origin: top center;
  will-change: transform;
  /* The bars draw in from the top of the page to the bottom. */
  animation: bars-draw 2.2s cubic-bezier(0.45, 0, 0.2, 1) 0.2s both;
}

@keyframes bars-draw {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* The gap the opening line sits in: a hole cut out of the bars, sized to the
   line by home.js. Scrolling closes it from top and bottom (--hole-k 1 → 0). */
.hero-instrument {
  --hole-w: var(--intro-w, 0px);
  --hole-h: calc(var(--intro-h, 0px) * var(--hole-k, 1));
  width: 100%;
  height: 100%;
  -webkit-mask:
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0) center / var(--hole-w) var(--hole-h) no-repeat;
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0),
    linear-gradient(#000 0 0) center / var(--hole-w) var(--hole-h) no-repeat;
  mask-composite: exclude;
}

/* Bars in a lighter green than the paper, drawn flat and all at once
   (the draw-down above is the only entrance). */
.hero-instrument .stem,
.hero-instrument .flare,
.hero-instrument .thicken {
  background: var(--bar);
  opacity: 1;
  transform: translateX(-50%);
  animation: none;
}

.hero-instrument .stem { width: max(1.25px, 9%); }
.hero-instrument .flare { width: 46%; }
.hero-instrument .thicken { width: 24%; }

/* Phones get one run of the pattern (41 bars) rather than two. */
@media (max-width: 640px) {
  .hero-instrument .column:nth-child(n + 42) {
    display: none;
  }
}

.hero-intro {
  position: absolute;
  top: 50%;
  left: 50%;
  margin: 0;
  /* The padding is the breathing room the bars leave around the line. */
  padding: 0.85em 2.1em;
  transform: translate(-50%, -50%);
  font-size: clamp(0.95rem, 1.45vw, 1.3rem);
  line-height: 1.45;
  white-space: nowrap;
}

/* The line fades in as the bars finish drawing. (The scroll fade-out is set
   on .hero-intro itself, so the two don't fight.) */
.hero-intro__text {
  display: inline-block;
  animation: intro-in 1.4s ease 1.7s both;
}

@keyframes intro-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* The verse, in the space the bars leave below them. Hidden until scrolled. */
.hero-verse__words {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--bars-top) + var(--bars-h) * var(--settled));
  bottom: 0;
  margin: 0;
  padding: 0 1.5rem 3vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.9rem, 1.2vw, 1.15rem);
  line-height: 1.5;
  opacity: 0;
}

.hero-verse__ref {
  display: block;
  margin-top: 1.4em;
  color: var(--bar);
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .hero-bars, .hero-intro__text { animation: none; }
}

/* ---------- Invitation ---------- */

/* Printed straight onto the green paper, inside a border
   of piano-key blocks. Each piece fades up in turn on scroll (home.js). */
.invite {
  --frame: color-mix(in srgb, var(--olive) 72%, #c8dc8a); /* the same green as the opening's bars */
  --sage-ink: color-mix(in srgb, var(--olive) 30%, #d4e0a6);
  position: absolute;
  inset: 0;
  z-index: 1;
  color: var(--cream);
  will-change: transform;
}

.invite__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--frame);
}

.invite__content {
  position: absolute;
  /* Inside the frame, with room to breathe. */
  inset: 12% 10%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--font-type);
  text-transform: uppercase;
}

.invite__piece {
  opacity: 0;
}

.invite__together,
.partner__parents,
.invite-type {
  margin: 0;
  font-size: clamp(0.66rem, min(0.86vw, 1.55vh), 0.95rem);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.invite__together {
  margin-bottom: clamp(2.5rem, 13vh, 9rem);
}

.invite__couple {
  /* As wide as the longer name; the parents sit under its two ends. */
  width: max-content;
  max-width: 100%;
}

.invite__names {
  margin: 0;
  font-family: var(--font-names);
  font-weight: 300;
  font-size: clamp(2rem, min(4.7vw, 8.6vh), 5.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-transform: none;
}

.partner__name {
  display: block;
}

/* First name in cream, the rest in the light sage green. */
.partner__name .name-rest {
  color: var(--sage-ink);
}

.invite__parents {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: clamp(1.4rem, 5.5vh, 3.6rem);
  color: var(--sage-ink);
}

.partner__parents {
  text-align: left;
}

.partner__parents + .partner__parents {
  text-align: right;
}

.invite-type {
  margin-top: clamp(2.5rem, 13vh, 9rem);
}

.invite-type .type-line {
  display: block;
}

@media (max-width: 640px) {
  .invite__content {
    inset: 10% 8%;
  }
  .invite__names {
    font-size: min(10vw, 7vh);
  }
  .invite__parents {
    gap: 1rem;
  }
  .invite__together,
  .partner__parents,
  .invite-type {
    font-size: min(2.7vw, 0.75rem);
  }
}

/* ---------- Hint ---------- */

.hero-hint {
  position: absolute;
  /* In the margin below the bars. */
  bottom: clamp(0.5rem, 1.4vh, 0.9rem);
  left: 0;
  right: 0;
  margin: 0;
  text-align: center;
  font-family: var(--font-type);
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0;
}

/* The hint waits until the verse has been typed. */
.hero-stage.verse-done .hero-hint {
  animation: hint-in 1s ease 0.4s both, hint-bob 2.6s ease-in-out 1.4s infinite;
}

@keyframes hint-in {
  to { opacity: 0.6; }
}

@keyframes hint-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

.hero-stage .hero-hint.is-hidden {
  animation: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ---------- Typing (verse and invitation) ---------- */

.type-line {
  display: block;
  text-wrap: balance;
}

.ch {
  opacity: 0;
  transition: opacity 0.12s linear;
}

.ch.on {
  opacity: 1;
}

.caret {
  position: relative;
  display: inline-block;
  width: 0;
  height: 1em;
  vertical-align: baseline;
}

.caret::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: -0.15em;
  width: 0.5em;
  height: 1.15em;
  background: var(--cream);
  opacity: 0.8;
  animation: caret-blink 1s steps(1) infinite;
}

.caret.is-done::after {
  animation: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

@keyframes caret-blink {
  50% { opacity: 0; }
}

/* ---------- Shared ---------- */

/* Small section headings ("The venue"), styled like "Date and time". */
.section-label {
  margin: 0;
  font-family: var(--font-type);
  font-size: clamp(0.72rem, 0.95vw, 0.95rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.calendar-stage::before,
.route-stage::before,
.rsvp-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("images/paper-texture.png?v=2");
  background-size: 512px 512px;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

/* ---------- 02 · Date and time ---------- */

.calendar-section {
  position: relative;
  /* Only a brief hold once it's in place; it plays by itself on arrival. */
  height: 115vh;
}

.calendar-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--page);
  color: var(--olive);
  isolation: isolate;
}


.calendar-inner {
  width: min(560px, 100%);
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(2rem, 9vh, 6rem);
  text-align: center;
  font-family: var(--font-type);
  text-transform: uppercase;
}

/* Hidden until the section plays (home.js). */
.when-piece {
  opacity: 0;
}

.when-label {
  margin: 0 0 calc(-1 * clamp(0rem, 1.5vh, 1rem));
  /* Same size as the other section headings (.section-label). */
  font-size: clamp(0.72rem, 0.95vw, 0.95rem);
  letter-spacing: 0.04em;
}

.when-date {
  margin: 0;
  font-family: var(--font-names);
  font-weight: 300;
  font-size: clamp(2.1rem, min(3.9vw, 7vh), 4.4rem);
  line-height: 1.32;
  letter-spacing: -0.01em;
  text-transform: none;
  white-space: nowrap;
  /* Figures that sit on the line, as in the design ("20", "2027", "10:30"). */
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}

.when-date__line {
  display: block;
}

@media (max-width: 640px) {
  .when-date {
    font-size: min(9vw, 6vh);
  }
}

.countdown {
  width: min(460px, 100%);
}

/* A row of keys like a keyboard: an even grid of marks, thin lines with
   black keys (half a step wide) between them in groups of 2 and 3. One mark
   plays every second. */
.beat {
  display: grid;
  grid-template-columns: repeat(var(--marks, 60), 1fr);
  align-items: end;
  height: 30px;
  margin-bottom: 1.1rem;
}

.beat span {
  justify-self: center;
  width: 1.25px;
  height: 100%;
  border-radius: 1px;
  background: var(--olive);
  opacity: 0.22;
  transform: scaleY(0.5);
  transform-origin: bottom center;
  transition: opacity 1.4s ease, transform 1.4s ease;
}

.beat span.is-black {
  width: 50%;
}

.beat span.on {
  opacity: 0.95;
  transform: scaleY(1);
  transition-duration: 0.12s;
}

.countdown__units {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.countdown__unit {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 0.45rem;
}

.countdown__unit dd {
  margin: 0;
  font-family: var(--font-names);
  font-weight: 300;
  font-size: clamp(1.9rem, 6vw, 3rem);
  line-height: 1;
  text-transform: none;
  font-variant-numeric: tabular-nums;
}

.countdown__unit dt {
  font-size: 0.6rem;
  letter-spacing: 0.24em;
  opacity: 0.75;
}

.ceremony {
  margin: 0;
  font-size: clamp(0.64rem, 1.6vw, 0.74rem);
  letter-spacing: 0.1em;
  line-height: 1.9;
}

.ceremony__line {
  display: block;
  opacity: 0.8;
}

.ceremony__place {
  display: block;
  margin-top: 0.3em;
  font-weight: 700;
}

/* ---------- 03 · The route ---------- */

.route-section {
  position: relative;
  /* A short hold: the map plays itself once it pins. */
  height: 180vh;
}

.route-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 2vh, 1.4rem);
  background: var(--olive);
  color: var(--cream);
  isolation: isolate;
}

.route-stage::before {
  opacity: 0.8;
}

/* The streets around the venue, drawn straight onto the olive, fading at the edges. */
.route-map {
  width: min(1200px, 100%);
  height: clamp(300px, 58vh, 660px);
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 45%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 45%, transparent 100%);
}

.route-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.map path {
  fill: none;
  stroke: var(--cream);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.map-river path   { stroke: var(--sage); stroke-width: 84; opacity: 0.55; }
.map-lane path    { stroke-width: 3; opacity: 0.22; }
.map-street path  { stroke-width: 6; opacity: 0.36; }
.map-main path    { stroke-width: 11; opacity: 0.5; }
.map-highway path { stroke-width: 30; opacity: 0.42; }
.map-approach path { stroke-width: 11; opacity: 0.95; }

/* Lane markings down the middle of the highway. */
.map-highway path.map-highway__line {
  stroke: var(--olive);
  stroke-width: 2.5;
  stroke-dasharray: 16 14;
  opacity: 1;
}

.map-labels text {
  font-family: var(--font-type);
  font-size: 22px;
  letter-spacing: 4px;
  text-transform: uppercase;
  fill: var(--cream);
  opacity: 0.55;
}

/* The pin, tip at the venue. */
.route-pin {
  opacity: 0;
}

.route-pin__body {
  fill: var(--cream);
}

.route-pin__dot {
  fill: var(--olive);
}

.route-pin__shadow {
  fill: rgba(20, 26, 12, 0.35);
}

.route-pin__ring {
  fill: none;
  stroke: var(--cream);
  stroke-width: 2.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.route-pin__ring.is-on {
  animation: pin-pulse 2.4s ease-out infinite;
}

@keyframes pin-pulse {
  0%   { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(2.4); opacity: 0; }
}

.route-text {
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-align: center;
  opacity: 0;
}

.route-name {
  margin: 0.2rem 0 0;
  font-family: var(--font-names);
  font-weight: 300;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 1.05;
  text-wrap: balance;
}

.route-address {
  margin: 0;
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cream-dim);
}

.route-button {
  margin-top: 1.4rem;
  padding: 1em 1.7em;
  border: 1px solid var(--cream-dim);
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.route-button:hover {
  background: var(--cream);
  color: var(--olive);
}

.route-button:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
}

/* ---------- Where to stay (popup from the venue) ---------- */

.route-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.route-actions .route-button { margin-top: 0; background: none; cursor: pointer; }
.route-actions .route-button[hidden] { display: none; }

.stay-dialog {
  width: min(1160px, calc(100% - 2rem));
  height: calc(100dvh - 2rem);
  max-width: none;
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: var(--page);
  color: var(--olive);
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 30px 80px -30px rgba(20, 26, 12, 0.6);
}

.stay-dialog::backdrop {
  background: rgba(30, 36, 22, 0.6);
  backdrop-filter: blur(4px);
}

.stay-dialog[open] { animation: sheet-in 0.36s cubic-bezier(0.2, 0.8, 0.2, 1); }

.stay-dialog__close {
  position: sticky;
  top: 0.8rem;
  float: right;
  margin: 0.8rem 0.8rem 0 0;
}

.stay-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(2.5rem, 7vh, 4rem) clamp(1rem, 3vw, 2rem) 2.5rem;
}

.stay-head { text-align: center; }

.stay-heading {
  margin: 0.5rem 0 0;
  font-family: var(--font-names);
  font-weight: 300;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  line-height: 1.05;
  text-wrap: balance;
}

.stay-note {
  max-width: 34rem;
  margin: 1rem auto 0;
  font-family: var(--font-type);
  font-size: 0.82rem;
  line-height: 1.7;
  letter-spacing: 0.02em;
  text-wrap: pretty;
  opacity: 0.85;
}

.stay-tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin: 2.4rem 0 1.6rem;
}

.stay-sort {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.stay-sort button {
  padding: 0.65em 1.1em;
  border: 1px solid rgba(75, 87, 54, 0.35);
  border-radius: 999px;
  background: transparent;
  color: var(--olive);
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.stay-sort button:hover { border-color: var(--olive); }
.stay-sort button[aria-pressed="true"] { background: var(--olive); border-color: var(--olive); color: var(--cream); }
.stay-sort button:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

.stay-dates {
  margin: 0;
  font-family: var(--font-type);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.stay-sort[hidden], .stay-sort [hidden] { display: none; }

.stay-tools[hidden], .stay-empty[hidden], .stay-more[hidden], .stay-credit[hidden] { display: none; }

.stay-empty {
  margin: 3rem auto 2rem;
  max-width: 28rem;
  text-align: center;
  font-family: var(--font-type);
  font-size: 0.86rem;
  line-height: 1.7;
  opacity: 0.8;
}

.stay-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.1rem;
}

.stay-card__open {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--cream);
  color: var(--olive);
  text-align: left;
  font: inherit;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(75, 87, 54, 0.12), 0 10px 28px -18px rgba(40, 48, 28, 0.45);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.stay-card__open:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(75, 87, 54, 0.12), 0 18px 34px -18px rgba(40, 48, 28, 0.55); }
.stay-card__open:focus-visible { outline: 2px solid var(--olive); outline-offset: 3px; }

.stay-card__photo {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  background: color-mix(in srgb, var(--sage) 30%, var(--page));
  overflow: hidden;
}

.stay-card__photo img,
.stay-sheet__photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.stay-card__initial {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: grid;
  place-items: center;
  font-family: var(--font-names);
  font-weight: 300;
  font-size: 3.4rem;
  color: var(--cream);
  background: var(--sage);
}

.stay-card__badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.45em 0.8em;
  border-radius: 999px;
  background: var(--olive);
  color: var(--cream);
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.stay-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 1.1rem 1.2rem;
}

.stay-card__type,
.stay-sheet__type {
  font-family: var(--font-type);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.65;
}

.stay-card__name {
  font-family: var(--font-names);
  font-weight: 300;
  font-size: 1.45rem;
  line-height: 1.12;
  text-wrap: balance;
}

.stay-card__meta {
  font-family: var(--font-type);
  font-size: 0.74rem;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

.stay-card__note {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(75, 87, 54, 0.3);
  font-family: var(--font-type);
  font-size: 0.72rem;
  line-height: 1.55;
}

.stay-more {
  display: block;
  margin: 1.8rem auto 0;
  padding: 1em 1.7em;
  border: 1px solid var(--olive);
  border-radius: 999px;
  background: transparent;
  color: var(--olive);
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.stay-more:hover { background: var(--olive); color: var(--cream); }

.stay-credit {
  margin: 2rem 0 0;
  text-align: center;
  font-family: var(--font-type);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  opacity: 0.6;
}

.stay-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.5rem;
  margin-top: 0.2rem;
  font-family: var(--font-type);
  font-size: 0.74rem;
}

.stay-card__price strong { font-size: 1.05rem; font-weight: 700; }

.stay-card__perk,
.stay-prices__perk {
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--olive) 70%, var(--sage));
}

.stay-prices {
  margin: 0.4rem 0 0.2rem;
  padding: 0.9rem 1rem 0.8rem;
  border: 1px solid rgba(75, 87, 54, 0.18);
  border-radius: 12px;
}

.stay-prices[hidden] { display: none; }

.stay-prices__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-type);
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.7;
}

.stay-prices__list { list-style: none; margin: 0; padding: 0; }

.stay-prices__row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.55rem 0.2rem;
  border-top: 1px solid rgba(75, 87, 54, 0.12);
  color: var(--olive);
  text-decoration: none;
  font-family: var(--font-type);
  font-size: 0.8rem;
}

li:first-child > .stay-prices__row { border-top: 0; }
a.stay-prices__row:hover { background: color-mix(in srgb, var(--sage) 12%, var(--cream)); }
a.stay-prices__row:hover .stay-prices__amount::after { content: " ↗"; }
.stay-prices__source { flex: 1; min-width: 0; }
.stay-prices__amount { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }

.stay-prices__big {
  margin: 0;
  font-family: var(--font-type);
  font-size: 0.82rem;
}

.stay-prices__big strong { font-size: 1.2rem; }

.stay-prices__total {
  margin: 0.5rem 0 0;
  font-family: var(--font-type);
  font-size: 0.66rem;
  line-height: 1.5;
  opacity: 0.7;
}

/* Details sheet: a centred card on wide screens, a bottom sheet on phones. */
html.sheet-open { overflow: hidden; }

.stay-sheet {
  width: min(640px, calc(100% - 2rem));
  max-height: calc(100dvh - 3rem);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--cream);
  color: var(--olive);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(20, 26, 12, 0.6);
}

.stay-sheet::backdrop {
  background: rgba(30, 36, 22, 0.55);
  backdrop-filter: blur(3px);
}

.stay-sheet[open] { animation: sheet-in 0.32s cubic-bezier(0.2, 0.8, 0.2, 1); }

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
}

.stay-sheet__inner {
  position: relative;
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.stay-sheet__close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 50%;
  background: rgba(250, 248, 240, 0.92);
  color: var(--olive);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.stay-sheet__photos {
  display: flex;
  aspect-ratio: 16 / 10;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  background: color-mix(in srgb, var(--sage) 30%, var(--page));
}

.stay-sheet__photos::-webkit-scrollbar { display: none; }
.stay-sheet__photos > * { flex: 0 0 100%; scroll-snap-align: start; }

.stay-sheet__body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.4rem 1.5rem 1.6rem;
}

.stay-sheet__name {
  margin: 0;
  font-family: var(--font-names);
  font-weight: 300;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.05;
}

.stay-sheet__meta,
.stay-sheet__address {
  margin: 0;
  font-family: var(--font-type);
  font-size: 0.78rem;
  line-height: 1.6;
}

.stay-sheet__address { opacity: 0.75; }

.stay-sheet__note {
  margin: 0.3rem 0;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--sage) 18%, var(--cream));
  font-family: var(--font-type);
  font-size: 0.78rem;
  line-height: 1.6;
}

.stay-sheet__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.stay-btn {
  padding: 0.95em 1.3em;
  border: 1px solid rgba(75, 87, 54, 0.4);
  border-radius: 999px;
  color: var(--olive);
  text-decoration: none;
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease;
}

.stay-btn:hover { background: color-mix(in srgb, var(--sage) 16%, var(--cream)); }
.stay-btn--primary { flex-basis: 100%; text-align: center; background: var(--olive); border-color: var(--olive); color: var(--cream); }
.stay-btn--primary:hover { background: color-mix(in srgb, var(--olive) 85%, black); }

.stay-sheet__credit {
  margin: 0.8rem 0 0;
  font-family: var(--font-type);
  font-size: 0.6rem;
  line-height: 1.6;
  opacity: 0.6;
}

.stay-sheet__credit a { color: inherit; }

@media (max-width: 640px) {
  .stay-dialog {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }
  .stay-sheet {
    width: 100%;
    max-width: none;
    margin: auto 0 0;
    border-radius: 18px 18px 0 0;
  }
  .stay-sheet[open] { animation-name: sheet-up; }
  @keyframes sheet-up { from { transform: translateY(40%); opacity: 0.4; } }
}

@media (prefers-reduced-motion: reduce) {
  .stay-card__open, .stay-sheet[open] { transition: none; animation: none; }
}

/* ---------- 04 · RSVP ---------- */

/* The green paper of the invitation, with a short form that opens one
   question at a time (home.js). */
.rsvp-section {
  --sage-ink: color-mix(in srgb, var(--olive) 30%, #d4e0a6);
  --line: color-mix(in srgb, var(--cream) 45%, transparent);
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(14vh, 6rem) 12% max(14vh, 6rem);
  background: var(--olive);
  color: var(--cream);
  isolation: isolate;
}

.rsvp-section::before {
  opacity: 0.8;
}

.rsvp-inner {
  width: min(460px, 100%);
  text-align: center;
}

.rsvp-piece {
  opacity: 0;
}

.rsvp-heading {
  margin: 0;
  font-family: var(--font-names);
  font-weight: 300;
  font-size: clamp(2.4rem, min(4.7vw, 8.6vh), 4.6rem);
  line-height: 1.1;
}

.rsvp-note {
  margin: 0.9rem 0 clamp(2.4rem, 7vh, 4rem);
  font-family: var(--font-type);
  font-size: clamp(0.68rem, 0.86vw, 0.9rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sage-ink);
}

.rsvp-form {
  display: grid;
}

.rsvp-form[hidden] {
  display: none;
}

/* A question that opens smoothly when its turn comes. */
.rsvp-step {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

.rsvp-step.is-on {
  grid-template-rows: 1fr;
  opacity: 1;
}

.rsvp-step__in {
  min-height: 0;
  overflow: hidden;
}

.rsvp-step.is-on .rsvp-step__in {
  /* Room between questions, and for focus rings. */
  padding: 0.4rem 0.25rem 1.6rem;
}

.field {
  display: grid;
  gap: 0.55rem;
}

.field__label {
  font-family: var(--font-type);
  font-size: clamp(0.68rem, 0.86vw, 0.9rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sage-ink);
}

.field__label em {
  font-style: normal;
  opacity: 0.75;
}

.field__input {
  width: 100%;
  padding: 0.5rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--font-type);
  font-size: 1rem;
  text-align: center;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.field__input:focus {
  border-bottom-color: var(--cream);
  box-shadow: 0 1px 0 var(--cream);
}

.field__input[aria-invalid="true"] {
  border-bottom-color: #e7a08f;
  box-shadow: 0 1px 0 #e7a08f;
}

textarea.field__input {
  resize: vertical;
  min-height: 3.4rem;
  line-height: 1.6;
}

/* Choices sit side by side. */
.choice {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.choice legend {
  width: 100%;
  padding: 0;
  margin-bottom: 0.9rem;
}

.choice__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 2rem;
}

.choice__row--count {
  gap: 0.8rem 1.4rem;
}

.choice__option {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-type);
  font-size: 0.86rem;
  text-transform: uppercase;
  cursor: pointer;
}

.choice__option input {
  appearance: none;
  flex: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid var(--cream);
  border-radius: 50%;
  display: grid;
  place-content: center;
  cursor: pointer;
}

.choice__option input::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cream);
  transform: scale(0);
  transition: transform 0.2s ease;
}

.choice__option input:checked::before {
  transform: scale(1);
}

.choice__option input:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 3px;
}

.choice[aria-invalid="true"] .choice__option input {
  border-color: #e7a08f;
}

/* Honeypot for bots — never shown. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.rsvp-submit {
  padding: 1.05em 2.6em;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  color: var(--olive);
  font-family: var(--font-type);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.rsvp-submit:hover {
  background: color-mix(in srgb, var(--cream) 86%, var(--olive));
}

.rsvp-submit:focus-visible {
  outline: 2px solid var(--cream);
  outline-offset: 4px;
}

.rsvp-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.rsvp-status {
  min-height: 1.4em;
  margin: 0;
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.rsvp-status.is-error {
  color: #f0b3a5;
}

.rsvp-thanks p {
  margin: 0;
  font-family: var(--font-names);
  font-weight: 300;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.25;
}

/* Phones: keep each set of choices on one line. */
@media (max-width: 640px) {
  .rsvp-section {
    padding-left: 7%;
    padding-right: 7%;
  }
  .choice__row,
  .choice__row--count {
    flex-wrap: nowrap;
    gap: 0.9rem;
  }
  .choice__option {
    gap: 0.4rem;
    font-size: 0.66rem;
    white-space: nowrap;
  }
  .choice__option input {
    width: 15px;
    height: 15px;
  }
  .choice__option input::before {
    width: 7px;
    height: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rsvp-step { transition: none; }
}
