/* =============================================================
   Wedding Invitation — Styles  (mobile-first)
   Palette: blue + white  ·  Script names + serif headings
   ============================================================= */

:root {
  --cream:       #f4f8fc;
  --cream-deep:  #dbe8f4;
  --blush:       #eaf2fa;
  --maroon:      #1f4e79;
  --maroon-deep: #16395c;
  --ink:         #26323d;
  --ink-soft:    #647689;
  --gold:        #4a90d9;
  --gold-deep:   #2f6cb0;
  --gold-light:  #a9cdee;
  --white:       #ffffff;

  --script: "Great Vibes", cursive;
  --script-name: "Dancing Script", "Great Vibes", cursive;
  --serif:  "Cormorant Garamond", Georgia, serif;
  --sans:   "Jost", system-ui, sans-serif;

  --maxw: 1140px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Reusable gold flourish ornament (SVG data URI) */
  --ornament: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='28' viewBox='0 0 220 28'%3E%3Cg fill='none' stroke='%234a90d9' stroke-width='1.4'%3E%3Cpath d='M10 14h78'/%3E%3Cpath d='M210 14h-78'/%3E%3Cpath d='M88 14c6-7 12-7 12 0s-6 7-12 0' /%3E%3Cpath d='M132 14c-6-7-12-7-12 0s6 7 12 0'/%3E%3C/g%3E%3Cg fill='%234a90d9'%3E%3Ccircle cx='110' cy='14' r='3.2'/%3E%3Ccircle cx='110' cy='5' r='1.6'/%3E%3Ccircle cx='110' cy='23' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Section backgrounds ---------- */
section { padding: 5rem 1.5rem; position: relative; }
.section--cream { background: var(--cream); }
.section--blush { background: var(--blush); }

/* ---------- Section header component ---------- */
.sec-head { text-align: center; margin-bottom: 2.8rem; }
.sec-head__eyebrow {
  font-family: var(--script);
  font-size: 2rem;
  line-height: 1;
  color: var(--gold-deep);
  margin-bottom: 0.2rem;
}
.sec-head__eyebrow--light { color: var(--gold-light); }
.sec-head__title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.9rem, 7vw, 3rem);
  letter-spacing: 1px;
  color: var(--maroon);
  text-transform: uppercase;
}
.ornament {
  width: 200px; max-width: 70%;
  height: 26px;
  margin: 1rem auto 0;
  background: var(--ornament) center/contain no-repeat;
}
.ornament--light { filter: brightness(0) invert(1); opacity: 0.85; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              background 0.35s var(--ease), color 0.35s var(--ease);
}
.btn--primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--white);
  box-shadow: 0 10px 26px rgba(47, 108, 176, 0.35);
}
.btn--primary:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(47,108,176,0.45); }
.btn--ghost { background: transparent; color: var(--maroon); border: 1.5px solid var(--gold); }
.btn--ghost:hover { background: var(--maroon); border-color: var(--maroon); color: var(--white); transform: translateY(-3px); }
.btn--light { background: var(--white); color: var(--maroon); box-shadow: 0 10px 26px rgba(0,0,0,0.18); }
.btn--light:hover { transform: translateY(-3px); background: var(--cream); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ NAV ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.5rem;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease);
}
.nav.is-scrolled {
  background: rgba(244, 248, 252, 0.94);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 22px rgba(31, 78, 121, 0.1);
  padding: 0.55rem 1.5rem;
}
.nav__brand {
  font-family: var(--script-name); font-weight: 700;
  font-size: 1.9rem; line-height: 1;
  color: var(--white); text-decoration: none;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
  transition: color 0.4s var(--ease), text-shadow 0.4s var(--ease);
}
.nav.is-scrolled .nav__brand { color: var(--maroon); text-shadow: none; }

