:root {
  --olive: #6f7953;
  --olive-dark: #3f4b35;
  --sage: #9aa486;
  --sage-soft: #c9cfba;
  --cream: #f7f3ea;
  --paper: #fffdf7;
  --sand: #d5cbb6;
  --ink: #2f3328;
  --muted: #707766;
  --line: rgba(63, 75, 53, 0.18);
  --shadow: 0 28px 80px rgba(47, 51, 40, 0.16);
  --script: "Snell Roundhand", "Apple Chancery", "Brush Script MT", cursive;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(154, 164, 134, 0.18), transparent 28rem),
    linear-gradient(180deg, #f4f0e7 0%, var(--cream) 42%, #ebe5d7 100%);
  font-family: var(--sans);
  line-height: 1.6;
}

body.modal-open {
  overflow: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 24rem;
  height: 24rem;
  border: 1px solid rgba(111, 121, 83, 0.12);
  border-radius: 48% 52% 44% 56%;
  transform: rotate(18deg);
}

body::before {
  top: 8rem;
  right: -8rem;
}

body::after {
  bottom: -8rem;
  left: -9rem;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(247, 243, 234, 0.82);
  border-bottom: 1px solid rgba(63, 75, 53, 0.1);
  backdrop-filter: blur(16px);
}

.brand {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0;
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 94svh;
  display: grid;
  align-items: end;
  padding: 2rem clamp(1rem, 5vw, 5rem) 2rem;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  background: var(--olive-dark);
}

.hero__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(38, 45, 32, 0.18), rgba(38, 45, 32, 0.68)),
    linear-gradient(90deg, rgba(38, 45, 32, 0.62), rgba(38, 45, 32, 0.1) 62%);
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 27%;
}

.hero__card {
  position: relative;
  max-width: 40rem;
  color: var(--paper);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--olive);
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero .eyebrow,
.detail-card--green .eyebrow {
  color: rgba(255, 253, 247, 0.82);
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 0;
}

h1 {
  max-width: 11ch;
  font-size: clamp(3.2rem, 11vw, 7.6rem);
}

h2 {
  font-size: clamp(2rem, 5vw, 4.2rem);
}

.hero__text {
  max-width: 26rem;
  margin: 1.5rem 0;
  color: rgba(255, 253, 247, 0.86);
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.85rem 1.35rem;
  border: 1px solid var(--olive);
  border-radius: 999px;
  background: var(--olive);
  color: var(--paper);
  font: 700 0.78rem/1 var(--sans);
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

.button:hover {
  transform: translateY(-2px);
  background: var(--olive-dark);
  border-color: var(--olive-dark);
}

.button--outline {
  background: transparent;
  color: var(--olive-dark);
}

.button--light {
  background: rgba(255, 253, 247, 0.9);
  border-color: rgba(255, 253, 247, 0.9);
  color: var(--olive-dark);
}

.scroll-hint {
  position: absolute;
  right: clamp(1rem, 5vw, 5rem);
  bottom: 2rem;
  color: rgba(255, 253, 247, 0.74);
  font-family: var(--script);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
}

@media (min-width: 861px) {
  .hero__image {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 2.5rem clamp(3rem, 8vw, 8rem) 2.5rem clamp(1rem, 5vw, 5rem);
    background:
      linear-gradient(120deg, rgba(63, 75, 53, 0.96), rgba(111, 121, 83, 0.78)),
      var(--olive-dark);
  }

  .hero__image::after {
    background:
      linear-gradient(90deg, rgba(38, 45, 32, 0.76), rgba(38, 45, 32, 0.42) 42%, rgba(38, 45, 32, 0.08)),
      radial-gradient(circle at 78% 35%, rgba(255, 253, 247, 0.18), transparent 22rem);
  }

  .hero__image img {
    width: min(34vw, 430px);
    height: min(76vh, 760px);
    border: 0.8rem solid rgba(255, 253, 247, 0.82);
    box-shadow: 0 30px 90px rgba(23, 27, 19, 0.32);
    object-position: center 38%;
  }
}

.section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(20rem, 1fr);
  gap: clamp(2rem, 7vw, 5rem);
  align-items: center;
}

