/* ================================================
   Megan & Robert · Wedding Site
   Palette: black · midnight blue · french blue ·
            gold · forest green · ivory
   ================================================ */

:root {
  --midnight: #0B1B3A;
  --midnight-deep: #050D1F;
  --french-blue: #4A6FA5;
  --black: #000000;
  --gold: #C9A961;
  --gold-light: #E4C97A;
  --forest: #2D4A3E;
  --ivory: #F5F1E8;
  --ivory-dim: #d9d3c1;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --caps: 'Cinzel', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--serif);
  color: var(--ivory);
  background: var(--midnight-deep);
  overflow-x: hidden;
  line-height: 1.6;
}

/* -------- Twinkling star background -------- */
.starfield {
  position: fixed; inset: 0;
  background:
    radial-gradient(2px 2px at 20% 30%, var(--ivory), transparent),
    radial-gradient(1px 1px at 50% 80%, var(--gold-light), transparent),
    radial-gradient(1px 1px at 80% 10%, var(--ivory), transparent),
    radial-gradient(2px 2px at 90% 60%, var(--gold), transparent),
    radial-gradient(1px 1px at 33% 55%, var(--ivory), transparent),
    radial-gradient(1px 1px at 66% 25%, var(--gold-light), transparent);
  background-repeat: repeat;
  background-size: 600px 600px;
  opacity: 0.35;
  animation: twinkle 6s infinite alternate;
  z-index: 0; pointer-events: none;
}
@keyframes twinkle {
  from { opacity: 0.2; }
  to   { opacity: 0.55; }
}

/* -------- Navigation -------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(5, 13, 31, 0.75);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(201, 169, 97, 0.25);
}
.nav-monogram {
  font-family: var(--caps); color: var(--gold);
  letter-spacing: 0.2em; font-size: 1.1rem;
}
.nav-links {
  list-style: none; display: flex; gap: 2rem;
  margin: 0; padding: 0;
}
.nav-links a {
  font-family: var(--caps);
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--ivory-dim);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--gold); }
.nav-cta {
  border: 1px solid var(--gold);
  padding: 0.4rem 1rem;
  color: var(--gold) !important;
}
.nav-toggle {
  display: none; background: none; border: none;
  color: var(--gold); font-size: 1.5rem; cursor: pointer;
}

/* -------- Hero -------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  background:
    radial-gradient(ellipse at top, #1a2f5c 0%, var(--midnight) 40%, var(--midnight-deep) 100%);
  overflow: hidden;
}
.moon {
  position: absolute; top: 8%; left: 50%;
  transform: translateX(-50%);
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff8e1, #e4c97a 60%, #a58540);
  box-shadow:
    0 0 40px rgba(228, 201, 122, 0.6),
    0 0 90px rgba(228, 201, 122, 0.35),
    inset -10px -10px 30px rgba(0,0,0,0.25);
  z-index: 1;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 720px;
  margin-top: 8rem;
}
.eyebrow {
  font-family: var(--caps);
  letter-spacing: 0.35em;
  font-size: 0.75rem;
  color: var(--gold-light);
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.script-title {
  font-family: var(--script);
  font-size: clamp(4rem, 12vw, 8rem);
  color: var(--gold);
  margin: 0.5rem 0;
  line-height: 1;
  text-shadow: 0 0 20px rgba(201,169,97,0.35);
}
.script-title .amp { font-size: 0.7em; }
.divider {
  color: var(--gold); font-size: 1.2rem;
  margin: 1rem 0; letter-spacing: 0.5em;
}
.hero-sub {
  font-family: var(--caps);
  letter-spacing: 0.4em;
  font-size: 0.9rem;
  color: var(--ivory);
  text-transform: uppercase;
  margin: 0.5rem 0;
}
.hero-date {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--gold-light);
  letter-spacing: 0.3em;
  margin: 1rem 0 0.25rem;
}
.hero-time {
  color: var(--ivory-dim);
  font-size: 1.1rem;
  margin: 0 0 2rem;
}
.skyline {
  position: absolute; bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--black), transparent);
  clip-path: polygon(
    0 100%, 0 60%, 5% 55%, 8% 65%, 12% 50%, 15% 55%, 18% 45%,
    22% 50%, 25% 35%, 28% 45%, 32% 30%, 36% 40%, 40% 25%,
    44% 45%, 48% 35%, 52% 20%, 56% 40%, 60% 30%, 64% 45%,
    68% 35%, 72% 50%, 76% 40%, 80% 55%, 84% 45%, 88% 60%,
    92% 50%, 96% 55%, 100% 60%, 100% 100%
  );
  z-index: 1;
}

/* -------- Countdown -------- */
.countdown {
  display: flex; justify-content: center; gap: 1.5rem;
  margin-top: 3rem;
}
.countdown > div {
  min-width: 70px;
  border: 1px solid var(--gold);
  padding: 0.75rem 0.5rem;
  background: rgba(11, 27, 58, 0.5);
}
.countdown span {
  display: block;
  font-family: var(--caps);
  font-size: 1.6rem;
  color: var(--gold);
}
.countdown small {
  font-family: var(--caps);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  color: var(--ivory-dim);
  text-transform: uppercase;
}

