:root {
  --sage: #87947d;
  --deep-sage: #4f5740;
  --olive: #596048;
  --cream: #fbf8f1;
  --paper: #fffefd;
  --champagne: #d1af70;
  --ink: #141712;
  --muted: rgba(20, 23, 18, 0.68);
  --glass: rgba(255, 255, 253, 0.64);
  --glass-border: rgba(255, 255, 255, 0.74);
  --shadow: 0 24px 70px rgba(55, 61, 46, 0.16);
  --block: "Inter", Arial, sans-serif;
  --script: "Great Vibes", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--block);
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0.1;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px),
    radial-gradient(circle at 80% 30%, rgba(37, 48, 39, 0.22) 0 1px, transparent 1px);
  background-size: 34px 34px, 48px 48px;
  mix-blend-mode: soft-light;
}

.music-toggle {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 25;
  width: 52px;
  height: 52px;
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--olive);
  background: rgba(255, 255, 253, 0.74);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  transition: transform 0.35s ease, background 0.35s ease;
}

.music-toggle:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 253, 0.94);
}

.music-icon,
.music-icon::before,
.music-icon::after {
  position: absolute;
  display: block;
  background: currentColor;
}

.music-icon {
  width: 3px;
  height: 18px;
  left: 22px;
  top: 16px;
  border-radius: 6px;
}

.music-icon::before {
  content: "";
  width: 16px;
  height: 3px;
  left: 0;
  top: 0;
  border-radius: 6px;
  transform: rotate(-12deg);
  transform-origin: left center;
}

.music-icon::after {
  content: "";
  width: 10px;
  height: 10px;
  left: -7px;
  top: 15px;
  border-radius: 50%;
}

.music-toggle.is-playing .music-icon {
  width: 4px;
  height: 20px;
  left: 18px;
  top: 16px;
  box-shadow: 12px 0 0 currentColor;
}

.music-toggle.is-playing .music-icon::before,
.music-toggle.is-playing .music-icon::after {
  display: none;
}

.invitation::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(89, 96, 72, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(89, 96, 72, 0.035) 1px, transparent 1px);
  background-size: 68px 68px;
}

