/* The Gratitude Table — Thanksgiving · contract v3 curated theme.
 * Warm editorial serif invitation told as a table being set. The platform
 * blocks are the content; this sheet places and dresses them, and the
 * .gratitude-js runtime class gates the few JS-only flourishes (reveals,
 * the place-card welcome, candle light) so the page is fully legible
 * without the runtime and under prefers-reduced-motion. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/fraunces-roman-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/fraunces-italic-latin.woff2") format("woff2");
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

/* The palette lives on .gratitude, so the page shell repeats the paper tone
 * literally to keep the margins and overscroll from flashing white. */
html {
  background: #f4eddc;
}

.gratitude {
  --paper: #f4eddc;
  --paper-deep: #e8dcc0;
  --paper-shadow: #d9c9a6;
  --ink: #2d231f;
  --ink-soft: #54453d;
  --oxblood: #6e1e2b;
  --oxblood-deep: #4b131c;
  --chestnut: #8a5a3b;
  --persimmon: #c96f4a;
  --olive: #6b6f52;
  --olive-deep: #50543c;
  --brass: #b08d57;
  --brass-soft: rgba(176, 141, 87, 0.55);
  --plum: #241a1f;
  --plum-deep: #1a1216;
  --ivory: #f6f0e2;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-label: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.gratitude *,
.gratitude *::before,
.gratitude *::after {
  box-sizing: border-box;
}

.gratitude a {
  color: var(--oxblood);
}

.gratitude img {
  max-width: 100%;
}

.gratitude :focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

.gratitude__skip-link {
  position: fixed;
  top: 0.8rem;
  left: 0.8rem;
  z-index: 400;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: var(--ivory);
  box-shadow: 0 4px 16px rgba(26, 18, 22, 0.25);
  color: var(--oxblood);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}

.gratitude__skip-link:focus {
  transform: translateY(0);
}

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

.gratitude__grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  filter: url("#gratitude-grain");
}

/* ------------------------------------------------------------------ */
/* Shared course machinery: the table runner and its numbered plates   */
/* ------------------------------------------------------------------ */

.gratitude__course {
  position: relative;
  max-width: 36rem;
  margin-inline: auto;
  padding: 5.5rem 1.5rem 5.5rem 4rem;
}

/* The runner: one continuous vertical rule, grown course by course. The
 * base line is always present; the fill (::after) scales in on reveal, so
 * without the runtime or under reduced motion the whole runner is there. */
.gratitude__course::before,
.gratitude__course::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 1rem;
  width: 2px;
  border-radius: 1px;
}

.gratitude__course::before {
  background: linear-gradient(to bottom, transparent 0.5rem, var(--paper-shadow) 0.5rem, var(--paper-shadow) calc(100% - 0.5rem), transparent calc(100% - 0.5rem));
}

.gratitude__course::after {
  background: linear-gradient(to bottom, var(--brass), var(--oxblood));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.9s var(--ease-out);
}

.gratitude-js .gratitude__course.is-revealed::after {
  transform: scaleY(1);
}

/* Centered on the runner's 1rem line: the runner is 2px wide, so its center
 * sits at 1rem + 1px, and a 2.4rem plate wants left -0.15rem. The plate is a
 * porcelain disc with its own opaque ground — never the page tone behind it —
 * and sits above the runner, which would otherwise paint through it. */
.gratitude__plate {
  position: absolute;
  z-index: 1;
  top: 4.75rem;
  left: -0.15rem;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid var(--brass);
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: 0 2px 8px rgba(26, 18, 22, 0.18);
}

.gratitude__plate-number {
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--oxblood);
}

/* The runner is a vine: it sprouts at the first course and tapers off
 * below the last. Centered on the runner's 1rem line. */
.gratitude__vine {
  position: absolute;
  left: 0.3rem;
  width: 1.5rem;
  pointer-events: none;
}

.gratitude__vine--start {
  top: 0.9rem;
  color: var(--olive);
}

.gratitude__vine--end {
  bottom: 1.1rem;
  left: max(0.3rem, calc(50% - 17.7rem));
  color: var(--brass);
  opacity: 0.8;
  transform: scaleY(-1);
}

.gratitude__head {
  margin-bottom: 2.4rem;
}

