:root {
  --ink: #332927;
  --muted: #75625c;
  --paper: #fffaf5;
  --soft: #f7eee7;
  --rose: #b76e79;
  --rose-deep: #8c4051;
  --sage: #687a64;
  --gold: #b99052;
  --line: rgba(80, 58, 50, 0.18);
  --shadow: 0 24px 70px rgba(66, 41, 36, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  background:
    linear-gradient(rgba(255, 250, 245, 0.72), rgba(255, 250, 245, 0.72)),
    url("images/wedding-background.png") center top / cover fixed,
    linear-gradient(180deg, #fbf0e8 0%, #fffaf5 42%, #f1dfd5 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: 0.35;
  background-image:
    linear-gradient(120deg, rgba(255, 255, 255, 0.8) 0 1px, transparent 1px 32px),
    linear-gradient(30deg, rgba(185, 144, 82, 0.22) 0 1px, transparent 1px 42px);
}

a {
  color: inherit;
}

.invite-shell {
  width: min(100%, 760px);
  margin: 0 auto;
  overflow: hidden;
  background: rgba(255, 250, 245, 0.55);
  box-shadow: 0 0 80px rgba(75, 49, 43, 0.12);
}

.opening-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  overflow: hidden;
  background: #f8efe7;
  animation: overlayFade 2800ms ease forwards;
}

.opening-overlay__door {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 51%;
  background:
    linear-gradient(rgba(255, 250, 245, 0.84), rgba(255, 250, 245, 0.84)),
    url("images/wedding-background.png") center / cover;
  box-shadow: inset 0 0 60px rgba(112, 68, 58, 0.18);
  animation: doorOpen 2200ms cubic-bezier(0.72, 0, 0.2, 1) 420ms forwards;
}

.opening-overlay__door--left {
  left: 0;
  transform-origin: left center;
  animation-name: doorOpenLeft;
}

.opening-overlay__door--right {
  right: 0;
  transform-origin: right center;
  animation-name: doorOpenRight;
}

.opening-overlay__light {
  position: absolute;
  inset: -20%;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 255, 245, 0.98), rgba(255, 232, 184, 0.55) 18%, transparent 45%),
    linear-gradient(90deg, transparent 35%, rgba(255, 255, 245, 0.82), transparent 65%);
  animation: lightBloom 2600ms ease forwards;
}

.section-panel {
  position: relative;
  padding: clamp(56px, 12vw, 92px) 22px;
}

.hero {
  min-height: 100svh;
  display: grid;
  align-items: end;
  isolation: isolate;
  padding: 28px 20px 58px;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-image: url("images/wedding-venue.jpg");
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: heroDrift 16s ease-in-out infinite alternate;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(180deg, rgba(38, 24, 20, 0.14), rgba(38, 24, 20, 0.52) 58%, rgba(38, 24, 20, 0.76)),
    radial-gradient(circle at 50% 28%, rgba(255, 250, 245, 0.08), transparent 18rem);
}

.hero__content {
  color: #fffaf5;
  text-align: center;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.34);
}

.eyebrow,
.script-label {
  margin: 0 0 12px;
  color: var(--rose-deep);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #fff3ec;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  font-family: "Great Vibes", "Snell Roundhand", "Brush Script MT", cursive;
  font-size: clamp(4.7rem, 22vw, 9.4rem);
  font-weight: 400;
  line-height: 0.82;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 10vw, 4rem);
  font-weight: 500;
  line-height: 1;
}

h3 {
  margin: 0 0 5px;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.03em;
}

p {
  color: var(--muted);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.72;
}

.hero p {
  color: #fff7ef;
}

.surname {
  margin: 12px 0 0;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.date-line {
  margin: 26px 0 28px;
  font-size: 1.08rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.primary-action,
.map-action {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 250, 245, 0.7);
  border-radius: 999px;
  padding: 0 22px;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-decoration: none;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
  background: rgba(255, 250, 245, 0.18);
}

.intro,
.countdown,
.timeline,
.closing,
.rsvp {
  text-align: center;
}

.intro {
  background:
    linear-gradient(rgba(255, 250, 245, 0.78), rgba(255, 250, 245, 0.9)),
    url("images/wedding-background.png") center / cover;
}

.intro p:not(.script-label),
.closing p:not(.script-label),
.rsvp-contact {
  max-width: 33rem;
  margin: 24px auto 0;
}

.script-label {
  color: var(--gold);
}

.countdown {
  background:
    linear-gradient(rgba(255, 250, 245, 0.74), rgba(255, 250, 245, 0.88)),
    url("images/wedding-venue-outisde.jpg") center / cover;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 30px auto 0;
}

.countdown-grid div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 6px 14px;
  background: rgba(255, 250, 245, 0.72);
  box-shadow: 0 10px 32px rgba(92, 56, 48, 0.08);
}

.countdown-grid strong {
  display: block;
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: clamp(1.55rem, 8vw, 3rem);
  line-height: 1;
}

.countdown-grid span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.timeline {
  background:
    linear-gradient(rgba(255, 250, 245, 0.88), rgba(255, 250, 245, 0.94)),
    url("images/wedding-background.png") center / cover;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 34rem;
  margin: 34px auto 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.timeline-list::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 82px;
  width: 1px;
  content: "";
  background: var(--line);
}

