:root {
  --ivory: #faf3e8;
  --ivory-deep: #f2e6d3;
  --maroon: #5c1a1f;
  --maroon-deep: #3d0f13;
  --maroon-soft: #7a2a2e;
  --gold: #b8863b;
  --gold-bright: #d4a54a;
  --turmeric: #e0a53a;
  --ink: #2c1810;
  --ink-soft: #5a4438;

  --font-display: "Eczar", "Georgia", serif;
  --font-script: "Cormorant Garamond", "Georgia", serif;
  --font-body: "Mukta", "Segoe UI", sans-serif;

  --max-width: 640px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Subtle paper grain for warmth without weighing down scroll perf */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(212, 165, 74, 0.16), transparent 55%),
    linear-gradient(180deg, rgba(61, 15, 19, 0.86) 0%, rgba(92, 26, 31, 0.8) 55%, rgba(122, 42, 46, 0.82) 100%),
    url("/images/hero-couple.webp");
  background-size: cover, cover, cover;
  background-position: center, center, center 20%;
  background-repeat: no-repeat;
  color: var(--ivory);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(212, 165, 74, 0.25);
  pointer-events: none;
}

.hero::before {
  width: 480px;
  height: 480px;
  top: -220px;
  left: 50%;
  transform: translateX(-50%);
  animation: rotate-slow 90s linear infinite;
}

.hero::after {
  width: 640px;
  height: 640px;
  bottom: -340px;
  left: 50%;
  transform: translateX(-50%);
  border-style: dashed;
  animation: rotate-slow 120s linear infinite reverse;
}

@keyframes rotate-slow {
  to { transform: translateX(-50%) rotate(360deg); }
}

.hero__motif {
  color: var(--gold-bright);
  width: min(320px, 70vw);
  opacity: 0.7;
}

.hero__motif svg {
  width: 100%;
  height: auto;
  display: block;
}

.hero__motif--top { margin-bottom: 1.5rem; }
.hero__motif--bottom { margin-top: 1.5rem; }

.hero__content {
  position: relative;
  z-index: 1;
  animation: rise-in 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__eyebrow {
  margin: 0 0 0.75rem;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  animation: rise-in 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__names {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 10vw, 4.4rem);
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  gap: 0.1em;
}

.hero__names span:nth-child(1) { animation: rise-in 1s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero__amp { animation: rise-in 1s 0.3s cubic-bezier(0.16, 1, 0.3, 1) both; }
.hero__names span:nth-child(3) { animation: rise-in 1s 0.45s cubic-bezier(0.16, 1, 0.3, 1) both; }

.hero__amp {
  font-family: var(--font-script);
  font-style: italic;
  font-size: 0.55em;
  color: var(--gold-bright);
  display: block;
}

.hero__request {
  margin: 1.4rem 0 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: rgba(250, 243, 232, 0.82);
  animation: rise-in 1s 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__divider {
  width: 64px;
  height: 2px;
  margin: 1.5rem auto;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  animation: rise-in 1s 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__date {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.03em;
  animation: rise-in 1s 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__place {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: rgba(250, 243, 232, 0.7);
  animation: rise-in 1s 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Sections ---------- */

.section {
  padding: 4.5rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.section--alt {
  max-width: none;
  background: var(--ivory-deep);
}

.section--alt > * {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.section__kicker {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  text-align: center;
}

.section__title {
  margin: 0 0 1.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  font-weight: 600;
  color: var(--maroon);
  text-align: center;
}

.section__intro {
  text-align: center;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: -0.75rem auto 2rem;
}

.card {
  background: #fff;
  border: 1px solid rgba(184, 134, 59, 0.25);
  border-radius: 18px;
  padding: 2rem 1.75rem;
  box-shadow: 0 18px 40px -24px rgba(61, 15, 19, 0.35);
  position: relative;
}

.card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(184, 134, 59, 0.18);
  border-radius: 12px;
  pointer-events: none;
}

.detail-list {
  margin: 0 0 1.75rem;
  display: grid;
  gap: 1rem;
}

.detail-list__row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  align-items: baseline;
  border-bottom: 1px dashed rgba(92, 26, 31, 0.14);
  padding-bottom: 0.85rem;
}

.detail-list__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.detail-list dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 600;
}

.detail-list dd {
  margin: 0;
  font-size: 1.02rem;
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  border-radius: 999px;
  background: var(--maroon);
  color: var(--ivory);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 10px 24px -12px rgba(92, 26, 31, 0.55);
}

.btn:hover {
  background: var(--maroon-soft);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -12px rgba(92, 26, 31, 0.6);
}

.btn:active {
  transform: translateY(0);
}

.btn--primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--turmeric) 100%);
  color: var(--maroon-deep);
  box-shadow: 0 10px 24px -12px rgba(184, 134, 59, 0.6);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--turmeric) 0%, var(--gold) 100%);
}