.gratitude__kicker {
  margin: 0 0 0.7rem;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.gratitude__heading {
  margin: 0;
  max-width: 24ch;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: clamp(2.05rem, 7.2vw, 3.1rem);
  font-weight: 560;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

/* JS-only staged reveals — everything stays visible without the runtime
 * or under reduced motion. `translate` (not `transform`) so the gallery
 * item rotations below can compose with the reveal motion. */
.gratitude-js [data-gratitude-reveal],
.gratitude-js .story__introduction,
.gratitude-js .story__milestone,
.gratitude-js .event-schedule__event,
.gratitude-js .wedding-party__person,
.gratitude-js .gallery__item,
.gratitude-js .guest-information__faq,
.gratitude-js .guest-information__travel-item,
.gratitude-js .guest-information__gift,
.gratitude-js .rsvp-widget,
.gratitude-js .gratitude__coda {
  opacity: 0;
  translate: 0 16px;
  transition: opacity 0.7s var(--ease-out), translate 0.7s var(--ease-out);
}

.gratitude-js [data-gratitude-reveal].is-revealed,
.gratitude-js .is-revealed {
  opacity: 1;
  translate: 0 0;
}

/* ------------------------------------------------------------------ */
/* i · Hero — a seat is saved for you                                  */
/* ------------------------------------------------------------------ */

.gratitude__hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: var(--ivory);
}

.gratitude__hero .hero {
  /* Let the platform cover image use the whole opening scene, rather than
   * shrinking it to the copy column. The copy itself stays above the scrim. */
  position: static;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  padding: 7.5rem 1.5rem 0;
}

.gratitude__hero .hero > :not(.hero__cover-photo) {
  position: relative;
  z-index: 2;
}

.gratitude__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to top, rgba(26, 18, 22, 0.88) 0%, rgba(26, 18, 22, 0.42) 34%, rgba(26, 18, 22, 0.14) 62%, rgba(26, 18, 22, 0.3) 100%),
    linear-gradient(to bottom, rgba(36, 26, 31, 0.35), transparent 30%);
}

.gratitude__hero .hero__cover-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.gratitude__hero .hero__eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(246, 240, 226, 0.82);
}

.gratitude__hero .hero__names {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 460;
  font-variation-settings: "SOFT" 50, "WONK" 1;
  font-size: clamp(2.35rem, 9.5vw, 4.1rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 2px 24px rgba(26, 18, 22, 0.55);
}

.gratitude__hero .hero__separator {
  font-style: italic;
  font-weight: 300;
  opacity: 0.85;
}

.gratitude__hero .hero__date {
  margin-top: 1.05rem;
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(246, 240, 226, 0.9);
  text-shadow: 0 1px 10px rgba(26, 18, 22, 0.6);
}

.gratitude__hero .hero__welcome {
  margin: 0.9rem 0 0;
  max-width: 30rem;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-style: italic;
  line-height: 1.5;
  color: rgba(246, 240, 226, 0.85);
  text-shadow: 0 1px 10px rgba(26, 18, 22, 0.55);
}

/* The setting: candle, folded napkin, and one saved place card. Sits above
 * the hero's gradient scrim (::after), which would otherwise swallow its
 * clicks. */
.gratitude__setting {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  padding: 2.6rem 1.5rem 2.9rem;
}

.gratitude__setting-scene {
  position: relative;
  height: 8.6rem;
}

.gratitude__candle {
  position: absolute;
  left: 0.4rem;
  bottom: 0.7rem;
  width: 2.3rem;
  color: var(--brass);
  transition: color 1s var(--ease-out), filter 1s var(--ease-out);
}

.gratitude__napkin {
  position: absolute;
  left: 3.1rem;
  bottom: 0.85rem;
  width: 2.6rem;
  height: 2.6rem;
  background: linear-gradient(135deg, var(--oxblood), var(--oxblood-deep));
  border-radius: 0.35rem 0.35rem 0.9rem 0.9rem;
  transform: rotate(-4deg);
  box-shadow: 0 3px 10px rgba(26, 18, 22, 0.45);
}

.gratitude__placecard {
  position: absolute;
  right: 0.2rem;
  bottom: 0.55rem;
  width: 10.4rem;
  height: 6.6rem;
  perspective: 900px;
}

.gratitude__placecard-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.9rem;
  background: var(--ivory);
  border-radius: 0.4rem;
  box-shadow: 0 6px 18px rgba(26, 18, 22, 0.5);
  backface-visibility: hidden;
  transition: transform 0.9s var(--ease-out);
}

.gratitude__placecard-face--front::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid var(--brass-soft);
  border-radius: 0.25rem;
  pointer-events: none;
}

