:root {
  --cream: #fbf3ec;
  --blush: #f3ded2;
  --ink: #43302a;
  --clay: #be6242;
  --gold: #c89b3c;
  --jade: #2f6e62;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--cream), var(--blush));
}

.section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 4px;
  opacity: 0.6;
  text-transform: uppercase;
}

.section-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 32px;
  margin: 8px 0 28px;
  color: var(--ink);
}

.button {
  position: relative;
  overflow: hidden;
  display: inline-block;
  margin-top: 20px;
  padding: 13px 30px;
  border: 1px solid var(--clay);
  border-radius: 24px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  background: none;
  cursor: pointer;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(200, 155, 60, 0.55), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
}

.button:hover {
  background: rgba(190, 98, 66, 0.08);
  border-color: var(--gold);
  transform: translateY(-1px);
}

.button:hover::before {
  left: 130%;
}

/* Reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Section divider — suzani-inspired diamond row */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 0 6px;
}

.divider span {
  width: 7px;
  height: 7px;
  background: var(--gold);
  transform: rotate(45deg);
  opacity: 0.7;
}

.divider span:nth-child(2n) {
  width: 5px;
  height: 5px;
  background: var(--clay);
}

.divider span:nth-child(3) {
  width: 9px;
  height: 9px;
  background: var(--jade);
  opacity: 0.6;
}

/* Photo background — activated by JS only if the couple supplies a real photo */
.section.photo-bg {
  color: #fdf3e7;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.section.photo-bg .section-title,
.section.photo-bg .couple-names {
  color: #ffffff;
}

.section.photo-bg .label,
.section.photo-bg .hero-date,
.section.photo-bg .location-address {
  opacity: 0.9;
}

.section.photo-bg .scroll-hint {
  border-color: rgba(253, 243, 231, 0.55);
}

.section.photo-bg .button {
  border-color: var(--gold);
  color: #fdf3e7;
}

.section.photo-bg .button:hover {
  background: rgba(253, 243, 231, 0.14);
}

.section.photo-bg .location-card .button {
  color: var(--ink);
  border-color: var(--clay);
}

.section.photo-bg .location-card .button:hover {
  background: rgba(190, 98, 66, 0.08);
}

/* Hero */
.hero {
  overflow: hidden;
}

.hero-arch {
  width: 230px;
  height: 146px;
  margin-bottom: 10px;
  overflow: visible;
}

.hero-arch-path {
  fill: none;
  stroke: url(#archGrad);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: arch-draw 2.4s ease forwards 0.2s;
}

@keyframes arch-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.petals {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -20px;
  font-size: 13px;
  opacity: 0;
  animation: petal-fall 13s linear infinite;
}

.petal:nth-child(1) { left: 8%;  animation-delay: 0s;    font-size: 12px; }
.petal:nth-child(2) { left: 27%; animation-delay: 2.6s;  font-size: 10px; }
.petal:nth-child(3) { left: 50%; animation-delay: 5.2s;  font-size: 13px; }
.petal:nth-child(4) { left: 71%; animation-delay: 7.8s;  font-size: 11px; }
.petal:nth-child(5) { left: 90%; animation-delay: 10.4s; font-size: 12px; }

@keyframes petal-fall {
  0%   { transform: translateY(-20px) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.75; }
  50%  { transform: translateY(180px) translateX(16px) rotate(180deg); }
  90%  { opacity: 0.4; }
  100% { transform: translateY(380px) translateX(-12px) rotate(360deg); opacity: 0; }
}

.couple-names {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 48px;
  margin: 14px 0 12px;
}

.couple-names .amp {
  color: var(--gold);
  font-size: 0.8em;
  margin: 0 8px;
}

.hero-date {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 3px;
  opacity: 0.6;
}

.scroll-hint {
  margin-top: 26px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  border: 1px solid var(--gold);
  padding: 7px 20px;
  border-radius: 20px;
  opacity: 0.85;
}

.scroll-arrow {
  display: inline-block;
  animation: hint-bounce 1.6s ease-in-out infinite;
}

@keyframes hint-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

/* Couple vignette */
.couple-section {
  overflow: hidden;
}

.couple-vignette {
  position: relative;
  width: min(76vw, 290px);
  margin-top: 24px;
  padding: 9px;
}

.couple-vignette::before,
.couple-vignette::after {
  content: '';
  position: absolute;
  z-index: 0;
  width: 120px;
  height: 70px;
  border: 1px solid rgba(200, 155, 60, 0.5);
  border-radius: 50%;
  transform: rotate(-35deg);
}

.couple-vignette::before {
  top: 2px;
  left: -34px;
}

.couple-vignette::after {
  right: -34px;
  bottom: 2px;
}

.vignette-frame {
  position: relative;
  z-index: 1;
  aspect-ratio: 3 / 4;
  padding: 6px;
  border: 1px solid var(--gold);
  border-radius: 48% 48% 46% 46% / 34% 34% 54% 54%;
  background: linear-gradient(145deg, #fffaf4, #ead8c8);
  box-shadow: 0 20px 42px rgba(67, 48, 42, 0.2);
}

.vignette-frame img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  object-position: 50% 52%;
  filter: saturate(0.82) sepia(0.08) contrast(0.96);
}

.vignette-flower {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: var(--clay);
  background: var(--cream);
  border: 1px solid rgba(200, 155, 60, 0.7);
  box-shadow: 0 7px 18px rgba(67, 48, 42, 0.16);
  font-size: 23px;
}

.vignette-flower-top {
  top: 16px;
  right: -5px;
}

.vignette-flower-bottom {
  bottom: 25px;
  left: -7px;
}

.couple-quote {
  margin-top: 22px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--clay);
}

.couple-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: min(86vw, 340px);
  margin-top: 18px;
}

