:root {
  color-scheme: light;
  --plum: #211728;
  --plum-ink: #35233f;
  --paper: #faf5ed;
  --cream: #f4eae1;
  --gold: #e7cb9c;
  --violet: #785380;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--plum-ink); font: 1rem/1.55 var(--sans); }
h1, h2, h3, p, figure, address { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #ac70c2; outline-offset: 4px; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
.topbar { height: 66px; display: flex; align-items: center; padding: 0 clamp(18px, 5vw, 76px); gap: clamp(18px, 4vw, 50px); color: #f4e9f1; background: var(--plum); border-bottom: 1px solid #ffffff24; }
.mark { color: var(--gold); text-decoration: none; font: italic 500 2.4rem/1 var(--serif); }
.mark span { margin-left: 3px; vertical-align: top; font: .8rem/1 var(--sans); }
.topbar nav { display: flex; gap: clamp(16px, 3vw, 34px); margin-left: auto; }
.topbar nav a { font-size: .875rem; text-decoration: none; }
.topbar nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.music { border: 1px solid #ead7ec5c; border-radius: 28px; padding: 7px 13px; background: transparent; color: inherit; font-size: .875rem; white-space: nowrap; }
.music span:first-child { color: var(--gold); margin-right: 4px; }
.hero { display: grid; grid-template-columns: 45% 55%; min-height: clamp(620px, 86vh, 850px); background: var(--plum); color: var(--paper); }
.hero-copy { position: relative; display: grid; place-items: center; isolation: isolate; text-align: center; background: radial-gradient(ellipse at 60% 48%, #482f50, #211728 76%); }
.hero-copy::before { content: ""; z-index: -1; position: absolute; inset: 24px; border: 1px solid #ddbfa543; pointer-events: none; }
.hero-inner { padding: 34px 20px; }
.overline { color: var(--violet); font-weight: 700; font-size: .875rem; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; }
.hero .overline { color: var(--gold); }
h1 { font: italic 400 clamp(5.6rem, 10.4vw, 11rem)/.94 var(--serif); letter-spacing: -.064em; margin: 13px .065em 16px 0; }
h1 span { display: block; margin-top: .25em; font-size: .52em; letter-spacing: -.035em; }
.hero-date { color: #f0dfe9; font: 500 clamp(1.5rem, 2.6vw, 2rem)/1.2 var(--serif); margin: 18px 0 25px; }
.ornament { display: flex; justify-content: center; align-items: center; gap: 11px; color: #936c56; font-size: 1.25rem; }
.ornament span { width: 35px; height: 1px; background: currentColor; opacity: .55; }
.hero .ornament, .gallery .ornament { color: var(--gold); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid transparent; border-radius: 3px; background: var(--plum-ink); color: var(--paper); padding: 10px 21px; font-size: .875rem; font-weight: 700; text-align: center; text-decoration: none; }
.button:hover { background: #563360; }
.hero-button { background: #f2e5ea; color: #35223e; }
.hero-button:hover { background: #fff6fa; }
.hero-image { position: relative; overflow: hidden; background: #513653; }
.hero-image img { position: absolute; inset: 0; object-position: 50% 42%; animation: drift 12s ease-out both; }
@keyframes drift { from { transform: scale(1.045); } to { transform: scale(1); } }
.count-section, .event-section, .rsvp { padding: clamp(56px, 9vw, 110px) 20px; text-align: center; }
.count-section h2 { margin-top: 8px; }
h2 { font: 500 clamp(3rem, 6vw, 5rem)/.92 var(--serif); letter-spacing: -.035em; }
.countdown { display: flex; justify-content: center; max-width: 650px; margin: clamp(26px, 5vw, 52px) auto 24px; }
.countdown div { flex: 1 1 0; padding: 0 4px; }
.countdown div + div { border-left: 1px solid #b899a7; }
.countdown span { display: block; font: 500 clamp(2.5rem, 7vw, 5.3rem)/.88 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.countdown small { display: block; margin-top: 11px; font-size: .875rem; color: var(--violet); }
.note { color: #634f69; font-size: .875rem; }
.event-section { background: var(--cream); }
.event-section h2, .gallery h2 { margin: 10px 0 0; }
.event-grid { display: grid; grid-template-columns: 1fr 1fr; max-width: 810px; margin: 42px auto 0; border: 1px solid #99808c65; }
.event-grid article { padding: clamp(22px, 4vw, 50px) 12px; }
.event-grid article + article { border-left: 1px solid #99808c65; }
.event-grid h3 { font: 500 clamp(2rem, 4vw, 3.25rem)/1 var(--serif); margin: 8px 0; }
.venue-name { font-weight: 600; }
.venue-address { font-style: normal; margin-top: 5px; }
.event-grid .button { margin-top: 17px; }
.copy-address { width: max-content; max-width: 100%; min-height: 36px; margin: 4px auto 0; padding: 4px; border: 0; background: transparent; color: var(--plum-ink); text-decoration: underline; text-underline-offset: 3px; font-size: .875rem; }
.copy-address:not([hidden]) { display: block; }
.outline { background: transparent; color: var(--plum-ink); border-color: #897187; }
.outline:hover { background: #eadddf; }
.event-note { margin-top: 26px; }
.event-note span { display: block; font-weight: 700; }
.gallery { background: var(--plum); color: var(--paper); padding: clamp(48px, 8vw, 100px) clamp(16px, 5vw, 72px); }
.gallery-copy { text-align: center; margin-bottom: clamp(24px, 4vw, 48px); }
.gallery-grid { display: grid; grid-template: repeat(2, minmax(0, 225px)) / 1.43fr 1fr 1fr; gap: 12px; max-width: 990px; margin-inline: auto; }
.gallery-tile { display: block; overflow: hidden; min-width: 0; padding: 0; border: 0; border-radius: 2px; background: #513653; }
.gallery-tile:first-child { grid-row: span 2; }
.gallery-tile img { object-position: 50% 35%; transition: transform 450ms ease; }
.gallery-tile:nth-child(3) img { object-position: 50% 48%; }
.gallery-tile:nth-child(5) img { object-position: 50% 49%; }
@media (hover: hover) {
  .gallery-tile:hover img { transform: scale(1.06); }
}
.photo-viewer[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 9px; }
.photo-viewer { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 48px 12px max(12px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: #1b1221; color: var(--paper); }
.photo-viewer-close { position: absolute; right: 7px; top: 6px; }
.photo-viewer .close { color: var(--paper); min-width: 44px; min-height: 44px; }
.photo-viewer-frame { min-width: 0; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; }
.photo-viewer-frame img { height: 100%; object-fit: contain; touch-action: pan-y pinch-zoom; }
.photo-viewer-frame figcaption { text-align: center; font-size: .875rem; }
.photo-viewer-nav { display: flex; align-items: center; justify-content: center; gap: 20px; }
.photo-viewer-nav button { min-width: 46px; min-height: 46px; padding: 0; border: 1px solid #ead7ec5c; border-radius: 50%; background: transparent; color: var(--paper); font: 1.65rem/1 var(--sans); }
.photo-viewer-nav button:hover { background: #503454; }
#photo-position { min-width: 42px; text-align: center; font-variant-numeric: tabular-nums; font-size: .875rem; }
body:has(.photo-viewer[open]) { overflow: hidden; }
.rsvp { background: #ebdce8; }
.rsvp h2 { margin: 10px 0 16px; }
.rsvp .button { margin-top: 22px; }
footer { background: var(--plum); color: #e7d7e7; text-align: center; padding: 24px 16px; font-size: .875rem; }
footer span { color: var(--gold); padding: 0 5px; }
dialog { background: var(--paper); color: var(--plum-ink); border: 1px solid #a18ba3; border-radius: 8px; padding: 25px; width: min(calc(100% - 32px), 440px); max-height: calc(100% - 32px); }
dialog::backdrop { background: #170d22a6; }
.dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.dialog-header h2 { font-size: 2.25rem; }
.close { background: transparent; color: var(--plum-ink); padding: 0 8px; border: 0; font-size: 1.75rem; line-height: 1; }
dialog .note { margin-top: 12px; }
#rsvp-form { display: grid; gap: 7px; margin-top: 18px; }
#rsvp-form input, #rsvp-form select { width: 100%; min-height: 44px; color: var(--plum-ink); background: #fffaf5; border: 1px solid #9a809d; border-radius: 3px; padding: 7px 10px; margin-bottom: 10px; }
#rsvp-status { margin-top: 12px; }
@media (max-width: 720px) {
  .topbar { height: 57px; gap: 15px; }
  .topbar nav { gap: 14px; }
  .hero { display: grid; grid-template: 1fr / 1fr; min-height: clamp(540px, 79svh, 710px); }
  .hero-copy, .hero-image { grid-area: 1 / 1; }
  .hero-image { z-index: 0; }
  .hero-image img { object-position: 50% 40%; }
  .hero-copy { z-index: 1; align-items: end; background: linear-gradient(180deg, #21172800 28%, #21172818 43%, #211728a6 68%, #1b1223f5 100%); }
  .hero-copy::before { inset: 12px; border-color: #f5dbe15e; }
  .hero-inner { padding: 24px 15px 32px; }
  h1 { font-size: clamp(5.1rem, 17vw, 7.7rem); margin-top: 7px; margin-bottom: 7px; }
  .hero-date { margin: 9px 0 16px; }
  .hero-date { max-width: 300px; margin-inline: auto; }
  .gallery-grid { grid-template: auto / 1fr 1fr; gap: 8px; }
  .gallery-tile { aspect-ratio: 1; }
  .gallery-tile:first-child { grid-column: span 2; grid-row: auto; aspect-ratio: 5 / 5.5; }
}
@media (max-width: 350px) {
  .topbar nav { gap: 9px; }
  .topbar { padding-inline: 11px; gap: 10px; }
  .countdown small { font-size: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-image img { animation: none; }
  .gallery-tile img { transition: none; }
}
