:root {
  --maroon: #5f1718;
  --maroon-dark: #371011;
  --gold: #c79335;
  --gold-light: #f2d48a;
  --cream: #fff7e8;
  --parchment: #f3e4c7;
  --brown: #6d421f;
  --green: #496d33;
  --ink: #2d1810;
  --muted: #7a5a42;
  --shadow: 0 24px 60px rgba(49, 13, 10, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding-bottom: 5.8rem;
  color: var(--ink);
  font-family: "Cinzel", Georgia, serif;
  background:
    radial-gradient(circle at 16% 10%, rgba(199, 147, 53, 0.2), transparent 24rem),
    radial-gradient(circle at 85% 18%, rgba(73, 109, 51, 0.16), transparent 19rem),
    linear-gradient(135deg, #fff9ef 0%, #f0dfbd 42%, #fff6e7 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(45deg, rgba(95, 23, 24, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(95, 23, 24, 0.04) 25%, transparent 25%);
  background-size: 28px 28px;
  z-index: -1;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.hero {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(3rem, 7vw, 6rem) clamp(1.4rem, 4vw, 4rem) clamp(1.4rem, 4vw, 4rem);
  overflow: hidden;
}

.hero-copy {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
  text-align: center;
}

.hero-copy::before {
  content: "";
  width: min(72vw, 33rem);
  height: min(38vw, 17rem);
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  border: 10px double rgba(199, 147, 53, 0.44);
  border-bottom: 0;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  opacity: 0.7;
  pointer-events: none;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.75rem;
  color: var(--gold);
  font-family: "Cinzel", serif;
  font-size: clamp(0.78rem, 1.4vw, 0.95rem);
  font-weight: 700;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  color: var(--maroon);
  font-family: "Great Vibes", cursive;
  font-size: clamp(4rem, 13vw, 7.6rem);
  font-weight: 400;
  line-height: 0.82;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}

.hero h1 .name-line,
.hero h1 .amp-line {
  display: block;
}

.hero h1 .amp-line {
  color: var(--brown);
  font-size: 0.62em;
  line-height: 0.78;
}

.hero-date,
.hero-time,
.hero-venue {
  margin: 0.45rem 0;
  font-family: "Cinzel", serif;
  font-weight: 700;
}

.hero-date {
  margin-top: 1.1rem;
  font-size: clamp(1.1rem, 3vw, 1.8rem);
}

.hero-time,
.hero-venue {
  color: var(--brown);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.6rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.85rem 1.25rem;
  font-weight: 800;
  border-radius: 999px;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--maroon-dark);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  box-shadow: 0 14px 30px rgba(139, 83, 26, 0.28);
}

.button.secondary {
  color: var(--maroon);
  background: rgba(255, 247, 232, 0.78);
  border: 1px solid rgba(95, 23, 24, 0.24);
}

.button.large {
  min-height: 3.4rem;
  padding-inline: 1.6rem;
}

.invitation-frame {
  position: relative;
  width: min(100%, 30rem);
  margin: 0 auto;
  padding: 0.7rem;
  background: linear-gradient(135deg, var(--gold-light), var(--maroon), var(--gold));
  border-radius: 0.7rem;
  box-shadow: var(--shadow);
}

.invitation-frame::before,
.invitation-frame::after {
  content: "";
  position: absolute;
  bottom: -1rem;
  width: 6rem;
  height: 6rem;
  background: radial-gradient(ellipse at 50% 100%, var(--green) 0 28%, transparent 29%);
  opacity: 0.34;
}

.invitation-frame::before {
  left: -1.2rem;
  transform: rotate(-28deg);
}

.invitation-frame::after {
  right: -1.2rem;
  transform: rotate(28deg);
}

.invitation-frame img {
  width: 100%;
  max-height: 76svh;
  object-fit: contain;
  background: var(--cream);
  border-radius: 0.45rem;
}

.countdown-section,
.section-panel,
.rsvp-section {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto clamp(2rem, 5vw, 4rem);
}

.countdown-section,
.section-panel,
.rsvp-section {
  position: relative;
}

.countdown-section::before,
.section-panel::before,
.rsvp-section::before {
  content: "";
  position: absolute;
  top: -1.25rem;
  left: 50%;
  width: min(12rem, 52vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-50%);
}

.countdown-section {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  text-align: center;
  color: var(--cream);
  background:
    linear-gradient(90deg, rgba(242, 212, 138, 0.15), transparent, rgba(242, 212, 138, 0.15)),
    linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  border: 1px solid rgba(242, 212, 138, 0.42);
  border-radius: 0.5rem;
  box-shadow: var(--shadow);
}

.ornament {
  width: min(18rem, 70vw);
  height: 1px;
  margin: 0 auto 1rem;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

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

.time-card {
  padding: 1rem 0.6rem;
  background: rgba(255, 247, 232, 0.1);
  border: 1px solid rgba(242, 212, 138, 0.28);
  border-radius: 0.45rem;
}

.time-card span {
  display: block;
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: clamp(1.8rem, 7vw, 3.1rem);
  font-weight: 700;
  line-height: 1;
}

.time-card small {
  display: block;
  margin-top: 0.4rem;
  font-weight: 700;
  text-transform: uppercase;
}

.section-panel {
  padding: clamp(1.4rem, 4vw, 3rem);
  background: rgba(255, 247, 232, 0.76);
  border: 1px solid rgba(199, 147, 53, 0.38);
  border-radius: 0.6rem;
  box-shadow: 0 16px 42px rgba(85, 42, 16, 0.12);
}

.card-viewer {
  text-align: center;
}

.card-viewer .section-heading {
  margin-inline: auto;
}

.card-stage {
  position: relative;
  width: min(100%, 35rem);
  margin: 0 auto 1rem;
  padding: 0.6rem;
  background: linear-gradient(135deg, var(--gold-light), var(--maroon), var(--gold));
  border-radius: 0.7rem;
  box-shadow: var(--shadow);
  touch-action: pan-y;
}

.card-stage img {
  width: 100%;
  max-height: min(72svh, 48rem);
  object-fit: contain;
  background: var(--cream);
  border-radius: 0.45rem;
}

.card-arrow {
  position: absolute;
  top: 50%;
  width: 2.8rem;
  height: 2.8rem;
  display: grid;
  place-items: center;
  color: var(--maroon-dark);
  font-size: 2.2rem;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: 0;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(55, 16, 17, 0.24);
  cursor: pointer;
  transform: translateY(-50%);
}

.card-arrow.previous {
  left: -0.8rem;
}

.card-arrow.next {
  right: -0.8rem;
}

.card-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.card-controls p {
  margin: 0;
  color: var(--brown);
  font-weight: 700;
}

.card-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.card-dots {
  display: flex;
  gap: 0.45rem;
}

.card-dots button {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  background: rgba(95, 23, 24, 0.25);
  border: 1px solid rgba(95, 23, 24, 0.2);
  border-radius: 50%;
  cursor: pointer;
}

.card-dots button.is-active {
  background: var(--maroon);
  border-color: var(--gold);
}

.section-heading {
  max-width: 42rem;
  margin-bottom: 1.4rem;
}

.section-note {
  max-width: 34rem;
  margin: 0.75rem auto 0;
  color: var(--muted);
}

.section-heading h2,
.rsvp-section h2 {
  margin: 0;
  color: var(--maroon);
  font-family: "Cinzel", serif;
  font-size: clamp(1.9rem, 5vw, 3rem);
  line-height: 1.1;
}

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

.detail-grid article {
  min-height: 11rem;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(243, 228, 199, 0.6));
  border: 1px solid rgba(109, 66, 31, 0.18);
  border-radius: 0.5rem;
}

.detail-icon {
  display: inline-grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  color: var(--cream);
  font-family: "Cinzel", serif;
  font-weight: 700;
  background: var(--maroon);
  border: 2px solid var(--gold);
  border-radius: 50%;
}

h3 {
  margin: 1rem 0 0.45rem;
  color: var(--brown);
  font-family: "Cinzel", serif;
  font-size: 1.2rem;
}

p {
  line-height: 1.7;
}

.timeline {
  display: grid;
  gap: 1rem;
}

.timeline article {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(109, 66, 31, 0.18);
}

.timeline article:last-child {
  border-bottom: 0;
}

.timeline time {
  color: var(--maroon);
  font-family: "Cinzel", serif;
  font-weight: 700;
}

.timeline h3,
.timeline p {
  margin-top: 0;
}

.location-layout {
  display: grid;
  gap: 1.25rem;
}

.address {
  color: var(--brown);
  font-family: "Cinzel", serif;
  font-size: 1.15rem;
  font-weight: 700;
}

iframe {
  width: 100%;
  min-height: 19rem;
  border: 0;
  border-radius: 0.5rem;
  box-shadow: 0 10px 28px rgba(55, 16, 17, 0.16);
}

.rsvp-section {
  position: relative;
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  color: var(--cream);
  text-align: center;
  background:
    linear-gradient(rgba(55, 16, 17, 0.88), rgba(55, 16, 17, 0.9)),
    url("kirthi-invitation.jpg") center 58% / cover;
  border: 1px solid rgba(242, 212, 138, 0.42);
  border-radius: 0.6rem;
  box-shadow: var(--shadow);
}

.rsvp-section h2 {
  color: var(--gold-light);
}

.rsvp-section p {
  max-width: 40rem;
  margin: 1rem auto 1.5rem;
}

.calendar-actions {
  width: min(100%, 42rem);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(242, 212, 138, 0.35);
}

.calendar-actions p {
  margin: 0 0 0.9rem;
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-weight: 700;
}

.calendar-actions div {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.calendar-button {
  color: var(--cream);
  background: rgba(255, 247, 232, 0.1);
  border: 1px solid rgba(242, 212, 138, 0.42);
}

.floating-rsvp {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 30;
  width: min(28rem, calc(100% - 1.5rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.55rem;
  color: var(--cream);
  background: rgba(55, 16, 17, 0.94);
  border: 1px solid rgba(242, 212, 138, 0.44);
  border-radius: 999px;
  box-shadow: 0 18px 45px rgba(49, 13, 10, 0.34);
  backdrop-filter: blur(14px);
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.floating-rsvp span {
  padding-left: 0.65rem;
  color: var(--gold-light);
  font-family: "Cinzel", serif;
  font-size: clamp(0.72rem, 2.4vw, 0.86rem);
  font-weight: 700;
}

.floating-rsvp .button {
  min-height: 2.45rem;
  padding: 0.62rem 0.9rem;
  white-space: nowrap;
}

footer {
  padding: 2rem 1rem 2.5rem;
  color: var(--cream);
  text-align: center;
  background: var(--maroon-dark);
  border-top: 4px solid var(--gold);
}

footer p {
  margin: 0 0 0.25rem;
  font-family: "Cinzel", serif;
  font-weight: 700;
  text-transform: uppercase;
}

footer small {
  color: var(--gold-light);
}

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

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

@media (max-width: 520px) {
  .hero {
    padding-top: 2.25rem;
  }

  .hero h1 {
    font-size: clamp(3.4rem, 18vw, 5rem);
  }

  .timeline article {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .card-stage {
    padding: 0.42rem;
  }

  .card-arrow {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 1.8rem;
  }

  .card-arrow.previous {
    left: -0.35rem;
  }

  .card-arrow.next {
    right: -0.35rem;
  }

  .floating-rsvp {
    bottom: 0.75rem;
    border-radius: 0.75rem;
  }

  .floating-rsvp span {
    max-width: 7rem;
  }
}

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

  .detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(24rem, 31rem);
    gap: clamp(2rem, 5vw, 5rem);
  }

  .hero-copy {
    margin: 0;
    text-align: left;
  }

  .hero-copy::before {
    left: 0;
    transform: none;
  }

  .hero-actions {
    justify-content: flex-start;
  }

  .location-layout {
    grid-template-columns: minmax(0, 0.82fr) minmax(22rem, 1.18fr);
    align-items: center;
  }
}