.gallery-photo {
  height: 190px;
  padding: 4px;
  overflow: hidden;
  border: 1px solid rgba(200, 155, 60, 0.65);
  background: #fffaf4;
  box-shadow: 0 12px 24px rgba(67, 48, 42, 0.14);
}

.gallery-photo-left {
  border-radius: 48% 48% 12px 12px;
  transform: rotate(-2deg);
}

.gallery-photo-right {
  border-radius: 48% 48% 12px 12px;
  transform: rotate(2deg);
}

.gallery-photo img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  object-fit: cover;
  object-position: center;
  filter: saturate(0.82) sepia(0.07) contrast(0.96);
}

.photo-credit {
  margin-top: 8px;
  color: inherit;
  font-size: 9px;
  opacity: 0.42;
  text-decoration: none;
}

.photo-credit a {
  color: inherit;
}

/* Countdown */
.countdown {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.countdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 74px;
  background: #fffaf4;
  border: 1px solid rgba(200, 155, 60, 0.35);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(67, 48, 42, 0.14);
  overflow: hidden;
}

.countdown-item::before {
  content: '';
  display: block;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--clay));
}

.countdown-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  color: var(--clay);
  display: inline-block;
  padding: 12px 0 2px;
}

.countdown-value.tick {
  animation: value-pulse 0.4s ease;
}

@keyframes value-pulse {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.2); color: var(--gold); }
  100% { transform: scale(1); }
}

.countdown-unit {
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  opacity: 0.6;
  width: 100%;
  text-align: center;
  padding: 6px 0 10px;
  margin-top: 2px;
  border-top: 1px dashed rgba(190, 98, 66, 0.3);
}

.countdown-fallback,
.countdown-message {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 24px;
  margin-top: 16px;
}

/* Date heading + mini dividers */
.date-big {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 36px;
  margin: 8px 0 14px;
  letter-spacing: 1px;
}

.mini-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gold);
}