/* -------- Buttons -------- */
.btn {
  display: inline-block;
  font-family: var(--caps);
  letter-spacing: 0.3em;
  font-size: 0.85rem;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9rem 2.2rem;
  border: 1px solid var(--gold);
  transition: all 0.3s;
  cursor: pointer;
}
.btn-primary {
  background: var(--gold); color: var(--midnight-deep);
}
.btn-primary:hover {
  background: var(--gold-light); box-shadow: 0 0 20px rgba(201,169,97,0.5);
}
.btn-outline {
  color: var(--gold); background: transparent;
}
.btn-outline:hover {
  background: var(--gold); color: var(--midnight-deep);
}
.btn-large { padding: 1.2rem 3.5rem; font-size: 1rem; }

/* -------- Sections -------- */
.section {
  position: relative; z-index: 2;
  padding: 6rem 1.5rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}
.section-title {
  font-family: var(--script);
  color: var(--gold);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin: 0 0 1.5rem;
}
.section-lead {
  max-width: 620px; margin: 0 auto 2.5rem;
  font-size: 1.15rem;
  color: var(--ivory-dim);
}

/* -------- Cards -------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.card {
  background: rgba(11, 27, 58, 0.6);
  border: 1px solid var(--gold);
  padding: 2.5rem 1.5rem;
  position: relative;
  transition: transform 0.4s, box-shadow 0.4s;
}
.card::before, .card::after {
  content: ""; position: absolute;
  width: 20px; height: 20px;
  border: 1px solid var(--gold);
}
.card::before { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.card::after  { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 15px 40px rgba(201,169,97,0.2);
}
.card-icon {
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; color: var(--gold);
  font-size: 3rem;
}
.card-icon img { max-height: 100px; }
.card h3 {
  font-family: var(--caps);
  letter-spacing: 0.25em;
  color: var(--gold);
  font-size: 0.9rem;
  margin: 0 0 0.5rem;
}
.card-venue {
  font-family: var(--script);
  color: var(--ivory);
  font-size: 1.8rem;
  margin: 0.25rem 0 1rem;
}
.card-desc {
  color: var(--ivory-dim);
  font-size: 1rem;
  margin: 0 0 1rem;
}
.card-time {
  font-family: var(--caps);
  color: var(--gold-light);
  letter-spacing: 0.2em;
  font-size: 0.85rem;
}

/* -------- Backgrounds per section -------- */
.story    { background: transparent; }
.celebration { background: rgba(74, 111, 165, 0.08); }
.travel   { background: transparent; }
.registry { background: rgba(45, 74, 62, 0.15); }

/* -------- Registry -------- */
.registry-buttons {
  display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap;
}

/* -------- RSVP -------- */
.rsvp {
  position: relative;
  background:
    radial-gradient(ellipse at center, rgba(74,111,165,0.15), transparent 60%);
}
.laurel {
  position: absolute; top: 50%;
  transform: translateY(-50%);
  color: var(--forest); font-size: 4rem;
  opacity: 0.5;
}
.laurel-left { left: 5%; }
.laurel-right { right: 5%; }
.rsvp-deadline {
  margin-top: 1.5rem; color: var(--ivory-dim);
  font-size: 1.1rem;
}

/* -------- Footer -------- */
.footer {
  background: var(--black);
  padding: 3rem 1.5rem 1.5rem;
  border-top: 1px solid rgba(201,169,97,0.3);
  position: relative; z-index: 2;
}
.footer-inner {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem; align-items: center;
  color: var(--ivory-dim);
}
.footer-left, .footer-right { font-family: var(--caps); font-size: 0.75rem; letter-spacing: 0.2em; }
.footer-left .mono, .footer-right { }
.footer-left .mono { color: var(--gold); font-size: 1rem; letter-spacing: 0.3em; }
.footer-right { text-align: right; }
.footer-center { text-align: center; color: var(--gold); font-size: 2rem; }
.italic { font-style: italic; text-transform: none; letter-spacing: 0.05em; }
.copyright {
  margin-top: 2rem; text-align: center;
  font-size: 0.75rem; color: rgba(245,241,232,0.4);
}

/* -------- Responsive -------- */
@media (max-width: 768px) {
  .nav { padding: 1rem 1.25rem; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(5,13,31,0.95);
    flex-direction: column; padding: 1.5rem;
    gap: 1.25rem;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .countdown { gap: 0.75rem; flex-wrap: wrap; }
  .countdown > div { min-width: 60px; padding: 0.5rem; }
  .countdown span { font-size: 1.2rem; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-right { text-align: center; }
  .laurel { display: none; }
}
