/* =========================================================
   Muhammed Faseeen & Shaima — Wedding Invitation
   Cream / gold / terracotta luxury theme
   ========================================================= */

:root {
  --cream: #f7f0e6;
  --cream-deep: #efe4d3;
  --card: #fffdf9;
  --ink: #322c26;
  --ink-soft: #6f6558;
  --gold: #b8923f;
  --gold-soft: #cfa54c;
  --gold-line: #d8c39a;
  --terracotta: #bd8574;
  --blush: #e7c9c2;

  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Tangerine', cursive;
  --label: 'Marcellus', Georgia, serif;

  --max-w: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--serif);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
video {
  max-width: 100%;
  display: block;
}

/* ---------------- ambient particle canvas ---------------- */
#particles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ============================================================
   ENVELOPE INTRO GATE
   ============================================================ */
.envelope-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #1c1712;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 1.2s ease, visibility 1.2s ease;
}

.envelope-gate.is-open {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.envelope-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition: opacity 0.4s ease;
}

.envelope-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 6, .2) 0%, rgba(10, 8, 6, .05) 50%, rgba(10, 8, 6, .45) 100%);
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.envelope-gate.video-playing::after {
  opacity: 0.2;
}

.envelope-hint {
  position: absolute;
  bottom: 42px;
  z-index: 10;
  font-family: var(--label);
  font-size: 0.76rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(246, 234, 210, 0.85);
  background: rgba(28, 23, 18, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid rgba(216, 195, 154, 0.3);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
  animation: pulse-hint 2.5s ease-in-out infinite;
}

.envelope-gate.video-playing .envelope-hint {
  opacity: 0;
  transform: translateY(10px);
}

@keyframes pulse-hint {

  0%,
  100% {
    opacity: 0.5;
    transform: translateY(0);
  }

  50% {
    opacity: 0.95;
    transform: translateY(-4px);
  }
}

/* ============================================================
   SHARED / TYPOGRAPHY
   ============================================================ */
.eyebrow {
  font-family: var(--label);
  font-size: .74rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 14px;
}

.site {
  position: relative;
  z-index: 2;
}

section {
  position: relative;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 110px 24px;
  text-align: center;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100svh;
  width: 100%;
  max-width: 100% !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  overflow: hidden;
}

.hero-responsive-pic {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 100svh;
  max-width: 100%;
  margin: 0;
}

.hero-responsive-img {
  width: 100%;
  height: 100%;
  min-height: 100svh;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

.hero-frame {
  position: relative;
  width: 100%;
  max-width: 840px;
  background: rgba(255, 253, 249, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(216, 195, 154, 0.7);
  border-radius: 28px;
  padding: 60px 36px 54px;
  box-shadow: 0 25px 60px -20px rgba(110, 85, 40, 0.18),
    inset 0 0 0 8px rgba(255, 253, 249, 0.9),
    inset 0 0 0 9px rgba(216, 195, 154, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}

.hero-monogram {
  width: 76px;
  height: 76px;
  color: var(--gold);
  margin-bottom: 22px;
  filter: drop-shadow(0 4px 12px rgba(184, 146, 63, 0.25));
}

.hero-names {
  margin: 12px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 24px;
  font-family: var(--script);
  font-weight: 400;
  font-size: clamp(3.4rem, 11vw, 6.6rem);
  color: var(--ink);
  line-height: 1.05;
  text-shadow: 0 2px 10px rgba(184, 146, 63, 0.1);
}

.hero-names .amp {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.42em;
  color: var(--gold);
}

.hero-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 140px;
  margin: 24px auto 20px;
  color: var(--gold-soft);
}

.hero-divider::before,
.hero-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-line), transparent);
}

.hero-divider .diamond {
  font-size: 0.65rem;
}

.hero-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 580px;
  margin: 0 0 32px;
  line-height: 1.6;
}

.hero-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(239, 228, 211, 0.8), rgba(247, 240, 230, 0.9));
  border: 1px solid var(--gold-line);
  padding: 12px 28px;
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--label);
  font-size: 0.86rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px -10px rgba(90, 70, 30, 0.25);
}

.hero-date-badge svg {
  width: 18px;
  height: 18px;
  color: var(--gold);
}

.scroll-cue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 48px;
  margin-top: 36px;
  border: 1px solid var(--gold-line);
  border-radius: 20px;
  background: rgba(255, 253, 249, 0.6);
  backdrop-filter: blur(4px);
  transition: border-color 0.3s ease;
}

.scroll-cue:hover {
  border-color: var(--gold);
}

.scroll-cue-line {
  width: 3px;
  height: 8px;
  border-radius: 3px;
  background: var(--gold);
  animation: scroll-cue-move 1.8s ease-in-out infinite;
}