.gratitude__placecard-face--back {
  transform: rotateY(180deg);
  background: var(--oxblood);
  color: var(--ivory);
}

.gratitude__placecard-face--back::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid rgba(246, 240, 226, 0.45);
  border-radius: 0.25rem;
}

.gratitude__placecard-word {
  position: relative;
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--chestnut);
}

.gratitude__placecard-word--name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-style: italic;
  font-size: 1.45rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--oxblood);
}

.gratitude__placecard-face--back .gratitude__placecard-word--name {
  color: var(--ivory);
}

.gratitude__setting.is-seated .gratitude__placecard-face--front {
  transform: rotateY(180deg);
}

.gratitude__setting.is-seated .gratitude__placecard-face--back {
  transform: rotateY(360deg);
}

/* Candle glow — restrained, never a bloom */
.gratitude__setting.is-seated .gratitude__candle {
  color: var(--persimmon);
  filter: drop-shadow(0 0 10px rgba(201, 111, 74, 0.55));
}

.gratitude__seat-button {
  margin-top: 0.9rem;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border: 1px solid rgba(246, 240, 226, 0.6);
  border-radius: 999px;
  background: rgba(26, 18, 22, 0.35);
  color: var(--ivory);
  font-family: var(--font-label);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.3s var(--ease-out), opacity 0.4s var(--ease-out), visibility 0.4s var(--ease-out);
}

.gratitude__seat-button:hover {
  background: rgba(201, 111, 74, 0.45);
  border-color: var(--persimmon);
}

.gratitude__seat-button:active {
  transform: translateY(1px);
}

.gratitude__cue {
  position: absolute;
  right: 1.5rem;
  bottom: 1.1rem;
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.95rem;
  color: rgba(246, 240, 226, 0.55);
  transition: opacity 0.5s var(--ease-out), visibility 0.5s var(--ease-out);
}

/* Once the guest is seated, the offer and its cue have done their job. */
.gratitude__setting.is-seated .gratitude__seat-button,
.gratitude__setting.is-seated .gratitude__cue {
  opacity: 0;
  visibility: hidden;
}

/* ------------------------------------------------------------------ */
/* ii · Story — recipe cards and keepsakes                             */
/* ------------------------------------------------------------------ */

.gratitude__story .story__introduction {
  margin: 0 0 2.6rem;
  padding: 1.7rem 1.6rem;
  background: var(--paper-deep);
  border: 1px solid var(--paper-shadow);
  border-radius: 255px 18px 225px 18px / 18px 225px 18px 255px;
  box-shadow: 0 8px 22px rgba(93, 70, 45, 0.14);
  font-size: 1.12rem;
  font-style: italic;
  line-height: 1.62;
  color: var(--ink-soft);
}

.gratitude__story .story__introduction p {
  margin: 0;
}

.gratitude__story .story__milestones {
  display: grid;
  gap: 3.2rem;
}

.gratitude__story .story__milestone {
  position: relative;
  display: grid;
  gap: 1.1rem;
}

.gratitude__story .story__milestone:nth-child(odd) .story__milestone-photo {
  transform: rotate(-1.4deg);
}

.gratitude__story .story__milestone:nth-child(even) .story__milestone-photo {
  transform: rotate(1.1deg);
}

.gratitude__story .story__milestone-photo {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 6px solid var(--ivory);
  border-bottom-width: 26px;
  border-radius: 0.25rem;
  box-shadow: 0 10px 26px rgba(93, 70, 45, 0.28);
  background: var(--ivory);
  transition: transform 0.5s var(--ease-out);
}

.gratitude__story .story__milestone:hover .story__milestone-photo {
  transform: rotate(0deg) scale(1.012);
}

.gratitude__story .story__milestone-date {
  margin-top: 0.4rem;
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--chestnut);
}

.gratitude__story .story__milestone-title {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-size: 1.7rem;
  line-height: 1.12;
  color: var(--ink);
}

.gratitude__story .story__milestone-description {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.66;
  color: var(--ink-soft);
}

.gratitude__story .story__milestone-description p {
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* iii · Countdown — the engraved serving plate                        */
/* ------------------------------------------------------------------ */

.gratitude__countdown .countdown {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 17rem;
  margin-inline: auto;
  padding: 2.9rem;
  border: 1px solid var(--brass);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(176, 141, 87, 0.12), transparent 60%),
    var(--paper-deep);
  box-shadow:
    inset 0 0 0 6px var(--paper),
    inset 0 0 0 7px var(--brass-soft),
    0 14px 34px rgba(93, 70, 45, 0.18);
}

