/* Shared structure for all three variants. Colours and type live in each variant's stylesheet. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: 'Jost', sans-serif; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { text-decoration: none; }
section { scroll-margin-top: 50px; }

@keyframes floatPetal {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: .8; }
  100% { transform: translateY(720px) rotate(200deg); opacity: 0; }
}
@keyframes fadeUp {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes ringPulse {
  0%, 100% { transform: scale(1); opacity: .85; }
  50% { transform: scale(1.07); opacity: 1; }
}
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes shimmerSweep {
  0% { background-position: -150% 0; }
  100% { background-position: 250% 0; }
}

/* Nav */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 18px;
  padding: 16px;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.site-nav a { font-size: 11px; letter-spacing: 1.5px; transition: color .3s ease; }
.site-nav a.active { font-weight: 500; }

/* Hero */
.hero { position: relative; text-align: center; overflow: hidden; }
.hero-content { position: relative; z-index: 2; }
.petal {
  position: absolute; top: -20px;
  width: 10px; height: 10px; border-radius: 0 50% 50% 50%;
  animation: floatPetal linear infinite;
  pointer-events: none;
}
.fade-in { animation: fadeUp .9s ease both; animation-delay: var(--d, 0s); }

.monogram { position: relative; }
.monogram .halo { position: absolute; border-radius: 50%; animation: spinSlow linear infinite; }
.monogram .ring { position: absolute; inset: 0; border-radius: 50%; animation: ringPulse ease-in-out infinite; }
.monogram .ring-inner { position: absolute; border-radius: 50%; }
.monogram .letters {
  position: absolute; inset: 0; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.shimmer {
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: shimmerSweep 5s linear infinite;
}

.hero-photo { overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.countdown { display: flex; justify-content: center; gap: 16px; }
.countdown > div { min-width: 52px; }
.cd-label { font-size: 9px; letter-spacing: 1.5px; }

/* Sections */
.section { padding: 44px 22px; text-align: center; }
.narrow { max-width: 420px; margin: 0 auto; }

/* Story polaroids */
.story-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; }
.polaroid {
  width: 150px; padding: 8px 8px 14px; border-radius: 3px;
  transform: rotate(var(--tilt, 0deg));
  transition: transform .35s ease, box-shadow .35s ease;
}
.polaroid:hover { transform: rotate(0deg) translateY(-6px); }
.polaroid img { width: 100%; height: 140px; object-fit: cover; border-radius: 2px; }
.polaroid p { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 12px; margin: 8px 0 0; }

/* Event cards */
.side-label {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 0 14px; font-size: 10px; letter-spacing: 2.5px;
}
.side-label::before, .side-label::after { content: ''; width: 26px; height: 1px; background: var(--line); }
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 28px; }
.cards.bride { margin-bottom: 30px; }
.ev-card {
  width: 150px; padding: 16px 12px;
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.ev-card:hover { transform: translateY(-6px); }
.ev-day { line-height: 1; }
.ev-month { font-size: 9px; letter-spacing: 2px; margin: 2px 0 8px; }
.ev-title { margin: 0 0 3px; }
.ev-desc { font-size: 10px; margin: 0; line-height: 1.4; }
.together { font-size: 10px; letter-spacing: 2.5px; margin: 0 0 14px; }
.shared-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.shared-card {
  width: 150px; padding: 22px 20px;
  transition: transform .3s ease, box-shadow .3s ease;
}
.shared-card:hover { transform: translateY(-6px); }
.shared-card h3 { margin: 0 0 6px; }
.shared-card p { font-size: 12px; margin: 0; }
.shared-card p:first-of-type { margin-bottom: 2px; }

/* RSVP */
.rsvp { text-align: left; }
.rsvp-head { text-align: center; margin-bottom: 18px; }
.rsvp-form { display: flex; flex-direction: column; gap: 10px; }
.rsvp-form input, .rsvp-form select { padding: 10px 12px; font-size: 13px; font-family: inherit; }
.rsvp-form button {
  padding: 12px; border: none; font-size: 12px; letter-spacing: 1.5px; font-family: inherit;
  cursor: pointer; transition: opacity .3s ease, transform .3s ease;
}
.rsvp-form button:hover { transform: translateY(-1px); }
.rsvp-form button:disabled { opacity: .6; cursor: wait; transform: none; }
.rsvp-error { font-size: 12px; margin: 0; text-align: center; }
.rsvp-thanks { padding: 22px; text-align: center; animation: fadeUp .6s ease both; }
.rsvp-thanks p { margin: 0; }

/* Footer */
.footer { position: relative; padding: 40px 20px; text-align: center; overflow: hidden; }
.footer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.footer .footer-inner { position: relative; z-index: 2; }
.footer p { margin: 0; }

/* Scroll reveal: uses `translate` so it never fights with hover/tilt transforms. Only hides content once JS is running. */
.js .reveal { opacity: 0; translate: 0 16px; transition: opacity .9s ease, translate .9s ease; transition-delay: var(--d, 0s); }
.js .reveal.is-visible { opacity: 1; translate: 0 0; }

@media (min-width: 768px) {
  .section { padding: 64px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; translate: none; }
  .petal { display: none; }
}