.nav {
  display: none;
  position: absolute;
  top: 18px;
  left: 50%;
  z-index: 3;
  width: min(calc(100% - 28px), 720px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid rgba(89, 96, 72, 0.13);
  border-radius: 999px;
  background: rgba(255, 255, 253, 0.66);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.nav a {
  color: var(--olive);
  font-size: clamp(0.56rem, 2.3vw, 0.72rem);
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.nav .brand {
  font-family: var(--block);
  font-size: 1.08rem;
  letter-spacing: 0.08em;
}

.countdown-section,
.monogram-section,
.details-section,
.portrait-section,
.itinerary-section,
.dress-section,
.rsvp-section {
  width: min(100% - 34px, 620px);
  margin: 0 auto;
}

.foliage {
  display: block;
  width: min(100%, 430px);
  margin-inline: auto;
  mix-blend-mode: multiply;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  font-family: var(--block);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--block);
  font-weight: 500;
  letter-spacing: 0;
}

.script-title {
  font-family: var(--script);
  font-weight: 400;
}

h1.script-title {
  font-size: clamp(3.05rem, 14vw, 5.4rem);
  line-height: 0.9;
}

.primary-action,
.rsvp-form button {
  border: 0;
  color: var(--paper);
  background: var(--olive);
  box-shadow: 0 18px 36px rgba(57, 68, 57, 0.24);
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
}

.primary-action {
  min-height: 44px;
  padding: 0 10px;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
  font-family: var(--block);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.primary-action:hover {
  color: var(--olive);
  background: transparent;
  box-shadow: none;
  transform: translateY(-2px);
}

.invitation {
  position: relative;
  background: linear-gradient(180deg, var(--paper), var(--cream) 48%, var(--paper));
}

.countdown-section {
  padding: 26px 0 28px;
  text-align: center;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.countdown div,
.rsvp-form {
  border: 1px solid var(--glass-border);
  background: var(--glass);
  backdrop-filter: blur(22px);
  box-shadow: var(--shadow);
}

.countdown div {
  min-height: 98px;
  display: grid;
  place-items: center;
  padding: 16px 8px;
  border-radius: 6px;
}

.countdown strong {
  display: block;
  color: var(--olive);
  font-family: var(--block);
  font-size: clamp(2.2rem, 11vw, 4.4rem);
  font-weight: 500;
  line-height: 0.8;
}

.countdown span {
  display: block;
  margin-top: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.monogram-section {
  padding: 56px 0 18px;
}

.monogram-photo {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
}

.monogram-photo img,
.portrait-section img,
.dress-section img {
  display: block;
  width: 100%;
  object-fit: cover;
  box-shadow: 0 22px 56px rgba(35, 41, 29, 0.16);
}

.monogram-photo img {
  height: auto;
  object-fit: contain;
  box-shadow: none;
}

.details-section {
  position: relative;
  padding: 18px 0 76px;
  text-align: center;
}

.details-section h2 {
  margin-bottom: 18px;
  font-size: clamp(4rem, 17vw, 6.4rem);
  line-height: 0.84;
  letter-spacing: 0;
  text-transform: none;
}

.details-card {
  position: relative;
  z-index: 2;
  padding: 16px 8px 34px;
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.details-ornament {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: min(100%, 520px);
  margin: 0 auto 38px;
  color: var(--olive);
}

.details-ornament::before,
.details-ornament::after {
  content: "";
  height: 1px;
  background: rgba(209, 175, 112, 0.58);
}

.details-ornament span {
  position: relative;
  width: 46px;
  height: 20px;
}

.details-ornament span::before,
.details-ornament span::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 19px;
  height: 10px;
  border-radius: 100% 0 100% 0;
  background: rgba(89, 96, 72, 0.72);
}

.details-ornament span::before {
  left: 5px;
  transform: rotate(22deg);
}

.details-ornament span::after {
  right: 5px;
  transform: scaleX(-1) rotate(22deg);
}

.detail-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-bottom: 46px;
}

.detail-row div {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 0 12px;
}

.detail-row div + div::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 6px;
  width: 1px;
  background: rgba(209, 175, 112, 0.48);
}

.detail-row strong {
  color: var(--ink);
  font-size: clamp(0.72rem, 2.7vw, 0.96rem);
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.line-icon {
  position: relative;
  display: block;
  color: currentColor;
}

.line-icon {
  width: 50px;
  height: 50px;
  color: rgba(89, 96, 72, 0.82);
}

.calendar-icon {
  border: 2px solid currentColor;
  border-radius: 7px;
}

.calendar-icon::before,
.calendar-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
}

.calendar-icon::before {
  left: 6px;
  right: 6px;
  top: 11px;
  height: 2px;
}

.calendar-icon::after {
  left: 10px;
  top: 19px;
  width: 5px;
  height: 5px;
  box-shadow: 9px 0, 18px 0, 0 10px, 9px 10px, 18px 10px;
}

.pin-icon {
  border: 2px solid currentColor;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg) scale(0.78);
}

.pin-icon::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.clock-icon {
  border: 2px solid currentColor;
  border-radius: 50%;
}

.clock-icon::before,
.clock-icon::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 10px;
  width: 2px;
  height: 12px;
  background: currentColor;
  transform-origin: bottom;
}

.clock-icon::after {
  height: 10px;
  transform: rotate(126deg);
}

.details-card p {
  max-width: 520px;
  margin: 0 auto;
  color: rgba(20, 23, 18, 0.86);
  font-family: var(--block);
  font-size: clamp(1rem, 3.7vw, 1.28rem);
  font-weight: 400;
  line-height: 1.75;
}

.details-heart {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  width: min(170px, 58%);
  margin: 24px auto;
  color: var(--champagne);
  font-size: 1.05rem;
}

.details-heart::before,
.details-heart::after {
  content: "";
  height: 1px;
  background: rgba(209, 175, 112, 0.58);
}

.foliage-under {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  margin-top: 18px;
  opacity: 1;
}

.portrait-section {
  padding: 34px 0 28px;
}

.portrait-section img {
  width: min(100%, 395px);
  aspect-ratio: 0.73;
  margin: 0 auto;
}

.itinerary-section {
  padding: 16px 0 72px;
}

.ornament-heading {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin: 0 auto 30px;
  width: min(100%, 340px);
  text-align: center;
}

.ornament-heading::before,
.ornament-heading::after {
  content: "";
  height: 1px;
  background: rgba(20, 23, 18, 0.2);
}

.ornament-heading h2 {
  font-size: 1.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.timeline {
  position: relative;
  display: grid;
  gap: 34px;
  width: min(100%, 360px);
  margin: 0 auto;
  --timeline-axis: 48%;
  --timeline-gap: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 27px;
  bottom: 27px;
  left: var(--timeline-axis);
  width: 2px;
  background: var(--ink);
  transform: translateX(-50%);
}

.timeline article {
  position: relative;
  display: grid;
  grid-template-columns: var(--timeline-axis) minmax(0, 1fr);
  align-items: center;
  column-gap: var(--timeline-gap);
  min-height: 54px;
}

.timeline article::before {
  content: "";
  position: absolute;
  left: var(--timeline-axis);
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}

.timeline-icon {
  justify-self: center;
  width: 54px;
  height: 54px;
  grid-column: 1;
  object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(20, 23, 18, 0.06));
}

.timeline article div {
  grid-column: 2;
  text-transform: uppercase;
}

.timeline strong {
  font-size: 0.82rem;
}

.timeline p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  line-height: 1.25;
}