.gratitude__countdown .countdown::after {
  content: "gathered under one roof";
  position: absolute;
  bottom: -2.15rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--oxblood);
  white-space: nowrap;
}

.gratitude__countdown .countdown__remaining {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-variation-settings: "SOFT" 30;
  font-size: clamp(1.25rem, 5vw, 1.85rem);
  line-height: 1.2;
  text-wrap: balance;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
  text-align: center;
  color: var(--oxblood);
}

.gratitude__countdown .countdown__remaining--source {
  display: none;
}

.gratitude-countdown__units {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 1.1rem;
}

.gratitude-countdown__unit {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
}

.gratitude-countdown__value {
  color: var(--oxblood);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-variation-settings: "SOFT" 30;
  font-size: clamp(1.35rem, 5.2vw, 1.9rem);
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}

.gratitude-countdown__value.is-changing {
  animation: gratitude-countdown-tick 0.5s var(--ease-out) both;
}

@keyframes gratitude-countdown-tick {
  0% {
    opacity: 0.5;
  }

  100% {
    opacity: 1;
  }
}

.gratitude-countdown__label {
  color: var(--chestnut);
  font-family: var(--font-label);
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gratitude-countdown__status {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 500;
  font-variation-settings: "SOFT" 30;
  font-size: clamp(1.25rem, 5vw, 1.85rem);
  line-height: 1.2;
  text-wrap: balance;
  text-align: center;
  color: var(--oxblood);
}

/* ------------------------------------------------------------------ */
/* iv · Events — the menu                                              */
/* ------------------------------------------------------------------ */

.gratitude__events .event-schedule {
  display: grid;
  gap: 2.6rem;
}

.gratitude__events .event-schedule__event {
  position: relative;
  padding-bottom: 2.6rem;
}

.gratitude__events .event-schedule__event::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  border-bottom: 1px dashed var(--paper-shadow);
}

.gratitude__events .event-schedule__event:last-child::after {
  display: none;
}

.gratitude__events .event-schedule__title {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-size: 1.45rem;
  line-height: 1.15;
  color: var(--ink);
}

.gratitude__events .event-schedule__time {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 480;
  font-size: 1.15rem;
  line-height: 1.35;
  color: var(--oxblood);
}

/* The dash between the two <time> elements is platform markup for an inline
 * range; this menu stacks the times and says "until" in words instead. */
.gratitude__events .event-schedule__time-separator {
  display: none;
}

.gratitude__events .event-schedule__time-separator + .event-schedule__time {
  margin-top: 0.15rem;
  font-size: 0.98rem;
  color: var(--chestnut);
}

.gratitude__events .event-schedule__time-separator + .event-schedule__time::before {
  content: "until ";
}

.gratitude__events .event-schedule__location {
  margin-top: 0.9rem;
  border-left: 2px solid var(--brass-soft);
  padding-left: 0.85rem;
}

.gratitude__events .event-schedule__venue,
.gratitude__events .event-schedule__address {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.gratitude__events .event-schedule__venue {
  font-weight: 600;
  color: var(--ink);
}

.gratitude__events .event-schedule__address {
  color: var(--ink-soft);
}

.gratitude__events .event-schedule__directions {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.3rem;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--brass-soft);
  text-underline-offset: 4px;
  color: var(--oxblood);
}

.gratitude__events .event-schedule__dress-code {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.gratitude__events .event-schedule__dress-code span {
  display: inline-block;
  margin-right: 0.4rem;
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--chestnut);
}

.gratitude__events .event-schedule__description {
  margin-top: 0.8rem;
  font-size: 0.96rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--ink-soft);
}

.gratitude__events .event-schedule__description p {
  margin: 0;
}

/* ------------------------------------------------------------------ */
/* v · Wedding party — place settings, not avatars                     */
/* ------------------------------------------------------------------ */

/* ------------------------------------------------------------------ */
/* ii · Couple — the two who set the table                             */
/* ------------------------------------------------------------------ */

.gratitude__couple .couple {
  display: grid;
  gap: 3rem;
}

.gratitude__couple .couple__partner {
  display: grid;
  gap: 0.85rem;
}

.gratitude__couple .couple__partner:nth-child(odd) .couple__portrait {
  transform: rotate(-1.4deg);
}

.gratitude__couple .couple__partner:nth-child(even) .couple__portrait {
  transform: rotate(1.5deg);
}

