:root {
  --bg: #fbf6f1;
  --bg-accent: #f3e7dc;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: #fffaf6;
  --surface-dark: rgba(51, 31, 30, 0.72);
  --text: #3b2b2a;
  --muted: #7b6862;
  --primary: #9d6f62;
  --primary-dark: #7a5046;
  --line: rgba(122, 80, 70, 0.16);
  --shadow: 0 24px 60px rgba(59, 43, 42, 0.12);
  --radius: 24px;
  --card-width: min(920px, 92vw);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.85), transparent 30%),
    linear-gradient(180deg, #fefbf8 0%, #f7ede4 45%, #fff9f5 100%);
}

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

.hero {
  min-height: 100vh;
  padding: 24px clamp(20px, 3vw, 40px) 56px;
  display: grid;
  align-items: center;
  position: relative;
  overflow: clip;
}

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}

.hero-glow--one {
  width: 320px;
  height: 320px;
  top: 8%;
  left: -80px;
  background: rgba(244, 203, 183, 0.35);
}

.hero-glow--two {
  width: 420px;
  height: 420px;
  right: -120px;
  bottom: 6%;
  background: rgba(181, 150, 141, 0.26);
}

.topbar {
  position: absolute;
  top: 24px;
  left: clamp(20px, 3vw, 40px);
  right: clamp(20px, 3vw, 40px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand,
.nav-link,
.eyebrow,
.panel-label,
.detail-label,
.inside-kicker,
.venue-card__label {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
}

.brand,
.nav-link {
  color: var(--muted);
}

.nav-link {
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.hero-layout {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.hero-copy {
  width: min(680px, 100%);
  text-align: left;
}

.hero-copy h1 {
  margin: 18px 0 16px;
  font-size: clamp(3rem, 10vw, 6.3rem);
  line-height: 0.95;
  font-weight: 700;
}

.hero-copy h1 span {
  color: var(--primary);
  font-weight: 400;
}

.subtitle,
.date-line,
.inside-copy,
.body-copy,
.timeline-item p,
.info-card p,
.venue-card p {
  color: var(--muted);
  line-height: 1.7;
}

.subtitle {
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 0 14px;
}

.date-line {
  font-weight: 600;
  color: var(--primary-dark);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-visual {
  position: relative;
  min-height: 580px;
}

.hero-photo {
  position: absolute;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(157, 111, 98, 0.16);
  background: var(--surface-strong);
}

.hero-photo img,
.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-photo--large {
  inset: 0 60px 90px 0;
}

.hero-photo--small {
  width: 44%;
  height: 38%;
  right: 0;
  bottom: 0;
}

.hero-badge {
  position: absolute;
  left: -10px;
  bottom: 28px;
  padding: 18px 20px;
  min-width: 120px;
  border-radius: 22px;
  background: var(--surface-dark);
  color: #fff8f5;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-badge span {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.hero-badge p {
  margin: 8px 0 0;
  color: rgba(255, 248, 245, 0.82);
}

.scroll-stage {
  min-height: 100vh;
  position: relative;
}

.scroll-stage__sticky {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  padding: 48px 16px 72px;
  perspective: 1800px;
}

.scroll-hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.invitation-card {
  --open-progress: 0;
  width: var(--card-width);
  aspect-ratio: 16 / 10;
  max-height: 70vh;
  cursor: pointer;
  outline: none;
  transform:
    translateY(calc(var(--open-progress) * -18px))
    scale(calc(1 - (var(--open-progress) * 0.05)));
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.invitation-card.is-open {
  --open-progress: 1;
}

.invitation-card:focus-visible {
  box-shadow: 0 0 0 4px rgba(157, 111, 98, 0.16);
  border-radius: var(--radius);
}

.invitation-card.is-open + .invitation-toggle {
  background: transparent;
  color: var(--primary-dark);
  border: 1px solid rgba(122, 80, 70, 0.24);
  box-shadow: none;
}

.scroll-stage__sticky.is-open .scroll-hint {
  opacity: 0;
  transform: translateY(-18px);
}

.card-shell {
  width: 100%;
  height: 100%;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(250, 239, 228, 0.95)),
    var(--surface-strong);
  border: 1px solid rgba(157, 111, 98, 0.18);
  transform-style: preserve-3d;
  transition: box-shadow 800ms ease;
}

.card-shell::before {
  content: "";
  position: absolute;
  top: 10%;
  bottom: 10%;
  left: 50%;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    rgba(157, 111, 98, 0.4),
    transparent
  );
  transform: translateX(-50%) scaleY(calc(1 - var(--open-progress)));
  transform-origin: center;
  opacity: calc(1 - (var(--open-progress) * 1.2));
  pointer-events: none;
  transition:
    transform 850ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 500ms ease;
}

.card-shell::after {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(157, 111, 98, 0.14);
  border-radius: calc(var(--radius) - 10px);
  pointer-events: none;
}

.card-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: #fffaf7;
  background:
    linear-gradient(180deg, rgba(122, 80, 70, 0.2), rgba(122, 80, 70, 0.42)),
    linear-gradient(135deg, #9d6f62, #7a5046);
  backface-visibility: hidden;
  box-shadow: 0 18px 34px rgba(59, 43, 42, 0.18);
  transition:
    transform 1050ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 650ms ease;
}

.card-panel--left {
  left: 0;
  transform-origin: left center;
  transform:
    translateX(calc(var(--open-progress) * -10%))
    rotateY(calc(var(--open-progress) * -178deg));
}

.card-panel--right {
  right: 0;
  transform-origin: right center;
  transform:
    translateX(calc(var(--open-progress) * 10%))
    rotateY(calc(var(--open-progress) * 178deg));
}

.panel-text h2,
.panel-text p:last-child {
  margin: 10px 0 0;
}

.card-inside {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: clamp(24px, 4vw, 54px);
  text-align: center;
  opacity: calc(0.16 + (var(--open-progress) * 1.05));
  transform: scale(calc(0.94 + (var(--open-progress) * 0.06)));
  transition:
    opacity 560ms ease 180ms,
    transform 900ms cubic-bezier(0.22, 1, 0.36, 1) 120ms;
}

.card-inside h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.inside-copy {
  max-width: 560px;
  margin: 0 auto;
}

.inside-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.inside-grid article,
.info-card,
.venue-card {
  background: var(--surface);
  border: 1px solid rgba(157, 111, 98, 0.14);
  backdrop-filter: blur(18px);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(59, 43, 42, 0.06);
}

.inside-grid article {
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 140px;
}

.inside-grid article p {
  margin: 6px 0 0;
  line-height: 1.45;
}

.inside-grid article p:first-of-type {
  margin-top: 0;
}

.detail-label,
.inside-kicker,
.eyebrow,
.venue-card__label {
  color: var(--primary-dark);
}

.content-section {
  padding: 100px clamp(20px, 4vw, 56px);
}

.content-section--accent {
  background: rgba(255, 255, 255, 0.34);
}

.section-heading {
  text-align: center;
  margin: 0 auto 42px;
  max-width: 680px;
}

.section-heading h2,
.story-layout h2 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
}

.details-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.timer-section {
  text-align: center;
}

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

.countdown-card {
  background: var(--surface);
  border: 1px solid rgba(157, 111, 98, 0.14);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(59, 43, 42, 0.06);
  padding: 22px 14px;
}

.countdown-number {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--primary-dark);
  line-height: 1;
}

.countdown-label {
  margin: 10px 0 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.gallery-grid {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 20px;
}

.gallery-card {
  margin: 0;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(157, 111, 98, 0.14);
  box-shadow: var(--shadow);
}

.gallery-card img {
  aspect-ratio: 4 / 4.2;
}

.gallery-card--tall img {
  aspect-ratio: 4 / 5.2;
}

.gallery-card figcaption {
  padding: 16px 18px 18px;
  color: var(--muted);
  line-height: 1.6;
}

.info-card,
.venue-card {
  padding: 24px;
}

.info-card h3,
.timeline-item h3,
.venue-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.timeline {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 18px;
  border: 1px solid rgba(157, 111, 98, 0.14);
  background: rgba(255, 255, 255, 0.78);
}

.timeline-item span {
  color: var(--primary-dark);
  font-weight: 700;
}

.story-layout {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 148px;
  padding: 14px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 12px 22px rgba(122, 80, 70, 0.18);
}

.button-link--ghost {
  background: transparent;
  color: var(--primary-dark);
  border: 1px solid rgba(122, 80, 70, 0.24);
  box-shadow: none;
}

.invitation-toggle {
  min-width: 200px;
  padding: 14px 22px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(122, 80, 70, 0.18);
  transition:
    transform 220ms ease,
    background 220ms ease,
    color 220ms ease,
    border 220ms ease,
    box-shadow 220ms ease;
}

.invitation-toggle:hover {
  transform: translateY(-1px);
}

.venue-divider {
  border: 0;
  border-top: 1px solid rgba(122, 80, 70, 0.18);
  margin: 18px 0;
}

.site-footer {
  padding: 36px 20px 48px;
  text-align: center;
  color: var(--muted);
}

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

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

@media (max-width: 960px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    width: min(760px, 100%);
    text-align: center;
  }

  .subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    min-height: 500px;
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
  }

  .gallery-grid,
  .story-layout {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .invitation-card {
    width: min(94vw, 520px);
    aspect-ratio: auto;
    height: auto;
    max-height: none;
  }

  .inside-grid,
  .gallery-grid,
  .details-grid,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .countdown {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 460px;
    gap: 12px;
  }

  .countdown-card {
    padding: 16px 12px;
  }

  .countdown-number {
    font-size: clamp(1.7rem, 8vw, 2.2rem);
  }

  .countdown-label {
    font-size: 0.72rem;
    letter-spacing: 0.06em;
  }

  .hero {
    padding-top: 88px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-visual {
    min-height: 400px;
  }

  .hero-photo--large {
    inset: 0 36px 76px 0;
  }

  .hero-photo--small {
    width: 46%;
    height: 34%;
  }

  .hero-badge {
    left: 8px;
    bottom: 20px;
    padding: 14px 16px;
    min-width: 104px;
  }

  .hero-badge span {
    font-size: 1.6rem;
  }

  .timeline-item {
    gap: 10px;
  }

  .card-inside {
    position: relative;
    inset: auto;
    place-content: start;
    overflow: visible;
    gap: 10px;
    padding: 16px;
  }

  .card-inside h2 {
    font-size: clamp(1.45rem, 6vw, 2rem);
  }

  .inside-copy {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .inside-grid article {
    padding: 14px;
    min-height: auto;
  }

  .topbar {
    flex-direction: column;
    gap: 8px;
  }

  .content-section {
    padding: 80px 18px;
  }
}

@media (max-width: 520px) {
  .hero-copy h1 {
    font-size: clamp(2.5rem, 15vw, 4rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .button-link {
    width: 100%;
  }

  .hero-visual {
    min-height: 340px;
  }

  .card-inside {
    padding: 14px;
  }

  .inside-grid {
    gap: 10px;
  }

  .scroll-hint {
    font-size: 0.88rem;
  }

  .countdown {
    max-width: 360px;
    gap: 10px;
  }

  .invitation-toggle {
    width: 100%;
  }
}
