/* ==========================================================================
   Multi-page layout: nav, image-stack sections, countdown, CTAs, forms
   ========================================================================== */

:root {
  --cream1: #fbfaf9;
  --cream2: #ffffff;
  --burgundy: #3a121a;
  --olive-btn: #83853f;
  --olive-btn-dark: #6c6e33;
}

body.page-invitation,
body.page-rsvp,
body.page-details {
  background: var(--cream1);
}

/* envelope: start the full-bleed art just below the overlay nav.
   Background matches the invitation page so the open→invitation handoff
   fades through the same cream with no flash. */
body.page-envelope { background: var(--cream1); }
.page-envelope .envelope-gate { top: 64px; }

/* invitation entrance — the page fades in and the opened envelope rises,
   so it reads as the invite emerging rather than snapping into place */
.invite-flow { animation: invite-fade 0.8s ease both; }
@keyframes invite-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-rise { animation: hero-rise 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s both; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(70px) scale(0.965); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .invite-flow, .hero-rise { animation: none; }
}

.flow { width: 100%; }

/* ---------- navigation ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 249, 0.92);
  -webkit-backdrop-filter: saturate(1.1) blur(6px);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: 1px solid var(--hairline-soft);
}

.site-nav--overlay {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 120;
  background: rgba(251, 250, 249, 0.55);
  border-bottom-color: rgba(74, 67, 47, 0.12);
}

.site-nav__list {
  list-style: none;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: clamp(1rem, 4vw, 3rem);
}

.site-nav__link {
  display: inline-block;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-nav__link:hover { color: var(--wax); }

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

/* ---------- image-stack sections ---------- */

.img-section {
  display: block;
  width: 100%;
  overflow: hidden;
}

.img-section.cream1 { background: var(--cream1); }

.stack-img {
  display: block;
  width: 100%;
  max-width: 1366px;
  height: auto;
  margin: 0 auto;
}

/* full-bleed banners span the whole width */
.img-section.bleed .stack-img,
.stack-img.bleed {
  max-width: none;
}

/* ---------- you-are-invited intro text ---------- */

.invite-intro {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 6vw, 3rem) 1.25rem clamp(2rem, 6vw, 3.5rem);
}

.invite-copy {
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0 0 1.2rem;
}

.invite-copy:last-child { margin-bottom: 0; }

.img-link {
  display: block;
  cursor: pointer;
}

.cta-block {
  padding-bottom: clamp(2rem, 6vw, 4rem);
  text-align: center;
}

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

.countdown-banner {
  position: relative;
  background: url('/images/banner-floral.png') center / cover no-repeat;
  padding: clamp(3rem, 9vw, 6rem) 1rem;
  display: flex;
  justify-content: center;
}

.countdown-inner {
  background: rgba(31, 26, 21, 0.82);
  color: #f4efe4;
  padding: 1.5rem clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  max-width: 40rem;
  width: 100%;
}

.countdown-timer {
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: clamp(0.4rem, 2vw, 1.2rem);
  font-variant-numeric: tabular-nums;
}