.gratitude__couple .couple__portrait {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 6px solid var(--ivory);
  border-radius: 0.3rem;
  box-shadow: 0 10px 26px rgba(93, 70, 45, 0.26);
  background: var(--ivory);
  transition: transform 0.5s var(--ease-out);
}

.gratitude__couple .couple__partner:hover .couple__portrait {
  transform: rotate(0deg) scale(1.01);
}

.gratitude__couple .couple__name {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 540;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  line-height: 1.1;
  color: var(--ink);
}

.gratitude__couple .couple__label {
  margin: 0.2rem 0 0;
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.gratitude__couple .couple__bio {
  margin: 0.55rem 0 0;
  max-width: 28rem;
  font-size: 0.97rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.gratitude__couple .couple__bio > :first-child { margin-top: 0; }
.gratitude__couple .couple__bio > :last-child { margin-bottom: 0; }

@media (min-width: 46rem) {
  .gratitude__couple .couple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.5rem;
  }
}

.gratitude__party .wedding-party {
  display: grid;
  gap: 3rem;
}

.gratitude__party .wedding-party__person {
  display: grid;
  gap: 0.85rem;
}

.gratitude__party .wedding-party__person:nth-child(odd) .wedding-party__photo {
  transform: rotate(-1.6deg);
}

.gratitude__party .wedding-party__person:nth-child(even) .wedding-party__photo {
  transform: rotate(1.3deg);
}

.gratitude__party .wedding-party__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 6px solid var(--ivory);
  border-radius: 0.3rem;
  box-shadow: 0 10px 26px rgba(93, 70, 45, 0.26);
  background: var(--ivory);
  transition: transform 0.5s var(--ease-out);
}

.gratitude__party .wedding-party__person:hover .wedding-party__photo {
  transform: rotate(0deg) scale(1.01);
}

.gratitude__party .wedding-party__name {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 540;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-size: 1.5rem;
  line-height: 1.1;
  color: var(--ink);
}

.gratitude__party .wedding-party__role {
  margin: 0.2rem 0 0;
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--oxblood);
}

.gratitude__party .wedding-party__group {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-style: italic;
  color: var(--chestnut);
}

.gratitude__party .wedding-party__bio {
  margin: 0.55rem 0 0;
  max-width: 26rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------------ */
/* vi · Gallery — loose prints on the table                            */
/* ------------------------------------------------------------------ */

.gratitude__gallery .gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: start;
}

.gratitude__gallery .gallery__item {
  position: relative;
  margin: 0;
  padding: 0.55rem 0.55rem 0.4rem;
  background: var(--ivory);
  border: 1px solid var(--paper-shadow);
  border-radius: 0.22rem;
  box-shadow: 0 8px 20px rgba(93, 70, 45, 0.2);
  cursor: zoom-in;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}

.gratitude__gallery .gallery__item:nth-child(3n + 1) {
  transform: rotate(-1.3deg);
}

.gratitude__gallery .gallery__item:nth-child(3n + 2) {
  transform: translateY(0.9rem) rotate(1.1deg);
}

.gratitude__gallery .gallery__item:nth-child(3n) {
  transform: rotate(-0.6deg);
}

.gratitude__gallery .gallery__item:first-child {
  grid-column: 1 / -1;
  transform: rotate(-0.7deg);
}

.gratitude__gallery .gallery__item:hover,
.gratitude__gallery .gallery__item:focus-visible {
  transform: rotate(0deg) scale(1.02);
  box-shadow: 0 14px 30px rgba(93, 70, 45, 0.3);
}

.gratitude__gallery .gallery__image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--paper-deep);
}

.gratitude__gallery .gallery__caption {
  padding: 0.55rem 0.25rem 0.15rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 460;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--chestnut);
}

/* ------------------------------------------------------------------ */
/* vii · Guest information — notes tucked beneath the plate            */
/* ------------------------------------------------------------------ */

.gratitude__notes .guest-information {
  display: grid;
  gap: 2.4rem;
}

.gratitude__notes .guest-information h3 {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 540;
  font-variation-settings: "SOFT" 40, "WONK" 1;
  font-size: 1.3rem;
  line-height: 1.2;
  color: var(--ink);
}

.gratitude__notes .guest-information__faqs {
  display: grid;
  gap: 0.8rem;
}

.gratitude__notes .guest-information__faq {
  background: var(--paper-deep);
  border: 1px solid var(--paper-shadow);
  border-radius: 0.45rem;
  overflow: hidden;
}

