:root {
  --olive-dark: #3f6e68;
  --olive-mid: #7d9f91;
  --olive-soft: #b8d4cc;
  --brown-deep: #4a3a30;
  --paper: #ecebe7;
  --white-soft: #f5f5f3;
  --shadow: 0 8px 24px rgba(44, 37, 31, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  color: var(--brown-deep);
  background: var(--paper);
}

main {
  width: min(1320px, 100%);
  margin: 0 auto;
}

.section-soft {
  position: relative;
  background: #ecebe7;
  border-top: 1px solid rgba(125, 159, 145, 0.18);
  border-bottom: 1px solid rgba(125, 159, 145, 0.18);
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  font-family: "Playfair Display", serif;
  color: var(--olive-dark);
}

p {
  margin: 0;
  line-height: 1.5;
}

.hero-cover {
  position: relative;
  min-height: 82vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px 16px;
  background-image: linear-gradient(rgba(31, 39, 37, 0.58), rgba(31, 39, 37, 0.58)),
    url("https://images.unsplash.com/photo-1520854221256-17451cc331bf?auto=format&fit=crop&w=1800&q=70");
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 10%, rgba(194, 222, 209, 0.2), transparent 34%);
}

.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(245, 245, 243, 0.25) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.25;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  color: #f0f4ef;
}

.hero-content h1 {
  font-family: "Parisienne", cursive;
  font-size: clamp(3rem, 8vw, 6.2rem);
  color: #f0f4ef;
  margin: 14px 0 10px;
}

.hero-date {
  display: inline-block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: 1px solid rgba(240, 244, 239, 0.45);
  border-bottom: 1px solid rgba(240, 244, 239, 0.45);
  padding: 8px 28px;
  font-size: 0.95rem;
}

.hero-content p {
  font-size: clamp(1.05rem, 2.4vw, 1.8rem);
}

.cta-btn,
button {
  border: 1px solid rgba(112, 145, 133, 0.22);
  border-radius: 999px;
  padding: 12px 28px;
  background: var(--white-soft);
  color: #6f9184;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  min-width: 230px;
  box-shadow: 0 2px 8px rgba(92, 84, 76, 0.18);
  transition: transform 0.18s ease, background-color 0.2s ease;
}

.cta-btn:hover,
button:hover {
  transform: translateY(-1px);
  background: #fff;
}

.cta-btn {
  margin-top: 24px;
}

.invited-block {
  text-align: center;
  padding: 34px 16px 28px;
}

.countdown-shell {
  position: relative;
  width: 220px;
  margin: -84px auto 18px;
}

.countdown-dots {
  position: absolute;
  inset: -16px;
  border-radius: 50%;
  background-image: radial-gradient(rgba(216, 155, 70, 0.6) 1.2px, transparent 1.2px);
  background-size: 11px 11px;
  opacity: 0.7;
}

.countdown-card {
  position: relative;
  background: #f1f1ef;
  border-radius: 999px;
  width: 190px;
  height: 190px;
  margin: 0 auto;
  box-shadow: var(--shadow);
  border: 1px solid rgba(112, 145, 133, 0.18);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
}

.countdown-label {
  font-size: 2rem;
  color: #c5ab81;
  font-family: "Parisienne", cursive;
}

.count-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 84%;
}

.count-grid div {
  display: grid;
  justify-items: center;
  border-right: 1px solid rgba(99, 120, 110, 0.24);
}

.count-grid div:last-child {
  border-right: 0;
}

.count-grid strong {
  font-size: 1.7rem;
  color: #7d7e7b;
  line-height: 1;
}

.count-grid span {
  font-size: 0.73rem;
  color: #a2a19f;
}

.count-heart {
  color: #7c9b8d;
  font-size: 1.4rem;
}

.invited-counter {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 8px auto;
  background: #3f6e68;
  color: #fff;
  font-weight: 700;
  font-size: 1.4rem;
  display: grid;
  place-items: center;
}

.invited-block h2 {
  letter-spacing: 0.1em;
}

