/* ==========================================================================
   Mary & Curtis — wedding site
   Palette and typography lifted from the original Joy "Brannan" design:
     #a69475  warm gold (accent)
     #777150  olive (ink / headings)
     #e2dccd  cream (page background)
   ========================================================================== */

:root {
  --gold: #a69475;
  --olive: #777150;
  --cream: #e2dccd;
  --cream-light: #f3efe6;
  --paper: #fbf9f4;
  --ink: #3f3c30;
  --muted: #7a7566;
  --rule: rgba(166, 148, 117, 0.35);

  --font-display: 'Pinyon Script', 'Snell Roundhand', cursive;
  --font-heading: 'EB Garamond', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-nav: 'Raleway', var(--font-body);

  --measure: 42rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
}

/* --------------------------------------------------------------- reset --- */

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--olive);
  line-height: 1.25;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--olive);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--olive);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 100;
}

.skip-link:focus {
  left: 0;
}

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

/* Hidden from sight but still read aloud, e.g. "(opens in a new tab)". */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------------- nav --- */

.masthead {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem var(--gutter) 1.5rem;
  background: var(--cream);
  border-bottom: 1px solid var(--rule);
}

.masthead__monogram {
  font-family: var(--font-display);
  font-size: 2.75rem;
  line-height: 1;
  color: var(--olive);
  text-decoration: none;
}

.nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__link {
  font-family: var(--font-nav);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--olive);
  text-decoration: none;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease, color 150ms ease;
}

.nav__link:hover,
.nav__link:focus-visible {
  border-bottom-color: var(--gold);
}

.nav__link.is-active {
  border-bottom-color: var(--olive);
}

/* ------------------------------------------------------- cover header --- */

/*
 * Welcome page only: a full-viewport painted landscape with the nav across the
 * top and the couple's names centred over it, as on the original Joy site.
 */
.masthead--cover {
  position: relative;
  isolation: isolate;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: 1.75rem;
  background: var(--cream);
  border-bottom: 0;
  overflow: hidden;
}

.masthead__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 60%;
  animation: cover-settle 2.4s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.masthead__title {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  padding: 6rem var(--gutter) 0;
  pointer-events: none;
}

.masthead__names {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6.5vw, 5rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--olive);
  text-align: center;
  word-spacing: 0.15em;
  animation: cover-rise 1.4s 0.3s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.masthead--cover .nav,
.masthead--cover .nav-toggle {
  animation: cover-fade 1s 0.6s ease both;
}

@keyframes cover-settle {
  from { transform: scale(1.06); }
  to   { transform: scale(1); }
}

@keyframes cover-rise {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: none; }
}

@keyframes cover-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  color: var(--olive);
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  display: block;
  width: 1rem;
  height: 1px;
  background: var(--olive);
  content: '';
}

.nav-toggle__bar {
  position: relative;
}

.nav-toggle__bar::before { position: absolute; top: -5px; }
.nav-toggle__bar::after  { position: absolute; top: 5px; }

/* ---------------------------------------------------------------- hero --- */

.hero {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  padding: clamp(2.5rem, 6vw, 5rem) var(--gutter);
  max-width: 72rem;
  margin: 0 auto;
}

.hero__media {
  overflow: hidden;
}

.hero__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center;
}

.hero__body {
  text-align: center;
}

.hero__eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero__names {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 11vw, 6rem);
  font-weight: 400;
  color: var(--olive);
  line-height: 1.05;
  margin-bottom: 1.5rem;
}

.hero__date,
.hero__date-heading {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  letter-spacing: 0.08em;
  margin-bottom: 0.25rem;
}