/* ---------- Countdown ---------- */

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
}

.countdown__unit {
  background: #fff;
  border: 1px solid rgba(184, 134, 59, 0.25);
  border-radius: 14px;
  padding: 1rem 0.4rem;
  text-align: center;
  box-shadow: 0 14px 30px -22px rgba(61, 15, 19, 0.4);
}

.countdown__number {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-weight: 700;
  color: var(--maroon);
  font-variant-numeric: tabular-nums;
}

.countdown__label {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.countdown__done {
  text-align: center;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--maroon);
}

/* ---------- Menu ---------- */

.menu-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.menu-card {
  background: #fff;
  border: 1px solid rgba(184, 134, 59, 0.25);
  border-radius: 16px;
  padding: 1.4rem 1.5rem;
  box-shadow: 0 14px 30px -24px rgba(61, 15, 19, 0.35);
}

.menu-card h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--maroon);
}

.menu-card--placeholder {
  text-align: center;
  padding: 2.2rem 1.5rem;
}

.menu-card--placeholder p {
  margin: 0;
  color: var(--ink-soft);
}

.menu-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.menu-card li {
  padding: 0.3rem 0;
  color: var(--ink-soft);
  position: relative;
  padding-left: 1.1rem;
}

.menu-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}

/* ---------- RSVP ---------- */

.rsvp-form {
  display: grid;
  gap: 1.25rem;
}

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

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.field__optional {
  font-weight: 400;
  color: var(--ink-soft);
}

.field input[type="text"],
.field input[type="number"],
.field textarea {
  font: inherit;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(92, 26, 31, 0.22);
  background: var(--ivory);
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 134, 59, 0.18);
}

.field--radio {
  border: none;
  padding: 0;
  margin: 0;
}

.field--radio legend {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0 0 0.5rem;
}

.radio-group {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.radio-pill {
  position: relative;
  cursor: pointer;
}

.radio-pill input {
  position: absolute;
  opacity: 0;
}

.radio-pill span {
  display: inline-block;
  padding: 0.6rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(92, 26, 31, 0.25);
  color: var(--ink-soft);
  font-size: 0.88rem;
  transition: all 0.2s ease;
}

.radio-pill input:checked + span {
  background: var(--maroon);
  border-color: var(--maroon);
  color: var(--ivory);
}

.radio-pill input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(184, 134, 59, 0.35);
}

.rsvp-confirm {
  margin: 0;
  text-align: center;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(184, 134, 59, 0.15);
  color: var(--maroon-deep);
  font-weight: 500;
  animation: rise-in 0.4s ease both;
}

.rsvp-list {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 14px;
  border: 1px dashed rgba(92, 26, 31, 0.2);
}

.rsvp-list h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--maroon);
}

.rsvp-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.rsvp-list li {
  font-size: 0.9rem;
  color: var(--ink-soft);
  border-bottom: 1px solid rgba(92, 26, 31, 0.1);
  padding-bottom: 0.6rem;
}

.rsvp-list li strong {
  color: var(--ink);
}

/* ---------- Footer ---------- */

.footer {
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(122, 42, 46, 0.85) 0%, rgba(61, 15, 19, 0.9) 100%),
    url("/images/footer-couple.webp");
  background-size: cover, cover;
  background-position: center, center 25%;
  background-repeat: no-repeat;
  color: var(--ivory);
}

.footer__motif {
  color: var(--gold-bright);
  width: min(260px, 60vw);
  margin: 0 auto 1.5rem;
  opacity: 0.7;
}

.footer__motif svg {
  width: 100%;
  height: auto;
  display: block;
}

.footer__names {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
}

.footer__note {
  margin: 0.5rem 0 0;
  font-family: var(--font-script);
  font-style: italic;
  font-size: 1.1rem;
  color: rgba(250, 243, 232, 0.8);
}

/* ---------- Scroll reveal ---------- */

.section, .card, .menu-card, .countdown__unit {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.section.is-visible, .card.is-visible, .menu-card.is-visible, .countdown__unit.is-visible {
  opacity: 1;
  transform: translateY(0);
}

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

/* ---------- Responsive ---------- */

@media (min-width: 560px) {
  .menu-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 720px) {
  .section {
    padding: 6rem 2rem;
  }

  .detail-list__row {
    grid-template-columns: 110px 1fr;
  }
}
