/* ---------------------------------------------------------------
   Lourde & Reina — invitation
   --------------------------------------------------------------- */

/* ============ scroll progress hairline ============ */
.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--beige-500);
  z-index: 90;
  pointer-events: none;
}

/* ============ the stack ============ */

.chapters { position: relative; }

.chapter {
  position: sticky;
  top: 0;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--white);
  transform-origin: 50% 0;
  will-change: transform, filter;
}

/* Opted out of the stack. A sticky card gets slid over by the next one, which
   is fine for a headline but not for a form — it buries the submit button.
   This one scrolls normally so nothing ever covers it. */
.chapter--flow {
  position: relative;
  transform: none !important;
}

/* veil that darkens a card as the next one slides over it */
.chapter::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #0c0c0c;
  opacity: var(--dim, 0);
  pointer-events: none;
  z-index: 5;
}

.chapter--beige { background: var(--beige-50); }
.chapter--dark  { background: var(--ink); color: var(--white); }

/* Everything inside a chapter inherits ink-on-white by default, so the dark
   cards need their muted tones, hairlines and accents re-stated. */
.chapter--dark .eyebrow          { color: rgba(255, 255, 255, .55); }
.chapter--dark blockquote        { color: var(--white); }
.chapter--dark .quote__by        { color: rgba(255, 255, 255, .74); }
.chapter--dark .count__unit      { border-left-color: rgba(255, 255, 255, .14); }
.chapter--dark .count__lab       { color: rgba(255, 255, 255, .52); }
.chapter--dark .count__today     { color: var(--white); }
.chapter--dark .names__meta .lead { color: rgba(255, 255, 255, .82); }
.chapter--dark .names__meta .sub  { color: rgba(255, 255, 255, .55); }
.chapter--dark .detail h3        { color: rgba(255, 255, 255, .55); }
.chapter--dark .detail           { border-top-color: rgba(255, 255, 255, .16); }
.chapter--dark .detail .when,
.chapter--dark .detail .addr     { color: rgba(255, 255, 255, .78); }
.chapter--dark .maplink          { color: var(--white); }
.chapter--dark .maplink:hover    { border-color: var(--white); }
.chapter--dark .strip__panel     { border-top-color: rgba(255, 255, 255, .16); }
.chapter--dark .strip__caption   { color: rgba(255, 255, 255, .8); }

/* The dimming veil is black, which is invisible over a dark card — lift those
   with white instead so they still recede as the next card arrives. */
.chapter--dark::after { background: #ffffff; opacity: calc(var(--dim, 0) * .22); }

.chapter__inner {
  width: 100%;
  max-width: 1180px;
  padding: clamp(72px, 12vh, 132px) var(--pad);
  text-align: center;
}

/* ============ 01 · overture ============ */

.overture { padding: 0; }

.overture__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* keep the silhouettes in frame when the crop goes wide */
  object-position: 50% 58%;
  filter: grayscale(1) contrast(1.04) brightness(.66);
  transform: scale(1.06);
  will-change: transform;
}

/* One even top-to-bottom wash — no pool behind the text, nothing that reads as
   a shadow. Legibility comes from the wash plus the dimmed photo underneath. */
.overture__veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.36) 42%, rgba(0,0,0,.70) 100%);
}

.overture__body {
  position: relative;
  z-index: 2;
  height: 100svh;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 26px;
  padding: var(--pad);
  color: var(--white);
  text-align: center;
}

.overture .eyebrow { color: rgba(255,255,255,.78); }

