:root {
  color-scheme: light;
  --paper: #f5f4f1;
  --ink: #353438;
  --muted: #77757a;
  --smoke: #aaa9ac;
  --gold: #b39a62;
  --gold-light: #d7c99e;
  --rose: #9b6972;
  --rose-soft: #cfadb0;
  --rose-pale: #eadcda;
  --rose-deep: #78545c;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "DM Sans", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #e5e4e1;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

.paper {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 18% 25%, rgb(255 255 255 / 94%), transparent 43%),
    radial-gradient(ellipse at 84% 77%, rgb(224 223 220 / 63%), transparent 42%),
    radial-gradient(ellipse at 4% 55%, rgb(206 177 173 / 9%), transparent 18%),
    repeating-linear-gradient(113deg, rgb(94 92 90 / 3%) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(23deg, rgb(255 255 255 / 35%) 0 1px, transparent 1px 8px);
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.cover,
.invitation,
.gallery-section,
.date-section,
.event-section,
.dress-section,
.gift-section,
.rsvp-section {
  display: grid;
  min-height: 90svh;
  place-items: center;
  padding: 88px 24px;
}

.cover {
  min-height: 100svh;
}

.cover-content,
.section-inner {
  position: relative;
  z-index: 1;
  width: min(100%, 610px);
  margin: auto;
  text-align: center;
}

.section-inner--wide {
  width: min(100%, 920px);
}

.cover-content {
  padding: 52px 0;
}

.silk {
  position: absolute;
  z-index: -1;
  width: min(70vw, 620px);
  aspect-ratio: 1;
  opacity: 0.55;
  filter: blur(3px);
  pointer-events: none;
  background:
    radial-gradient(ellipse at 33% 32%, rgb(112 111 117 / 72%), transparent 6%),
    radial-gradient(ellipse at 42% 45%, rgb(135 134 139 / 60%), transparent 22%),
    radial-gradient(ellipse at 58% 53%, rgb(177 176 179 / 62%), transparent 38%),
    radial-gradient(ellipse at 55% 70%, rgb(216 215 214 / 72%), transparent 54%);
}

.silk--top {
  top: -22%;
  left: -27%;
  transform: rotate(-28deg);
}

.silk--bottom {
  right: -29%;
  bottom: -24%;
  transform: rotate(152deg);
}

.gold-dust {
  position: absolute;
  width: 180px;
  height: 280px;
  opacity: 0.68;
  pointer-events: none;
  background-image:
    radial-gradient(circle, var(--gold-light) 1.2px, transparent 1.8px),
    radial-gradient(circle, var(--gold) 1px, transparent 1.6px);
  background-size: 29px 31px, 47px 41px;
  background-position: 5px 7px, 21px 17px;
  mask-image: radial-gradient(ellipse, #000 5%, transparent 72%);
}

.gold-dust--top {
  top: 3%;
  right: 3%;
  transform: rotate(20deg);
}

.gold-dust--bottom {
  bottom: 2%;
  left: 2%;
  transform: rotate(-18deg);
}

.eyebrow {
  margin: 0;
  color: #77746f;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  line-height: 1.8;
  text-transform: uppercase;
}

.cover-roman {
  margin: 48px 0 0;
  font-family: var(--serif);
  font-size: clamp(1rem, 3vw, 1.4rem);
  letter-spacing: 0.34em;
}

.cover h1 {
  margin: 12px 0 22px;
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(5.5rem, 19vw, 9rem);
  font-weight: 400;
  line-height: 1.06;
  color: var(--rose-deep);
  text-shadow: 0 2px 0 rgb(255 255 255 / 55%);
}

.gold-rule {
  position: relative;
  display: block;
  width: 76px;
  height: 1px;
  margin: 25px auto;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.gold-rule--ornate::before,
.gold-rule--ornate::after {
  position: absolute;
  top: 50%;
  width: 6px;
  height: 6px;
  transform: translateY(-50%) rotate(45deg);
  border: 1px solid var(--gold);
  background: var(--paper);
  content: "";
}

.gold-rule--ornate::before {
  left: calc(50% - 23px);
}

.gold-rule--ornate::after {
  right: calc(50% - 23px);
}

.cover-date {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(0.9rem, 3.4vw, 1.2rem);
  letter-spacing: 0.19em;
}

.cover-date span {
  padding: 0 0.35em;
  color: var(--gold);
}

.cover-caption {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
}

.scroll-cue {
  display: grid;
  width: 40px;
  height: 40px;
  margin: 54px auto 0;
  place-items: center;
  border: 1px solid rgb(179 154 98 / 65%);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.2rem;
  text-decoration: none;
  transition: background-color 180ms ease, transform 180ms ease;
}

.scroll-cue:hover {
  transform: translateY(3px);
  background: rgb(179 154 98 / 10%);
}

.botanical {
  position: absolute;
  z-index: 0;
  width: clamp(110px, 24vw, 190px);
  aspect-ratio: 180 / 220;
  color: #a88a76;
  opacity: 0.56;
  pointer-events: none;
}

.botanical svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.35;
}

.botanical .petal {
  fill: rgb(197 151 151 / 24%);
}

.botanical .flower-center {
  fill: rgb(196 163 112 / 66%);
}

.botanical--upper {
  top: -18px;
  right: -15px;
  transform: rotate(16deg);
}

.botanical--lower {
  bottom: -78px;
  left: -46px;
  transform: rotate(196deg);
}

.botanical--left {
  top: 48%;
  left: -54px;
  transform: rotate(-18deg);
}

.botanical--right {
  right: -54px;
  bottom: 10%;
  transform: rotate(162deg);
}

.botanical--card {
  width: clamp(100px, 19vw, 155px);
  opacity: 0.32;
}

.botanical--rsvp {
  width: clamp(120px, 24vw, 200px);
  opacity: 0.5;
}

.invitation {
  min-height: 80svh;
}

.invitation h2,
.gallery-section h2,
.event-card h2,
.rsvp-section h2 {
  margin: 14px auto 0;
  font-family: var(--serif);
  font-size: clamp(2.35rem, 8vw, 4rem);
  font-weight: 400;
  line-height: 1.08;
  color: var(--rose-deep);
}

.invitation h2::after,
.gallery-section h2::after,
.rsvp-section h2::after {
  display: block;
  width: 48px;
  height: 1px;
  margin: 17px auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  content: "";
}

.invitation-copy,
.gift-copy {
  max-width: 500px;
  margin: 25px auto 0;
  color: #514f53;
  font-family: var(--serif);
  font-size: clamp(1.18rem, 4vw, 1.55rem);
  font-weight: 500;
  line-height: 1.5;
}

.invitation-signature {
  margin: 30px 0 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--rose);
}

.gallery-section {
  grid-template-columns: minmax(0, 1fr);
  min-height: 90svh;
}

.gallery-section > .section-inner {
  width: min(100%, 920px);
  min-width: 0;
}

.gallery-carousel {
  width: min(100%, 570px);
  min-width: 0;
  margin: 42px auto 0;
}

.carousel-viewport {
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(179 154 98 / 72%);
  background: rgb(249 248 244 / 88%);
  box-shadow: 0 12px 32px rgb(40 38 34 / 9%), inset 0 0 0 5px rgb(255 255 255 / 72%);
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  align-items: flex-start;
  transition: transform 420ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

.carousel-slide {
  display: grid;
  flex: 0 0 100%;
  min-width: 0;
  margin: 0;
  padding: 18px 18px 0;
  place-items: center;
}

.carousel-frame {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
  padding: 0 0 19px;
  border: 1px solid rgb(208 204 194 / 72%);
  background: #f9f8f4;
}

.carousel-frame img {
  display: block;
  width: 100%;
  height: min(52svh, 440px);
  min-height: 240px;
  object-fit: contain;
  background: #eeede9;
}

.carousel-frame figcaption {
  padding: 17px 12px 0;
  color: var(--rose-deep);
  font-family: var(--serif);
  font-size: 1.1rem;
  text-align: center;
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgb(179 154 98 / 78%);
  border-radius: 50%;
  color: #655a3f;
  background: rgb(249 248 244 / 92%);
  box-shadow: 0 2px 10px rgb(40 38 34 / 12%);
  cursor: pointer;
  transition: background-color 180ms ease;
}

.carousel-arrow:hover {
  background: #e9e2cf;
}

.carousel-arrow span {
  margin-top: -4px;
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1;
}

.carousel-arrow--previous {
  left: 24px;
}

.carousel-arrow--next {
  right: 24px;
}

.carousel-status {
  margin: 12px 0 0;
  color: var(--rose);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  gap: 13px;
  margin: 34px auto 0;
  align-items: center;
}

.gallery-dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}

.gallery-dot.is-active {
  border-color: var(--rose);
  background: var(--rose);
  box-shadow: 0 0 0 3px rgb(155 105 114 / 12%);
}

.date-section {
  min-height: 78svh;
}

.date-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  width: min(100%, 390px);
  margin: 34px auto 28px;
  padding: 17px 0;
  border-top: 1px solid rgb(179 154 98 / 64%);
  border-bottom: 1px solid rgb(179 154 98 / 64%);
}

.date-card::before,
.date-card::after {
  position: absolute;
  left: 50%;
  width: 7px;
  height: 7px;
  transform: translateX(-50%) rotate(45deg);
  border: 1px solid var(--gold);
  background: var(--paper);
  content: "";
}

.date-card::before {
  top: -4px;
}

.date-card::after {
  bottom: -4px;
}

.date-weekday,
.date-month {
  margin: 0;
  color: #646268;
  font-family: var(--serif);
  font-size: 0.92rem;
  letter-spacing: 0.18em;
}

.date-day {
  margin: 0;
  color: var(--rose-deep);
  font-family: var(--serif);
  font-size: 5.5rem;
  font-weight: 400;
  line-height: 1;
}

.date-month span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.7rem;
}