.mini-divider span:not(.divider-heart) {
  width: 36px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.divider-heart {
  font-size: 12px;
}

.mini-divider-star {
  margin: 30px 0 6px;
  color: var(--gold);
  font-size: 15px;
}

/* Calendar card */
.calendar-card {
  margin-top: 12px;
  width: 100%;
  max-width: 300px;
  background: #fffaf4;
  border: 1px solid rgba(200, 155, 60, 0.32);
  border-radius: 16px;
  padding: 18px 14px 20px;
  box-shadow: 0 12px 28px rgba(67, 48, 42, 0.12);
}

.calendar-month {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 14px;
  opacity: 0.75;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.calendar-weekdays span {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.5;
}

.calendar-grid {
  margin-top: 6px;
  row-gap: 6px;
}

.calendar-day {
  font-family: var(--font-display);
  font-size: 13px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.calendar-day.empty {
  visibility: hidden;
}

.calendar-day.highlight {
  border: 1px solid var(--gold);
  background: rgba(200, 155, 60, 0.14);
  color: var(--clay);
  font-weight: 600;
}

.calendar-time {
  margin-top: 18px;
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.65;
}

/* Evening program */
.program-intro {
  max-width: 310px;
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.7;
  opacity: 0.72;
}

.program-timeline {
  width: 100%;
  max-width: 330px;
  margin-top: 28px;
}

.program-item {
  display: grid;
  grid-template-columns: 58px 18px 1fr;
  align-items: stretch;
  min-height: 88px;
  text-align: left;
}

.program-time {
  padding-top: 16px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--clay);
}

.program-marker {
  position: relative;
}

.program-marker::before {
  content: '';
  position: absolute;
  top: 24px;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: var(--cream);
  transform: translateX(-50%);
  z-index: 1;
}

.program-marker::after {
  content: '';
  position: absolute;
  top: 35px;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: linear-gradient(var(--gold), rgba(200, 155, 60, 0.18));
}

.program-item:last-child .program-marker::after {
  display: none;
}

.program-content {
  margin: 4px 0 14px 12px;
  padding: 13px 15px;
  border: 1px solid rgba(200, 155, 60, 0.3);
  border-radius: 12px;
  background: rgba(255, 250, 244, 0.72);
  box-shadow: 0 8px 20px rgba(67, 48, 42, 0.08);
}

.program-icon {
  display: block;
  margin-bottom: 3px;
  color: var(--gold);
  font-size: 14px;
}

.program-content h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}

/* Location */
.location-pin {
  position: relative;
  width: 40px;
  height: 40px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-icon {
  width: 26px;
  height: 26px;
  color: var(--clay);
  position: relative;
  z-index: 2;
  animation: pin-drop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.pin-pulse {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(190, 98, 66, 0.25);
  animation: pin-radar 2.2s ease-out infinite;
}

@keyframes pin-drop {
  from { transform: translateY(-30px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

@keyframes pin-radar {
  0%   { transform: scale(0.3); opacity: 0.6; }
  100% { transform: scale(1.8); opacity: 0; }
}

.section.photo-bg .pin-icon {
  color: #ffffff;
}

.section.photo-bg .pin-pulse {
  background: rgba(255, 255, 255, 0.35);
}

.location-name {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 19px;
  margin-top: 8px;
}

.location-address {
  font-family: var(--font-body);
  font-size: 13px;
  opacity: 0.75;
  margin-top: 4px;
  max-width: 320px;
}

.location-card {
  margin-top: 20px;
  width: 100%;
  max-width: 320px;
  background: #fffaf4;
  border: 1px solid rgba(200, 155, 60, 0.3);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 14px 30px rgba(67, 48, 42, 0.16);
}

.location-card .button {
  width: 100%;
  margin-top: 14px;
}

.map-embed {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}

/* Gift */
.gift-text {
  font-family: var(--font-body);
  font-size: 13px;
  opacity: 0.8;
  max-width: 320px;
  margin-top: 8px;
}

.gift-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 18px 26px;
  border: 1px solid var(--gold);
  border-radius: 12px;
}

.gift-card-number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: 2px;
  user-select: all;
}

/* Intro / opening gate */
body.intro-locked {
  overflow: hidden;
  height: 100vh;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow: hidden;
}

.intro-overlay[hidden] {
  display: none;
}

.intro-gate {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  background: linear-gradient(180deg, var(--cream), var(--blush));
  transition: transform 1s cubic-bezier(0.65, 0, 0.35, 1);
}

.intro-gate-left {
  left: 0;
  border-right: 1px solid var(--gold);
}

.intro-gate-right {
  right: 0;
  border-left: 1px solid var(--gold);
}

.intro-overlay.opening .intro-gate-left {
  transform: translateX(-100%);
}

.intro-overlay.opening .intro-gate-right {
  transform: translateX(100%);
}

.intro-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  padding: 20px;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.intro-overlay.opening .intro-content {
  opacity: 0;
  transform: scale(0.94);
  pointer-events: none;
}

.intro-emblem {
  font-size: 28px;
  margin-bottom: 6px;
}

.intro-names {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 34px;
  margin: 6px 0 4px;
}

.intro-names .amp {
  color: var(--gold);
  margin: 0 6px;
}

.intro-open-button {
  position: relative;
  z-index: 3;
  margin-top: 18px;
  background: var(--cream);
}

.intro-open-button:hover {
  background: #f2e1d3;
}

/* Music toggle */
.music-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--cream);
  color: var(--clay);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.music-toggle:hover {
  transform: scale(1.06);
  background: #f2e1d3;
}

.music-icon {
  width: 17px;
  height: 17px;
}

.icon-pause {
  display: none;
}

.music-toggle.playing .icon-play {
  display: none;
}

.music-toggle.playing .icon-pause {
  display: block;
}

.music-toggle.playing {
  color: var(--jade);
  animation: music-pulse 1.8s ease-out infinite;
}

@keyframes music-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(190, 98, 66, 0.45); }
  70%  { box-shadow: 0 0 0 14px rgba(190, 98, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(190, 98, 66, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-arch-path,
  .petal,
  .scroll-arrow,
  .music-toggle.playing,
  .countdown-value.tick,
  .pin-icon,
  .pin-pulse {
    animation: none !important;
  }
  .hero-arch-path {
    stroke-dashoffset: 0;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .intro-gate,
  .intro-content {
    transition: none;
  }
  html {
    scroll-snap-type: none;
    scroll-behavior: auto;
  }
}