.section__copy h2 {
  max-width: 11ch;
}

.center {
  text-align: center;
}

.center h2 {
  max-width: 16ch;
  margin-inline: auto;
}

.paper,
.detail-card,
.rsvp__form {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(63, 75, 53, 0.12);
  box-shadow: var(--shadow);
}

.paper {
  padding: clamp(1.5rem, 5vw, 3rem);
}

.paper::before,
.paper::after,
.detail-card::before {
  content: "";
  position: absolute;
  width: 4.4rem;
  height: 5.6rem;
  border-radius: 100% 0 100% 0;
  border: 1px solid rgba(111, 121, 83, 0.24);
  opacity: 0.72;
  pointer-events: none;
}

.paper::before {
  top: -1.2rem;
  left: -1.1rem;
  transform: rotate(-18deg);
}

.paper::after {
  right: -1rem;
  bottom: -1.5rem;
  transform: rotate(164deg);
}

.paper p,
.detail-card p,
.rsvp p,
.footer p {
  margin: 0;
}

.paper p + p {
  margin-top: 1rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(18rem, 0.85fr) minmax(0, 1fr);
  gap: clamp(2rem, 8vw, 6rem);
  align-items: center;
}

.photo-stack {
  position: relative;
  min-height: 38rem;
}

.photo-stack img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-stack__main {
  position: absolute;
  inset: 0 auto auto 0;
  width: 72%;
  aspect-ratio: 0.68;
  border: 0.75rem solid var(--paper);
  box-shadow: var(--shadow);
  object-position: center;
}

.photo-stack__small {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 58%;
  aspect-ratio: 0.72;
  border: 0.75rem solid var(--paper);
  box-shadow: var(--shadow);
  object-position: center;
}

.info-list h2 {
  max-width: 13ch;
  margin-bottom: 2rem;
}

dl {
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
}

dl div {
  display: grid;
  grid-template-columns: 8rem 1fr;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

dt {
  color: var(--olive);
  font: 700 0.76rem/1.4 var(--sans);
  text-transform: uppercase;
}

dd {
  margin: 0;
}

.date-link {
  color: var(--olive-dark);
  font-weight: 700;
  text-decoration-color: rgba(111, 121, 83, 0.42);
  text-underline-offset: 0.22rem;
}

.calendar-card {
  display: grid;
  gap: 0.25rem;
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  background: var(--olive);
  color: var(--paper);
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(47, 51, 40, 0.14);
}

.calendar-card span {
  color: rgba(255, 253, 247, 0.75);
  font: 700 0.72rem/1 var(--sans);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.calendar-card strong {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.1;
}

.calendar-card em {
  color: rgba(255, 253, 247, 0.82);
  font-style: normal;
}

.timeline-section {
  width: min(860px, calc(100% - 2rem));
}

.timeline {
  position: relative;
  display: grid;
  gap: 0;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--olive);
  opacity: 0.35;
}

.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 6rem;
}

.timeline li::before {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: calc(50% - 0.35rem);
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--olive);
}

.timeline time {
  padding-right: 2rem;
  color: var(--olive-dark);
  font: 400 2rem/1 var(--serif);
  text-align: right;
}

.timeline span {
  padding-left: 2rem;
  font-size: 1.05rem;
}

.details-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 1.2rem;
  align-items: stretch;
}

.detail-card {
  min-height: 22rem;
  padding: clamp(1.35rem, 4vw, 2.5rem);
  overflow: hidden;
}

.detail-card::before {
  right: -1rem;
  top: -1.4rem;
  transform: rotate(28deg);
}

