@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/cormorant.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

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

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

:root {
  color-scheme: light;
  --paper: #f8f5ef;
  --paper-deep: #f0ece3;
  --white: #fffdf8;
  --ink: #282c22;
  --muted: #57594d;
  --olive: #47523e;
  --olive-deep: #323e2e;
  --bronze: #7e664d;
  --line: #d9d2c4;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
  --header-height: 70px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.65 var(--sans); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 4px; }
.symbol-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex: none; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1100px, calc(100% - 100px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid #e9e3d7;
}

.header-inner {
  width: min(1280px, calc(100% - 104px));
  min-height: calc(var(--header-height) - 1px);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.monogram {
  justify-self: start;
  font: 600 2rem/.9 var(--serif);
  letter-spacing: -.045em;
  padding-block: .2em;
  color: var(--olive-deep);
  text-decoration: none;
  white-space: nowrap;
}
.monogram span { font-style: italic; font-size: .63em; color: var(--bronze); margin-inline: .1em; }
.chapter-nav { display: flex; align-items: center; gap: clamp(22px, 3vw, 48px); }
.chapter-nav a {
  position: relative;
  padding-block: 12px;
  font-size: .77rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
.chapter-nav a:hover, .chapter-nav a[aria-current] { color: var(--olive-deep); }
.chapter-nav a[aria-current]::after { position: absolute; right: 0; bottom: 6px; left: 0; height: 1px; background: var(--bronze); content: ""; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.music-button, .menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  min-height: 38px;
  background: transparent;
  color: var(--olive-deep);
  border: 1px solid var(--line);
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 650;
}
.music-button:hover, .menu-toggle:hover { background: var(--paper-deep); }
.music-button .icon { width: 15px; height: 15px; }
.menu-toggle { display: none; }
.music-bars { display: none; align-items: center; gap: 2px; height: 12px; }
.music-button[aria-pressed="true"] .music-bars { display: inline-flex; }
.music-bars i { height: 8px; width: 1px; background: currentColor; animation: equalize .9s ease-in-out infinite alternate; }
.music-bars i:nth-child(2) { animation-delay: -.65s; }
.music-bars i:nth-child(3) { animation-delay: -.3s; }
@keyframes equalize { from { transform: scaleY(.45); } to { transform: scaleY(1.4); } }

.hero {
  min-height: clamp(560px, 73svh, 785px);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  justify-items: center;
  align-items: start;
  text-align: center;
  color: #fff9eb;
  background: #414437;
}
.hero-photo, .hero::after { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; }
.hero-photo { object-fit: cover; object-position: 50% 41%; }
.hero::after {
  content: "";
  background: linear-gradient(180deg, #181b12a8 0%, #1c21166b 34%, #1c21161c 76%, #1c21163d 100%);
}
.hero-frame { position: absolute; inset: 17px; border: 1px solid #fff9e545; pointer-events: none; }
.hero-content { width: min(940px, calc(100% - 64px)); padding-block: clamp(72px, 11vh, 128px) 86px; }
.hero-ornament { display: flex; align-items: center; justify-content: center; gap: 11px; font-size: .86rem; color: #e8d5aa; margin-bottom: 15px; }
.hero-ornament span { width: 34px; height: 1px; background: currentColor; opacity: .58; }
.eyebrow { font: 700 .68rem/1.5 var(--sans); text-transform: uppercase; letter-spacing: .24em; color: var(--bronze); }
.hero .eyebrow { color: #faebcf; font-size: .7rem; letter-spacing: .32em; }
.hero h1, h2, h3, .footer-names { font-family: var(--serif); font-weight: 500; }
.hero h1 {
  font-size: clamp(4.35rem, 9.1vw, 9rem);
  line-height: .9;
  letter-spacing: -.048em;
  margin-block: 13px 20px;
  text-shadow: 0 2px 32px #17190eb0;
}
.hero h1 em { font-weight: 400; color: #eddfc2; font-size: .78em; margin-inline: .04em; }
.hero-date { font-size: .84rem; font-weight: 550; letter-spacing: .07em; }
.hero-date span { margin-inline: .45em; }
.guest-greeting { font-size: .86rem; margin-top: 10px; overflow-wrap: anywhere; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 17px;
  border: 1px solid transparent;
  border-radius: 3px;
  text-decoration: none;
  font: 650 .82rem/1.4 var(--sans);
  transition: background-color .2s, color .2s, border-color .2s;
}
.button:disabled { opacity: .7; cursor: wait; }
.button-glass { margin-top: 25px; padding-inline: 18px; color: inherit; background: #2d382d68; border-color: #fff0cba8; backdrop-filter: blur(7px); }
.button-glass:hover { background: #3a4434dd; }
.button-dark { color: var(--white); background: var(--olive); border-color: var(--olive); }
.button-dark:hover { background: var(--olive-deep); border-color: var(--olive-deep); }
.button-outline { color: var(--olive-deep); background: transparent; border-color: #a5a394; }
.button-outline:hover { background: var(--white); border-color: var(--olive); }
.text-link { display: inline-flex; min-height: 38px; align-items: center; gap: 10px; color: var(--olive-deep); text-decoration: none; font-size: .83rem; font-weight: 700; border-bottom: 1px solid #a3a48e; }
.text-link:hover { border-color: currentColor; }
.text-link .up { transform: rotate(180deg); }

.section { padding-block: clamp(70px, 9.2vw, 122px); }
.section-intro { margin-bottom: 41px; }
.section-intro.centered { max-width: 560px; margin-inline: auto; text-align: center; }
.section-intro h2 {
  margin-block: 8px 13px;
  font-size: clamp(3rem, 5.75vw, 5.45rem);
  line-height: .98;
  letter-spacing: -.043em;
}
.section-intro h2 em { color: var(--olive); font-weight: 400; }
.section-intro > p:not(.eyebrow) { color: var(--muted); max-width: 48ch; }
.centered > p:not(.eyebrow) { margin-inline: auto; }
.section-next { margin-top: 39px; }
.couple-section .section-next { text-align: center; }
.couple-grid {
  display: grid;
  grid-template-columns: minmax(0, 325px) 80px minmax(0, 325px);
  align-items: center;
  justify-content: center;
  gap: 22px;
}
.person { text-align: center; align-self: start; }
.person-photo { padding: 7px; background: #faf8f2; border: 1px solid var(--line); }
.person-photo img { width: 100%; height: auto; aspect-ratio: 4 / 4.7; object-fit: cover; }
.person-copy { padding-top: 19px; }
.person h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1; margin-bottom: 8px; }
.person p { font-size: .86rem; color: var(--muted); }
.couple-divider { font: italic 400 clamp(3.7rem, 8vw, 7rem)/1 var(--serif); color: #a38c70; text-align: center; align-self: start; margin-top: min(15vw, 148px); }

.event-section { background: var(--paper-deep); }
.event-intro, .gallery-intro { display: flex; justify-content: space-between; align-items: end; gap: 22px; }
.event-intro h2, .gallery-intro h2 { margin-bottom: 0; }
.event-intro > p { padding-bottom: 4px; }
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.event-card { min-height: 162px; padding: 23px; border: 1px solid var(--line); background: var(--paper); }
.event-card .icon { color: var(--bronze); width: 20px; height: 20px; }
.event-card h3 { font-size: 2.3rem; line-height: 1; letter-spacing: -.02em; margin-block: 4px 6px; }
.event-card p { color: var(--muted); font-size: .89rem; }
.event-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-block: 18px 29px; }
.countdown-area { background: var(--olive-deep); color: var(--white); padding: 30px 18px; text-align: center; }
.countdown-area .eyebrow { color: #e4d6b8; margin-bottom: 14px; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(580px, 100%); margin-inline: auto; font-variant-numeric: tabular-nums; }
.countdown div { display: flex; flex-direction: column-reverse; justify-content: start; }
.countdown div + div { border-left: 1px solid #e4d6b84d; }
.countdown dd { font: 500 clamp(2.25rem, 6vw, 3.8rem)/.95 var(--serif); }
.countdown dt { padding-top: 6px; font-size: .7rem; color: #f1eada; }

.gallery-main { position: relative; overflow: hidden; background: var(--olive-deep); }
.gallery-main img { width: 100%; height: clamp(310px, 55vw, 590px); object-fit: contain; }
.gallery-main[data-fit="cover"] img { object-fit: cover; object-position: center 46%; }
.gallery-arrows { display: flex; gap: 8px; }
.round-button { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--olive-deep); border: 1px solid #b8b6a4; background: var(--paper); border-radius: 50%; transition: background-color .2s; }
.round-button:hover { background: var(--paper-deep); }
.gallery-expand { position: absolute; right: 15px; bottom: 15px; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 14px; }
.gallery-thumbs button { padding: 2px; border: 1px solid transparent; background: none; }
.gallery-thumbs button[aria-pressed="true"] { border-color: var(--olive); }
.gallery-thumbs img { width: clamp(56px, 12vw, 92px); height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.photo-dialog { width: min(960px, calc(100% - 36px)); max-height: calc(100% - 36px); background: #24291f; color: var(--white); border: none; padding: 0; border-radius: 4px; }
.photo-dialog::backdrop { background: #171a16e8; }
.dialog-inner { position: relative; }
.dialog-inner img { width: 100%; height: min(76dvh, 740px); object-fit: contain; }
.dialog-inner button { position: absolute; }
.dialog-close { right: 12px; top: 12px; }
.dialog-prev, .dialog-next { top: 50%; transform: translateY(-50%); }
.dialog-prev { left: 12px; }
.dialog-next { right: 12px; }

.guest-section { background: var(--paper-deep); }
.guest-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 20px; align-items: start; }
.guest-form, .guest-list-panel { padding: clamp(18px, 3vw, 29px); border: 1px solid var(--line); background: var(--paper); }
.guest-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guest-form label { display: grid; gap: 6px; margin-bottom: 16px; min-width: 0; font-size: .81rem; font-weight: 700; }
.guest-form input, .guest-form select, .guest-form textarea { min-width: 0; width: 100%; padding: 11px 12px; min-height: 45px; color: var(--ink); background: var(--white); border: 1px solid #ccc6b7; border-radius: 3px; font-size: 1rem; font-weight: 400; }
.guest-form textarea { resize: vertical; }
.form-status { margin-top: 9px; min-height: 1.4em; font-size: .81rem; color: var(--olive-deep); }
.form-status[data-error="true"] { color: #8c3330; }
.guest-list-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.guest-list-header h3 { display: flex; align-items: center; gap: 9px; font-size: 2.1rem; line-height: .95; }
.guest-list-header h3 span { border-radius: 16px; padding: 3px 8px; background: #e9e5d9; color: var(--muted); font: 700 .69rem/1.2 var(--sans); }
.refresh-button { background: none; border: 0; padding: 6px 0; color: var(--olive-deep); text-decoration: underline; text-underline-offset: .23em; font-size: .76rem; white-space: nowrap; }
.guest-comments { max-height: 330px; overflow-y: auto; overscroll-behavior: contain; scrollbar-color: #b5ae9a transparent; }
.guest-comments:empty { display: none; }
.guest-list-status { padding: 15px 0 4px; font-size: .88rem; color: var(--muted); }
.comment { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: start; gap: 10px; padding: 13px 5px 13px 0; }
.comment + .comment { border-top: 1px solid var(--line); }
.comment-avatar { display: grid; place-items: center; height: 35px; border-radius: 50%; background: #e9e6d8; color: var(--olive-deep); font-size: .77rem; font-weight: 700; }
.comment-author { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 8px; }
.comment-author strong { font-size: .86rem; overflow-wrap: anywhere; }
.comment-attendance { color: var(--olive-deep); font-size: .69rem; background: #e9e8dd; border-radius: 12px; padding: 1px 6px; }
.comment-message { margin-top: 4px; font-size: .89rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment time { display: block; margin-top: 5px; font-size: .69rem; color: var(--muted); }

.site-footer { background: var(--olive-deep); color: #f3ecdc; text-align: center; padding: 63px 0; }
.site-footer p:first-of-type { font-size: .87rem; }
.footer-names { font-size: clamp(3.25rem, 8vw, 5.6rem); line-height: .98; letter-spacing: -.04em; margin: 12px 0 17px; }
.footer-names em { color: #ded1b2; font-weight: 400; }
.site-footer .text-link { color: #f3ecdc; border-color: #c5bfa280; }

@media (max-width: 760px) {
  :root { --header-height: 61px; }
  .header-inner { width: calc(100% - 36px); grid-template-columns: 1fr auto; }
  .wrap { width: calc(100% - 40px); }
  .menu-toggle { display: inline-flex; width: 38px; padding: 0; }
  .menu-toggle .icon { width: 17px; height: 17px; }
  .chapter-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; padding: 8px 20px 14px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: 0 8px 14px #27241b12; }
  .chapter-nav[data-open="true"] { display: grid; gap: 0; }
  .chapter-nav a { width: fit-content; font-size: .86rem; padding: 11px 5px; }
  .hero { min-height: clamp(490px, 77svh, 620px); }
  .hero-photo { object-position: center 55%; }
  .hero-content { width: calc(100% - 42px); padding-top: clamp(65px, 10.5vh, 104px); }
  .hero-frame { inset: 10px; }
  .hero .eyebrow { font-size: .62rem; }
  .hero-date { font-size: .75rem; }
  .section-intro { margin-bottom: 26px; }
  .section-intro > p:not(.eyebrow) { font-size: .94rem; }
  .couple-grid { gap: 10px; grid-template-columns: minmax(0, 1fr) 27px minmax(0, 1fr); }
  .couple-divider { font-size: 3.3rem; margin-top: min(16vw, 148px); }
  .person-photo { padding: 4px; }
  .person p { font-size: .77rem; }
  .event-intro { display: block; }
  .event-intro h2 { margin-bottom: 12px; }
  .event-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .event-card { min-height: 125px; padding: 14px; }
  .event-card h3 { font-size: 1.85rem; }
  .event-card p { font-size: .81rem; }
  .event-venue { grid-column: 1 / -1; min-height: auto; }
  .guest-grid { grid-template-columns: 1fr; gap: 13px; }
  .guest-comments { max-height: 280px; }
}

@media (max-width: 400px) {
  .hero h1 { font-size: clamp(3.1rem, 13vw, 4.4rem); }
  .hero-date { letter-spacing: .02em; }
  .gallery-intro { align-items: end; gap: 8px; }
  .gallery-arrows { gap: 4px; }
  .round-button { width: 37px; height: 37px; }
  .guest-fields { grid-template-columns: 1fr; gap: 0; }
}

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