.nav__toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; z-index: 110; }
.nav__toggle span { width: 26px; height: 2px; background: var(--white); border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform 0.35s var(--ease), opacity 0.35s var(--ease), background 0.4s var(--ease); }
.nav.is-scrolled .nav__toggle span { background: var(--maroon); box-shadow: none; }
.nav.menu-open .nav__toggle span { background: var(--maroon); box-shadow: none; }
.nav.menu-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.menu-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__menu {
  position: fixed; inset: 0;
  background: rgba(244, 248, 252, 0.98); backdrop-filter: blur(6px);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
  transform: translateX(100%); transition: transform 0.45s var(--ease);
}
.nav.menu-open .nav__menu { transform: translateX(0); }
.nav__link {
  font-family: var(--serif); font-size: 1.7rem; font-weight: 500;
  color: var(--ink); text-decoration: none; letter-spacing: 1px; position: relative;
  transition: color 0.3s var(--ease);
}
.nav__link::after { content: ""; position: absolute; left: 50%; bottom: -4px; width: 0; height: 1.5px; background: var(--gold); transform: translateX(-50%); transition: width 0.3s var(--ease); }
.nav__link:hover { color: var(--maroon); }
.nav__link:hover::after { width: 100%; }

/* ============ HERO ============ */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 1.2rem; overflow: hidden;
  background: var(--maroon-deep);
}
.hero__bg {
  position: absolute; inset: -3%; z-index: 0;
  background-position: center; background-size: cover; background-repeat: no-repeat;
  animation: kenburns 24s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from { transform: scale(1); }
  to   { transform: scale(1.12); }
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 80% at 50% 45%, rgba(12,30,50,0.25) 0%, rgba(12,30,50,0.62) 100%),
    linear-gradient(180deg, rgba(12,30,50,0.5) 0%, rgba(12,30,50,0.35) 45%, rgba(12,30,50,0.7) 100%);
}
.hero__frame {
  position: relative; z-index: 2;
  border: 1px solid rgba(169, 205, 238, 0.6);
  padding: 3rem 1.6rem;
  margin: 1rem;
  max-width: 620px;
}
.hero__frame::before, .hero__frame::after {
  content: ""; position: absolute; width: 26px; height: 26px; border: 2px solid var(--gold-light);
}
.hero__frame::before { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.hero__frame::after  { bottom: -2px; right: -2px; border-left: none; border-top: none; }

.hero__intro {
  font-family: var(--sans); font-weight: 300;
  font-size: 0.78rem; letter-spacing: 3px; text-transform: uppercase;
  color: var(--cream); opacity: 0; transform: translateY(14px);
  animation: heroUp 1s var(--ease) 0.3s forwards;
}
.hero__names {
  font-family: var(--script-name); font-weight: 600; color: var(--white);
  line-height: 1.05; margin: 0.8rem 0;
  text-shadow: 0 4px 30px rgba(0,0,0,0.5);
}
.hero__name {
  display: block; font-size: clamp(3.4rem, 17vw, 6.5rem);
  opacity: 0; transform: translateY(20px);
}
.hero__name:first-of-type { animation: heroUp 1.1s var(--ease) 0.5s forwards; }
.hero__name:last-of-type  { animation: heroUp 1.1s var(--ease) 0.95s forwards; }
.hero__amp {
  display: block; font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: clamp(1.4rem, 5vw, 2rem); color: var(--gold-light);
  margin: -0.2em 0; opacity: 0;
  animation: heroFade 1s var(--ease) 0.8s forwards;
}
.hero__date-wrap {
  display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  margin-top: 1rem; opacity: 0; transform: translateY(14px);
  animation: heroUp 1s var(--ease) 1.3s forwards;
}
.hero__date-wrap .rule { width: 34px; height: 1px; background: var(--gold-light); opacity: 0.8; }
.hero__date {
  font-family: var(--sans); font-weight: 300;
  font-size: 0.82rem; letter-spacing: 3px; text-transform: uppercase; color: var(--cream);
}
@keyframes heroUp { to { opacity: 1; transform: translateY(0); } }
@keyframes heroFade { to { opacity: 1; } }

.hero__scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,0.6); border-radius: 14px;
  opacity: 0; animation: heroFade 1s ease 1.8s forwards;
}
.hero__scroll span { position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; background: var(--white); border-radius: 2px; transform: translateX(-50%); animation: scrollDot 1.8s infinite; }
@keyframes scrollDot { 0%{opacity:0;transform:translate(-50%,0)} 40%{opacity:1} 80%{opacity:0;transform:translate(-50%,14px)} 100%{opacity:0} }