.invited-subline {
  color: #7b998d;
  font-size: 0.95rem;
  margin-bottom: 12px;
}

.guest-chips {
  display: grid;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.guest-chips span {
  display: inline-block;
  background: #e4e3df;
  border-radius: 6px;
  padding: 6px 12px;
  color: #3d4a44;
}

.dot-line {
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: repeat(8, 12px);
  justify-content: center;
  gap: 8px;
}

.dot-line span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(216, 155, 70, 0.75);
}

.petal {
  position: absolute;
  width: 180px;
  opacity: 0.88;
  pointer-events: none;
  filter: drop-shadow(0 8px 12px rgba(66, 56, 44, 0.16));
}

.petal-invited-left {
  left: -62px;
  top: 38px;
  transform: rotate(-8deg);
}

.petal-timeline-right {
  right: -58px;
  bottom: 20px;
  transform: rotate(10deg);
}

.petal-gallery-left {
  left: -48px;
  top: 16px;
  transform: scaleX(-1) rotate(-16deg);
  opacity: 0.72;
}

.petal-fiesta-right {
  right: -52px;
  top: 10px;
  transform: rotate(18deg);
}

.petal-invited-right {
  right: -54px;
  top: 52px;
  transform: scaleX(-1) rotate(8deg);
  opacity: 0.62;
}

.petal-timeline-left {
  left: -56px;
  top: 18px;
  transform: scaleX(-1) rotate(-10deg);
  opacity: 0.7;
}

.petal-fiesta-left {
  left: -52px;
  top: 20px;
  transform: scaleX(-1) rotate(-18deg);
  opacity: 0.65;
}

.section-waves {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.section-waves::before,
.section-waves::after {
  content: "";
  position: absolute;
  left: -18%;
  width: 136%;
  height: 180px;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.62;
}

.section-waves::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 220'%3E%3Cpath d='M-20 150 C220 40 430 230 700 140 C910 72 1110 180 1420 80' fill='none' stroke='%23d89b46' stroke-width='2'/%3E%3C/svg%3E");
}

.section-waves::after {
  background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1400 220'%3E%3Cpath d='M-20 96 C180 200 430 18 740 108 C980 176 1180 56 1420 142' fill='none' stroke='%23d89b46' stroke-width='1.6'/%3E%3C/svg%3E\");
}

.invited-waves::before {
  bottom: -92px;
}

.invited-waves::after {
  bottom: -70px;
}

.timeline-waves::before {
  top: -58px;
}

.timeline-waves::after {
  bottom: -58px;
}

.gallery-waves::before {
  top: -44px;
}

.gallery-waves::after {
  bottom: -54px;
}

.fiesta-waves::before {
  top: -50px;
}

.fiesta-waves::after {
  bottom: -50px;
}

.timeline {
  padding: 36px 18px 40px;
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 18px;
}

.event-col {
  text-align: center;
}

.ribbon {
  margin: 0 auto 24px;
  width: min(270px, 100%);
  padding: 10px 20px;
  font-size: 2.1rem;
  color: #f2f4ef;
  background: var(--olive-mid);
  font-family: "Parisienne", cursive;
}

.event-col h4 {
  font-size: clamp(2rem, 2.4vw, 2.35rem);
  margin: 8px 0;
}

.event-col p {
  font-size: clamp(1.2rem, 1.9vw, 1.9rem);
  color: #6f9184;
  margin-bottom: 10px;
}

.gallery-block,
.fiesta-block,
.rsvp-section {
  text-align: center;
  padding: 46px 18px;
}

.script-title {
  font-family: "Parisienne", cursive;
  font-size: clamp(2.6rem, 7vw, 4rem);
}

.gallery-block > p,
.fiesta-block > p {
  color: #6f9184;
  margin-bottom: 24px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}

.gallery-grid img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  border: 8px solid var(--white-soft);
  box-shadow: var(--shadow);
}

.fiesta-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 18px;
}

