:root {
  --champagne: #f4e7d3;
  --champagne-light: #f3e4cf;
  --mocha: #8b6653;
  --mocha-dark: #654638;
  --espresso: #3b2418;
  --cream: #f7ead8;
  --shadow: 0 22px 70px rgba(59, 36, 24, 0.12);
  --radius: 2px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Montserrat", Arial, sans-serif;
  --script: "Parisienne", cursive;
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  scroll-behavior: smooth;
  background: var(--espresso-deep);
}
body {
  min-height: 100%;
  margin: 0;
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  color: var(--espresso);
  background: var(--champagne-light);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
img { display: block; width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-content: center;
  text-align: center;
  background: var(--espresso);
  color: var(--champagne);
  transition: opacity .7s ease, visibility .7s ease;
}
.preloader.is-hidden { opacity: 0; visibility: hidden; }
.preloader__mark {
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6rem);
  letter-spacing: .12em;
}
.preloader__mark span {
  font-family: var(--script);
  font-size: .75em;
  margin: 0 .15em;
}
.preloader p {
  margin: .8rem 0 0;
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: .04em;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding:
    calc(1.25rem + env(safe-area-inset-top, 0px))
    calc(clamp(1.25rem, 4vw, 4rem) + env(safe-area-inset-right, 0px))
    1.25rem
    calc(clamp(1.25rem, 4vw, 4rem) + env(safe-area-inset-left, 0px));
  color: var(--champagne-light);
  transition: background .35s ease, color .35s ease, box-shadow .35s ease, padding .35s ease;
}
.site-header.is-scrolled {
  padding-top: .85rem;
  padding-bottom: .85rem;
  color: var(--espresso);
  background: rgba(251, 246, 238, .92);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(59,36,24,.08);
}
.monogram {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  color: inherit;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: .02em;
}
.monogram span:first-child { transform: translateX(4px); }
.monogram span:last-child { transform: translateX(-4px); }
.monogram i { position: relative; z-index: 1; font-family: var(--script); font-size: 1.18em; font-weight: 400; color: var(--champagne-deep); transform: translateY(1px); }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2.5rem); }
.site-header nav a {
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .68rem;
  font-weight: 500;
}
.site-header nav a::after {
  content: "";
  display: block;
  width: 0;
  height: 1px;
  margin-top: .25rem;
  background: currentColor;
  transition: width .25s ease;
}
.site-header nav a:hover::after { width: 100%; }

.hero {
  position: relative;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  min-height: 100svh;
  min-height: 100dvh;
  height: 100svh;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--champagne-light);
  text-align: center;
}
.hero__slideshow {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero__slide {
  position: absolute;
  inset: -3%;
  opacity: 0;
  background-image: var(--hero-image);
  background-position: center;
  background-size: cover;
  transform: scale(1.055);
  transition: opacity 1.8s ease;
  will-change: opacity, transform;
}
.hero__slide.is-active {
  opacity: 1;
  animation: heroKenBurns 10s ease-out forwards;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(28,16,11,.64), rgba(38,22,15,.50) 42%, rgba(27,15,10,.78)),
    radial-gradient(circle at 50% 45%, transparent 8%, rgba(18,10,7,.46) 100%);
}
.hero__content {
  position: relative;
  z-index: 2;
  padding: 7rem 1.5rem;
  will-change: transform, opacity;
}
.eyebrow, .section-kicker {
  margin: 0 0 1.25rem;
  text-transform: uppercase;
  letter-spacing: .24em;
  font-size: .68rem;
  font-weight: 500;
}
.hero h1 {
  margin: 0;
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  font-weight: 400;
  line-height: .9;
  font-size: clamp(4rem, 11vw, 9.5rem);
  text-shadow: 0 4px 25px rgba(0,0,0,.22);
}
.hero h1 em {
  margin: .2rem 0 .4rem;
  font-family: var(--script);
  font-size: .55em;
  font-weight: 400;
}
.hero__rule { width: 60px; height: 1px; margin: 2rem auto 1.35rem; background: rgba(255,255,255,.72); }
.hero__date {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.hero__location {
  margin: .3rem 0 0;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .22em;
}
.music-button {
  position: absolute;
  right: clamp(1rem, 3vw, 2.5rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 3;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px;
  padding: .7rem 1rem;
  display: inline-flex;
  gap: .55rem;
  align-items: center;
  color: white;
  background: rgba(33,20,14,.28);
  backdrop-filter: blur(8px);
  font: 500 .68rem/1 var(--sans);
  text-transform: uppercase;
  letter-spacing: .12em;
  cursor: pointer;
  transition: transform .25s ease, background .25s ease;
}
.music-button:hover { transform: translateY(-2px); background: rgba(33,20,14,.52); }
.music-button.is-playing .music-button__icon { animation: pulse 1.2s infinite; }
.scroll-cue {
  position: absolute;
  z-index: 3;
  bottom: 1.6rem;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  gap: .45rem;
  color: var(--champagne-light);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .6rem;
}
.scroll-cue i {
  display: block;
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,.72);
  transform-origin: top;
  animation: scrollLine 1.8s ease-in-out infinite;
}

.quote-section,
.countdown-section,
.celebration-section,
.venue-section,
.rsvp-section {
  padding: clamp(5.5rem, 10vw, 9rem) clamp(1.25rem, 5vw, 5rem);
}
.quote-section {
  min-height: 90vh;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  background: var(--champagne-light);
}
.ornament { color: var(--mocha); font-size: 1.1rem; margin-bottom: 1.5rem; }
.quote-section h2,
.section-heading h2,
.countdown-section h2,
.rsvp-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1.03;
}
.quote-lead {
  margin: 2.4rem auto 1.2rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
}
.quote-copy { max-width: 670px; margin: 0 auto; font-size: .98rem; }
.signature span {
  display: block;
  margin-bottom: -.3rem;
  font-family: var(--serif);
  font-size: .95rem;
  font-style: italic;
}