@keyframes scroll-cue-move {
  0% {
    transform: translateY(0);
    opacity: 1;
  }

  70% {
    transform: translateY(14px);
    opacity: 0;
  }

  71% {
    transform: translateY(0);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================================
   COUNTDOWN SECTION (Before Footer)
   ============================================================ */
.countdown-section {
  padding: 60px 24px 70px;
}

.countdown-card {
  background: var(--card);
  border: 1px solid rgba(216, 195, 154, 0.65);
  border-radius: 24px;
  padding: 56px 28px 48px;
  box-shadow: 0 22px 50px -25px rgba(90, 70, 30, 0.25);
  max-width: 820px;
  margin: 0 auto;
}

.countdown {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}

.count-box {
  min-width: 90px;
  background: var(--card);
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  padding: 20px 14px 14px;
  box-shadow: 0 12px 30px -16px rgba(90, 70, 30, .4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.count-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px -16px rgba(90, 70, 30, .5);
}

.count-box span {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 2.2rem;
  color: var(--gold);
  line-height: 1;
}

.count-box small {
  display: block;
  margin-top: 8px;
  font-family: var(--label);
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ============================================================
   DETAILS
   ============================================================ */
.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin: 0;
  color: var(--ink);
}

.title-underline {
  width: 70px;
  height: 2px;
  background: var(--gold-soft);
  margin: 20px auto 60px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  text-align: center;
}

.card {
  background: var(--card);
  border-radius: 18px;
  padding: 46px 26px 40px;
  box-shadow: 0 20px 45px -30px rgba(90, 70, 30, .55);
  border: 1px solid rgba(216, 195, 154, .5);
  transition: transform .4s ease, box-shadow .4s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 50px -26px rgba(90, 70, 30, .6);
}

.card-icon {
  width: 34px;
  height: 34px;
  color: var(--gold);
  margin: 0 auto 16px;
}

.card-label {
  font-family: var(--label);
  font-size: .68rem;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 12px;
}

.card-main {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.25;
}

.card-sub {
  margin: 6px 0 0;
  font-family: var(--label);
  font-size: .9rem;
  color: var(--ink-soft);
}

.view-location-btn {
  display: inline-block;
  margin-top: 54px;
  font-family: var(--label);
  font-size: .76rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  padding: 16px 40px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  transition: background .35s ease, color .35s ease, transform .3s ease;
}

.view-location-btn:hover {
  background: var(--gold);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================================
   CLOSING
   ============================================================ */
.closing {
  padding-top: 40px;
  padding-bottom: 130px;
}

.seal {
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  color: var(--gold);
}

.closing-text {
  font-size: 1.25rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 0 10px;
}

.closing-names {
  font-family: var(--script);
  font-size: 2.4rem;
  color: var(--ink);
  margin: 0;
}

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .9s ease, transform .9s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   MUSIC TOGGLE
   ============================================================ */
.music-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--gold-line);
  background: var(--card);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 30px -14px rgba(90, 70, 30, .6);
}

.icon-note {
  width: 20px;
  height: 20px;
}

.music-bars {
  position: absolute;
  display: none;
  gap: 2px;
  align-items: flex-end;
  height: 14px;
}

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

.music-toggle.is-playing .music-bars {
  display: flex;
}

.music-bars i {
  width: 3px;
  background: var(--gold);
  border-radius: 2px;
  animation: bar-bounce 1s ease-in-out infinite;
}

.music-bars i:nth-child(1) {
  height: 6px;
  animation-delay: 0s;
}

.music-bars i:nth-child(2) {
  height: 14px;
  animation-delay: .18s;
}

.music-bars i:nth-child(3) {
  height: 9px;
  animation-delay: .34s;
}

@keyframes bar-bounce {

  0%,
  100% {
    transform: scaleY(.5);
  }

  50% {
    transform: scaleY(1);
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .cards {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }

  section {
    padding: 90px 22px;
  }
}

@media (max-width: 480px) {
  .hero-frame {
    padding: 42px 20px 38px;
    border-radius: 20px;
  }

  .hero-monogram {
    width: 62px;
    height: 62px;
    margin-bottom: 16px;
  }

  .hero-date-badge {
    padding: 10px 20px;
    font-size: 0.76rem;
  }

  .countdown-card {
    padding: 42px 18px 36px;
    border-radius: 18px;
  }

  .count-box {
    min-width: 70px;
    padding: 14px 8px 10px;
  }

  .count-box span {
    font-size: 1.6rem;
  }

  .music-toggle {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
  }
}

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .scroll-cue-line,
  .music-bars i {
    animation: none;
  }

  .card,
  .view-location-btn {
    transition: none;
  }
}