.countdown-heading {
  margin: 42px 0 15px;
  color: var(--rose);
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: 2.8rem;
}

.countdown {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(15px, 5vw, 32px);
  color: var(--rose-deep);
}

.countdown div {
  display: grid;
  gap: 6px;
}

.countdown span {
  font-family: var(--serif);
  font-size: clamp(2rem, 8vw, 3.2rem);
  letter-spacing: 0.12em;
  line-height: 1;
}

.countdown small {
  color: #77757a;
  font-family: var(--serif);
  font-size: 0.68rem;
}

.countdown b {
  padding-top: 4px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 400;
}

.event-section,
.dress-section,
.gift-section {
  min-height: 75svh;
  padding-top: 75px;
  padding-bottom: 75px;
}

.event-card {
  position: relative;
  width: min(100%, 430px);
  margin: 16px auto 0;
  padding: 42px 28px 38px;
  border: 1px solid rgb(179 154 98 / 64%);
  border-radius: 7px;
  background:
    linear-gradient(rgb(255 254 251 / 88%), rgb(255 254 251 / 88%)) padding-box,
    linear-gradient(145deg, rgb(179 154 98 / 65%), rgb(207 173 176 / 55%), rgb(179 154 98 / 65%)) border-box;
  box-shadow: 0 15px 38px rgb(54 52 47 / 8%), inset 0 0 0 5px rgb(255 255 255 / 62%);
}

