/* =========================================================
   Mark & Manuella — Wedding
   Palette: dusty teal · lavender · blush · plum
   ========================================================= */
:root {
  --plum:   #5d4b68;
  --plum-d: #463850;
  --mauve:  #9d7fa6;
  --teal:   #4f7d8c;
  --teal-d: #3c6371;
  --aqua:   #a8d5d0;
  --blush:  #e8b4c4;
  --blush-l:#f4d6df;
  --cream:  #faf7f5;
  --sand:   #f0ebe9;
  --ink:    #3a3340;
  --muted:  #7a7280;
  --white:  #ffffff;

  --serif:  'Cormorant Garamond', Georgia, serif;
  --script: 'Great Vibes', cursive;
  --sans:   'Jost', system-ui, sans-serif;

  --maxw: 1160px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --shadow: 0 18px 50px -20px rgba(70,56,80,.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.gate-open { overflow: hidden; }
img { max-width: 100%; display: block; }

.container { width: 90%; max-width: var(--maxw); margin: 0 auto; }
.container--narrow { max-width: 720px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.15; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(120deg, var(--teal), var(--plum));
  padding: .95em 2.4em;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), filter .35s var(--ease);
  box-shadow: 0 14px 30px -12px rgba(79,125,140,.6);
}
.btn:hover { transform: translateY(-3px); filter: brightness(1.06); box-shadow: 0 20px 38px -12px rgba(93,75,104,.6); }
.btn--ghost {
  background: transparent;
  color: var(--plum);
  border: 1.5px solid var(--mauve);
  box-shadow: none;
}
.btn--ghost:hover { background: var(--mauve); color: var(--white); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================
   GATE (countdown intro)
   ========================================================= */
.gate {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(232,180,196,.5), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(168,213,208,.55), transparent 55%),
    linear-gradient(135deg, #f3ecf1, #e7eef0);
  transition: opacity .8s var(--ease), visibility .8s;
  padding: 2rem 1rem;
}
.gate.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.gate__inner { max-width: 560px; animation: fadeUp 1.1s var(--ease) both; }
.gate__logo { width: clamp(300px, 60vw, 440px); margin: 0 auto .4rem; }
.gate__kicker { font-family: var(--sans); letter-spacing: .28em; text-transform: uppercase; font-size: .72rem; color: var(--teal); margin-bottom: .3rem; }
.gate__names { font-family: var(--script); font-size: clamp(2.6rem, 9vw, 4.4rem); color: var(--plum); line-height: .9; font-weight: 400; }
.gate__amp { font-family: var(--serif); font-size: 1.6rem; color: var(--mauve); display: block; margin: -.2rem 0; }
.gate__date { font-family: var(--serif); letter-spacing: .3em; font-size: 1.1rem; color: var(--ink); margin-top: .6rem; }

.countdown { display: flex; justify-content: center; gap: clamp(.6rem, 3vw, 1.6rem); margin: 1.8rem 0; }
.countdown__unit {
  min-width: 68px; padding: .8rem .4rem;
  background: rgba(255,255,255,.6);
  border: 1px solid rgba(157,127,166,.25);
  border-radius: 14px;
  backdrop-filter: blur(4px);
}
.countdown__num { font-family: var(--serif); font-size: 1.9rem; font-weight: 600; color: var(--plum); display: block; line-height: 1; }
.countdown__label { font-family: var(--sans); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90;
  transition: background .4s var(--ease), box-shadow .4s var(--ease), padding .4s var(--ease);
  padding: .5rem 0;
}
.nav.is-solid { background: rgba(250,247,245,.92); backdrop-filter: blur(10px); box-shadow: 0 6px 24px -16px rgba(70,56,80,.5); }
.nav__bar { display: flex; align-items: center; justify-content: space-between; }
.nav__brand { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; letter-spacing: .12em; color: var(--white); text-decoration: none; transition: color .4s; }
.nav.is-solid .nav__brand { color: var(--plum); }
.nav__menu { display: flex; gap: 2rem; }
.nav__menu a {
  font-family: var(--sans); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--white); text-decoration: none; position: relative; padding: .3rem 0; transition: color .3s;
}
.nav.is-solid .nav__menu a { color: var(--ink); }
.nav__menu a::after { content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 1.5px; background: var(--blush); transition: width .3s var(--ease); }
.nav__menu a:hover::after { width: 100%; }
.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 26px; height: 2px; background: var(--white); transition: .3s; }
.nav.is-solid .nav__toggle span { background: var(--plum); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: url('../assets/img/hero/hero.jpg') center/cover no-repeat, var(--plum-d);
  color: var(--white);
}
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(70,56,80,.55), rgba(60,99,113,.55)); }
.hero__content { position: relative; z-index: 2; padding: 6rem 1rem; }
.hero__kicker { font-family: var(--sans); letter-spacing: .34em; text-transform: uppercase; font-size: .72rem; opacity: .9; margin-bottom: 1rem; }
.hero__names { font-family: var(--script); font-weight: 400; font-size: clamp(3.2rem, 12vw, 7rem); line-height: .95; text-shadow: 0 8px 40px rgba(0,0,0,.35); }
.hero__names em { display: block; font-family: var(--serif); font-style: normal; font-size: .4em; margin: .1em 0; opacity: .9; }
.hero__invite { font-family: var(--serif); font-size: 1.25rem; font-style: italic; margin-top: 1rem; opacity: .95; }
.hero__date { font-family: var(--serif); letter-spacing: .16em; font-size: 1.4rem; margin-top: 1.2rem; }
.hero__city { font-family: var(--sans); letter-spacing: .22em; text-transform: uppercase; font-size: .74rem; opacity: .85; margin-top: .3rem; }
.hero__btn { margin-top: 2rem; background: rgba(255,255,255,.14); border: 1.5px solid rgba(255,255,255,.6); backdrop-filter: blur(4px); box-shadow: none; }
.hero__btn:hover { background: var(--white); color: var(--plum); }
.hero__scroll { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); width: 26px; height: 44px; border: 2px solid rgba(255,255,255,.7); border-radius: 14px; z-index: 2; }
.hero__scroll span { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 4px; height: 8px; background: #fff; border-radius: 2px; animation: scrollDot 1.6s infinite; }
@keyframes scrollDot { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 22px; } 100% { opacity: 0; } }