.gratitude__notes .guest-information__question {
  display: flex;
  align-items: center;
  min-height: 44px;
  width: 100%;
  padding: 0.85rem 1.05rem;
  background: transparent;
  border: 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 540;
  font-size: 1.05rem;
  line-height: 1.3;
  color: var(--ink);
  cursor: pointer;
}

.gratitude__notes .guest-information__question-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.gratitude__notes .guest-information__question-button::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-label);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--oxblood);
  transition: transform 0.35s var(--ease-out);
}

.gratitude__notes .guest-information__question-button[aria-expanded="true"]::after {
  transform: rotate(45deg);
}

.gratitude__notes .guest-information__answer-wrap {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.4s var(--ease-out);
}

.gratitude__notes .guest-information__answer-wrap[data-collapsed] {
  grid-template-rows: 0fr;
}

.gratitude__notes .guest-information__answer-wrap > div {
  overflow: hidden;
}

.gratitude__notes .guest-information__answer {
  padding: 0 1.05rem 1rem;
  font-size: 0.94rem;
  line-height: 1.62;
  color: var(--ink-soft);
}

.gratitude__notes .guest-information__answer p {
  margin: 0;
}

.gratitude__notes .guest-information__travel,
.gratitude__notes .guest-information__gifts {
  display: grid;
  gap: 0.9rem;
}

.gratitude__notes .guest-information__travel-item,
.gratitude__notes .guest-information__gift {
  position: relative;
  padding: 1.1rem 1.15rem 1rem;
  background: var(--paper);
  border: 1px solid var(--paper-shadow);
  border-left: 3px solid var(--brass);
  /* A leaf, but with the lobes kept under 3rem: the earlier 225px/255px
   * radii swept the brass stem across the text at every viewport. */
  border-radius: 0.3rem 3rem 18px 3rem / 0.3rem 3rem 18px 3rem;
  box-shadow: 0 6px 16px rgba(93, 70, 45, 0.12);
}

/* Its own place at the table: persimmon instead of travel's brass, and a
   small folded tag on the title, so a registry note doesn't read as just
   another travel card sharing the same accent. */
.gratitude__notes .guest-information__gift {
  border-left-color: var(--persimmon);
}

.gratitude__notes .guest-information__gift-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.gratitude__notes .guest-information__gift-title::before {
  content: "";
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  background: var(--persimmon);
  border-radius: 0.15rem 0.55rem 0.15rem 0.55rem;
  rotate: 8deg;
}

.gratitude__notes .guest-information__travel-description,
.gratitude__notes .guest-information__gift-description {
  margin: 0.5rem 0 0;
  font-size: 0.92rem;
  line-height: 1.58;
  color: var(--ink-soft);
}

.gratitude__notes .guest-information__travel-link,
.gratitude__notes .guest-information__gift-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.3rem;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: var(--brass-soft);
  text-underline-offset: 4px;
  color: var(--oxblood);
}

/* ------------------------------------------------------------------ */
/* viii · RSVP — the last chair, and the coda                          */
/* ------------------------------------------------------------------ */

.gratitude__rsvp {
  max-width: none;
  padding: 6rem 0 5rem;
  background:
    radial-gradient(110% 60% at 50% 0%, rgba(176, 141, 87, 0.16), transparent 55%),
    linear-gradient(var(--plum), var(--plum-deep));
  color: var(--ivory);
  color-scheme: dark;
}

/* Same column geometry as the centered courses: the runner keeps its 1rem
 * gutter, and the body text starts at the same 4rem inset as every course. */
.gratitude__rsvp-body {
  max-width: 36rem;
  margin-inline: auto;
  padding-inline: 4rem 1.5rem;
}

/* The evening course is full-bleed, but its runner must stay on the centered
 * column the other courses draw: column left edge is max(50% - 18rem, 0),
 * plus each element's course-relative offset. */
.gratitude__rsvp::before,
.gratitude__rsvp::after {
  left: max(1rem, calc(50% - 17rem));
}

.gratitude__rsvp::before {
  background: linear-gradient(to bottom, transparent 0.5rem, rgba(176, 141, 87, 0.35) 0.5rem, rgba(176, 141, 87, 0.35) calc(100% - 0.5rem), transparent calc(100% - 0.5rem));
}

.gratitude__rsvp::after {
  background: linear-gradient(to bottom, var(--brass), var(--persimmon));
}

.gratitude__rsvp .gratitude__kicker {
  color: var(--persimmon);
}