.hero__venue {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* Under the RSVP button. */
.hero__note {
  margin: 1rem 0 0;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* ----------------------------------------------------------- countdown --- */

.countdown {
  display: flex;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 3rem);
  margin-bottom: 2.5rem;
}

.countdown__unit {
  min-width: 4rem;
}

.countdown__value {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  color: var(--gold);
  line-height: 1;
}

.countdown__label {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

/* -------------------------------------------------------------- layout --- */

.page-head {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 1.5rem;
}

.page-head__title {
  font-family: var(--font-display);
  font-size: clamp(2.75rem, 8vw, 4.5rem);
  color: var(--olive);
}

.page-head__subtitle {
  max-width: var(--measure);
  margin: 1.25rem auto 0;
  color: var(--muted);
  font-size: 1rem;
}

.page-head__eyebrow {
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* A fund's name can run long, so it is set a little smaller than a page title. */
.page-head--gift .page-head__title {
  font-size: clamp(2.5rem, 7vw, 3.75rem);
}

.section {
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter);
}

.section--narrow {
  max-width: 48rem;
}

.section--form {
  max-width: 36rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) var(--gutter) 4rem;
}

.section--centred {
  text-align: center;
}

.section__title {
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.06em;
  margin-bottom: 2rem;
}

.lede {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--olive);
}

.page-photo {
  margin: 0 auto;
  max-width: 64rem;
  padding: 0 var(--gutter);
}

.page-photo img {
  width: 100%;
  object-fit: cover;
}

.page-photo--full img {
  aspect-ratio: 16 / 9;
}

.page-photo--portrait {
  max-width: 26rem;
}

/* ------------------------------------------------------------- details --- */

.details {
  max-width: var(--measure);
  margin: 0 auto 3rem;
  display: grid;
  gap: 1.5rem;
}

.details__row {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
}

.details__term {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.3rem;
}

.details__value {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--olive);
}

.quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.quick-links__item {
  border: 1px solid var(--rule);
  padding: 0.75rem 1.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--olive);
  transition: background 150ms ease;
}

.quick-links__item:hover {
  background: var(--cream-light);
}

/* ------------------------------------------------------------ timeline --- */

.day {
  margin-bottom: 3.5rem;
}

.day__label {
  text-align: center;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2.5rem;
}

.timeline__item {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: clamp(1rem, 4vw, 2.5rem);
}

.timeline__time {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: 0.05em;
  padding-top: 0.2rem;
}

.timeline__name {
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
}

