:root {
  color-scheme: light;
  --paper: #fcf7ed;
  --cream: #fcf7ed;
  --sage: #e6ead9;
  --green: #43523d;
  --green-deep: #394b38;
  --pink: #f3e1df;
  --rose: #965362;
  --ink: #413c34;
  --muted: #665c53;
  --line: #c9c4a8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --script: "Great Vibes", "Cormorant Garamond", Georgia, cursive;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 1.33rem/1.45 var(--serif); }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, .signature { color: var(--green); font-family: var(--script); font-weight: 400; line-height: 1.08; }
h2 { font-size: clamp(2.85rem, 11vw, 4.7rem); padding-inline: .12em; }
.eyebrow {
  color: var(--rose);
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.section { position: relative; text-align: center; padding: 4.6rem 1.35rem; }
.prose { max-width: 33rem; margin: 1.05rem auto 0; text-wrap: pretty; }
.note { max-width: 28rem; margin: .8rem auto 0; font-size: .96rem; color: var(--muted); line-height: 1.35; }

.hero {
  padding: clamp(.7rem, 2.8vw, 1.8rem);
  background: radial-gradient(ellipse at 2% 20%, #f3e1d8, transparent 53%),
    radial-gradient(ellipse at 100% 85%, #ecedda, transparent 55%), var(--paper);
  text-align: center;
}
.hero-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 auto;
  padding: clamp(2.5rem, 8svh, 5rem) 1rem 1.2rem;
  max-width: 70rem;
  min-height: calc(91svh - 1.4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hero h1 { margin: .3em 0 .11em; font-size: clamp(3.92rem, 15vw, 7.7rem); white-space: nowrap; }
.hero-date {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 700;
  font-size: clamp(1.02rem, 4vw, 1.28rem);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green);
}
.hero-date span { width: 1.5rem; height: 1px; background: var(--rose); opacity: .6; }
.hero-art {
  width: min(100%, 60svh, 37rem);
  margin: 1.1rem auto 1.25rem;
  mix-blend-mode: multiply;
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent),
    linear-gradient(transparent, #000 12%, #000 90%, transparent);
  mask-composite: intersect;
}
.scroll-link {
  display: inline-flex;
  gap: .5rem;
  min-height: 2.75rem;
  align-items: center;
  text-decoration: none;
  color: var(--green);
  font-size: .88rem;
  letter-spacing: .13em;
  font-weight: 700;
  text-transform: uppercase;
}
.scroll-link span { font-size: 1.2rem; color: var(--rose); }

.welcome { padding-bottom: 4rem; }
.date-stamp {
  display: grid;
  gap: .24rem;
  margin: 1.65rem auto 0;
  width: min(100%, 14.5rem);
  padding: 1rem .5rem .85rem;
  border-block: 1px solid var(--line);
}
.date-stamp time { color: var(--green); font-size: 1.85rem; line-height: 1.2; letter-spacing: .12em; }

.countdown {
  color: var(--cream);
  background: radial-gradient(ellipse at 12% 100%, #627457 0, transparent 53%),
    radial-gradient(ellipse at 100% 0, #63745d 0, transparent 48%), var(--green-deep);
  padding-block: 3.65rem 3.9rem;
}
.countdown h2 { color: inherit; font-size: clamp(2.32rem, 9.5vw, 4.25rem); }
.count-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 32rem; margin: 1.7rem auto 0; }
.count-grid b { display: block; font-size: clamp(2rem, 10vw, 4rem); line-height: 1; font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.count-grid span { font-size: .86rem; letter-spacing: .05em; text-transform: uppercase; }
#count-finished { margin-top: 1rem; }

.venue { padding-inline: 1.05rem; }
.venue-card {
  display: grid;
  width: min(100%, 56rem);
  margin: 1.4rem auto 0;
  padding: .55rem;
  border: 1px solid var(--line);
  background: var(--cream);
}
.venue-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.venue-meta { display:flex; flex-direction:column; gap:1.15rem; padding:1.12rem .45rem 1.45rem; align-self:center; }
.venue-name-distance { display:grid; gap:.1rem; }
.venue-meta .venue-address { margin:0; }
.venue-meta #map { align-self:center; }
.venue-meta h3, .contact-name { color: var(--green); font-size: 1.68rem; font-weight: 700; }
.venue-meta p { font-size: 1.17rem; }
.venue-time { margin: .55rem 0 1.05rem; }
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 3rem;
  padding: .5rem 1.25rem;
  border: 1px solid var(--green-deep);
  border-radius: .18rem;
  background: var(--green-deep);
  color: var(--cream);
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background .2s, color .2s;
}
.button:hover { background: #4a5d44; }
.button.outlined { color: var(--green-deep); background: transparent; }
.button.outlined:hover { background: var(--sage); }

.schedule { background: #eef0e2; padding-bottom: 2.9rem; }
.schedule > .eyebrow { margin-top: .6rem; }
.timeline { position: relative; max-width: 35rem; margin: 1.7rem auto 0; min-height: 38rem; }
.timeline-line { position: absolute; inset: 0; margin: auto; width: clamp(4.5rem, 25%, 7.5rem); height: 100%; overflow: visible; }
.timeline-line path { fill: none; stroke: #ce929d; stroke-width: 1.8; stroke-linecap: round; vector-effect: non-scaling-stroke; }
#moving-heart {
  position: absolute;
  top: 0;
  left: 0;
  width: 1.7rem;
  height: 1.7rem;
  margin: -.85rem;
  z-index: 1;
  pointer-events: none;
  background: url(assets/heart.svg) center / contain no-repeat;
  filter: drop-shadow(0 1px 2px #82445235);
}
.timeline ol {
  margin: 0;
  padding: .4rem 0;
  list-style: none;
  display: grid;
  grid-template-rows: repeat(5, minmax(7.5rem, auto));
  grid-template-columns: 39% 22% 39%;
}
.timeline li { grid-column: 1; align-self: center; font-size: 1.17rem; line-height: 1.16; }
.timeline li:nth-child(even) { grid-column: 3; }
.timeline li time { display: block; margin: .2rem 0; font-size: 1.82rem; font-weight: 600; color: var(--rose); font-variant-numeric: lining-nums tabular-nums; }
.event-icon { width: 2.85rem; height: 2.85rem; color: var(--green); vertical-align: middle; }

.dress { background: var(--cream); }
.dress-group { min-width:0; display:grid; align-content:start; gap:1rem; text-align:center; }
.dress-palette { width:100%; }
.dress-palette .swatches { width:100%; margin:0 auto; }
.swatches { margin: 1.5rem auto 1.95rem; padding: 0; display: flex; justify-content: center; gap: .55rem; list-style: none; }
.swatches li { width: clamp(2rem, 10vw, 3.1rem); aspect-ratio: 1; border-radius: 50%; outline: 1px solid #594d3b30; outline-offset: 2px; }
.dress-galleries { display:grid; grid-template-columns:1fr; max-width:53rem; margin:1.5rem auto 0; gap:2.25rem; }
.gallery h3 { font: 400 2.5rem/1.1 var(--script); color: var(--green); margin-bottom: .55rem; }
.slider-layout { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) 2.75rem; gap: .35rem; align-items: center; max-width: 25rem; margin: auto; }
.slide-window { display: grid; overflow: hidden; touch-action: pan-y; min-width: 0; }
.slide-window > * { grid-area: 1 / 1; min-width: 0; opacity: 0; visibility: hidden; transition: opacity .32s ease, visibility .32s; }
.slide-window > .active { opacity: 1; visibility: visible; }
.slider-layout img { aspect-ratio: 3 / 4; width: 100%; height: 100%; object-fit: cover; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.dress .gallery .slide-window { border:0; border-radius:0; box-shadow:none; background:transparent; }
.dress [data-gallery="women"] .slide-window { background-color:#ead8c3; }
.dress .gallery .slide-window > img { transition:opacity .65s ease-in-out, visibility .65s; }
.round {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #9653623d;
  border-radius: 50%;
  color: #854353;
  background: var(--pink);
  font: 400 1.6rem/1 Georgia, serif;
}
.round:hover { background: #ecd1d5; }
.round svg { width: 1.05rem; height: 1.05rem; pointer-events: none; }
.slide-index { margin-top: .45rem; color: var(--muted); font-size: 1rem; font-variant-numeric: lining-nums tabular-nums; }

.wishes { background: var(--pink); }
.wish-gallery { max-width: 30rem; margin: 1.25rem auto 0; }
.wish-gallery .slide-window { align-items: center; }
.wish-gallery .slide-window > .active { animation: wish-enter .28s ease both; }
.wish-gallery .slide-window[data-direction="back"] { --wish-offset: -.85rem; }
@keyframes wish-enter { from { opacity: 0; transform: translateX(var(--wish-offset, .85rem)); } }
.wish-slide { padding: .1rem .15rem; font-size: 1.17rem; line-height: 1.36; }
.wish-slide h3 { margin-bottom: .4rem; color: var(--green); font-size: 1.42rem; }
.wish-gallery .round { background: var(--cream); }
.contacts { padding-block: 4rem; }
.contact-name { margin: .95rem 0 .7rem; }
.contacts .button:disabled { cursor: default; background: transparent; color: var(--green-deep); opacity: .7; }
.rsvp { background: var(--sage); padding: 1.15rem; }
.rsvp-frame { padding: 3.25rem .75rem; border: 1px solid #abaf91; max-width: 55rem; margin: 0 auto; }
.rsvp .button { margin-top: 1.1rem; }
.goodbye { background: var(--cream); }
.goodbye img { width: min(75%, 17.5rem); aspect-ratio: 4/5; object-fit: cover; object-position: center 63%; margin: 0 auto 1.8rem; border-radius: 50% 50% 0 0 / 40% 40% 0 0; }
.goodbye .eyebrow { display: block; margin-top: .8rem; }
.signature { font-size: clamp(3.1rem, 11vw, 4.8rem); margin: .3em 0 .12em; }

dialog {
  width: min(calc(100% - 1.25rem), 32rem);
  max-height: min(94dvh, 52rem);
  border: 1px solid var(--line);
  padding: 0;
  color: var(--ink);
  background: var(--cream);
  overscroll-behavior: contain;
  box-shadow: 0 1rem 4rem #202c2240;
}
dialog::backdrop { background: #263225aa; }
.dialog-inner { position: relative; padding: 2.8rem 1.05rem 1.4rem; }
.dialog-inner h2, .dialog-inner > .note { text-align: center; }
.dialog-inner h2 { font-size: clamp(2.55rem, 10vw, 3.6rem); }
.close { position: absolute; top: .55rem; right: .55rem; }
#guest-form { display: grid; gap: 1rem; margin-top: 1.15rem; font-size: 1.13rem; }
.field { display: block; font-weight: 700; }
.optional { font-weight: 500; }
.field input, textarea { display: block; width: 100%; padding: .45rem .6rem; margin-top: .25rem; border: 1px solid #a9a88f; border-radius: .15rem; background: #fffdf9; color: var(--ink); font: 500 1.16rem/1.4 var(--serif); }
textarea { resize: vertical; }
fieldset { min-width: 0; border: 0; margin: 0; padding: 0; }
legend { margin-bottom: .25rem; padding: 0; font-weight: 700; line-height: 1.25; }
.choice { display: flex; align-items: center; gap: .48rem; min-height: 2.25rem; line-height: 1.2; }
.choice input { margin: 0; width: 1rem; height: 1rem; accent-color: var(--green-deep); flex: 0 0 1rem; }
.drinks-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .16rem .35rem; }
.form-result { padding: .9rem; margin-top: 1.1rem; text-align: center; background: var(--sage); }
.form-result .button { margin-top: .65rem; }

@media (min-width: 700px) {
  .hero-card { min-height: 0; padding-top: 3.2rem; }
  .section { padding-block: 5.3rem; }
  .venue-card { grid-template-columns: 1.5fr 1fr; }
  .dress-galleries { grid-template-columns:1fr 1fr; gap:3rem; }
  .rsvp { padding: 2rem; }
  .rsvp-frame { padding: 4rem 1rem; }
  .dialog-inner { padding-inline: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media (max-width: 380px) {
  .hero h1 { font-size: clamp(2.85rem, 15vw, 3.75rem); }
}