.timeline-list li {
  position: relative;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.timeline-list li::before {
  position: absolute;
  top: 4px;
  left: 77px;
  width: 11px;
  height: 11px;
  border: 3px solid var(--paper);
  border-radius: 50%;
  content: "";
  background: var(--rose);
  box-shadow: 0 0 0 1px var(--line);
}

.timeline-list time {
  color: var(--rose-deep);
  font-family: "Trebuchet MS", Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
}

.timeline-list p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.location {
  display: grid;
  gap: 24px;
  padding-top: 24px;
  background:
    linear-gradient(rgba(239, 228, 220, 0.84), rgba(239, 228, 220, 0.9)),
    url("images/wedding-background.png") center / cover;
}

.location__photo {
  min-height: 310px;
  border-radius: 8px;
  background: url("images/wedding-venue-outisde.jpg") center / cover;
  box-shadow: var(--shadow);
}

.location__content {
  text-align: center;
}

.location__content p:not(.eyebrow) {
  margin: 14px 0 24px;
}

.map-action {
  border-color: rgba(51, 41, 39, 0.18);
  color: #fffaf5;
  background: var(--rose-deep);
  box-shadow: 0 12px 30px rgba(140, 64, 81, 0.26);
}

.closing {
  min-height: 58svh;
  display: grid;
  align-content: center;
  background:
    linear-gradient(rgba(255, 250, 245, 0.62), rgba(242, 231, 223, 0.82)),
    url("images/wedding-background.png") center bottom / cover;
}

.rsvp {
  background:
    linear-gradient(rgba(255, 250, 245, 0.84), rgba(255, 250, 245, 0.92)),
    url("images/wedding-venue-outisde.jpg") center / cover;
}

.rsvp-form {
  display: grid;
  gap: 18px;
  max-width: 34rem;
  margin: 32px auto 0;
  font-family: "Trebuchet MS", Arial, sans-serif;
  text-align: left;
}

.rsvp-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.rsvp-form legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rsvp-form label {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.rsvp-form fieldset label {
  display: grid;
}

.rsvp-form input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rsvp-form fieldset span {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 245, 0.78);
  box-shadow: 0 10px 26px rgba(92, 56, 48, 0.08);
  cursor: pointer;
}

.rsvp-form input[type="radio"]:checked + span {
  border-color: var(--rose-deep);
  color: #fffaf5;
  background: var(--rose-deep);
}

.rsvp-form__comments {
  display: grid;
  gap: 8px;
}

.rsvp-form textarea {
  width: 100%;
  min-height: 116px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  font: 1rem/1.5 "Trebuchet MS", Arial, sans-serif;
  background: rgba(255, 250, 245, 0.84);
  box-shadow: 0 10px 26px rgba(92, 56, 48, 0.08);
}

.rsvp-form textarea:focus,
.rsvp-form input[type="radio"]:focus-visible + span {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.rsvp-form button {
  min-height: 52px;
  border: 0;
  border-radius: 999px;
  color: #fffaf5;
  font: 700 0.84rem/1 "Trebuchet MS", Arial, sans-serif;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  background: var(--rose-deep);
  box-shadow: 0 12px 30px rgba(140, 64, 81, 0.26);
  cursor: pointer;
}

.rsvp-contact a {
  color: var(--rose-deep);
  font-weight: 700;
}

.petals span {
  position: absolute;
  top: -50px;
  width: 12px;
  height: 18px;
  border-radius: 70% 20% 70% 20%;
  opacity: 0.72;
  background: rgba(255, 231, 226, 0.86);
  animation: fall 9s linear infinite;
}

.petals span:nth-child(1) {
  left: 9%;
  animation-delay: 0s;
}

.petals span:nth-child(2) {
  left: 26%;
  animation-delay: 2.3s;
  animation-duration: 11s;
}

.petals span:nth-child(3) {
  left: 42%;
  animation-delay: 1.1s;
  animation-duration: 8s;
}

.petals span:nth-child(4) {
  left: 63%;
  animation-delay: 3.4s;
  animation-duration: 12s;
}

.petals span:nth-child(5) {
  left: 78%;
  animation-delay: 1.8s;
  animation-duration: 10s;
}

.petals span:nth-child(6) {
  left: 90%;
  animation-delay: 4.5s;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 900ms ease, transform 900ms ease;
}

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

@keyframes heroDrift {
  from {
    transform: scale(1.06) translate3d(-1.2%, -0.6%, 0);
  }

  to {
    transform: scale(1.11) translate3d(1.2%, 0.8%, 0);
  }
}

@keyframes fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
  }

  100% {
    transform: translate3d(28px, 112vh, 0) rotate(360deg);
  }
}

@keyframes doorOpenLeft {
  to {
    transform: perspective(900px) rotateY(72deg);
    opacity: 0.16;
  }
}

@keyframes doorOpenRight {
  to {
    transform: perspective(900px) rotateY(-72deg);
    opacity: 0.16;
  }
}

@keyframes lightBloom {
  0% {
    opacity: 0;
    transform: scale(0.72);
  }

  42% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

@keyframes overlayFade {
  0%,
  72% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@media (min-width: 760px) {
  .invite-shell {
    margin-block: 28px;
    border-radius: 24px;
  }

  .section-panel {
    padding-inline: 54px;
  }

  .location {
    grid-template-columns: 1fr 0.82fr;
    align-items: center;
    text-align: left;
  }

  .location__content {
    text-align: left;
  }
}

@media (max-width: 360px) {
  .section-panel {
    padding-inline: 16px;
  }

  .countdown-grid {
    gap: 6px;
  }

  .countdown-grid div {
    padding-inline: 3px;
  }

  .timeline-list {
    gap: 20px;
  }
}

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

  .reveal {
    opacity: 1;
    transform: none;
  }

  .opening-overlay {
    display: none;
  }
}