/* =========================================================
   SECTION scaffolding
   ========================================================= */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section--tint { background: linear-gradient(180deg, var(--sand), #eef3f2); }
.section__head { text-align: center; max-width: 640px; margin: 0 auto clamp(2.5rem, 6vw, 4rem); }
.section__kicker { font-family: var(--script); font-size: 1.7rem; color: var(--mauve); line-height: 1; }
.section__title { font-size: clamp(2.2rem, 6vw, 3.4rem); color: var(--plum); margin: .2rem 0 1rem; }
.section__title::after { content: ''; display: block; width: 64px; height: 2px; margin: 1rem auto 0; background: linear-gradient(90deg, var(--blush), var(--aqua)); }
.section__intro { font-family: var(--serif); font-size: 1.2rem; color: var(--muted); font-style: italic; }

/* =========================================================
   STORY timeline
   ========================================================= */
.timeline { list-style: none; position: relative; max-width: 900px; margin: 0 auto; }
.timeline::before { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: linear-gradient(var(--blush), var(--aqua)); transform: translateX(-50%); }
.timeline__item { position: relative; width: 50%; padding: 0 2.6rem 3rem; }
.timeline__item:nth-child(odd) { left: 0; text-align: right; }
.timeline__item:nth-child(even) { left: 50%; text-align: left; }
.timeline__dot { position: absolute; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); border: 3px solid var(--mauve); z-index: 2; }
.timeline__item:nth-child(odd) .timeline__dot { right: -8px; }
.timeline__item:nth-child(even) .timeline__dot { left: -8px; }
.timeline__img { width: 100%; height: 230px; object-fit: cover; border-radius: 14px; box-shadow: var(--shadow); margin-bottom: 1rem; cursor: pointer; transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.timeline__img:hover { transform: scale(1.02); box-shadow: 0 22px 55px -18px rgba(70,56,80,.5); }
.timeline__date { font-family: var(--sans); letter-spacing: .2em; text-transform: uppercase; font-size: .7rem; color: var(--teal); }
.timeline__title { font-size: 1.7rem; color: var(--plum); margin: .2rem 0 .5rem; }
.timeline__text { color: var(--muted); font-size: .98rem; }

/* =========================================================
   QUOTE band
   ========================================================= */
.quote {
  position: relative; text-align: center; color: var(--white);
  padding: clamp(4rem, 10vw, 7rem) 1rem;
  background: url('../assets/img/gallery/mm-05.jpg') center/cover fixed no-repeat, var(--plum);
}
.quote__overlay { position: absolute; inset: 0; background: rgba(60,56,72,.62); }
.quote blockquote { position: relative; z-index: 2; max-width: 760px; margin: 0 auto; }
.quote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.5rem, 4vw, 2.4rem); line-height: 1.4; }
.quote cite { display: block; margin-top: 1.2rem; font-family: var(--sans); letter-spacing: .28em; text-transform: uppercase; font-size: .74rem; opacity: .85; font-style: normal; }