/* ============ COUNTDOWN ============ */
.countdown { text-align: center; }
.countdown__grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.9rem; }
.countdown__unit {
  background: var(--white); border: 1px solid var(--cream-deep);
  border-radius: 10px; padding: 1.3rem 0.5rem; min-width: 74px; flex: 1 1 70px; max-width: 120px;
  box-shadow: 0 12px 30px rgba(31, 78, 121, 0.07); position: relative;
}
.countdown__unit::after { content:""; position:absolute; left:50%; bottom:0; transform:translateX(-50%); width:34px; height:2px; background:var(--gold); }
.countdown__unit span { display: block; font-family: var(--serif); font-weight: 600; font-size: clamp(2rem, 8vw, 3rem); color: var(--maroon); line-height: 1; }
.countdown__unit label { font-size: 0.66rem; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-soft); margin-top: 0.5rem; display: block; }

/* ============ STORY ============ */
.story { text-align: center; }
.story__text {
  max-width: 720px; margin: 0 auto;
  font-family: var(--serif); font-style: italic; font-size: 1.3rem; line-height: 1.95; color: var(--ink);
}
.story__couple { font-family: var(--script-name); font-weight: 600; font-size: 2.4rem; color: var(--maroon); margin-top: 1.6rem; }
.amp-sm { font-family: var(--serif); font-style: italic; color: var(--gold-deep); }

/* ============ DETAILS / EVENT CARDS ============ */
.details { text-align: center; }
.details__cards { display: flex; flex-direction: column; gap: 1.6rem; max-width: 900px; margin: 0 auto; }
.event-card {
  background: var(--white); border-radius: 14px; padding: 2.4rem 1.6rem 2rem;
  box-shadow: 0 14px 36px rgba(31, 78, 121, 0.08); border-top: 3px solid var(--gold);
  display: flex; flex-direction: column; gap: 1.3rem;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.event-card:hover { transform: translateY(-6px); box-shadow: 0 22px 46px rgba(31,78,121,0.14); }
.event-card__label {
  font-family: var(--script); font-size: 2.4rem; line-height: 1; color: var(--maroon);
}
.event-card__row { display: flex; align-items: flex-start; gap: 0.9rem; text-align: left; }
.event-card__icon { flex: 0 0 34px; width: 34px; height: 34px; color: var(--gold-deep); margin-top: 2px; }
.event-card__icon svg { width: 100%; height: 100%; }
.event-card h3 {
  font-family: var(--sans); font-weight: 500; font-size: 0.72rem; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--gold-deep); margin-bottom: 0.2rem;
}
.event-card__lead { font-family: var(--serif); font-size: 1.25rem; color: var(--ink); line-height: 1.4; }
.event-card p { color: var(--ink-soft); }
.event-card__addr { font-size: 0.92rem; margin-top: 0.2rem; }
.event-card__actions { display: flex; flex-direction: column; gap: 0.8rem; margin-top: auto; padding-top: 0.4rem; }
.event-card__actions .btn { width: 100%; }

/* ---- Shared venue banner (shown when all events are at one venue) ---- */
.venue-banner {
  max-width: 900px; margin: 1.8rem auto 0;
  background: var(--white); border-radius: 14px;
  padding: 2.2rem 1.6rem; text-align: center;
  box-shadow: 0 14px 36px rgba(31,78,121,0.08);
  border: 1px solid var(--cream-deep); border-top: 3px solid var(--gold);
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
}
.venue-banner__icon { width: 40px; height: 40px; color: var(--gold-deep); }
.venue-banner__icon svg { width: 100%; height: 100%; }
.venue-banner__eyebrow {
  font-family: var(--script); font-size: 1.9rem; line-height: 1;
  color: var(--gold-deep); margin-top: 0.2rem;
}
.venue-banner__name {
  font-family: var(--serif); font-weight: 500; font-size: clamp(1.4rem, 5vw, 1.9rem);
  letter-spacing: 0.5px; color: var(--maroon);
}
.venue-banner__addr { color: var(--ink-soft); font-size: 0.96rem; }
.venue-banner .btn { margin-top: 1.1rem; }

