@font-face {
  font-family: Cormorant;
  src: url("assets/cormorant.woff2") format("woff2");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: Cormorant;
  src: url("assets/cormorant-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #291620;
  --wine: #481c2c;
  --night: #210e16;
  --ivory: #fcf2e7;
  --paper: #fbf4eb;
  --faint: #e8d7c6;
  --pink: #f1b4ae;
  --gold: #f2c58c;
  --muted: #665158;
  --serif: Cormorant, Georgia, serif;
  --sans: "DM Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.55; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd, ol { margin: 0; }
h1, h2, h3 { font-family: var(--serif); line-height: 0.96; font-weight: 600; }
h2 { font-size: clamp(2.65rem, 6vw, 4.6rem); letter-spacing: -0.045em; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #c06a72; outline-offset: 4px; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus { position: fixed; z-index: 5; top: 0.75rem; left: 0.75rem; background: var(--paper); padding: 0.65rem 1rem; }
.container { width: min(100% - 3rem, 69rem); margin-inline: auto; }
.section { padding-block: clamp(4.6rem, 9vw, 8rem); }
.section-heading { max-width: 42rem; margin-inline: auto; text-align: center; }
.section-heading > p { margin: 0.95rem auto 0; color: var(--muted); max-width: 36rem; }
.ornament { margin-bottom: 1rem; display: flex; justify-content: center; align-items: center; gap: 0.65rem; color: #873a4c; font-size: 1.15rem; line-height: 1; }
.ornament::before, .ornament::after { content: ""; width: 1.9rem; height: 1px; background: currentColor; opacity: 0.48; }
.eyebrow { font-size: 0.875rem; font-weight: 750; letter-spacing: 0.18em; text-transform: uppercase; }

.top { position: relative; z-index: 1; background: #230f18; color: var(--ivory); border-bottom: 1px solid #ffffff1e; }
.top-inner { width: min(100% - 3rem, 78rem); margin-inline: auto; min-height: 4.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.monogram { flex: none; display: grid; place-items: center; text-decoration: none; width: 3.2rem; height: 3.2rem; border: 1px solid #efbc8296; border-radius: 50%; color: var(--gold); font: 600 1.55rem/1 var(--serif); }
.monogram i { padding-inline: 0.025em; color: var(--pink); font-weight: 500; font-size: 0.73em; }
.nav-links { display: flex; align-items: center; justify-content: flex-end; gap: clamp(1rem, 3vw, 2.5rem); font-size: 0.875rem; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--gold); }
.nav-links .nav-rsvp { border: 1px solid #efbc8279; padding: 0.55rem 0.9rem; border-radius: 0.15rem; }

.hero {
  isolation: isolate;
  position: relative;
  background: radial-gradient(ellipse at 78% 38%, #592337 0%, transparent 53%), linear-gradient(112deg, #210e17 12%, #361523 71%, #250e16);
  color: var(--ivory);
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background-image: repeating-linear-gradient(135deg, #ffd59c10 0 1px, transparent 1px 31px);
  mask-image: linear-gradient(90deg, #000, transparent 76%);
}
.hero-inner {
  width: min(100% - 5rem, 76rem);
  padding-block: clamp(3.4rem, 7vw, 6.25rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2.5rem, 6vw, 6.5rem);
}
.hero-copy { animation: appear 0.7s ease-out both; }
@keyframes appear { from { opacity: 0; transform: translateY(0.65rem); } to { opacity: 1; transform: none; } }
.hero-suits { display: flex; align-items: center; gap: 0.8rem; margin-bottom: clamp(1.4rem, 3vw, 2.3rem); color: var(--gold); font-size: 1.1rem; }
.hero-suits::before { content: ""; width: 2.2rem; height: 1px; background: #dfad7599; }
.hero-suits span:nth-child(even) { color: var(--pink); }
.hero h1 { font-size: clamp(3.65rem, 7.4vw, 7.15rem); letter-spacing: -0.062em; text-wrap: balance; }
.hero h1 em { display: block; color: var(--gold); font-weight: 500; }
.hero-names { margin-top: 1.55rem; font: 600 clamp(2rem, 4vw, 3.5rem)/1 var(--serif); letter-spacing: -0.04em; }
.hero-names span { color: var(--pink); font-style: italic; font-weight: 500; }
.hero-ages { margin-top: 0.55rem; color: #f2d7cd; font-size: 0.9rem; }
.hero-ages span { padding-inline: 0.25rem; color: var(--gold); }
.hero-date { margin-top: 1.5rem; display: grid; gap: 0.14rem; justify-items: start; }
.hero-date time { letter-spacing: 0.13em; color: var(--gold); font-size: 0.9rem; font-weight: 750; text-transform: uppercase; }
.hero-date span { color: #f2d7cd; font-size: 0.875rem; }
.hero .button { margin-top: 1.55rem; }

.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem;
  padding: 0.65rem 1.3rem; border: 1px solid transparent; border-radius: 0.18rem; text-decoration: none;
  font: 700 0.9rem/1.25 var(--sans); cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.button-gold { color: #321720; background: #f3c998; }
.button-gold:hover:not(:disabled) { background: #ffe1b7; }
.button-outline { background: transparent; color: #632338; border-color: #a57175; }
.button-outline:hover { background: #f8e3d6; }
.button:disabled { cursor: default; opacity: 0.66; }

.hero-photo {
  position: relative; isolation: isolate; width: min(100%, 30.5rem); justify-self: center;
  border: 1px solid #e8b67c; padding: 0.45rem; background: #2f1523;
  border-radius: 49% 49% 0.2rem 0.2rem / 21% 21% 0.2rem 0.2rem;
  box-shadow: 0 2rem 3rem -1.3rem #110710c9;
}
.hero-photo::before {
  position: absolute; content: ""; z-index: -1; inset: -0.55rem; border: 1px solid #e8b67c50;
  border-radius: inherit; pointer-events: none;
}
.hero-photo img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 49% 49% 0.1rem 0.1rem / 20.7% 20.7% 0.1rem 0.1rem;
}

.countdown { color: var(--ink); background: #f2e0d0; border-block: 1px solid #e6cbb6; padding-block: 1.5rem; }
.countdown-inner { display: flex; justify-content: center; align-items: center; gap: clamp(1.4rem, 5vw, 4.75rem); }
.countdown h2 { max-width: 12ch; font-size: clamp(1.65rem, 3vw, 2.35rem); line-height: 1; }
.countdown-time { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.countdown-time div { min-width: clamp(4rem, 8vw, 6.75rem); text-align: center; padding-inline: 0.4rem; }
.countdown-time div + div { border-left: 1px solid #b782726e; }
.countdown-time span { display: block; font: 600 clamp(2.2rem, 5vw, 3.45rem)/0.95 var(--serif); color: #722b42; font-variant-numeric: lining-nums tabular-nums; }
.countdown-time small { display: block; margin-top: 0.38rem; color: #5f4050; font-size: 0.875rem; }

.royals { background: radial-gradient(ellipse at 50% 0, #fffaf3, transparent 76%), var(--paper); }
.portraits { width: min(100%, 54rem); margin: clamp(2rem, 5.5vw, 4rem) auto 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 4.8vw, 3.3rem); }
.portrait { --portrait-bg: #f2e0d4; padding: 0.45rem; border: 1px solid #bb8e82; background: var(--portrait-bg); border-radius: 0.3rem; }
.portrait-hearts { --portrait-bg: #4d1d2c; color: var(--ivory); }
.portrait-white { --portrait-bg: #efe5d7; }
.portrait-photo { aspect-ratio: 4 / 4.7; overflow: hidden; border-radius: 48% 48% 0.1rem 0.1rem / 15% 15% 0.1rem 0.1rem; }
.portrait-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; }
.portrait-white img { object-position: 50% 24%; }
.portrait-copy { position: relative; text-align: center; padding: 0.95rem 0.3rem 1.2rem; }
.portrait-copy h3 { font-size: clamp(2.4rem, 4.7vw, 4rem); letter-spacing: -0.04em; }
.portrait-copy p { margin-top: 0.35rem; font-size: clamp(0.875rem, 2vw, 0.98rem); }
.portrait-copy p span { padding-inline: 0.1rem; }
.portrait-emblem { color: #80364b; font-size: 1.35rem; display: block; margin-bottom: 0.25rem; line-height: 1; }
.portrait-hearts .portrait-emblem { color: var(--gold); }
.family { margin: clamp(2.8rem, 7vw, 5.4rem) auto 0; width: min(100%, 57rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.3rem 0; text-align: center; }
.family-group { padding: 0.55rem 0.5rem; }
.family .family-group:first-child { grid-column: 1 / -1; border-block: 1px solid var(--faint); padding-block: 1.35rem; }
.family .family-group:last-child { border-left: 1px solid var(--faint); }
.family h3 { color: #772e44; font-size: clamp(1.55rem, 3vw, 2.05rem); }
.family p { margin-top: 0.5rem; }

.locations { background: radial-gradient(ellipse at 50% -35%, #722f46, transparent 70%), #351725; color: var(--ivory); }
.locations .ornament { color: var(--gold); }
.locations .section-heading > p { color: #f0d3c6; }
.venue-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 2.6rem; gap: clamp(1rem, 4vw, 2rem); }
.venue { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.45rem, 4.2vw, 2.55rem); color: var(--ink); border: 1px solid #dcb092; border-radius: 0.24rem; background: #fff4e9; }
.venue .eyebrow { color: #813a4d; margin-bottom: 0.7rem; }
.venue h3 { font-size: clamp(2.12rem, 4vw, 3rem); margin-bottom: 0.85rem; }
.venue-time, .venue-hours { font-weight: 700; margin-bottom: 0.8rem; }
.venue-hours { display: flex; flex-wrap: wrap; gap: 0.55rem 1.8rem; }
.venue-hours dt { font-weight: 500; font-size: 0.875rem; color: var(--muted); }
.venue address { color: var(--muted); font-style: normal; padding-bottom: 1.3rem; }
.venue .button { margin-top: auto; }

.program { background: #f5e8dc; }
.program-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: stretch; gap: clamp(2rem, 7vw, 6.3rem); }
.hatter {
  position: relative; overflow: hidden; min-height: 31rem;
  border-radius: 49% 49% 0.2rem 0.2rem / 20% 20% 0.2rem 0.2rem; border: 0.4rem solid #f5e8dc;
  background: #422432; box-shadow: 0 0 0 1px #b38672;
}
.hatter img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 36%; }
.program-copy { align-self: center; }
.program .section-heading { text-align: left; }
.program .ornament { justify-content: flex-start; }
.program .ornament::before { display: none; }
.timeline { list-style: none; padding: 0; margin-top: 1.35rem; }
.timeline li { display: grid; grid-template-columns: minmax(6.4rem, 0.43fr) 1fr; gap: 0.6rem; align-items: baseline; border-bottom: 1px solid #dbbfb3; padding-block: 0.7rem; }
.timeline time { color: #7b3449; font: 700 1.55rem/1 var(--serif); white-space: nowrap; font-variant-numeric: lining-nums; }
.timeline li > span { font-weight: 650; }

.dress { border-block: 1px solid #dbb29b; background: #eccebf; }
.dress-inner { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 0.65rem clamp(1rem, 3.2vw, 2.1rem); padding-block: 1.85rem; }
.dress-suit { display: grid; place-items: center; width: 2.45rem; height: 3.3rem; border: 1px solid #9f5761; border-radius: 0.25rem; color: #702840; font-size: 1.35rem; transform: rotate(-9deg); }
.dress h2 { font-size: clamp(2.05rem, 4.2vw, 3rem); }

.gallery { background: #fff8ef; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(0.5rem, 1.5vw, 1rem); margin-top: 2rem; }
.gallery-grid button { display: block; width: 100%; padding: 0.25rem; border: 1px solid #d3a697; border-radius: 0.2rem; overflow: hidden; background: #fff8ef; cursor: zoom-in; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0.1rem; transition: filter 180ms ease; }
.gallery-grid button:hover img { filter: brightness(0.87); }
.gallery-grid button:nth-child(2) img, .gallery-grid button:nth-child(6) img { object-position: 50% 31%; }

.rsvp { color: var(--ivory); background: radial-gradient(ellipse at 25% 5%, #592437, transparent 68%), #2c1320; }
.rsvp-inner { display: grid; grid-template-columns: 0.9fr 1.1fr; align-items: center; gap: clamp(1.5rem, 7vw, 6rem); }
.rsvp .ornament { justify-content: flex-start; color: var(--gold); }
.rsvp-intro p { color: #efd3c7; margin-top: 1rem; }
.rsvp-intro strong { display: inline-block; color: var(--gold); }
.rsvp-form { padding: clamp(1.2rem, 3vw, 2rem); border: 1px solid #c68f767d; border-radius: 0.23rem; background: #1d0b1562; }
.rsvp-form fieldset { display: grid; gap: 0.42rem; border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.rsvp-form label { font-size: 0.875rem; font-weight: 700; }
.rsvp-form input, .rsvp-form select {
  display: block; width: 100%; margin-bottom: 0.65rem; min-height: 2.85rem; padding: 0.55rem 0.7rem; border: 1px solid #af7e77;
  border-radius: 0.19rem; background: #fff5eb; color: #321820;
}
.rsvp-form select { appearance: none; padding-right: 2.2rem; background-image: linear-gradient(45deg, transparent 50%, #67364c 50%), linear-gradient(135deg, #67364c 50%, transparent 50%); background-position: calc(100% - 1rem) 51%, calc(100% - 0.7rem) 51%; background-size: 0.3rem 0.3rem; background-repeat: no-repeat; }
.rsvp-form :disabled:is(input, select) { opacity: 0.78; color: #432635; }
.rsvp-form .button { justify-self: start; margin-top: 0.35rem; }
.form-status { margin-top: 0.75rem; color: #f2d5c8; font-size: 0.875rem; }
.form-status:empty { margin-top: 0; }

.footer { display: flex; align-items: center; justify-content: center; gap: 0.7rem 1rem; flex-wrap: wrap; padding: 1.35rem; background: #1f0e17; color: #e8c8bc; font-size: 0.875rem; }
.footer .monogram { width: 2.5rem; height: 2.5rem; font-size: 1.22rem; }
.footer p span { color: var(--gold); padding-inline: 0.25em; }

.lightbox { max-width: min(94vw, 56rem); max-height: 94vh; padding: 0; border: 1px solid #ecd0ae80; border-radius: 0.3rem; overflow: auto; color: var(--ivory); background: #270f1b; }
.lightbox::backdrop { background: #160912ee; }
.lightbox-content { padding: 0.75rem; }
.lightbox-top, .lightbox-nav { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; }
.lightbox-top { margin-bottom: 0.55rem; }
.lightbox-nav { margin-top: 0.6rem; }
.lightbox img { max-width: 100%; max-height: 69vh; width: auto; height: auto; margin-inline: auto; object-fit: contain; }
.viewer-button { min-height: 2.75rem; padding: 0.3rem 0.8rem; background: transparent; color: var(--ivory); border: 1px solid #ecd0ae80; border-radius: 0.2rem; cursor: pointer; }
.viewer-button:hover { background: #562938; }
.viewer-button.close { min-width: 2.75rem; font-size: 1.35rem; line-height: 1; }

@media (max-width: 52rem) {
  .hero-inner { width: min(100% - 3rem, 69rem); gap: 2rem; }
  .hero h1 { font-size: clamp(3.25rem, 8.2vw, 5.2rem); }
  .dress-inner { grid-template-columns: auto 1fr; }
  .dress-suit { grid-row: span 2; }
  .dress p { grid-column: 2; }
}

@media (max-width: 39rem) {
  .container, .hero-inner, .top-inner { width: calc(100% - 2rem); }
  .top-inner { min-height: 3.8rem; gap: 0.5rem; }
  .top .monogram { width: 2.5rem; height: 2.5rem; font-size: 1.25rem; }
  .nav-links { gap: 0.7rem; }
  .nav-links a:first-child { display: none; }
  .nav-links .nav-rsvp { padding: 0.4rem 0.6rem; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 2.65rem 2.5rem; gap: 1.85rem; }
  .hero-copy { text-align: center; }
  .hero-suits { justify-content: center; margin-bottom: 1rem; }
  .hero-suits::after { content: ""; width: 2.2rem; height: 1px; background: #dfad7599; }
  .hero h1 { font-size: clamp(3.45rem, 12vw, 4.7rem); }
  .hero-names { margin-top: 0.95rem; }
  .hero-date { justify-items: center; margin-top: 1rem; }
  .hero .button { margin-top: 1.15rem; }
  .hero-photo { width: min(100% - 0.85rem, 24rem); }
  .countdown-inner { flex-direction: column; text-align: center; gap: 0.75rem; }
  .countdown h2 { max-width: none; }
  .countdown-time div { min-width: 4.1rem; }
  .family { gap: 0.9rem 0; }
  .portraits { gap: 0.65rem; }
  .portrait-photo { aspect-ratio: 4 / 5.35; }
  .portrait-copy p { text-wrap: balance; }
  .venue-grid, .program-grid, .rsvp-inner { grid-template-columns: 1fr; }
  .hatter { min-height: 0; aspect-ratio: 4 / 3; width: min(100%, 28rem); justify-self: center; }
  .hatter img { object-position: 50% 29%; }
  .program .section-heading { text-align: center; }
  .program .ornament { justify-content: center; }
  .program .ornament::before { display: block; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 25rem) {
  .family { grid-template-columns: 1fr; }
  .family .family-group:last-child { border-left: 0; border-top: 1px solid var(--faint); padding-top: 1rem; }
  .gallery-grid img { aspect-ratio: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