.overture__hail {
  font-family: var(--sans);
  font-weight: 200;
  font-size: clamp(38px, 9vw, 96px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0;
}

.overture__hail em {
  display: block;
  font-family: var(--script);
  font-style: normal;
  font-size: 1.2em;
  line-height: 1.24;
  margin-top: .02em;
}

.overture__cue {
  position: absolute;
  left: 50%;
  bottom: clamp(26px, 5vh, 54px);
  transform: translateX(-50%);
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 12px;
  color: rgba(255,255,255,.8);
}

.overture__cue span {
  font-size: 9px;
  letter-spacing: .4em;
  text-transform: uppercase;
}

.overture__cue i {
  display: block;
  width: 1px;
  height: 46px;
  background: linear-gradient(rgba(255,255,255,.85), rgba(255,255,255,0));
  animation: cue 2.4s var(--ease) infinite;
}

@keyframes cue {
  0%   { transform: scaleY(0); transform-origin: 50% 0; }
  45%  { transform: scaleY(1); transform-origin: 50% 0; }
  46%  { transform: scaleY(1); transform-origin: 50% 100%; }
  100% { transform: scaleY(0); transform-origin: 50% 100%; }
}

/* ============ 02 · save the date (typographic) ============ */

.savedate .chapter__inner { max-width: 820px; }

.savedate__sig {
  margin: 0;
  font-size: clamp(34px, 10vw, 104px);
  color: var(--ink);
}

.savedate__line {
  margin: clamp(18px, 3.4vh, 30px) auto 0;
  max-width: 30ch;
  font-size: clamp(11px, 2.4vw, 13px);
  letter-spacing: .26em;
  text-transform: uppercase;
  line-height: 2;
  color: var(--muted);
}

.datestamp {
  margin: clamp(22px, 4vh, 38px) 0 0;
  font-weight: 200;
  font-size: clamp(30px, 8vw, 64px);
  letter-spacing: .2em;
  line-height: 1.1;
}

.savedate__tag {
  margin: clamp(26px, 4.5vh, 40px) 0 0;
  display: inline-block;
  padding: 12px 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============ 03 · names ============ */

.names__together { margin-bottom: clamp(26px, 5vh, 42px); }

.names__pair {
  margin: 0;
  font-weight: 200;
  font-size: clamp(30px, 7.4vw, 74px);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.names__pair .amp {
  display: block;
  font-family: var(--script);
  font-size: .66em;
  line-height: 1.4;
  letter-spacing: 0;
  color: var(--beige-500);
  margin: .04em 0;
}

.names__meta {
  margin: clamp(30px, 6vh, 50px) auto 0;
  display: grid;
  gap: 10px;
  max-width: 460px;
}

.names__meta p { margin: 0; }

.names__meta .lead {
  font-size: clamp(14px, 3vw, 17px);
  color: var(--ink-soft);
  letter-spacing: .02em;
}

.names__meta .sub {
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ 04 · quote ============ */

.quote blockquote {
  margin: 0 auto;
  max-width: 820px;
  font-weight: 200;
  font-size: clamp(21px, 4.4vw, 40px);
  line-height: 1.42;
  letter-spacing: -.015em;
  color: var(--ink);
}

.quote blockquote .mark {
  font-family: var(--script);
  font-size: 1.1em;
  line-height: 0;          /* keep the swash out of the line box */
  vertical-align: -.06em;
  color: var(--beige-500);
}

.quote__by {
  margin: clamp(22px, 4vh, 38px) 0 0;
  font-size: clamp(26px, 6vw, 44px);
  color: var(--ink-soft);
}

/* ============ 05 · editorial strip (typographic) ============ */

.strip .chapter__inner { max-width: 1080px; }

.strip__row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2vw, 26px);
  margin-bottom: clamp(40px, 8vh, 78px);
}

.strip__panel {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.strip__panel i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--muted-light);
}

.strip__panel b {
  font-weight: 200;
  font-size: clamp(19px, 3.6vw, 34px);
  letter-spacing: -.02em;
  line-height: 1.1;
}

.strip__caption {
  margin: 0;
  font-size: clamp(28px, 6.5vw, 52px);
  color: var(--ink-soft);
}

/* ============ 06 · details ============ */

.details__grid {
  margin: clamp(34px, 6vh, 56px) auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 56px);
  max-width: 880px;
  text-align: left;
}

.detail {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  display: grid;
  gap: 8px;
  align-content: start;
}