.fiesta-card {
  background: #f1efeb;
  border-radius: 22px;
  padding: 30px 20px 24px;
  border: 1px solid rgba(133, 161, 145, 0.22);
  box-shadow: 0 8px 20px rgba(72, 63, 51, 0.1);
}

.fiesta-card h3 {
  font-size: clamp(1.8rem, 2.6vw, 2.3rem);
  color: #b3996a;
}

.card-icon {
  font-size: 2.5rem;
  color: #77988c;
}

.fiesta-card p {
  color: #6f9184;
  font-size: 1.08rem;
}

.rsvp-section {
  max-width: 780px;
  margin: 0 auto 70px;
  border: 1px solid rgba(112, 145, 133, 0.2);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.stack-form {
  display: grid;
  gap: 12px;
  text-align: left;
  margin-top: 18px;
}

.stack-form label {
  display: grid;
  gap: 4px;
  color: var(--olive-dark);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(112, 145, 133, 0.35);
  border-radius: 10px;
  padding: 10px;
  font: inherit;
  background: #fff;
}

.muted {
  color: #6f9184;
}

.hidden {
  display: none;
}

.loader-screen {
  position: fixed;
  inset: 0;
  background: var(--olive-soft);
  display: grid;
  place-items: center;
  z-index: 50;
  transition: opacity 0.45s ease;
}

.loader-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-heart-wrap {
  text-align: center;
  position: relative;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
}

.loader-heart {
  color: #c9ab7e;
  font-size: 1.8rem;
  animation: tiny-beat 1.1s infinite ease-in-out;
}

.loader-dots {
  position: absolute;
  inset: 0;
}

.loader-dots span {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(201, 171, 126, 0.85);
  top: 50%;
  left: 50%;
  transform-origin: 0 -34px;
  animation: dot-fade 1.1s infinite ease-in-out;
}

.loader-dots span:nth-child(1) { transform: rotate(0deg) translate(-50%, -50%); animation-delay: 0s; }
.loader-dots span:nth-child(2) { transform: rotate(45deg) translate(-50%, -50%); animation-delay: 0.12s; }
.loader-dots span:nth-child(3) { transform: rotate(90deg) translate(-50%, -50%); animation-delay: 0.24s; }
.loader-dots span:nth-child(4) { transform: rotate(135deg) translate(-50%, -50%); animation-delay: 0.36s; }
.loader-dots span:nth-child(5) { transform: rotate(180deg) translate(-50%, -50%); animation-delay: 0.48s; }
.loader-dots span:nth-child(6) { transform: rotate(225deg) translate(-50%, -50%); animation-delay: 0.6s; }
.loader-dots span:nth-child(7) { transform: rotate(270deg) translate(-50%, -50%); animation-delay: 0.72s; }
.loader-dots span:nth-child(8) { transform: rotate(315deg) translate(-50%, -50%); animation-delay: 0.84s; }

.loader-heart-wrap p {
  position: absolute;
  top: 92px;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  color: #6f9184;
  font-size: 0.9rem;
}

@keyframes tiny-beat {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.2); }
  65% { transform: scale(0.92); }
}

@keyframes dot-fade {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 1; }
}

@media (max-width: 980px) {
  .gallery-grid,
  .fiesta-cards,
  .timeline {
    grid-template-columns: 1fr;
  }

  .countdown-shell {
    margin-top: -46px;
  }

  .petal {
    width: 130px;
    opacity: 0.72;
  }

  .section-waves::before,
  .section-waves::after {
    height: 140px;
  }
}

@media (max-width: 640px) {
  .hero-cover {
    min-height: 72vh;
  }

  .hero-content h1 {
    font-size: clamp(2.4rem, 15vw, 4rem);
  }

  .cta-btn,
  button {
    min-width: 190px;
    padding: 10px 18px;
  }

  .countdown-shell {
    width: 180px;
    margin-top: -34px;
  }

  .countdown-card {
    width: 164px;
    height: 164px;
  }

  .count-grid strong {
    font-size: 1.35rem;
  }

  .gallery-grid img {
    height: 250px;
  }

  .petal {
    display: none;
  }
}
