:root {
  --ink: #26332d;
  --sage: #718679;
  --terracotta: #b66f58;
  --champagne: #f4eee4;
  --paper: #fbf9f5;
  --line: #d8d7ce;
  --serif: 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.hero {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  color: #fff;
}

.hero-image,
.hero-wash {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.hero-image {
  object-fit: cover;
  object-position: 54% 14%;
  transform: scale(1.025);
  transform-origin: center 45%;
}

.hero-wash {
  background:
    linear-gradient(180deg, rgb(23 27 21 / 65%), transparent 23%),
    linear-gradient(90deg, rgb(22 25 19 / 85%), rgb(22 25 19 / 64%) 27%, transparent 58%);
}

.nav {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  z-index: 2;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 5vw, 5rem);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .15em;
  color: inherit;
  text-decoration: none;
  font: 1.65rem var(--serif);
  letter-spacing: .12em;
  white-space: nowrap;
}

.wordmark i {
  color: #e5c8a8;
  font-size: .75em;
  font-style: normal;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .2rem clamp(.5rem, 2vw, 2rem);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-size: .875rem;
  font-weight: 600;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: inherit;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible { text-decoration: underline; }

.hero-content {
  width: fit-content;
  max-width: 54%;
  padding: 7rem 1rem 5rem clamp(2rem, 7vw, 8rem);
}

.eyebrow,
.kicker,
.section-label {
  letter-spacing: .2em;
  text-transform: uppercase;
  font-size: .75rem;
  font-weight: 600;
}

.hero h1 {
  margin: .75rem 0;
  font: 500 clamp(2.6rem, 5.3vw, 5.6rem)/.95 var(--serif);
  text-wrap: balance;
}

.hero h1 em {
  color: #e2bfa0;
  font-style: normal;
}

.hero-date {
  display: flex;
  flex-wrap: wrap;
  gap: 0 .55rem;
  margin-top: 1.15rem;
  font-size: .875rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.hero-date [aria-hidden] { color: #e2bfa0; }

.button {
  display: inline-block;
  margin-top: 1rem;
  padding: .8rem 1.25rem;
  border: 1px solid currentColor;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .875rem;
}

.button-light { color: #fff; }
.button-light:hover { background: rgb(255 255 255 / 13%); }

.section {
  position: relative;
  padding: clamp(5rem, 11vw, 10rem) clamp(1.5rem, 9vw, 10rem);
}

.section-label {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: var(--terracotta);
  margin-bottom: 4rem;
}

.section-label span {
  width: 4rem;
  height: 1px;
  background: var(--terracotta);
}

h2 {
  margin: .6rem 0 1.5rem;
  font: 500 clamp(3rem, 7vw, 6rem)/.95 var(--serif);
}

.intro {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 3rem;
  align-items: end;
}

.intro-copy { max-width: 38rem; }
.intro-copy p:not(.kicker) { max-width: 32rem; font-size: 1.15rem; }

.date-card {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.date-day { color: var(--terracotta); font: 5rem/.8 var(--serif); }
.date-card strong,
.date-card span { display: block; }
.date-card span { font-size: .8rem; color: var(--sage); }

.details { background: var(--champagne); }
.details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 8vw, 10rem);
  align-items: center;
}

.details h2 em { color: var(--terracotta); font-style: normal; }

.text-link {
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
}

.garden-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 22rem;
  background: linear-gradient(135deg, #d49b7b, #718679);
  color: #fff;
  text-align: center;
}

.garden-card::before {
  content: '';
  position: absolute;
  inset: 1.2rem;
  border: 1px solid rgb(255 255 255 / 55%);
}

.garden-mark { font: 5rem/1 var(--serif); }
.garden-card p { position: absolute; bottom: 2rem; letter-spacing: .08em; font-size: .8rem; }

.gallery h2,
.gallery-grid {
  max-width: 74rem;
  margin-inline: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.65rem, 1.8vw, 1.45rem);
  padding: 0;
  list-style: none;
}

.gallery-grid li { background: var(--champagne); }
.gallery-grid li:nth-child(n + 3) { aspect-ratio: 4 / 5; }
.gallery-grid .gallery-wide { grid-column: span 2; aspect-ratio: 1.6; }

.gallery-grid a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-grid a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 4px;
}

.gallery-grid img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-wide img { object-position: center 35%; }
.gallery-woods img { object-position: 45% 25%; }
.gallery-proposal img { object-position: center 65%; }

@media (prefers-reduced-motion: no-preference) {
  .gallery-grid img { transition: transform 200ms ease-out; }
  .gallery-grid a:hover img { transform: scale(1.035); }
}

.photo-viewer {
  max-width: calc(100vw - 1.5rem);
  max-height: calc(100svh - 1.5rem);
  padding: .65rem;
  border: none;
  background: var(--ink);
  color: var(--paper);
}

.photo-viewer::backdrop { background: rgb(15 20 17 / 90%); }
.photo-viewer form { display: flex; justify-content: flex-end; margin-bottom: .45rem; }

.photo-close {
  padding: .5rem .9rem;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.photo-viewer img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100svh - 6rem);
  margin: auto;
}

.rsvp-panel {
  max-width: 40rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 6rem);
  border: 1px solid var(--line);
  text-align: center;
}

.rsvp { background: var(--champagne); }
.rsvp-panel p:not(.kicker) { max-width: 28rem; margin: 0 auto 2rem; }
.coming {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: #8d4635;
  font-size: .875rem;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.dot { width: .55rem; height: .55rem; background: var(--terracotta); border-radius: 50%; }

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 3rem clamp(1.5rem, 9vw, 10rem);
  background: var(--ink);
  color: #c8d0c9;
  font-size: .75rem;
}

footer .wordmark { color: #fff; }
footer p { margin: 0; }

@media (max-width: 800px), (max-aspect-ratio: 4 / 5) {
  .hero { align-items: end; }
  .hero-image { object-position: 55% 12%; }
  .hero-wash {
    background:
      linear-gradient(180deg, rgb(23 27 21 / 78%), transparent 18%),
      linear-gradient(0deg, rgb(21 27 21 / 93%) 5%, rgb(21 27 21 / 72%) 30%, transparent 59%);
  }
  .hero-content {
    width: 100%;
    max-width: none;
    padding: 18rem 1rem clamp(2rem, 6vh, 4.5rem);
    text-align: center;
  }
  .hero h1 { font-size: clamp(2.6rem, 8.75vw, 5rem); }
  .hero-date { justify-content: center; }
  .intro, .details-grid { grid-template-columns: 1fr; }
  .section-label { margin-bottom: 2.5rem; }
  .date-card { border-left: 0; border-top: 1px solid var(--line); padding: 1.5rem 0 0; }
  .garden-card { min-height: 17rem; }
  footer { flex-direction: column; align-items: flex-start; gap: 1rem; }
}

@media (max-width: 580px) {
  .nav { padding-block: .75rem; gap: .65rem; }
  .nav-links { font-size: .8rem; letter-spacing: .055em; }
  .wordmark { font-size: 1.4rem; letter-spacing: .07em; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-grid li { aspect-ratio: 2 / 3; }
  .gallery-grid .gallery-woods { grid-column: span 2; aspect-ratio: 1.6; }
  .gallery-grid .gallery-proposal { grid-column: span 2; aspect-ratio: 4 / 5; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
