:root {
  --paper: light-dark(#faf7ef, #18221d);
  --card: light-dark(#fffcf6, #222e26);
  --ink: light-dark(#283e30, #f0eee5);
  --muted: light-dark(#46574a, #c8d2c6);
  --olive: light-dark(#53633e, #cad9ad);
  --line: light-dark(#d6d3bf, #49594c);
  --portrait-border: light-dark(#b4b49b, #677767);
  --portrait-shadow: light-dark(rgb(62 69 43 / .26), rgb(0 0 0 / .62));
  --portrait-diffusion: light-dark(rgb(247 241 216 / .35), rgb(213 226 188 / .21));
  --gold: light-dark(#846333, #e3c48e);
  --sage: light-dark(#e8ebde, #28372d);
  --glow: light-dark(#fffcf5, #29352b);
  --band: light-dark(#283e30, #344a3a);
  --on-band: #faf7ef;
  --on-band-muted: #e2e5d4;
  --focus: light-dark(#a3662f, #f2c88f);
  color-scheme: light dark;
  --serif: Baskerville, "Iowan Old Style", Georgia, serif;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(1rem, 4vw, 4rem);
  color: var(--ink);
  background: var(--paper);
  font: 100%/1.6 var(--sans);
}

:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.skip {
  position: absolute;
  top: .5rem;
  left: .5rem;
  z-index: 2;
  padding: .5rem 1rem;
  background: var(--card);
  transform: translateY(-150%);
}

.skip:focus { transform: none; }
.content { width: min(calc(100% - 2 * var(--gutter)), 72rem); margin-inline: auto; }
section[id], .wedding-notes { scroll-margin-top: 1.25rem; }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem 2rem;
  width: min(calc(100% - 2 * var(--gutter)), 86rem);
  min-height: 4.25rem;
  margin-inline: auto;
}

.monogram {
  flex: none;
  font: 2.25rem/1 var(--serif);
  letter-spacing: -.08em;
  text-decoration: none;
}

.monogram i, footer i { color: var(--gold); }
nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0 clamp(.75rem, 2.6vw, 2.25rem); }
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: .95rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}

nav a:hover, footer a:hover { text-decoration: underline; text-underline-offset: .25em; }
.language-link { color: var(--olive); }

.menu-toggle, .theme-toggle {
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .35rem .65rem;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.menu-toggle { display: none; }
.theme-toggle:not([hidden]) { display: inline-flex; min-width: 44px; border-radius: 50%; }
.theme-toggle:hover { background: var(--sage); border-color: var(--line); }
.theme-label, .theme-sun, :root[data-theme="dark"] .theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: block; }

.canopy {
  position: relative;
  height: clamp(4.1rem, 12vw, 14.25rem);
  overflow: hidden;
  mask-image: linear-gradient(#000 82%, transparent);
}

.greenery {
  position: absolute;
  top: 0;
  left: 50%;
  width: max(100%, 64rem);
  max-width: none;
  height: auto;
  transform: translateX(-50%);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  grid-template-areas: "portrait invitation";
  align-items: center;
  width: min(calc(100% - 2 * var(--gutter)), 86rem);
  margin-inline: auto;
  padding-block: clamp(.7rem, 1.8vw, 1.4rem) clamp(1.5rem, 3.5vw, 3.5rem);
}

.portrait {
  grid-area: portrait;
  position: relative;
  height: clamp(27rem, 44vw, 41rem);
  overflow: hidden;
  border: 1px solid var(--portrait-border);
  border-radius: .8rem;
  background: #737855;
  box-shadow: 0 .65rem 2rem .1rem var(--portrait-shadow);
}

.portrait::after {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 1.25rem .12rem var(--portrait-diffusion);
  content: "";
  pointer-events: none;
}

.portrait img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 10%;
}

.invitation {
  grid-area: invitation;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(1.75rem, 4vw, 4rem) 1rem;
  text-align: center;
  background: radial-gradient(ellipse at 50% 38%, var(--glow), transparent 70%);
}

.eyebrow {
  color: var(--olive);
  font-size: .75rem;
  font-weight: 650;
  letter-spacing: .11em;
  line-height: 1.4;
  text-transform: uppercase;
}

h1 {
  margin: 1rem 0 1.45rem;
  font: clamp(2.7rem, 5.15vw, 5.75rem)/.94 var(--serif);
  letter-spacing: -.045em;
}

h1 i { display: block; margin: .2em 0 .22em; font-size: .59em; color: var(--gold); }
.date { font: clamp(1.6rem, 2.6vw, 2.35rem)/1.2 var(--serif); }
.place { margin-top: .25rem; color: var(--muted); }

.button {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-height: 48px;
  margin-top: 1.25rem;
  padding: .65rem 1.15rem;
  border-radius: .2rem;
  background: var(--band);
  color: var(--on-band);
  font-weight: 600;
  text-decoration: none;
}

.button:hover { background: #405740; }

.countdown {
  padding: .35rem 1rem 1rem;
  background: var(--band);
  color: var(--on-band);
}

.countdown[hidden], .ticks[hidden] { display: none; }
.countdown h2 { margin: .6rem 0 .75rem; text-align: center; font: italic 1.55rem/1.1 var(--serif); }
.ticks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(100%, 22rem); margin-inline: auto; }
.ticks span {
  display: grid;
  text-align: center;
  color: var(--on-band-muted);
  font-size: .65rem;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.ticks span + span { border-left: 1px solid #778770; }
.ticks b { color: white; font: 2rem/1.15 var(--serif); font-variant-numeric: tabular-nums; }

h2 { font: clamp(2.2rem, 4vw, 3.6rem)/1.05 var(--serif); letter-spacing: -.035em; }
h3 { font: 1.7rem/1.1 var(--serif); letter-spacing: -.02em; }

.venue-photo { margin-block: clamp(1.5rem, 5vw, 4rem) 0; }
.venue-photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 2.35;
  object-fit: cover;
  object-position: center 59%;
  border-radius: .55rem;
}
.venue-photo figcaption {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .2rem 1rem;
  margin-top: .45rem;
  color: var(--muted);
  font-size: .82rem;
}

.quick-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-block: clamp(2rem, 6vw, 4.75rem);
}

.info { padding: clamp(1.25rem, 3.1vw, 2.5rem); border: 1px solid var(--line); background: var(--card); }
.info h2 { font-size: clamp(1.9rem, 3.1vw, 2.65rem); }
.info p, .section-intro p, .activity p:not(.eyebrow), .wedding-notes p { color: var(--muted); }
.info .lead { margin-bottom: .35rem; color: var(--ink); font-weight: 650; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 44px;
  font-weight: 650;
  text-underline-offset: .22em;
}

.text-link:hover { color: var(--olive); }
.info .text-link { margin-top: .35rem; }

.explore { padding-block: clamp(2.5rem, 7vw, 5.5rem); background: var(--sage); }
.section-intro { max-width: 38rem; margin-bottom: clamp(1.4rem, 3vw, 2rem); }
.section-intro p { margin-top: .65rem; }
.activities { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.activity {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--card);
  border-radius: .5rem;
  overflow: hidden;
}

.activity-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--paper);
}

.activity-body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: clamp(1.05rem, 2vw, 1.8rem);
}

.activity-links, .activity-body > .text-link { margin-top: auto; }
.activity-links { display: flex; flex-direction: column; align-items: flex-start; }
.photo-credits { margin-top: 1rem; color: var(--muted); }
.photo-credits summary {
  width: fit-content;
  min-height: 44px;
  padding-block: .65rem;
  font: 650 .9rem/1.4 var(--sans);
  cursor: pointer;
}
.photo-credits ul { margin-block: 0 .5rem; padding-left: 1.5rem; font-size: .9rem; }

.wedding-notes { padding-bottom: clamp(2.25rem, 6vw, 4.75rem); }
.wedding-notes > section { padding-block: 1.2rem; }
.wedding-notes > section + section { border-top: 1px solid var(--line); }
.wedding-notes .panel-body { padding-inline: .25rem; }
.faq-questions {
  max-width: 54rem;
  margin: 0 0 .3rem;
}
.faq-questions > div { padding: .9rem 0; }
.faq-questions > div + div { border-top: 1px solid var(--line); }
.faq-questions dt { font-weight: 650; }
.faq-questions dd { margin: .25rem 0 0; color: var(--muted); }

.panel-body { padding-top: .65rem; }
.photo-gallery { padding-bottom: clamp(1.5rem, 5vw, 3.75rem); }
.gallery-heading { display: flex; align-items: baseline; gap: 1rem; }
.photo-count { margin-left: auto; color: var(--muted); font: .85rem/1.2 var(--sans); white-space: nowrap; }
.photo-gallery > .panel-body { padding-block: .65rem .5rem; }
.gallery-controls:not([hidden]) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .65rem;
  margin-bottom: .55rem;
}
.gallery-arrows { display: flex; gap: .4rem; }
.gallery-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: .35rem .75rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: var(--card);
  color: var(--ink);
  font: 600 .9rem/1.2 var(--sans);
  cursor: pointer;
}
.gallery-controls button:hover { background: var(--sage); }
.gallery-arrows button { font-size: 1.15rem; }
.photo-strip {
  display: flex;
  gap: .7rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: .3rem .3rem .7rem;
  margin-inline: -.3rem;
}
.photo {
  display: block;
  flex: 0 0 clamp(9.5rem, 24vw, 16rem);
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: .35rem;
  background: var(--sage);
}
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 42%; }

.photo-viewer {
  width: min(calc(100% - 1rem), 71rem);
  max-height: calc(100% - 1rem);
  padding: 0;
  border: 1px solid #566356;
  border-radius: .55rem;
  background: #141d17;
  color: #f7f4eb;
  overflow: auto;
}
.photo-viewer::backdrop { background: rgb(7 14 10 / .86); }
.viewer-frame { position: relative; }
.viewer-image {
  width: 100%;
  height: min(74vh, 50rem);
  height: min(74dvh, 50rem);
  object-fit: contain;
  background: #0b110d;
}
.viewer-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .5rem;
  padding: .6rem;
  text-align: center;
}
.viewer-label p { font-size: .95rem; line-height: 1.35; }
.viewer-count { font-size: .8rem; color: #ced9cc; }
.photo-viewer button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #7b8a7b;
  border-radius: 50%;
  background: #24352b;
  color: #fff;
  font: 1.55rem/1 var(--sans);
  cursor: pointer;
}
.photo-viewer button:hover { background: #3c5242; }
.viewer-close { position: absolute; z-index: 1; top: .7rem; right: .7rem; }

footer { background: var(--band); color: var(--on-band); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .55rem 1.25rem; padding-block: 1.35rem; }
footer a { font: 1.7rem/1.2 var(--serif); text-decoration: none; }
footer i { color: #ddc393; }
footer span { color: var(--on-band-muted); font-size: .87rem; }

@media (max-width: 62rem) {
  .activities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 46rem) {
  .photo { flex-basis: clamp(12rem, 68vw, 23rem); }
  .venue-photo img { aspect-ratio: 1.6; }
  .header-inner { display: block; min-height: auto; }
  .home-mark { display: block; width: max-content; margin: .75rem auto; }
  .header-inner[data-menu-ready] .home-mark { display: none; }

  .menu-toggle:not([hidden]) {
    display: flex;
    justify-content: space-between;
    width: 100%;
    min-height: 58px;
    padding-inline: .25rem;
    border-radius: .3rem;
  }

  nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: .35rem 0 .65rem;
    border-top: 1px solid var(--line);
  }

  .header-inner[data-menu-ready] .menu-toggle[aria-expanded="false"] + nav { display: none; }

  nav a { padding-inline: .55rem; }
  .theme-toggle:not([hidden]) {
    justify-content: flex-start;
    gap: .7rem;
    margin-top: .25rem;
    padding-inline: .55rem;
    border-radius: .3rem;
    font-size: .95rem;
    font-weight: 600;
  }
  .theme-label { display: inline; }

  .hero-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "invitation" "portrait";
    max-width: 34rem;
    gap: 1.25rem;
  }
  .portrait { height: auto; aspect-ratio: 1.12; }
  .portrait img { object-position: center 12%; }
  .invitation { padding: .15rem .25rem 0; }
  h1 { font-size: clamp(2.55rem, 8.6vw, 4.2rem); }
}

@media (max-width: 35rem) {
  .monogram { font-size: 1.95rem; }
  .quick-info, .activities { grid-template-columns: minmax(0, 1fr); }
  .quick-info { grid-auto-rows: 1fr; }
}

:root[data-theme="dark"] .greenery { filter: brightness(1.19) saturate(.85); }

@media (prefers-reduced-motion: no-preference) {
  @keyframes photo-in {
    from { opacity: .45; transform: scale(1.03); }
    to { opacity: 1; transform: scale(1); }
  }

  @keyframes unfold {
    from { opacity: 0; transform: translateY(.38rem); }
    to { opacity: 1; transform: translateY(0); }
  }

  .portrait img { animation: photo-in .85s ease-out both; }
  .invitation > * { animation: unfold .65s .13s ease-out both; }
  .photo-viewer[open] { animation: unfold .2s ease-out both; }
  .photo img { transition: transform .22s ease; }
  .photo:focus-visible img { transform: scale(1.05); }

  @media (hover: hover) {
    .photo:hover img { transform: scale(1.05); }
  }
}