.detail-card--green {
  display: grid;
  grid-template-columns: 1fr 9rem;
  gap: 1.5rem;
  align-items: end;
  background: var(--olive);
  color: var(--paper);
}

.detail-card--green h2,
.detail-card--green p {
  grid-column: 1;
}

.detail-card--green img {
  grid-column: 2;
  grid-row: 1 / 4;
  width: 100%;
  align-self: center;
  border: 0.45rem solid rgba(255, 253, 247, 0.72);
}

.detail-card--photo {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  justify-content: center;
  align-items: start;
  gap: clamp(1rem, 3vw, 2rem);
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.detail-card--photo img {
  width: 100%;
  height: auto;
  min-height: 0;
  border: 0.75rem solid var(--paper);
  box-shadow: var(--shadow);
}

.detail-card h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 4vw, 3.15rem);
}

.menu-list {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

.menu-list li {
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.menu-list span {
  display: block;
  color: var(--olive);
  font: 700 0.76rem/1.6 var(--sans);
  text-transform: uppercase;
}

.countdown-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: min(1040px, calc(100% - 2rem));
  padding-block: 4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(5rem, 1fr));
  gap: 0.75rem;
}

.countdown div {
  min-width: 5rem;
  padding: 1rem 0.75rem;
  background: var(--paper);
  border: 1px solid rgba(63, 75, 53, 0.12);
  text-align: center;
}

.countdown strong {
  display: block;
  color: var(--olive-dark);
  font: 400 clamp(2rem, 5vw, 4.2rem)/1 var(--serif);
}

.countdown span {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
}

.rsvp {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(24rem, 1.25fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}

.rsvp__copy h2 {
  max-width: 13ch;
  margin-bottom: 1.5rem;
}

.rsvp__copy p + p {
  margin-top: 1rem;
}

.rsvp__form {
  display: grid;
  gap: 1.35rem;
  padding: clamp(1.15rem, 3vw, 2.2rem);
}

.rsvp__form label,
.rsvp__form legend {
  color: var(--muted);
  font-size: 0.72rem;
}

label,
legend {
  color: var(--olive-dark);
  font: 700 0.78rem/1.4 var(--sans);
  text-transform: uppercase;
}

input,
textarea,
select {
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(63, 75, 53, 0.22);
  border-radius: 0;
  background: #fffefa;
  color: var(--ink);
  font: 1rem/1.4 var(--sans);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(111, 121, 83, 0.28);
  outline-offset: 2px;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

fieldset {
  display: grid;
  gap: 0.6rem;
  margin: 0;
  padding: 0;
  border: 0;
}

.participants-fieldset {
  gap: 1rem;
}

.participants-list {
  display: grid;
  gap: 1rem;
}

.participant-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(9rem, 0.45fr);
  gap: 0.9rem 0.85rem;
  align-items: end;
  padding: 1.15rem;
  background: rgba(247, 243, 234, 0.52);
  border: 1px solid rgba(63, 75, 53, 0.14);
}

.participant-row label {
  min-width: 0;
}

.participant-row__top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(63, 75, 53, 0.1);
}

.participant-row__top span {
  color: var(--olive);
  font: 400 1.35rem/1 var(--serif);
  text-transform: none;
}

.participant-row__name {
  grid-column: 1;
}

.participant-row__attendance {
  grid-column: 2;
}

.participant-row__note {
  grid-column: 1 / -1;
}

.remove-participant {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--olive-dark);
  font: 700 0.72rem/1 var(--sans);
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.22rem;
  cursor: pointer;
}

.text-button {
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--olive-dark);
  font: 700 0.78rem/1.4 var(--sans);
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.25rem;
  cursor: pointer;
}

.radio {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-weight: 400;
  text-transform: none;
}

.radio input {
  width: 1rem;
  margin: 0;
}