.gratitude__rsvp .gratitude__heading {
  color: var(--ivory);
}

.gratitude__rsvp .gratitude__plate {
  left: max(-0.15rem, calc(50% - 18.15rem));
}

.gratitude__rsvp .rsvp-widget__title {
  margin: 0 0 1.6rem;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(246, 240, 226, 0.65);
}

.gratitude__rsvp .rsvp-widget__form {
  display: grid;
  gap: 1.6rem;
}

.gratitude__rsvp .rsvp-widget__field {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  border: 0;
}

/* The attend fieldset stacks a small-caps legend over the pill row; it needs
 * more air between the two than a label needs over its underline input. */
.gratitude__rsvp fieldset.rsvp-widget__field {
  gap: 0.9rem;
}

.rsvp-widget__label {
  margin-bottom: 1.2em;
}

.gratitude__rsvp .rsvp-widget__label,
.gratitude__rsvp .rsvp-widget__field legend {
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246, 240, 226, 0.7);
}

.gratitude__rsvp .rsvp-widget__input {
  width: 100%;
  min-height: 48px;
  padding: 0.6rem 0.2rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(246, 240, 226, 0.35);
  border-radius: 0;
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.4;
  transition: border-color 0.3s var(--ease-out);
}

.gratitude__rsvp .rsvp-widget__input::placeholder {
  color: rgba(246, 240, 226, 0.4);
  font-style: italic;
}

.gratitude__rsvp .rsvp-widget__input:focus {
  outline: none;
  border-bottom-color: var(--persimmon);
}

.gratitude__rsvp .rsvp-widget__input:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 4px;
  border-radius: 2px;
}

.gratitude__rsvp textarea.rsvp-widget__input {
  resize: vertical;
}

.gratitude__rsvp .rsvp-widget__choices {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.gratitude__rsvp .rsvp-widget__choice {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  min-height: 44px;
  padding: 0.55rem 1.05rem;
  border: 1px solid rgba(246, 240, 226, 0.4);
  border-radius: 999px;
  font-family: var(--font-label);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ivory);
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}

.gratitude__rsvp .rsvp-widget__choice:has(input:checked) {
  border-color: var(--persimmon);
  background: rgba(201, 111, 74, 0.22);
}

.gratitude__rsvp .rsvp-widget__choice input {
  accent-color: var(--persimmon);
  width: 1.1rem;
  height: 1.1rem;
}

.gratitude__rsvp .rsvp-widget__submit {
  justify-self: start;
  min-height: 52px;
  padding: 0.85rem 2.1rem;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--persimmon), var(--oxblood));
  color: var(--ivory);
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(201, 111, 74, 0.3);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), filter 0.3s var(--ease-out);
}

.gratitude__rsvp .rsvp-widget__submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 14px 30px rgba(201, 111, 74, 0.42);
}

.gratitude__rsvp .rsvp-widget__submit:active {
  transform: translateY(2px);
}

/* The coda: candles, a toast, and the way back up */
.gratitude__coda {
  max-width: 36rem;
  margin: 4.6rem auto 0;
  padding-top: 3rem;
  border-top: 1px solid rgba(246, 240, 226, 0.16);
  text-align: center;
}

.gratitude__candles {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.7rem;
}

.gratitude__coda-candle {
  width: 1.7rem;
  color: rgba(176, 141, 87, 0.5);
  transition: color 0.8s var(--ease-out), filter 0.8s var(--ease-out);
}

.gratitude__candles.is-lit .gratitude__coda-candle {
  color: var(--persimmon);
  filter: drop-shadow(0 0 8px rgba(201, 111, 74, 0.65));
}

.gratitude__candles.is-lit .gratitude__coda-candle:nth-child(odd) {
  animation: gratitude-flicker 2.4s ease-in-out infinite alternate;
}

.gratitude__candles.is-lit .gratitude__coda-candle:nth-child(even) {
  animation: gratitude-flicker 2.8s ease-in-out infinite alternate-reverse;
}

@keyframes gratitude-flicker {
  from {
    transform: rotate(-1.4deg) scaleY(0.98);
  }
  to {
    transform: rotate(1.6deg) scaleY(1.04);
  }
}

.gratitude__coda-line {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-style: italic;
  font-weight: 460;
  font-size: clamp(1.45rem, 5vw, 2rem);
  line-height: 1.25;
  color: var(--ivory);
}

.gratitude__toast-line {
  margin: 1.1rem auto 0;
  max-width: 24rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: rgba(246, 240, 226, 0.75);
}