/* =========================================================
   SCHEDULE / events
   ========================================================= */
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; max-width: 880px; margin: 0 auto; }
.event {
  background: var(--white); border-radius: 20px; padding: 2.6rem 2rem; text-align: center;
  box-shadow: var(--shadow); border: 1px solid rgba(157,127,166,.12);
  transition: transform .4s var(--ease);
}
.event:hover { transform: translateY(-6px); }
.event__icon { width: 54px; height: 54px; margin: 0 auto 1rem; color: var(--teal); }
.event__name { font-size: 1.7rem; color: var(--plum); }
.event__time { font-family: var(--sans); letter-spacing: .16em; text-transform: uppercase; font-size: .78rem; color: var(--mauve); margin: .5rem 0; }
.event__date { font-family: var(--serif); font-size: 1.05rem; color: var(--ink); }
.event__venue { font-weight: 600; margin-top: .8rem; color: var(--plum); }
.event__address { color: var(--muted); font-size: .92rem; }
.event__note { margin-top: .9rem; font-style: italic; font-family: var(--serif); color: var(--teal); font-size: .98rem; }
.event__divider { width: 40px; height: 1px; background: var(--blush); margin: 1rem auto; }
.schedule__foot { text-align: center; margin-top: 3rem; }
.dresscode { margin-top: 2rem; }
.dresscode h3 { color: var(--plum); font-size: 1.5rem; }
.dresscode p { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 1.1rem; max-width: 520px; margin: .3rem auto 0; }

/* =========================================================
   GALLERY
   ========================================================= */
.gallery__grid { columns: 4 220px; column-gap: 14px; }
.gallery__item { break-inside: avoid; margin-bottom: 14px; border-radius: 12px; overflow: hidden; cursor: pointer; position: relative; box-shadow: var(--shadow); }
.gallery__item img { width: 100%; transition: transform .6s var(--ease); }
.gallery__item::after { content: '＋'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.6rem; background: linear-gradient(rgba(93,75,104,0), rgba(93,75,104,.45)); opacity: 0; transition: opacity .4s; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item:hover::after { opacity: 1; }

/* =========================================================
   RSVP form
   ========================================================= */
.rsvp__form { background: var(--white); padding: clamp(1.8rem, 5vw, 3rem); border-radius: 22px; box-shadow: var(--shadow); }
.field { margin-bottom: 1.3rem; }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field label { display: block; font-family: var(--sans); font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--plum); margin-bottom: .5rem; }
.field label span { text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .8rem; }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  padding: .85rem 1rem; border: 1.5px solid #e3dce4; border-radius: 12px; background: #fbf9fb;
  transition: border-color .3s, box-shadow .3s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--mauve); box-shadow: 0 0 0 4px rgba(157,127,166,.14); }