.detail h3 {
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail .place {
  margin: 0;
  font-weight: 200;
  font-size: clamp(21px, 3.6vw, 30px);
  letter-spacing: -.015em;
  line-height: 1.2;
}

.detail .when,
.detail .addr {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.maplink {
  margin-top: 12px;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: .3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--beige-500);
  transition: gap .35s var(--ease), border-color .35s var(--ease);
}
.maplink:hover { gap: 16px; border-color: var(--ink); }
.maplink svg { width: 11px; height: 11px; }

/* ============ 07 · countdown ============ */

.count .chapter__inner { max-width: 960px; }

.count__row {
  margin: clamp(34px, 6vh, 56px) auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(6px, 2vw, 24px);
}

.count__unit {
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: clamp(16px, 3vw, 26px) 6px;
  border-left: 1px solid var(--line-soft);
}
.count__unit:first-child { border-left: 0; }

.count__num {
  font-weight: 200;
  font-size: clamp(34px, 9vw, 78px);
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}

.count__lab {
  font-size: 9px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
}

.count__today {
  display: none;
  margin: 0 auto;
  max-width: 620px;
  font-weight: 200;
  font-size: clamp(24px, 6vw, 46px);
  line-height: 1.5;
  letter-spacing: -.02em;
}
.count__today em {
  font-family: var(--script);
  font-style: normal;
  font-size: 1.15em;
  line-height: 0;
  vertical-align: -.04em;
  color: var(--beige-500);
}
.count.is-day .count__row { display: none; }
.count.is-day .count__today { display: block; }

/* ============ 08 · rsvp ============ */

.rsvp .chapter__inner { max-width: 700px; }

.rsvp__title {
  margin: 0;
  font-weight: 200;
  font-size: clamp(34px, 9vw, 68px);
  letter-spacing: .16em;
}

.rsvp__by {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}

.form {
  margin: clamp(34px, 6vh, 52px) 0 0;
  display: grid;
  gap: 26px;
  text-align: left;
}

.field { display: grid; gap: 10px; }

.field > label {
  font-size: 9px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input[type="text"],
.field input[type="number"],
.field textarea,
.field select {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 2px;
  width: 100%;
  transition: border-color .35s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.field textarea { resize: vertical; min-height: 92px; line-height: 1.6; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.field input::placeholder,
.field textarea::placeholder { color: var(--muted-light); }

.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.choice input { position: absolute; opacity: 0; pointer-events: none; }

.choice label {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 15px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}

.choice input:checked + label {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.choice input:focus-visible + label { outline: 2px solid var(--beige-500); outline-offset: 2px; }

.btn {
  margin-top: 6px;
  justify-self: start;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 16px 40px;
  cursor: pointer;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { opacity: .84; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: default; }

.form__note {
  margin: 0;
  font-size: 12px;
  color: #a33;
  min-height: 1em;
}

.thanks {
  display: none;
  margin: clamp(30px, 6vh, 48px) auto 0;
  max-width: 560px;
}
.thanks p {
  margin: 0;
  font-weight: 200;
  font-size: clamp(20px, 4.4vw, 32px);
  line-height: 1.4;
  letter-spacing: -.015em;
}
.thanks .script { display: block; margin-top: 22px; font-size: clamp(30px, 7vw, 46px); color: var(--beige-500); }

.rsvp.is-sent .form,
.rsvp.is-sent .rsvp__by { display: none; }
.rsvp.is-sent .thanks { display: block; }

/* ============ 09 · footer ============ */

.closing .chapter__inner { display: grid; gap: 22px; justify-items: center; }

.closing__names {
  margin: 0;
  font-size: clamp(34px, 10vw, 110px);
  line-height: 1.26;
  color: var(--white);
  max-width: 100%;
}

.closing__date {
  margin: clamp(18px, 3.5vh, 34px) 0 0;
  font-size: clamp(10px, 2.4vw, 12px);
  letter-spacing: .38em;
  text-transform: uppercase;
  color: rgba(255,255,255,.62);
}

/* ============ responsive ============ */

@media (max-width: 720px) {
  .details__grid { grid-template-columns: 1fr; gap: 34px; }
  .strip__row { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
  .count__row { grid-template-columns: repeat(2, 1fr); row-gap: 10px; }
  .count__unit:nth-child(3) { border-left: 0; }
  .choice { grid-template-columns: 1fr; }
  .btn { justify-self: stretch; text-align: center; }
}