.event-card::before {
  position: absolute;
  inset: 9px;
  border: 1px solid rgb(179 154 98 / 25%);
  border-radius: 3px;
  content: "";
  pointer-events: none;
}

.event-card::after {
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 52px;
  height: 8px;
  transform: translateX(-50%);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle, var(--rose) 1.3px, transparent 1.8px),
    radial-gradient(circle, var(--gold) 1px, transparent 1.5px),
    radial-gradient(circle, var(--gold) 1px, transparent 1.5px);
  background-position: center, 13px center, calc(100% - 13px) center;
  background-repeat: no-repeat;
  background-size: 5px 5px, 4px 4px, 4px 4px;
  content: "";
}

.event-card > .eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--rose);
}

.event-card > .eyebrow::before,
.event-card > .eyebrow::after {
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold));
  content: "";
}

.event-card > .eyebrow::after {
  transform: rotate(180deg);
}

.event-card h2 {
  font-size: clamp(2rem, 7vw, 3rem);
}

.emblem {
  position: relative;
  z-index: 2;
  display: grid;
  width: 78px;
  height: 78px;
  margin: 0 auto -34px;
  place-items: center;
  border: 1px solid var(--gold-light);
  border-radius: 50%;
  color: var(--rose);
  background:
    radial-gradient(circle at center, #fbf8f2 0 53%, transparent 54%),
    #e9ddd9;
}

.emblem svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.45;
}