.timeline__location {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.timeline__dress {
  margin-bottom: 0.75rem;
}

.pill {
  display: inline-block;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 0.2rem 0.85rem;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* -------------------------------------------------------------- travel --- */

/* Full width, so a hotel grid can grow with the screen. Text blocks are held
   to the same column section--narrow gives every other page. */
.section--travel {
  max-width: none;
}

.travel-block {
  max-width: calc(48rem - 2 * var(--gutter));
  margin-inline: auto;
  padding-bottom: 2.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

/* Room for four 15rem hotel cards (63.75rem with gaps) but not five (79.75rem),
   so the grid tops out at four across. Change both if the card width changes. */
.travel-block--wide {
  max-width: 76rem;
}

/* Only the grid goes wide: the heading and any notes stay in the text column,
   lined up with every other block's title. */
.travel-block--wide > :not(.hotel-grid) {
  max-width: calc(48rem - 2 * var(--gutter));
  margin-inline: auto;
}

.travel-block:last-child {
  border-bottom: 0;
}

.travel-block__title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.travel-block__address,
.travel-block__phone {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

/* Recommended hotels: as many 15rem+ cards across as the screen fits, down to
   one on a phone. auto-fit (not auto-fill) so a short row stretches to fill
   the width instead of leaving empty columns on the right. */
.hotel-grid {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
  gap: 1.25rem;
}

.hotel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hotel-card--linked:hover,
.hotel-card--linked:focus-within {
  border-color: var(--gold);
  box-shadow: 0 6px 18px rgba(63, 60, 48, 0.1);
  transform: translateY(-2px);
}

.hotel-card__media {
  aspect-ratio: 3 / 2;
  background: var(--cream-light);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hotel-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hotel-card--linked:hover .hotel-card__media img {
  transform: scale(1.03);
}

.hotel-card__placeholder {
  width: 3rem;
  height: 3rem;
  color: var(--gold);
}

.hotel-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.9rem 1rem 1rem;
}

.hotel-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.hotel-card__summary {
  margin: 0.6rem 0 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
}

/* Pushed to the bottom so it lines up across a row of cards. */
.hotel-card__credit {
  margin: auto 0 0;
  padding-top: 0.6rem;
  font-size: 0.7rem;
  color: var(--muted);
}

/* Above the stretched link, like the Maps button. */
.hotel-card__credit a {
  position: relative;
  z-index: 2;
  color: inherit;
}

.hotel-card__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--ink);
}

.hotel-card__link {
  color: inherit;
  text-decoration: none;
}

.hotel-card__price {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--olive);
}

.hotel-card__price-rest {
  color: var(--rule);
}

/* Stretch the website link over the whole card. */
.hotel-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hotel-card__link:focus-visible {
  outline: none;
}

.hotel-card:has(.hotel-card__link:focus-visible) {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Above the stretched link, so it opens Maps rather than the website. */
.hotel-card__map {
  position: relative;
  z-index: 2;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem 0.3rem 0.5rem;
  font-family: var(--font-nav);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--olive);
  text-decoration: none;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hotel-card__map:hover,
.hotel-card__map:focus-visible {
  background: var(--cream-light);
  border-color: var(--gold);
}

.hotel-card__map svg {
  width: 0.95rem;
  height: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  .hotel-card,
  .hotel-card__media img {
    transition: none;
  }

  .hotel-card--linked:hover,
  .hotel-card--linked:focus-within,
  .hotel-card--linked:hover .hotel-card__media img {
    transform: none;
  }
}

/* ----------------------------------------------------------------- faq --- */

.faq {
  display: grid;
}

.faq__item {
  border-bottom: 1px solid var(--rule);
}

.faq__question {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--olive);
  padding: 1.25rem 2rem 1.25rem 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}

.faq__question::-webkit-details-marker {
  display: none;
}

.faq__question::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  font-size: 1.25rem;
}

.faq__item[open] .faq__question::after {
  content: '–';
}

.faq__answer {
  padding-bottom: 1.5rem;
}

/* ------------------------------------------------------------ registry --- */

/*
 * The wish-list: one card per item, as on Joy's registry page. Both kinds of
 * item share the card (a link out to another registry, or a fund taking
 * contributions) and differ only in what sits at the bottom of it.
 */
.registry-section {
  max-width: 62rem;
  padding-top: 1rem;
}

.registry {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1.5rem, 4vw, 2.5rem);
}

/* A lone item would stretch the full width; keep it card-sized instead. */
.registry--single {
  max-width: 30rem;
  margin-inline: auto;
}

.registry__item {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
  transition:
    transform 350ms cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 350ms ease,
    border-color 350ms ease;
  /* `backwards`, not `both`: a retained end state would pin `transform` and
     cancel the hover lift below. */
  animation: card-rise 800ms cubic-bezier(0.23, 1, 0.32, 1) backwards;
}

.registry__item:nth-child(2)     { animation-delay: 100ms; }
.registry__item:nth-child(3)     { animation-delay: 200ms; }
.registry__item:nth-child(n + 4) { animation-delay: 300ms; }

.registry__item:focus-within {
  border-color: var(--gold);
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(1.25rem); }
  to   { opacity: 1; transform: none; }
}

.registry__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--cream-light);
}

.registry__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

/* No photo: the monogram on a soft wash, so the card still has a face. */
.registry__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: var(--gold);
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.75), transparent 60%),
    var(--cream-light);
}

.registry__badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--olive);
  background: rgba(251, 249, 244, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.registry__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.75rem 1.75rem 2rem;
  text-align: center;
}

.registry__title {
  font-size: 1.55rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
}