.field textarea { resize: vertical; }
.rsvp__submit { width: 100%; margin-top: .5rem; }
.rsvp__status { text-align: center; margin-top: 1rem; font-family: var(--serif); font-style: italic; font-size: 1.05rem; min-height: 1.4em; }
.rsvp__status.is-ok { color: var(--teal); }
.rsvp__status.is-err { color: #b5546b; }

/* =========================================================
   GIFTS
   ========================================================= */
.gifts__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.6rem; }
.gift {
  background: linear-gradient(160deg, #fff, #fbf5f8); border: 1px solid rgba(232,180,196,.4);
  border-radius: 18px; padding: 2rem; text-align: center; box-shadow: var(--shadow);
}
.gift__label { font-family: var(--sans); letter-spacing: .18em; text-transform: uppercase; font-size: .72rem; color: var(--teal); }
.gift__detail { font-family: var(--serif); font-size: 1.4rem; color: var(--plum); margin: .3rem 0; }
.gift__name { color: var(--muted); font-size: .95rem; }
.gift__number { font-family: var(--sans); font-size: 1.15rem; letter-spacing: .06em; color: var(--ink); margin-top: .5rem; font-weight: 500; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { text-align: center; padding: 4rem 0 3rem; background: linear-gradient(180deg, #efe8ee, #e4ebed); }
.footer__logo { width: 240px; margin: 0 auto 1rem; }
.footer__names { font-family: var(--script); font-size: 2.4rem; color: var(--plum); }
.footer__date { font-family: var(--serif); letter-spacing: .1em; color: var(--muted); }
.footer__contacts { display: flex; gap: 2rem; justify-content: center; flex-wrap: wrap; margin: 1.4rem 0; }
.footer__contact { font-size: .92rem; color: var(--ink); }
.footer__contact strong { display: block; font-family: var(--sans); letter-spacing: .12em; text-transform: uppercase; font-size: .7rem; color: var(--teal); }
.footer__socials { display: flex; gap: 1rem; justify-content: center; margin-bottom: 1.4rem; }
.footer__socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--plum); box-shadow: var(--shadow); transition: transform .3s, background .3s, color .3s; }
.footer__socials a:hover { transform: translateY(-3px); background: var(--plum); color: #fff; }
.footer__socials svg { width: 18px; height: 18px; }
.footer__credit { font-family: var(--sans); letter-spacing: .16em; text-transform: uppercase; font-size: .68rem; color: var(--muted); margin-top: 1rem; }

/* =========================================================
   MUSIC toggle
   ========================================================= */
.music {
  position: fixed; bottom: 22px; right: 22px; z-index: 95;
  width: 52px; height: 52px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--teal), var(--plum)); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.music svg { width: 22px; height: 22px; fill: currentColor; }
.music__ring { position: absolute; inset: -4px; border: 2px solid rgba(157,127,166,.5); border-radius: 50%; opacity: 0; }
.music.is-playing .music__ring { animation: pulse 1.8s infinite; }
.music.is-playing svg { animation: spin 4s linear infinite; }
@keyframes pulse { 0% { opacity: .6; transform: scale(1); } 100% { opacity: 0; transform: scale(1.4); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   LIGHTBOX
   ========================================================= */
.lightbox { position: fixed; inset: 0; z-index: 1100; background: rgba(40,34,48,.94); display: none; align-items: center; justify-content: center; }
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 88vw; max-height: 86vh; border-radius: 8px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox__close { position: absolute; top: 18px; right: 26px; background: none; border: none; color: #fff; font-size: 2.6rem; cursor: pointer; line-height: 1; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 1.6rem; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; transition: background .3s; }
.lightbox__nav:hover { background: rgba(255,255,255,.28); }
.lightbox__prev { left: 20px; }
.lightbox__next { right: 20px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 780px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 100%; right: 5%; left: 5%;
    flex-direction: column; gap: 0; text-align: center;
    background: rgba(250,247,245,.98); backdrop-filter: blur(10px);
    border-radius: 16px; padding: .6rem; box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; opacity: 0; transition: max-height .4s var(--ease), opacity .3s, padding .3s;
  }
  .nav__menu.is-open { max-height: 420px; opacity: 1; padding: 1rem .6rem; }
  .nav__menu a { color: var(--ink); padding: .8rem; }

  .timeline::before { left: 18px; }
  .timeline__item { width: 100%; left: 0 !important; text-align: left !important; padding: 0 0 2.4rem 3rem; }
  .timeline__item .timeline__dot { left: 10px !important; right: auto !important; }

  .field--row { grid-template-columns: 1fr; }
  .gallery__grid { columns: 2 140px; }
  .quote { background-attachment: scroll; }
}
@media (max-width: 420px) {
  .countdown__unit { min-width: 58px; }
  .gallery__grid { columns: 2 120px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .music.is-playing svg { animation: none; }
}