.event-place {
  margin: 23px 0 4px;
  font-family: var(--serif);
  font-size: 1.75rem;
}

.event-time {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.2em;
}

.gold-button {
  display: inline-block;
  min-width: 170px;
  padding: 12px 22px;
  border: 1px solid #a98e4e;
  border-radius: 7px;
  color: #5e4e2c;
  background: linear-gradient(180deg, #efe4c6, #d9c48f 48%, #eadbb6);
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 58%), 0 3px 8px rgb(121 99 56 / 12%);
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter 180ms ease, transform 180ms ease;
}

.gold-button:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.dress-copy {
  max-width: 300px;
  margin: 20px auto 0;
  color: #68666b;
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.5;
}

.dress-note {
  max-width: 310px;
  margin: 20px auto 0;
  padding-top: 15px;
  border-top: 1px solid rgb(179 154 98 / 38%);
  color: var(--rose-deep);
  font-size: 0.76rem;
  line-height: 1.6;
}

.form-status {
  min-height: 1.2em;
  margin: 12px 0 0;
  color: #655a3f;
  font-size: 0.75rem;
}

.gift-copy {
  margin-top: 20px;
  font-size: 1.18rem;
}

.gift-alias {
  margin: 20px 0 0;
  color: #77757a;
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rsvp-section {
  min-height: 76svh;
}

.rsvp-section h2 {
  max-width: 450px;
  margin-top: 22px;
  font-family: "Great Vibes", "Brush Script MT", cursive;
  font-size: clamp(3.3rem, 12vw, 5rem);
}

.rsvp-copy {
  margin: 20px auto 26px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
}

.rsvp-form {
  display: grid;
  gap: 18px;
  width: min(100%, 460px);
  margin: 0 auto;
  text-align: left;
}

.rsvp-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 7px;
  color: #6e5960;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.form-field input,
.form-field select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid rgb(179 154 98 / 48%);
  border-radius: 6px;
  color: #51484b;
  background: rgb(255 255 255 / 78%);
  font: inherit;
  font-weight: 400;
  letter-spacing: normal;
}

.companions-fieldset {
  display: grid;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgb(179 154 98 / 38%);
  border-radius: 8px;
}

.companions-fieldset[hidden] {
  display: none;
}

.companions-fieldset legend {
  padding: 0 7px;
  color: var(--rose-deep);
  font-family: var(--serif);
  font-size: 1.1rem;
}

.companions-fieldset p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.companions-list {
  display: grid;
  gap: 12px;
}

.companion-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.add-companion-button,
.remove-companion-button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgb(179 154 98 / 55%);
  border-radius: 6px;
  color: #655a3f;
  background: rgb(255 255 255 / 72%);
  font: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}

.add-companion-button {
  justify-self: start;
}

.remove-companion-button {
  color: var(--rose-deep);
}

.rsvp-form .gold-button {
  justify-self: center;
}

.rsvp-form .gold-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.footer {
  padding: 35px 20px 28px;
  color: #626065;
  text-align: center;
}

.footer-mark {
  color: var(--rose);
  font-family: var(--serif);
  font-size: 1.8rem;
  letter-spacing: 0.2em;
}

.footer p {
  margin: 8px 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

:focus-visible {
  outline: 2px solid #806a37;
  outline-offset: 4px;
}

@media (max-width: 600px) {
  .cover,
  .invitation,
  .gallery-section,
  .date-section,
  .event-section,
  .dress-section,
  .gift-section,
  .rsvp-section {
    padding: 72px 20px;
  }

  .cover-roman {
    margin-top: 38px;
  }

  .cover-date {
    font-size: clamp(0.65rem, 2.8vw, 0.78rem);
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .rsvp-fields {
    grid-template-columns: 1fr;
  }

  .gallery-carousel {
    margin-top: 32px;
  }

  .carousel-slide {
    padding: 8px 8px 0;
  }

  .carousel-frame img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: min(48svh, 360px);
    min-height: 0;
    object-fit: contain;
    background: transparent;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
  }

  .carousel-arrow--previous {
    left: 15px;
  }

  .carousel-arrow--next {
    right: 15px;
  }

  .date-card {
    gap: 10px;
  }

  .date-weekday,
  .date-month {
    font-size: 0.76rem;
  }

  .event-card {
    padding-right: 20px;
    padding-left: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