.calendar-links {
  margin-top: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.calendar-links .cta-underline {
  margin-top: 0;
}

.count-seg {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.4rem;
}

.count-num {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

.count-label {
  margin-top: 0.5rem;
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: rgba(244, 239, 228, 0.72);
}

.count-colon {
  font-size: clamp(1.4rem, 4.5vw, 2.2rem);
  transform: translateY(-0.4em);
  color: rgba(244, 239, 228, 0.5);
}

/* ---------- CTA links & buttons ---------- */

.cta-underline {
  display: inline-block;
  margin-top: 1.4rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.3rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.cta-underline:hover { color: var(--wax); border-bottom-color: var(--wax); }

.cta-on-dark {
  color: #f0e9dc;
  border-bottom-color: rgba(240, 233, 220, 0.6);
}
.cta-on-dark:hover { color: #fff; border-bottom-color: #fff; }

.btn-olive {
  display: inline-block;
  background: var(--olive-btn);
  color: #fbf8f1;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  font-size: 0.8rem;
  padding: 0.95em 2.6em;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.btn-olive:hover { background: var(--olive-btn-dark); }
.btn-block { width: 100%; }

/* ---------- closing block ---------- */

.closing {
  text-align: center;
  padding: clamp(2rem, 7vw, 4.5rem) 1rem clamp(2.5rem, 8vw, 5rem);
}

.closing-logo {
  display: block;
  width: min(320px, 70vw);
  height: auto;
  margin: 0 auto 1.6rem;
}

.closing .detail-eyebrow { margin-bottom: 0.5rem; }

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

.site-footer {
  text-align: center;
  padding: clamp(2.5rem, 8vw, 5rem) 1rem clamp(2rem, 6vw, 3.5rem);
  background: var(--cream1);
  border-top: 1px solid var(--hairline-soft);
}

.footer-logo {
  width: min(180px, 46vw);
  height: auto;
  margin: 0 auto 0.5rem;
  display: block;
}

.footer-thanks {
  font-family: var(--font-script);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--script-ink, #5c5a3d);
  margin: 0;
}

.footer-line {
  margin: 0.2rem 0 1.4rem;
  color: var(--ink-soft);
}

.footer-contact {
  margin: 0 0 1.6rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.footer-return {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.26em;
  text-indent: 0.26em;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 0.3rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer-return:hover { color: var(--wax); border-bottom-color: var(--wax); }

/* ---------- RSVP page ---------- */

.rsvp-intro {
  text-align: center;
  padding: 0.5rem 1rem 0;
}

.page-title {
  font-family: var(--font-script);
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--script-ink, #5c5a3d);
  margin: 0 0 0.6rem;
  line-height: 1;
}

.rsvp-deadline {
  color: var(--ink);
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.rsvp-form-section {
  padding: clamp(1.5rem, 5vw, 3rem) 1rem clamp(2.5rem, 8vw, 4rem);
  display: flex;
  justify-content: center;
}

.rsvp-form {
  width: 100%;
  max-width: 33rem;
  background: #fff;
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  box-shadow: 0 1rem 2.5rem rgba(74, 67, 47, 0.08);
}

.form-field { margin-bottom: 1.6rem; }

.form-field > label,
.attendance-field legend {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--ink);
  font-size: 1.05rem;
}

.form-field .req { color: var(--wax); margin-left: 0.15em; }
.form-field .hint { color: var(--ink-soft); font-size: 0.85em; }

.rsvp-form input[type="text"],
.rsvp-form textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(74, 67, 47, 0.3);
  border-radius: 5px;
  padding: 0.7em 0.85em;
}

.rsvp-form input[type="text"]:focus,
.rsvp-form textarea:focus {
  outline: none;
  border-color: var(--olive-btn);
  box-shadow: 0 0 0 3px rgba(131, 133, 63, 0.15);
}

.rsvp-form textarea { resize: vertical; }

.attendance-field {
  border: none;
  margin: 0 0 1.6rem;
  padding: 0;
}

.attendance-options {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.attendance-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.attendance-option input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.attendance-option span {
  display: block;
  padding: 0.85em 1em;
  background: #efece4;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--ink);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.attendance-option input:hover + span { background: #e7e3d8; }

.attendance-option input:checked + span {
  background: rgba(131, 133, 63, 0.16);
  border-color: var(--olive-btn);
}

.attendance-option input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(131, 133, 63, 0.2);
}

.rsvp-status {
  margin: 1rem 0 0;
  text-align: center;
  color: var(--olive-btn-dark);
  min-height: 1.2em;
}
.rsvp-status.is-error { color: var(--wax); }

/* ---------- Details page (live text) ---------- */

.details-header {
  text-align: center;
  padding-top: clamp(1rem, 4vw, 2.5rem);
}

.details-logo {
  width: min(260px, 60vw);
  height: auto;
  display: block;
  margin: 0 auto;
}

.detail-section {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 2.75rem) 1.25rem;
  text-align: center;
}

.detail-icon {
  width: clamp(48px, 9vw, 72px);
  height: auto;
  margin: 0 auto 0.5rem;
  display: block;
}

.detail-title {
  font-family: 'Pinyon Script', var(--font-script);
  font-size: clamp(3rem, 9.5vw, 4.6rem);
  color: var(--script-ink, #5c5a3d);
  line-height: 1.1;
  margin: 0 0 1.4rem;
}

.detail-eyebrow {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  text-indent: 0.24em;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.4rem;
}

.detail-group { margin-bottom: 1.8rem; }
.detail-group p { margin: 0.2rem 0; color: var(--ink-soft); }

.detail-lead { color: var(--ink-soft); margin: 0 0 1rem; }

.dresscode-illustration {
  display: block;
  width: 100%;
  max-width: 24rem;
  height: auto;
  margin: 0 auto 1rem;
}

/* dress-code color swatches */
.swatches {
  list-style: none;
  margin: 0 0 1.4rem;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 1.4rem);
}

.swatch {
  width: clamp(2.4rem, 9vw, 3.2rem);
  height: clamp(2.4rem, 9vw, 3.2rem);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow:
    inset 0 0 0 1px rgba(74, 67, 47, 0.12),
    0 0.25rem 0.6rem rgba(74, 67, 47, 0.14);
}

.detail-card {
  margin-top: 1.5rem;
  background: #fff;
  border: 1px solid var(--hairline-soft);
  border-radius: 8px;
  padding: 1.5rem;
}

.detail-photo {
  width: 100%;
  max-width: 22rem;
  height: auto;
  border-radius: 6px;
  margin: 0 auto 1rem;
  display: block;
}

/* timeline graphic — matches the width of the detail sections above */
.timeline-section {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 5vw, 2.75rem) 1.25rem;
  text-align: center;
}

.timeline-graphic {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

/* q&a */
.qa-item { margin-bottom: 1.5rem; }
.qa-question { margin: 0 0 0.3rem; font-weight: 600; color: var(--ink); }
.qa-answer { margin: 0; color: var(--ink-soft); }

.detail-section .cta-underline { margin: 0.6rem 0.6rem 0; }

@media (prefers-reduced-motion: reduce) {
  .site-nav__link, .cta-underline, .btn-olive, .footer-return { transition: none; }
}