.registry__description {
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.registry__progress {
  margin-bottom: 1.5rem;
}

.registry__raised {
  margin: 0.65rem 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.registry__raised strong {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--olive);
}

/* Pinned to the foot of the card so the buttons line up across a row. */
.registry__actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.registry__actions .button {
  margin-top: 0;
  min-width: 13rem;
  text-align: center;
}

.registry__host {
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.registry__arrow {
  display: inline-block;
  transition: transform 250ms ease;
}

.registry__note {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gold);
}

.registry-empty {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--muted);
}

/* Hover effects only where there is a real pointer; on touch screens they stick. */
@media (hover: hover) {
  .registry__item:hover {
    transform: translateY(-4px);
    border-color: var(--gold);
    box-shadow: 0 22px 44px -28px rgba(63, 60, 48, 0.5);
  }

  .registry__item:hover .registry__image {
    transform: scale(1.05);
  }

  .registry__item:hover .registry__arrow {
    transform: translate(2px, -2px);
  }
}

/* --------------------------------------------------------------- meter --- */

/*
 * Progress towards a fund's goal. A native <progress>, so assistive tech reads
 * its value without any ARIA; this only paints it. The vendor pseudo-elements
 * stay in separate rules: one unknown selector in a list drops the whole rule.
 */
.meter {
  display: block;
  width: 100%;
  height: 0.4rem;
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--cream);
  overflow: hidden;
}

.meter::-webkit-progress-bar {
  background: var(--cream);
  border-radius: 999px;
}

.meter::-webkit-progress-value {
  background: linear-gradient(90deg, var(--gold), var(--olive));
  border-radius: 999px;
}

.meter::-moz-progress-bar {
  background: linear-gradient(90deg, var(--gold), var(--olive));
  border-radius: 999px;
}

/* ----------------------------------------------------------- test mode --- */

/* Development only: says plainly that the checkout is pretend. */
.test-ribbon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.75rem;
  max-width: 36rem;
  margin: 0 auto 2.5rem;
  padding: 0.7rem 1.1rem;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--gold);
  border-radius: 2px;
  background: rgba(243, 239, 230, 0.7);
}

.test-ribbon__label {
  padding: 0.2rem 0.65rem;
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--gold);
  border-radius: 999px;
}

/* Stripe's test card number reads as one unit, so it never splits across lines. */
.card-number {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- form --- */

.form {
  display: grid;
  gap: 1.75rem;
}

.field {
  display: grid;
  gap: 0.5rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.field--group {
  gap: 0.75rem;
}

.field__label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0;
}

/*
 * A fieldset's <legend> is never a grid item, so the gap above skips it. Give
 * it the same space a <label> gets above its input.
 */
legend.field__label {
  margin-bottom: 0.5rem;
}

.field__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 0.75rem 0.9rem;
  border-radius: 2px;
}

.field__input--small {
  max-width: 7rem;
}

.field__input:focus-visible {
  border-color: var(--gold);
}

.field__input.is-invalid {
  border-color: #a1543f;
}

.field__error {
  margin: 0;
  font-size: 0.85rem;
  color: #a1543f;
}

.field__hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

/* The "Other" detail box, indented under the checkbox it belongs to. */
.field--nested {
  margin: 0.25rem 0 0 1.6rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--rule);
  gap: 0.35rem;
}

.field--nested[hidden] {
  display: none;
}

/* ------------------------------------------------- rsvp guest lookup --- */

.form__intro {
  max-width: var(--measure);
  margin-bottom: 2rem;
  color: var(--muted);
}

.form--lookup {
  padding-bottom: 1rem;
}

/*
 * The name box's autocomplete. The list is positioned under the input, so
 * the field is the positioning context; it sits above whatever follows and
 * is removed from flow so opening it never shoves the button down.
 */
.field--combobox {
  position: relative;
}

.suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 10;
  margin: 0.35rem 0 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  box-shadow: 0 12px 32px rgba(63, 60, 48, 0.12);
  max-height: 16rem;
  overflow-y: auto;
  animation: suggest-rise 180ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

.suggest[hidden] {
  display: none;
}

@keyframes suggest-rise {
  from { opacity: 0; transform: translateY(-0.25rem); }
  to   { opacity: 1; transform: none; }
}

.suggest__option {
  padding: 0.65rem 0.9rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: var(--olive);
  cursor: pointer;
  transition: background 120ms ease;
}

.suggest__option.is-highlighted {
  background: var(--cream-light);
  box-shadow: inset 3px 0 0 var(--gold);
}

.rsvp-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}

.rsvp-card__name {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--olive);
  margin-bottom: 0.5rem;
}

.rsvp-card__detail {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

/* Shown when the household has replied before and is back to change it. */
.rsvp-card__replied {
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  background: var(--cream-light);
  border-left: 3px solid var(--olive);
}

.rsvp-card__detail:last-child {
  margin-bottom: 0;
}

.rsvp-card__detail--muted {
  font-size: 0.85rem;
  color: var(--muted);
}

.rsvp-card__detail--muted a {
  color: var(--gold);
  text-underline-offset: 3px;
}

/* ------------------------------------------------------ person cards --- */

/*
 * One card per person in the household. A family of five is a long form, so
 * each person gets a clear visual boundary and a number, otherwise the fields
 * read as one undifferentiated run and it stops being obvious who you are
 * answering for.
 *
 * The card is a <details>. Padding lives on the head and body rather than on
 * the card itself, so a collapsed card is a tidy header strip with no stray
 * space underneath it.
 */
.person {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  margin-bottom: 1.75rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.person:focus-within {
  border-color: var(--gold);
  box-shadow: 0 2px 18px rgba(0, 0, 0, 0.05);
}

.person__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.75rem;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;

  /* Drop the browser's disclosure triangle; .person__chevron replaces it. */
  list-style: none;
}

.person__head::-webkit-details-marker {
  display: none;
}

.person__head:hover {
  background: var(--cream-light);
}

/*
 * Keyboard users tab to the summary itself, so it needs a visible ring. The
 * card-level :focus-within glow is too soft to serve as the only cue.
 */
.person__head:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.person__body {
  padding: 1.25rem 1.75rem 1.75rem;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.person__index {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  border-radius: 50%;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: var(--gold);
}

.person__name {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  color: var(--olive);
  margin: 0;
  overflow-wrap: anywhere;
}

.person__role {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/*
 * A collapsed card hides the answer, so the header has to carry it. Without
 * this a guest cannot tell which of their five cards they have already done.
 */
.person__status {
  flex: 0 0 auto;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--muted);
  white-space: nowrap;
}

.person__status--yes {
  border-color: var(--gold);
  background: rgba(166, 148, 117, 0.16);
  color: var(--olive);
}

.person__status--no {
  border-color: rgba(122, 117, 102, 0.4);
  color: var(--muted);
}

.person__chevron {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.15rem;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg) translate(-0.1rem, -0.1rem);
  transition: transform 0.2s ease;
}

.person[open] .person__chevron {
  transform: rotate(-135deg) translate(-0.1rem, -0.1rem);
}

.person [data-attending-only][hidden] {
  display: none;
}

/* Sits beside a label to mark a field the guest can safely skip. */
.field__optional {
  margin-left: 0.4rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

@media (max-width: 640px) {
  .person__head {
    padding: 1rem 1.1rem;
    gap: 0.75rem;
  }

  .person__body {
    padding: 1.1rem 1.1rem 1.5rem;
  }

  /* The status pill and a long name will not share a narrow line. */
  .person__status {
    display: none;
  }
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.95rem;
  cursor: pointer;
}

.choice input {
  margin-top: 0.35rem;
  accent-color: var(--gold);
}

.alert {
  border: 1px solid #c08a75;
  background: #f6ece7;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.alert__title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  color: #7d3f2c;
  margin-bottom: 0.5rem;
}

.alert__list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  color: #7d3f2c;
}

/* -------------------------------------------------------------- button --- */

.button {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.95rem 2.5rem;
  border: 1px solid var(--gold);
  border-radius: 2px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.button--primary {
  background: var(--gold);
  color: var(--paper);
}

.button--primary:hover {
  background: var(--olive);
  border-color: var(--olive);
}

.button--outline {
  background: transparent;
  color: var(--olive);
  margin-top: 1.5rem;
}

.button--outline:hover {
  background: var(--gold);
  color: var(--paper);
}

/* Set by main.js while a gift form is on its way, so it cannot be sent twice. */
.button:disabled,
.button.is-busy {
  opacity: 0.7;
  cursor: progress;
}

.link {
  color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.rich-text p:last-child {
  margin-bottom: 0;
}

.rich-text a {
  color: var(--gold);
}
/* ----------------------------------------------------------- gift form --- */

.gift-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.25rem;
  padding: 1.1rem 1.25rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
}

.gift-card__image {
  flex: none;
  width: 6.5rem;
  height: 6.5rem;
  object-fit: cover;
  border-radius: 2px;
}

.gift-card__body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.6rem;
}

.gift-card__description,
.gift-card__raised {
  margin: 0;
  color: var(--muted);
}

.gift-card__description {
  font-size: 0.92rem;
}

.gift-card__raised {
  font-size: 0.82rem;
}

.gift-card__raised strong {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--olive);
}