.gratitude__toast-button {
  margin-top: 1.6rem;
  min-height: 46px;
  padding: 0.75rem 1.7rem;
  border: 1px solid var(--brass);
  border-radius: 999px;
  background: transparent;
  color: var(--brass);
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.gratitude__toast-button:hover,
.gratitude__toast-button[aria-pressed="true"] {
  background: var(--brass);
  color: var(--plum);
}

.gratitude .gratitude__back-top {
  display: block;
  width: fit-content;
  margin: 2rem auto 0;
  min-height: 44px;
  padding-top: 0.8rem;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-color: rgba(246, 240, 226, 0.35);
  text-underline-offset: 4px;
  color: rgba(246, 240, 226, 0.75);
}

/* ------------------------------------------------------------------ */
/* The full-size gallery viewer                                        */
/* ------------------------------------------------------------------ */

body.gratitude-viewer-open {
  overflow: hidden;
}

/* The overlay carries the `hidden` attribute until the runtime opens it;
 * `display: grid` above must not override that. */
.gratitude__viewer[hidden] {
  display: none;
}

.gratitude__viewer {
  /* The runtime appends the viewer to <body>, outside .gratitude, so give
   * this small island the tokens its controls need rather than relying on
   * inherited custom properties. */
  --ivory: #f6f0e2;
  --plum: #241a1f;
  --plum-deep: #1a1216;
  --persimmon: #c96f4a;
  --font-label: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1.1rem;
  background: rgba(26, 18, 22, 0.92);
  backdrop-filter: blur(4px);
}

.gratitude__viewer-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: min(92vw, 46rem);
  max-height: 88svh;
  margin: 0;
}

.gratitude__viewer-image {
  display: block;
  max-width: 100%;
  max-height: 72svh;
  object-fit: contain;
  border: 6px solid var(--ivory);
  border-radius: 0.3rem;
  background: var(--plum-deep);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.gratitude__viewer-caption {
  margin-top: 1rem;
  max-width: 30rem;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-style: italic;
  font-size: 1.05rem;
  text-align: center;
  color: var(--ivory);
}

.gratitude__viewer button {
  position: fixed;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(246, 240, 226, 0.4);
  border-radius: 50%;
  background: rgba(26, 18, 22, 0.6);
  color: var(--ivory);
  font-family: var(--font-label);
  font-size: 1.2rem;
  cursor: pointer;
  transition: border-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}

.gratitude__viewer button:hover {
  border-color: var(--persimmon);
  color: var(--persimmon);
}

.gratitude__viewer-close {
  top: 1.1rem;
  right: 1.1rem;
}

.gratitude__viewer-prev {
  left: 1.1rem;
  bottom: 1.1rem;
}

.gratitude__viewer-next {
  right: 1.1rem;
  bottom: 1.1rem;
}

/* ------------------------------------------------------------------ */
/* Sparse invitations: collapse shells whose platform block is empty   */
/* ------------------------------------------------------------------ */

.gratitude__couple:not(:has(.couple__partner)),
.gratitude__story:not(:has(.story__introduction, .story__milestone)),
.gratitude__countdown:not(:has(.countdown__remaining)),
.gratitude__events:not(:has(.event-schedule__event)),
.gratitude__party:not(:has(.wedding-party__person)),
.gratitude__gallery:not(:has(.gallery__item)),
.gratitude__notes:not(:has(.guest-information *)),
.gratitude__rsvp:not(:has(.rsvp-widget)) {
  display: none;
}

/* ------------------------------------------------------------------ */
/* Motion: none of the choreography is essential                       */
/* ------------------------------------------------------------------ */

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

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

  .gratitude-js [data-gratitude-reveal],
  .gratitude-js .story__introduction,
  .gratitude-js .story__milestone,
  .gratitude-js .event-schedule__event,
  .gratitude-js .wedding-party__person,
  .gratitude-js .gallery__item,
  .gratitude-js .guest-information__faq,
  .gratitude-js .guest-information__travel-item,
  .gratitude-js .guest-information__gift,
  .gratitude-js .rsvp-widget,
  .gratitude-js .gratitude__coda {
    opacity: 1;
    translate: 0 0;
  }

  .gratitude__course::after {
    transform: scaleY(1);
  }

  .gratitude__gallery .gallery__item,
  .gratitude__party .wedding-party__photo,
  .gratitude__story .story__milestone-photo {
    transition: none;
  }
}