/* ============ GALLERY (masonry — gap-free for any photo count) ============ */
.gallery__grid { column-count: 2; column-gap: 0.6rem; max-width: var(--maxw); margin: 0 auto; }
.gallery__item { position: relative; overflow: hidden; border-radius: 8px; background: var(--cream-deep); cursor: pointer; display: block; width: 100%; margin: 0 0 0.6rem; break-inside: avoid; -webkit-column-break-inside: avoid; }
.gallery__item::after { content: "\002B"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; background: rgba(31,78,121,0.35); opacity: 0; transition: opacity 0.4s var(--ease); }
.gallery__item:hover::after { opacity: 1; }
.gallery__item img { width: 100%; height: auto; object-fit: cover; display: block; transition: transform 0.7s var(--ease); }
.gallery__item:hover img { transform: scale(1.08); }

/* ============ RSVP ============ */
.rsvp { background: linear-gradient(150deg, var(--maroon) 0%, var(--maroon-deep) 100%); text-align: center; color: var(--cream); overflow: hidden; }
.rsvp::before, .rsvp::after { content: ""; position: absolute; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(169,205,238,0.20), transparent 70%); }
.rsvp::before { top: -90px; left: -70px; } .rsvp::after { bottom: -90px; right: -70px; }
.rsvp__inner { max-width: 620px; margin: 0 auto; position: relative; z-index: 1; }
.rsvp__title { font-family: var(--serif); font-weight: 500; font-size: clamp(2rem, 8vw, 3rem); letter-spacing: 1px; text-transform: uppercase; color: var(--white); }
.rsvp__text { margin: 1.2rem auto 2rem; opacity: 0.92; max-width: 480px; font-family: var(--serif); font-size: 1.2rem; font-style: italic; }
.rsvp__actions { display: flex; flex-direction: column; align-items: center; gap: 0.9rem; }

/* ============ FOOTER ============ */
.footer { background: var(--ink); color: var(--cream); text-align: center; padding: 3.2rem 1.5rem; }
.footer__couple { font-family: var(--script-name); font-weight: 600; font-size: 2.2rem; color: var(--gold-light); }
.footer__hashtag { font-family: var(--sans); letter-spacing: 2px; font-size: 0.85rem; color: var(--gold); margin-top: 0.4rem; }
.footer__note { font-size: 0.85rem; opacity: 0.65; margin-top: 1rem; }

/* ============ LIGHTBOX ============ */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 20, 35, 0.94); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease);
}
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox__img { max-width: 92vw; max-height: 82vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); transform: scale(0.96); transition: transform 0.35s var(--ease); }
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 2.6rem; line-height: 1; cursor: pointer; opacity: 0.85; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.3); color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer; transition: background 0.3s var(--ease); }
.lightbox__nav:hover { background: rgba(255,255,255,0.25); }
.lightbox__nav--prev { left: 14px; } .lightbox__nav--next { right: 14px; }

/* ============ FALLING PETALS ============ */
.petal { position: fixed; top: -8%; z-index: 5; pointer-events: none; border-radius: 0 50% 0 50%; opacity: 0.55; will-change: transform; }

/* ============ RESPONSIVE ============ */
@media (min-width: 700px) {
  section { padding: 6.5rem 2rem; }
  .details__cards { flex-direction: row; align-items: stretch; }
  .event-card { flex: 1; }
  .event-card__actions { flex-direction: row; }
  .rsvp__actions { flex-direction: row; justify-content: center; }
  .gallery__grid { column-count: 3; column-gap: 0.9rem; }
  .gallery__item { margin-bottom: 0.9rem; }
}
@media (min-width: 900px) {
  .nav__toggle { display: none; }
  .nav__menu { position: static; inset: auto; flex-direction: row; transform: none; background: none; backdrop-filter: none; gap: 2.4rem; }
  .nav__link { font-size: 1.05rem; color: var(--white); text-shadow: 0 1px 6px rgba(0,0,0,0.4); }
  .nav.is-scrolled .nav__link { color: var(--ink); text-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__bg { animation: none; }
  .hero__intro, .hero__name, .hero__amp, .hero__date-wrap, .hero__scroll { animation: none; opacity: 1; transform: none; }
  .hero__scroll span { animation: none; }
  .petal { display: none !important; }
  html { scroll-behavior: auto; }
}