/* One-tap amounts. Each one is a real radio button, painted as a tile. */
.amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
  gap: 0.6rem;
}

.amount {
  position: relative;
  display: grid;
  cursor: pointer;
}

/*
 * The radio is invisible but still covers the whole tile, so it is the thing
 * that gets clicked, focused and announced. Nothing about the control is faked.
 */
.amount__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.amount__label {
  display: grid;
  place-items: center;
  min-height: 3.4rem;
  padding: 0.6rem 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.2;
  color: var(--olive);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.amount--other .amount__label {
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.amount:hover .amount__label {
  border-color: var(--gold);
}

.amount__input:checked + .amount__label {
  color: var(--paper);
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 10px 22px -14px rgba(119, 113, 80, 0.9);
  transform: translateY(-1px);
}

.amount__input:focus-visible + .amount__label {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* It sits under the tiles rather than a checkbox, so there is no indent to match. */
.form--gift .field--nested {
  margin: 0.35rem 0 0;
}

.money {
  position: relative;
  max-width: 12rem;
}

.money__symbol {
  position: absolute;
  top: 50%;
  left: 0.95rem;
  transform: translateY(-50%);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  color: var(--muted);
  pointer-events: none;
}

.money__input {
  padding-left: 2rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
}

.field__input--textarea {
  min-height: 6.5rem;
  line-height: 1.55;
  resize: vertical;
}

.gift-secure {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--cream-light);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.gift-secure__icon {
  flex: none;
  margin-top: 0.1rem;
  color: var(--gold);
}

.gift-secure__text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.gift-secure__text strong {
  font-weight: 500;
  color: var(--olive);
}

.form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

/* Shown in place of the form when a fund is complete or payments are off. */
.notice {
  padding: 2rem 1.75rem;
  text-align: center;
  color: var(--muted);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--gold);
}

.notice__title {
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--olive);
}

/* ------------------------------------------------------- test checkout --- */

/* Striped like hazard tape, so nobody mistakes it for the real thing. */
.test-banner {
  margin-bottom: 2rem;
  padding: 1.1rem 1.35rem;
  border: 1px dashed var(--gold);
  border-radius: 2px;
  background:
    repeating-linear-gradient(-45deg, rgba(166, 148, 117, 0.08) 0 10px, transparent 10px 20px),
    var(--cream-light);
}

.test-banner__title {
  margin-bottom: 0.35rem;
  font-size: 0.66rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.test-banner__text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.receipt {
  margin: 0 0 2rem;
  padding: 0.35rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 2px;
}

.receipt__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
}

.receipt__row:last-child {
  border-bottom: 0;
}

.receipt__term {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.receipt__value {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  text-align: right;
  color: var(--olive);
}

.receipt__row--total .receipt__value {
  font-size: 1.75rem;
  line-height: 1.1;
}

.checkout__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.checkout__actions .button {
  margin-top: 0;
}

/* --------------------------------------------------------- gift status --- */

.gift-status .lede {
  max-width: 34rem;
  margin: 0 auto 1rem;
  font-size: 1.3rem;
}

.gift-status__text {
  max-width: 34rem;
  margin: 0 auto 1.25rem;
  color: var(--muted);
}

/* A wax seal on the thank-you: the monogram, pressed in gold. */
.gift-status__seal {
  display: grid;
  place-items: center;
  width: 6.5rem;
  height: 6.5rem;
  margin: 0 auto 2rem;
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1;
  color: var(--paper);
  background: radial-gradient(circle at 32% 28%, #c7b695, var(--gold) 55%, #8a7959);
  box-shadow:
    inset 0 0 0 4px rgba(251, 249, 244, 0.22),
    inset 0 0 0 5px rgba(119, 113, 80, 0.35),
    0 16px 32px -16px rgba(63, 60, 48, 0.6);
  animation: seal-press 900ms cubic-bezier(0.23, 1, 0.32, 1) both;
}

@keyframes seal-press {
  0%   { opacity: 0; transform: scale(1.35) rotate(-12deg); }
  60%  { opacity: 1; transform: scale(0.96) rotate(2deg); }
  100% { opacity: 1; transform: none; }
}

.gift-status__signoff {
  margin: 1.5rem 0 0.25rem;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.2;
  color: var(--gold);
}

.gift-status__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

.gift-status__actions .button {
  margin-top: 0;
}

.gift-status__test {
  display: inline-block;
  margin: 2.5rem 0 0;
  padding: 0.45rem 1.1rem;
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px dashed var(--gold);
  border-radius: 999px;
}

@media (max-width: 40rem) {
  .gift-card {
    align-items: flex-start;
  }

  .gift-card__image {
    width: 5rem;
    height: 5rem;
  }

  .receipt {
    padding: 0.25rem 1.1rem;
  }

  .form__actions,
  .checkout__actions {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .form__actions .button,
  .checkout__actions .button {
    width: 100%;
  }
}

/* The global rule below shortens durations but not delays, which would leave
   later cards blank for a moment; skip these entrances outright instead. */
@media (prefers-reduced-motion: reduce) {
  .registry__item,
  .gift-status__seal {
    animation: none;
  }
}

/* -------------------------------------------------------------- footer --- */

.footer {
  text-align: center;
  padding: 3.5rem var(--gutter);
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
}

.footer__monogram {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.footer__names {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--olive);
  margin-bottom: 0.35rem;
}

.footer__meta {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

/* --------------------------------------------------------- breakpoints --- */

@media (min-width: 48rem) {
  .hero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .hero__body {
    text-align: left;
  }

  .countdown {
    justify-content: flex-start;
  }

  .hero__image {
    aspect-ratio: 3 / 4;
  }
}

@media (max-width: 40rem) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    width: 100%;
  }

  .nav.is-open {
    display: block;
  }

  /* Keep the open menu legible over the painting. */
  .masthead--cover .nav.is-open {
    position: relative;
    z-index: 1;
    max-width: 20rem;
    padding: 1rem;
    background: rgba(243, 239, 230, 0.92);
    border: 1px solid var(--rule);
  }

  .masthead--cover .nav-toggle {
    background: rgba(243, 239, 230, 0.6);
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    padding-top: 0.5rem;
  }

  .details__row,
  .timeline__item {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