.dress-section {
  padding: 32px 0 84px;
  text-align: center;
}

.dress-section img {
  width: min(100%, 390px);
  height: auto;
  margin: 0 auto 14px;
  object-fit: contain;
  box-shadow: none;
  filter: drop-shadow(0 18px 34px rgba(35, 41, 29, 0.15));
}

.dress-section p,
.dress-section small {
  max-width: 340px;
  margin: 0 auto;
  font-family: var(--block);
  font-size: 0.95rem;
  line-height: 1.42;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dress-section h2 {
  margin-top: 42px;
  font-size: clamp(3rem, 16vw, 5.2rem);
  line-height: 0.86;
}

.dress-section > span {
  display: block;
  margin-top: 8px;
  font-family: var(--block);
  font-size: 1.18rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.palette {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 24px 0;
}

.palette i {
  width: clamp(52px, 13vw, 78px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.rsvp-section {
  position: relative;
  display: grid;
  gap: 26px;
  padding: 28px 0 92px;
  text-align: center;
}

.rsvp-copy {
  align-self: center;
}

.rsvp-copy h2 {
  color: var(--olive);
  font-size: clamp(3.5rem, 18vw, 6.2rem);
  line-height: 0.82;
}

.rsvp-copy p:last-child {
  max-width: 430px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.rsvp-form {
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 6px;
  text-align: left;
}

.rsvp-form label {
  display: grid;
  gap: 8px;
  color: var(--olive);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rsvp-identity {
  display: grid;
  gap: 7px;
  padding: 14px 13px;
  border: 1px solid rgba(95, 109, 87, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 253, 0.62);
}

.rsvp-identity span {
  color: var(--olive);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rsvp-identity strong {
  color: var(--ink);
  font-family: var(--block);
  font-size: 1.32rem;
  font-weight: 600;
  line-height: 1.1;
}

.rsvp-identity b {
  font: inherit;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border: 1px solid rgba(95, 109, 87, 0.18);
  border-radius: 6px;
  padding: 14px 13px;
  color: var(--ink);
  background: rgba(255, 255, 253, 0.82);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.rsvp-form textarea {
  resize: vertical;
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: rgba(95, 109, 87, 0.68);
  background: rgba(255, 255, 253, 0.96);
  box-shadow: 0 0 0 4px rgba(135, 148, 125, 0.14);
}

.rsvp-form button {
  min-height: 50px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.rsvp-form button:hover {
  transform: translateY(-3px);
  background: var(--deep-sage);
  box-shadow: 0 24px 46px rgba(57, 68, 57, 0.3);
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--olive);
  font-size: 0.92rem;
}

.foliage-bottom {
  margin-top: 8px;
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  animation: introReveal 1s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.reveal:nth-child(2) {
  animation-delay: 0.12s;
}

.reveal:nth-child(3) {
  animation-delay: 0.24s;
}

.reveal:nth-child(4) {
  animation-delay: 0.36s;
}

.reveal:nth-child(5) {
  animation-delay: 0.48s;
}

.reveal:nth-child(6) {
  animation-delay: 0.6s;
}

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.19, 1, 0.22, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes introReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cinematicWipe {
  0% {
    transform: translateY(100%);
  }
  45% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100%);
  }
}

@media (min-width: 720px) {
  .countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .countdown-section,
  .monogram-section,
  .details-section,
  .portrait-section,
  .itinerary-section,
  .dress-section,
  .rsvp-section {
    width: min(100% - 48px, 720px);
  }

  .rsvp-section {
    grid-template-columns: minmax(0, 0.82fr) minmax(320px, 0.78fr);
    align-items: start;
    gap: 42px;
    text-align: left;
  }

  .rsvp-copy p:last-child {
    margin-left: 0;
  }

  .rsvp-form {
    padding: 28px;
  }

  .foliage-bottom {
    grid-column: 1 / -1;
  }
}

@media (max-width: 430px) {
  .details-card {
    padding-inline: 0;
  }

  .details-ornament {
    margin-bottom: 30px;
  }

  .detail-row div {
    gap: 12px;
    padding: 0 8px;
  }

  .detail-row strong {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
  }

  .line-icon {
    width: 42px;
    height: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