.countdown-section {
  text-align: center;
  color: var(--champagne-light);
  background: var(--espresso);
}
.countdown-section .section-kicker { color: #d9bea9; }
.countdown-section h2 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.countdown {
  max-width: 900px;
  margin: clamp(2.5rem, 6vw, 5rem) auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.countdown div {
  position: relative;
  padding: .5rem;
}
.countdown div:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 10%;
  width: 1px;
  height: 80%;
  background: rgba(244,231,211,.22);
}
.countdown strong {
  display: block;
  font-family: var(--serif);
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 400;
  line-height: 1;
}
.countdown span {
  display: block;
  margin-top: .8rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .62rem;
}
.countdown-note {
  margin: 0 auto;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.celebration-section { background: var(--champagne); }
.section-heading {
  max-width: 760px;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
  text-align: center;
}
.section-heading .section-kicker { color: var(--mocha); }
.details-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.detail-card {
  min-height: 360px;
  padding: clamp(2rem, 4vw, 3.5rem) 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(59,36,24,.15);
  background: rgba(255,250,242,.54);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.detail-card:hover { transform: translateY(-7px); box-shadow: var(--shadow); background: var(--cream); }
.detail-card__icon { color: var(--mocha); font-size: 1.2rem; }
.detail-card__type {
  margin: 1.2rem 0 .8rem;
  text-transform: uppercase;
  letter-spacing: .17em;
  font-size: .67rem;
  font-weight: 500;
}
.detail-card h3 {
  margin: 0 0 1rem;
  font: 400 clamp(2rem, 3vw, 3rem)/1.05 var(--serif);
}
.detail-card p:last-child { margin: 0; font-size: .85rem; }

.venue-section { background: var(--champagne); }
.venue-list { max-width: 1180px; margin: 0 auto; display: grid; gap: 2rem; }
.venue-card {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  min-height: 450px;
  background: var(--cream);
  box-shadow: var(--shadow);
}
.venue-card--reverse { grid-template-columns: 1fr 1.35fr; }
.venue-card--reverse .venue-card__image { order: 2; }
.venue-card__image { overflow: hidden; }
.venue-card__image img {
  height: 100%;
  object-fit: cover;
  transition: transform .8s ease;
}
.venue-card:hover img { transform: scale(1.025); }
.venue-card__content {
  padding: clamp(2.4rem, 5vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.venue-card__content .section-kicker { color: var(--mocha); }
.venue-card h3 {
  margin: 0;
  font: 400 clamp(2.5rem, 5vw, 4.5rem)/1 var(--serif);
}
.venue-card__content > p:not(.section-kicker) { margin: 1rem 0 2rem; }
.button {
  width: fit-content;
  min-width: 170px;
  padding: .9rem 1.25rem;
  border: 1px solid var(--espresso);
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .65rem;
  font-weight: 500;
  transition: color .25s ease, background .25s ease, transform .25s ease;
}
.button:hover { color: var(--champagne-light); background: var(--espresso); transform: translateY(-2px); }

.rsvp-section {
  display: grid;
  place-items: center;
  min-height: 78vh;
  text-align: center;
  background:
    linear-gradient(rgba(59,36,24,.86), rgba(59,36,24,.89)),
    url("assets/images/rings-hero.webp") center/cover fixed;
}
.rsvp-card {
  width: min(760px, 100%);
  padding: clamp(3rem, 8vw, 6rem) clamp(1.5rem, 6vw, 5rem);
  color: var(--champagne-light);
  border: 1px solid rgba(244,231,211,.35);
  background: rgba(59,36,24,.35);
  backdrop-filter: blur(8px);
}
.rsvp-card .section-kicker { color: #d9bea9; }
.rsvp-card p:not(.section-kicker) { max-width: 520px; margin: 1.4rem auto 2.3rem; }
.button--light { margin: 0 auto; color: var(--champagne-light); border-color: var(--champagne-light); }
.button--light:hover { color: var(--espresso); background: var(--champagne-light); }


.rsvp-card { width: min(860px, 100%); }
.rsvp-card__intro { max-width: 650px; margin: 0 auto; }
.rsvp-form {
  max-width: 650px;
  margin: 2.6rem auto 0;
  display: grid;
  gap: 1.4rem;
  text-align: left;
}
.form-field {
  display: grid;
  gap: .55rem;
  margin: 0;
  padding: 0;
  border: 0;
}
.form-field label,
.form-field legend {
  color: var(--champagne-light);
  font-size: .64rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.form-field label em {
  margin-left: .4rem;
  font-style: normal;
  opacity: .55;
}
.form-field input[type="text"],
.form-field textarea {
  width: 100%;
  border: 1px solid rgba(244,231,211,.34);
  border-radius: 0;
  padding: 1rem 1.05rem;
  color: var(--champagne-light);
  background: rgba(255,255,255,.055);
  outline: none;
  font: 300 .9rem/1.5 var(--sans);
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.form-field textarea { resize: vertical; min-height: 118px; }
.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(244,231,211,.48); }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--champagne-deep);
  background: rgba(255,255,255,.08);
  box-shadow: 0 0 0 3px rgba(223,198,168,.10);
}
.attendance-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
.attendance-options label { position: relative; cursor: pointer; }
.attendance-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.attendance-options span {
  min-height: 54px;
  padding: .85rem 1rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244,231,211,.34);
  color: var(--champagne-light);
  background: rgba(255,255,255,.045);
  text-align: center;
  font-size: .72rem;
  letter-spacing: .06em;
  text-transform: none;
  transition: color .25s ease, background .25s ease, border-color .25s ease;
}
.attendance-options input:checked + span {
  color: var(--espresso);
  border-color: var(--champagne-light);
  background: var(--champagne-light);
}
.rsvp-submit {
  width: 100%;
  max-width: 320px;
  margin: .3rem auto 0;
  border-radius: 0;
  cursor: pointer;
  font-family: var(--sans);
}
.rsvp-submit:disabled { cursor: wait; opacity: .62; }
.form-status { min-height: 0; margin: .2rem 0 0 !important; text-align: center; font-size: .78rem; }
.form-status.is-success, .form-status.is-error { padding: 1rem 1.1rem; border: 1px solid rgba(244,231,211,.28); background: rgba(255,255,255,.06); }
.form-status.is-success { color: #f4e7d3; }
.form-status.is-error, .field-error { color: #ffd2c8; }
.form-status strong { display: block; margin-bottom: .2rem; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; }
.form-status span { display: block; opacity: .88; }
.field-error { min-height: 1.1em; font-size: .68rem; }
.form-field.has-error input[type="text"],
.form-field.has-error textarea,
.attendance-field.has-error .attendance-options span { border-color: #ffd2c8; }

footer {
  padding: 4.5rem 1.25rem;
  text-align: center;
  color: var(--champagne-light);
  background: #2d1a12;
}
.footer-date {
  margin: 0 0 .6rem;
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: .14em;
}
footer > p:nth-child(2) { margin: 0; font-size: .8rem; letter-spacing: .06em; }
.signature--footer { margin-top: 1.7rem; color: var(--champagne); }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s ease, transform .9s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }

@keyframes heroZoom { to { transform: scale(1); } }
@keyframes scrollLine {
  0%, 100% { transform: scaleY(.25); opacity: .45; }
  50% { transform: scaleY(1); opacity: 1; }
}
@keyframes pulse { 50% { transform: scale(1.18); } }

@media (max-width: 820px) {
  .site-header nav { display: none; }
  .hero h1 { font-size: clamp(4rem, 20vw, 7rem); }
  .music-button__label { display: none; }
  .music-button { width: 44px; height: 44px; justify-content: center; padding: 0; }
  .scroll-cue { display: none; }

  .countdown { grid-template-columns: repeat(2, 1fr); gap: 2rem 0; }
  .countdown div:nth-child(2)::after { display: none; }
  .countdown div::after { height: 70%; top: 15%; }

  .details-grid { grid-template-columns: 1fr; }
  .detail-card { min-height: 300px; }

  .venue-card,
  .venue-card--reverse { grid-template-columns: 1fr; }
  .venue-card--reverse .venue-card__image { order: 0; }
  .venue-card__image { min-height: 300px; }
  .venue-card__content { text-align: center; align-items: center; }
  .rsvp-section { background-attachment: scroll; }
}

@media (max-width: 520px) {
  .site-header { padding-left: 1rem; padding-right: 1rem; }
  .hero__content { padding-top: 5.5rem; }
  .hero h1 { line-height: .92; }
  .quote-copy { font-size: .9rem; }
  .countdown strong { font-size: 3.6rem; }
  .venue-card__image { min-height: 240px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}


/* Version 2 polish */
.page-progress{position:fixed;inset:0 0 auto;z-index:1000;height:2px;pointer-events:none}.page-progress span{display:block;width:0;height:100%;background:var(--champagne)}
.preloader__rings{position:relative;width:84px;height:46px;margin:0 auto 1.1rem}.preloader__rings span{position:absolute;width:42px;height:42px;border:1px solid #d8c3a5;border-radius:50%;animation:ringBreathe 1.8s ease-in-out infinite alternate}.preloader__rings span:first-child{left:8px}.preloader__rings span:last-child{right:8px;animation-delay:.25s}
.hero__grain{position:absolute;inset:0;opacity:.12;mix-blend-mode:soft-light;background-image:repeating-radial-gradient(circle at 0 0,transparent 0,rgba(255,255,255,.08) 1px,transparent 2px,transparent 4px)}
.music-button{padding:.5rem 1rem .5rem .5rem}.music-button__disc{width:38px;height:38px;display:grid;place-items:center;border-radius:50%;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.2)}.music-button__text{display:grid;text-align:left;line-height:1.1}.music-button__text small{font:400 .54rem/1 var(--sans);text-transform:uppercase;letter-spacing:.16em;opacity:.7}.music-button__text strong{margin-top:.28rem;font:500 .65rem/1 var(--sans);text-transform:uppercase;letter-spacing:.11em}.music-button.is-playing .music-button__disc{animation:spin 5s linear infinite}
.short-rule{display:block;width:58px;height:1px;margin:2rem auto;background:#d8c3a5}.quote-section .section-kicker{color:var(--mocha)}
.countdown-section{position:relative;overflow:hidden;background:radial-gradient(circle at 50% 0%,rgba(139,102,83,.45),transparent 42%),var(--espresso)}.countdown-section:before,.countdown-section:after{content:"";position:absolute;border:1px solid rgba(241,225,200,.08);border-radius:50%}.countdown-section:before{width:420px;height:420px;top:-210px;left:-180px}.countdown-section:after{width:560px;height:560px;right:-280px;bottom:-320px}.countdown-section>*{position:relative;z-index:1}
.detail-card{position:relative;overflow:hidden}.detail-card__number{position:absolute;top:1.2rem;right:1.4rem;font-family:var(--serif);font-size:1.2rem;color:rgba(59,36,24,.22)}
.venue-card__image{position:relative}.venue-card__tag{position:absolute;left:1rem;bottom:1rem;padding:.55rem .8rem;color:white;background:rgba(36,20,14,.62);backdrop-filter:blur(8px);font-size:.58rem;text-transform:uppercase;letter-spacing:.16em}
.button{display:inline-flex;align-items:center;justify-content:space-between;gap:1.5rem}.button b{font-size:.9rem;font-weight:400;transition:transform .25s ease}.button:hover b{transform:translate(2px,-2px)}
.rsvp-card{position:relative;overflow:hidden}.rsvp-card>*{position:relative;z-index:1}.rsvp-card__ring{position:absolute;width:220px;height:220px;border:1px solid rgba(241,225,200,.12);border-radius:50%;z-index:0}.rsvp-card__ring--one{top:-120px;left:-80px}.rsvp-card__ring--two{right:-90px;bottom:-130px}.footer-monogram{margin-bottom:1.2rem;font-family:var(--serif);font-size:2rem;letter-spacing:.12em;color:var(--champagne)}
@keyframes spin{to{transform:rotate(360deg)}}@keyframes ringBreathe{to{transform:scale(1.08);opacity:.55}}
@media(max-width:820px){.music-button__text{display:none}.music-button{width:48px;height:48px;justify-content:center;padding:0}.music-button__disc{width:36px;height:36px}}

@media (max-width: 520px) {
  .hero {
    width: 100%;
    min-height: 100svh;
    min-height: 100dvh;
    height: 100svh;
    height: 100dvh;
  }

  .hero__content {
    width: 100%;
    max-width: 100vw;
    padding-left: .55rem;
    padding-right: .55rem;
    overflow: visible;
  }

  .hero h1 {
    width: 100%;
    max-width: 100%;
    align-items: center;
    font-size: clamp(3rem, 14.2vw, 4.25rem);
    line-height: .94;
  }

  .hero__name {
    width: 100%;
    font-size: 1em;
    letter-spacing: -.04em;
    transform: scaleX(.94);
    transform-origin: center;
  }

  .venue-card__image {
    min-height: 0;
    aspect-ratio: 16 / 10;
  }

  .venue-card__content {
    min-height: 250px;
    padding-top: 2.2rem;
    padding-bottom: 2.2rem;
  }

  .attendance-options { grid-template-columns: 1fr; }
  .rsvp-card { padding-left: 1.15rem; padding-right: 1.15rem; }
}


/* Version 4: safe-area and viewport polish */
@supports (padding: max(0px)) {
  .site-header {
    padding-top: max(1.1rem, env(safe-area-inset-top));
  }

  .music-button {
    right: max(clamp(1rem, 3vw, 2.5rem), env(safe-area-inset-right));
    bottom: max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-bottom));
  }

  .scroll-cue {
    bottom: max(1.6rem, env(safe-area-inset-bottom));
  }

  footer {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Avoid body safe-area padding shrinking the full-bleed hero. */
body {
  padding: 0;
}

.hero,
.rsvp-section,
footer {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}


/* Version 6 — final invitation polish */
.preloader__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .02em;
  animation: preloaderMark 1.8s ease both;
}
.preloader__mark span:first-child { transform: translateX(8px); }
.preloader__mark span:last-child { transform: translateX(-8px); }
.preloader__mark b {
  position: relative;
  z-index: 1;
  color: var(--champagne-deep);
}
.preloader__date {
  margin-top: .75rem !important;
  font-family: var(--serif) !important;
  font-style: normal !important;
  font-size: .8rem;
  letter-spacing: .28em !important;
  animation: preloaderDate 1.8s .25s ease both;
}
@keyframes preloaderMark {
  0% { opacity: 0; transform: translateY(8px); }
  45%, 72% { opacity: 1; transform: none; }
  100% { opacity: .25; transform: translateY(-3px); }
}
@keyframes preloaderDate {
  0%, 30% { opacity: 0; transform: translateY(6px); }
  65%, 100% { opacity: 1; transform: none; }
}

/* Typography-only celebration cards */
.detail-card {
  min-height: 330px;
}
.detail-card__number {
  font-size: 1rem;
}
.detail-card__type {
  margin-top: 0;
}
.detail-card h3 {
  margin-top: .4rem;
}
.detail-card::before {
  content: "";
  width: 42px;
  height: 1px;
  margin: 0 auto 1.55rem;
  background: rgba(59,36,24,.32);
}

/* Editorial venue treatment */
.venue-list {
  gap: clamp(4rem, 8vw, 7rem);
}
.venue-card,
.venue-card--reverse {
  grid-template-columns: 1fr;
  min-height: 0;
  max-width: 920px;
  margin: 0 auto;
  background: transparent;
  box-shadow: none;
}
.venue-card--reverse .venue-card__image {
  order: 0;
}
.venue-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 0;
}
.venue-card__image::after {
  background:
    linear-gradient(180deg, rgba(36,20,14,.02), rgba(36,20,14,.26)),
    linear-gradient(90deg, rgba(59,36,24,.08), transparent 55%);
}
.venue-card__tag {
  left: 50%;
  bottom: 1.1rem;
  transform: translateX(-50%);
  white-space: nowrap;
}
.venue-card__content {
  min-height: 0;
  padding: clamp(2rem, 5vw, 3.2rem) 1rem 0;
  align-items: center;
  text-align: center;
}
.venue-card__content .section-kicker {
  margin-bottom: .9rem;
}
.venue-card h3 {
  max-width: 100%;
  font-size: clamp(2.7rem, 6vw, 5rem);
}
.venue-address {
  margin: 1.1rem 0 2rem !important;
  font-size: .8rem;
  line-height: 1.8;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Form controls: explicitly remove browser blue styling */
.rsvp-form input,
.rsvp-form textarea,
.rsvp-form button {
  -webkit-appearance: none;
  appearance: none;
}
.attendance-options input {
  accent-color: var(--champagne);
}
.rsvp-submit,
.rsvp-submit:visited,
.rsvp-submit:focus,
.rsvp-submit:active {
  color: var(--champagne-light);
  border-color: var(--champagne-light);
  background: transparent;
  outline: none;
  box-shadow: none;
}
.rsvp-submit:hover {
  color: var(--espresso);
  border-color: var(--champagne-light);
  background: var(--champagne-light);
}
.rsvp-submit:focus-visible {
  box-shadow: 0 0 0 3px rgba(244,231,211,.18);
}

/* One unified editorial action style */
.venue-card .button {
  color: var(--espresso);
  border-color: rgba(59,36,24,.72);
}
.venue-card .button:hover {
  color: var(--champagne-light);
  background: var(--espresso);
}

@media (max-width: 820px) {
  .venue-list {
    gap: 4.5rem;
  }
  .venue-card__image {
    aspect-ratio: 4 / 3;
  }
  .venue-card__content {
    padding-top: 1.8rem;
  }
  .detail-card {
    min-height: 280px;
  }
}

@media (max-width: 520px) {
  .venue-card__image {
    aspect-ratio: 4 / 3;
  }
  .venue-card h3 {
    font-size: clamp(2.55rem, 13vw, 3.7rem);
  }
  .venue-address {
    margin-bottom: 1.6rem !important;
  }
  .rsvp-submit {
    max-width: 100%;
  }
}


/* Version 7 — compact venues, fixed music control, stronger RSVP states */

/* Keep the music control available throughout the invitation. */
.music-button {
  position: fixed;
  z-index: 240;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  color: var(--champagne-light);
  border-color: rgba(244,231,211,.42);
  background: rgba(36,20,14,.88);
  box-shadow: 0 12px 32px rgba(20,10,6,.22);
}
.music-button:hover {
  color: var(--champagne-light);
  background: rgba(59,36,24,.96);
}
.music-button:focus-visible {
  outline: 2px solid var(--champagne-deep);
  outline-offset: 3px;
}

/* Return venues to the compact editorial-card layout. */
.venue-list {
  max-width: 1180px;
  gap: 2rem;
}
.venue-card,
.venue-card--reverse {
  max-width: none;
  min-height: 380px;
  margin: 0;
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  background: var(--cream);
  box-shadow: var(--shadow);
}
.venue-card--reverse {
  grid-template-columns: .95fr 1.25fr;
}
.venue-card--reverse .venue-card__image {
  order: 2;
}
.venue-card__image {
  width: auto;
  min-height: 380px;
  aspect-ratio: auto;
}
.venue-card__content {
  min-height: 380px;
  padding: clamp(2.2rem, 4vw, 4rem);
  align-items: flex-start;
  text-align: left;
}
.venue-card h3 {
  font-size: clamp(2.5rem, 4.5vw, 4.2rem);
}
.venue-address {
  margin: 1rem 0 1.8rem !important;
  text-align: left;
}
.venue-card__tag {
  left: 1rem;
  bottom: 1rem;
  transform: none;
}

/* Footer closing should read like a handwritten signature again. */
.signature--footer {
  margin-top: 1.7rem;
  color: var(--champagne);
  font-family: var(--script);
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.05;
}
.signature--footer span {
  margin-bottom: .05rem;
  font-family: var(--serif);
  font-size: .95rem;
  letter-spacing: .04em;
}

/* RSVP action remains mocha at every interaction state — never browser blue/white. */
.rsvp-submit,
.rsvp-submit:link,
.rsvp-submit:visited,
.rsvp-submit:hover,
.rsvp-submit:focus,
.rsvp-submit:active {
  color: var(--champagne-light) !important;
  border-color: var(--mocha) !important;
  background: var(--mocha) !important;
  -webkit-tap-highlight-color: transparent;
}
.rsvp-submit:hover {
  background: var(--mocha-dark) !important;
  border-color: var(--mocha-dark) !important;
}
.rsvp-submit:active {
  transform: translateY(1px);
  background: #563a2f !important;
}
.rsvp-submit b,
.rsvp-submit b::after {
  color: currentColor;
}

/* Clear visual validation, without aggressive browser-default colours. */
.form-field.has-error input[type="text"],
.form-field.has-error textarea,
.attendance-field.has-error .attendance-options span {
  border-color: #efb7aa !important;
  box-shadow: 0 0 0 2px rgba(239,183,170,.12);
}
.field-error {
  display: block;
  color: #ffd2c8;
}
.rsvp-form input:invalid,
.rsvp-form textarea:invalid {
  box-shadow: none;
}

@media (max-width: 820px) {
  .venue-card,
  .venue-card--reverse {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .venue-card--reverse .venue-card__image {
    order: 0;
  }
  .venue-card__image {
    min-height: 240px;
    aspect-ratio: 16 / 10;
  }
  .venue-card__content {
    min-height: 0;
    padding: 2rem 1.4rem 2.3rem;
    align-items: center;
    text-align: center;
  }
  .venue-address {
    text-align: center;
  }
  .music-button {
    width: 48px;
    height: 48px;
    padding: 0;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .venue-list {
    gap: 2.4rem;
  }
  .venue-card__image {
    min-height: 220px;
    aspect-ratio: 4 / 3;
  }
  .venue-card h3 {
    font-size: clamp(2.45rem, 12vw, 3.5rem);
  }
}

@media (hover: none) {
  .rsvp-submit:hover {
    color: var(--champagne-light) !important;
    border-color: var(--mocha) !important;
    background: var(--mocha) !important;
    transform: none;
  }
}


/* Version 8 — compact venue cards and restored elegant opening */

/* Venue image frame: shorter and more restrained */
.venue-card,
.venue-card--reverse {
  min-height: 320px;
}
.venue-card__image {
  min-height: 320px;
}
.venue-card__content {
  min-height: 320px;
  padding: clamp(1.8rem, 3.2vw, 3rem);
}
.venue-card h3 {
  margin-bottom: .35rem;
  font-size: clamp(2.15rem, 3.8vw, 3.35rem);
  line-height: .9;
}
.venue-card__content .section-kicker {
  margin-bottom: .65rem;
}
.venue-address {
  margin: .85rem 0 1.45rem !important;
  font-size: .74rem;
  line-height: 1.65;
}

/* The overlay label has been removed; keep images clean */
.venue-card__tag {
  display: none !important;
}

/* Elegant opening sequence */
.preloader__quote {
  margin: .55rem 0 0;
  color: var(--champagne);
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-style: italic;
  font-weight: 400;
  letter-spacing: .035em;
  opacity: 0;
  animation: preloaderQuote 2.2s .35s ease both;
}
.preloader__date {
  margin-top: .85rem !important;
  opacity: 0;
  animation: preloaderDateElegant 2.2s .75s ease both;
}
@keyframes preloaderQuote {
  0%, 15% { opacity: 0; transform: translateY(6px); }
  42%, 78% { opacity: 1; transform: none; }
  100% { opacity: .2; transform: translateY(-3px); }
}
@keyframes preloaderDateElegant {
  0%, 35% { opacity: 0; transform: translateY(6px); }
  62%, 100% { opacity: 1; transform: none; }
}

@media (max-width: 820px) {
  .venue-card,
  .venue-card--reverse {
    min-height: 0;
  }
  .venue-card__image {
    min-height: 200px;
    aspect-ratio: 16 / 9;
  }
  .venue-card__content {
    min-height: 0;
    padding: 1.55rem 1.25rem 1.9rem;
  }
  .venue-card h3 {
    font-size: clamp(2.1rem, 9vw, 3rem);
    line-height: .92;
  }
  .venue-address {
    margin-bottom: 1.25rem !important;
  }
}

@media (max-width: 520px) {
  .venue-card__image {
    min-height: 185px;
    aspect-ratio: 16 / 10;
  }
  .venue-list {
    gap: 1.8rem;
  }
}


.hero-reveal {
  opacity: 0;
  transform: translateY(14px);
}
body.hero-ready .hero-reveal {
  animation: heroTextIn .8s cubic-bezier(.2,.7,.2,1) forwards;
}
body.hero-ready .hero-reveal--1 { animation-delay: .12s; }
body.hero-ready .hero-reveal--2 { animation-delay: .42s; }
body.hero-ready .hero-reveal--3 { animation-delay: .70s; }
body.hero-ready .hero-reveal--4 { animation-delay: .98s; }
body.hero-ready .hero-reveal--5 { animation-delay: 1.28s; }

@keyframes heroTextIn {
  to { opacity: 1; transform: none; }
}
@keyframes heroKenBurns {
  from { transform: scale(1.055); }
  to { transform: scale(1.01); }
}


/* Version 9 venue refinement */
.venue-card,
.venue-card--reverse {
  min-height: 285px;
}
.venue-card__image {
  min-height: 285px;
}
.venue-card__content {
  min-height: 285px;
  padding: clamp(1.5rem, 2.8vw, 2.4rem);
}
.venue-card h3 {
  font-size: clamp(1.95rem, 3.2vw, 2.8rem);
  line-height: .95;
}
.venue-card__content .section-kicker {
  display: none;
}
.venue-card__tag {
  display: inline-flex !important;
  left: 1rem;
  bottom: 1rem;
  transform: none;
  padding: .48rem .72rem;
  color: var(--champagne-light);
  background: rgba(36,20,14,.58);
  border: 1px solid rgba(244,231,211,.16);
  backdrop-filter: blur(8px);
  font-size: .56rem;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.venue-address {
  margin: .75rem 0 1.2rem !important;
  font-size: .70rem;
  line-height: 1.55;
}
.venue-card .button {
  min-width: 170px;
  min-height: 44px;
  padding: .76rem 1rem;
}

@media (max-width: 820px) {
  .venue-card__image {
    min-height: 175px;
    aspect-ratio: 16 / 9;
  }
  .venue-card__content {
    min-height: 0;
    padding: 1.3rem 1rem 1.6rem;
  }
  .venue-card h3 {
    font-size: clamp(1.9rem, 8.7vw, 2.65rem);
    line-height: .96;
  }
}
@media (max-width: 520px) {
  .venue-card__image {
    min-height: 165px;
    aspect-ratio: 16 / 10;
  }
}


/* Stable build safeguards */
.hero__slideshow {
  opacity: 1;
}
.hero__slide {
  pointer-events: none;
}
.hero__slide.is-active {
  z-index: 1;
}
.hero__overlay,
.hero__grain,
.hero__content {
  z-index: 2;
}
.hero__overlay,
.hero__grain {
  pointer-events: none;
}

/* Content must never remain permanently hidden. */
.reveal {
  will-change: opacity, transform;
}
@media (prefers-reduced-motion: reduce) {
  .hero-reveal,
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* Version 10 — mobile-first venue correction and spacing pass */

/* Venue names must remain single-line, especially on phones. */
.venue-name {
  width: 100%;
  max-width: 100%;
  margin: 0;
  white-space: nowrap;
  text-align: inherit;
  overflow: visible;
  font-size: clamp(1.75rem, 3.1vw, 2.65rem) !important;
  line-height: 1.05 !important;
  letter-spacing: -.025em;
}

.venue-address {
  display: grid;
  gap: .1rem;
}

.venue-address span {
  display: block;
}

/* Mobile-first compact venue treatment */
@media (max-width: 820px) {
  .venue-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .venue-list {
    width: 100%;
    gap: 1.6rem;
  }

  .venue-card,
  .venue-card--reverse {
    width: 100%;
    max-width: 100%;
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .venue-card--reverse .venue-card__image {
    order: 0;
  }

  .venue-card__image {
    width: 100%;
    min-height: 0 !important;
    height: clamp(170px, 47vw, 210px);
    aspect-ratio: auto !important;
  }

  .venue-card__content {
    min-height: 0 !important;
    padding: 1.25rem 1rem 1.45rem;
    align-items: center;
    text-align: center;
  }

  .venue-name {
    font-size: clamp(1.55rem, 7.2vw, 2.05rem) !important;
    line-height: 1.08 !important;
    letter-spacing: -.035em;
  }

  .venue-name--church {
    transform: scaleX(.94);
    transform-origin: center;
  }

  .venue-address {
    margin: .65rem 0 1.1rem !important;
    text-align: center;
    font-size: .68rem;
    line-height: 1.45;
    letter-spacing: .075em;
  }

  .venue-card .button {
    width: min(100%, 210px);
    min-width: 0;
    min-height: 42px;
    padding: .72rem .95rem;
  }

  .venue-card__tag {
    left: .8rem;
    bottom: .8rem;
    padding: .42rem .65rem;
    font-size: .52rem;
  }
}

/* Narrow iPhones and small Android devices */
@media (max-width: 390px) {
  .venue-section {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .venue-card__image {
    height: 165px;
  }

  .venue-card__content {
    padding-left: .8rem;
    padding-right: .8rem;
  }

  .venue-name {
    font-size: 1.48rem !important;
  }

  .venue-name--church {
    transform: scaleX(.92);
  }

  .venue-address {
    font-size: .64rem;
  }
}

/* Larger phones: still keep the venue name on one line. */
@media (min-width: 391px) and (max-width: 520px) {
  .venue-name--church {
    font-size: clamp(1.55rem, 6.6vw, 1.9rem) !important;
  }
}

/* General mobile spacing pass */
@media (max-width: 520px) {
  .quote-section,
  .countdown-section,
  .celebration-section,
  .venue-section,
  .rsvp-section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .section-heading {
    margin-bottom: 2.4rem;
  }

  .section-heading h2,
  .countdown-section h2,
  .rsvp-card h2 {
    line-height: 1.05;
  }

  .details-grid {
    gap: 1rem;
  }

  .detail-card {
    min-height: 245px;
    padding: 1.7rem 1.1rem;
  }

  .rsvp-card {
    padding-top: 2.8rem;
    padding-bottom: 2.8rem;
  }

  .rsvp-form {
    gap: 1.15rem;
  }
}


/* Final usability and sharing polish */
.made-by {
  margin: 2.4rem 0 0;
  color: rgba(244,231,211,.55);
  font-size: .64rem;
  letter-spacing: .08em;
}

.rsvp-form,
.rsvp-success-panel {
  transition: opacity .55s ease, transform .55s ease;
}

.rsvp-card.is-complete .rsvp-card__intro,
.rsvp-card.is-complete .rsvp-form {
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
}

.rsvp-success-panel {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

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

.rsvp-success-panel.is-entering {
  opacity: 0;
  transform: translateY(20px);
}

.rsvp-success-panel.is-visible {
  opacity: 1;
  transform: none;
}

.rsvp-success-panel__mark {
  width: 58px;
  height: 58px;
  margin: 0 auto 1.2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244,231,211,.55);
  border-radius: 50%;
  color: var(--champagne-light);
  font-family: var(--serif);
  font-size: 1.8rem;
}

.rsvp-success-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 400;
  line-height: 1;
}

.rsvp-success-panel > p:not(.section-kicker) {
  margin: 1.2rem auto 2rem;
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
}

.calendar-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .8rem;
}

.calendar-button {
  min-width: 220px;
  cursor: pointer;
  font-family: var(--sans);
}

/* Music control: expanded at first on mobile, compact after scrolling. */
body.has-scrolled .music-button {
  width: 48px;
  height: 48px;
  padding: 0;
  justify-content: center;
}

body.has-scrolled .music-button__text {
  display: none;
}

@media (max-width: 820px) {
  .music-button {
    width: auto;
    height: auto;
    min-height: 48px;
    padding: .5rem 1rem .5rem .5rem;
    justify-content: flex-start;
  }

  .music-button__text {
    display: grid;
  }

  .scroll-cue {
    display: grid;
    bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  }

  .scroll-cue span {
    font-size: .56rem;
  }

  .scroll-cue i {
    height: 24px;
  }

  .calendar-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 520px) {
  .music-button {
    right: max(.75rem, env(safe-area-inset-right, 0px));
    bottom: max(.75rem, env(safe-area-inset-bottom, 0px));
  }

  .scroll-cue {
    left: 1rem;
    bottom: max(1.15rem, env(safe-area-inset-bottom, 0px));
    transform: none;
    justify-items: start;
  }

  .rsvp-success-panel h2 {
    font-size: 3rem;
  }
}