@media (max-width: 760px) {
  .participant-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1rem 0.9rem 1.1rem;
  }

  .participant-row__name,
  .participant-row__attendance,
  .participant-row__note {
    grid-column: 1;
  }
}

.form-message {
  min-height: 1.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.form-message--success {
  color: var(--olive-dark);
}

.form-message--error {
  color: #8a3a2d;
}

.success-modal[hidden] {
  display: none;
}

.success-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(47, 51, 40, 0.62);
  backdrop-filter: blur(10px);
}

.success-modal__panel {
  position: relative;
  width: min(680px, 100%);
  max-height: min(86svh, 760px);
  overflow: auto;
  padding: clamp(1rem, 4vw, 1.5rem);
  background: var(--paper);
  border: 1px solid rgba(63, 75, 53, 0.16);
  box-shadow: 0 30px 100px rgba(23, 27, 19, 0.35);
}

.success-modal__panel h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.9rem, 5vw, 3rem);
}

.success-modal video {
  display: block;
  width: 100%;
  max-height: 58svh;
  background: #000;
  object-fit: contain;
}

.success-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--olive-dark);
  font: 700 0.72rem/1 var(--sans);
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 0.22rem;
  cursor: pointer;
}

.gifts {
  padding-top: 0;
}

.paper--wide {
  max-width: 760px;
  margin-inline: auto;
  text-align: center;
}

.paper--wide h2 {
  margin-bottom: 1rem;
}

.footer {
  display: grid;
  place-items: center;
  gap: 0.8rem;
  padding: 4rem 1rem;
  background: var(--olive-dark);
  color: var(--paper);
  text-align: center;
}

.footer__names {
  font-family: var(--script);
  font-size: clamp(2rem, 5vw, 3.2rem);
}

@media (max-width: 860px) {
  .site-header {
    align-items: center;
  }

  .hero {
    min-height: 92svh;
  }

  .hero__image img {
    object-position: 56% center;
  }

  .scroll-hint {
    left: 1rem;
    right: auto;
    bottom: 1rem;
  }

  .intro,
  .split,
  .rsvp {
    grid-template-columns: 1fr;
  }

  .section__copy h2,
  .info-list h2,
  .rsvp__copy h2 {
    max-width: 100%;
  }

  .photo-stack {
    min-height: 31rem;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .detail-card--photo {
    display: block;
    min-height: 32rem;
  }

  .detail-card--photo img {
    max-width: 420px;
    min-height: 0;
    margin-inline: auto;
  }

  .detail-card--photo img:last-child {
    display: none;
  }

  .countdown-section {
    display: grid;
  }
}

@media (max-width: 620px) {
  .site-header {
    background: rgba(247, 243, 234, 0.88);
    border-bottom: 1px solid rgba(63, 75, 53, 0.1);
  }

  .hero {
    padding-top: 2rem;
  }

  .hero__card {
    padding-bottom: 2rem;
  }

  .section {
    width: min(100% - 1.1rem, 1120px);
  }

  dl div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .timeline::before {
    left: 0.4rem;
  }

  .timeline li {
    grid-template-columns: 4.8rem 1fr;
    padding-left: 1.2rem;
  }

  .timeline li::before {
    left: 0.05rem;
  }

  .timeline time {
    padding-right: 0.8rem;
    font-size: 1.4rem;
    text-align: left;
  }

  .timeline span {
    padding-left: 0.5rem;
  }

  .detail-card--green {
    grid-template-columns: 1fr;
  }

  .detail-card--green h2,
  .detail-card--green p,
  .detail-card--green img {
    grid-column: auto;
    grid-row: auto;
  }

  .detail-card--green img {
    width: min(12rem, 100%);
  }

  .countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .countdown div {
    min-width: 0;
    padding: 0.75rem 0.25rem;
  }

  .countdown strong {
    font-size: clamp(1.5rem, 10vw, 2.35rem);
  }

  .countdown span {
    font-size: 0.62rem;
  }
}
