@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --emerald-950: #061c16;
  --emerald-900: #09261e;
  --emerald-800: #0f372c;
  --emerald-700: #16483a;
  --gold: #e7c77a;
  --gold-soft: #fff0bd;
  --ivory: #fff8ec;
  --nav-height: 92px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
  background: #020c09;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
  color: var(--ivory);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

body.opened .site {
  opacity: 1;
  visibility: visible;
}

/* ================================
   OPENING SCREEN
================================ */
.opening-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--emerald-950);
  transition: opacity 900ms ease, visibility 900ms ease;
}

.opening-screen.hide {
  opacity: 0;
  visibility: hidden;
}

.opening-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(5, 23, 17, 0.62), rgba(5, 23, 17, 0.86)),
    url('assets/images/magica-wide.jpg') center / cover;
  filter: blur(6px) scale(1.06) saturate(1.04);
}

.opening-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 245, 210, 0.26), transparent 28%),
    radial-gradient(circle at 50% 54%, rgba(231, 199, 122, 0.18), transparent 32%),
    linear-gradient(180deg, rgba(255,255,255,0.08), transparent 22%, rgba(0,0,0,0.18));
  pointer-events: none;
}

.opening-sparkles,
.main-sparkles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.sparkle {
  position: absolute;
  width: var(--s);
  height: var(--s);
  left: var(--x);
  top: var(--y);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.96), rgba(231,199,122,0.35) 52%, transparent 72%);
  box-shadow: 0 0 16px rgba(255,255,255,0.35);
  animation: twinkle var(--d) ease-in-out infinite alternate;
}

@keyframes twinkle {
  from {
    opacity: 0.22;
    transform: scale(0.72);
  }
  to {
    opacity: 0.95;
    transform: scale(1.24);
  }
}

.door-wrap {
  position: relative;
  z-index: 3;
  width: min(86vw, 360px);
  height: min(70vh, 560px);
  max-height: 580px;
  perspective: 1600px;
  transform-style: preserve-3d;
}

.luxury-door {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    linear-gradient(145deg, #174b3a, #09281f 58%, #1b513f);
  border: 1px solid rgba(255,255,255,0.22);
  box-shadow:
    inset 0 0 0 1px rgba(231,199,122,0.18),
    inset 0 0 80px rgba(255,255,255,0.05),
    0 35px 90px rgba(0,0,0,0.38);
  transition:
    transform 1500ms cubic-bezier(.16,.84,.22,1),
    filter 1500ms ease;
}

.luxury-door::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(231,199,122,0.30);
  border-radius: 18px;
}

.luxury-door::after {
  content: "";
  position: absolute;
  inset: 38px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
}

.door-glass {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,0.16), transparent 30%),
    linear-gradient(110deg, transparent 35%, rgba(255,255,255,0.10), transparent 55%);
  opacity: 0.9;
}

.door-left {
  left: 0;
  border-radius: 28px 0 0 28px;
  transform-origin: left center;
}

.door-right {
  right: 0;
  border-radius: 0 28px 28px 0;
  transform-origin: right center;
}

.seal {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 126px;
  height: 126px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.42), transparent 22%),
    linear-gradient(145deg, #f0d28c, #a5732a 70%);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow:
    0 22px 56px rgba(0,0,0,0.35),
    inset 0 0 0 2px rgba(255,255,255,0.16);
  transition:
    opacity 850ms ease,
    transform 850ms ease;
}

.seal span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3.9rem;
  line-height: 1;
  color: #fff9ec;
  text-shadow: 0 4px 12px rgba(0,0,0,0.22);
}

.opening-screen.opening .door-left {
  transform: rotateY(-105deg) translateX(-10px);
  filter: brightness(1.08);
}

.opening-screen.opening .door-right {
  transform: rotateY(105deg) translateX(10px);
  filter: brightness(1.08);
}

.opening-screen.opening .seal {
  opacity: 0;
  transform: translate(-50%, -54%) scale(0.65);
}

.open-btn {
  position: absolute;
  z-index: 4;
  bottom: max(52px, calc(46px + var(--safe-bottom)));
  left: 50%;
  transform: translateX(-50%);
  min-width: min(72vw, 290px);
  min-height: 58px;
  border-radius: 999px;
  border: 1px solid rgba(231,199,122,0.52);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.03)),
    rgba(7, 30, 23, 0.62);
  color: var(--ivory);
  letter-spacing: 0.22em;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow:
    0 20px 50px rgba(0,0,0,0.30),
    inset 0 1px 0 rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  cursor: pointer;
  overflow: hidden;
}

.open-btn::after,
.hero-card::after {
  content: "";
  position: absolute;
  inset: -120% auto -120% -45%;
  width: 38%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.45), transparent);
  transform: rotate(16deg);
  animation: sweep 4s ease-in-out infinite;
}

@keyframes sweep {
  0%, 46% { left: -45%; }
  86%, 100% { left: 124%; }
}

/* ================================
   MAIN SITE
================================ */
.site {
  position: relative;
  width: min(100%, 460px);
  min-height: 100vh;
  margin: 0 auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 900ms ease 350ms, visibility 900ms ease 350ms;
  overflow: hidden;
  background: #061c16;
  box-shadow: 0 0 80px rgba(0,0,0,0.18);
}

.main-bg {
  position: fixed;
  inset: 0;
  left: 50%;
  width: min(100%, 460px);
  transform: translateX(-50%);
  background:
    linear-gradient(rgba(5, 20, 15, 0.38), rgba(5, 20, 15, 0.72)),
    url('assets/images/magica-stage.jpg') center / cover;
  filter: saturate(1.05) contrast(1.04);
  z-index: 0;
}

.main-overlay {
  position: fixed;
  inset: 0;
  left: 50%;
  width: min(100%, 460px);
  transform: translateX(-50%);
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 4%, rgba(255,248,225,0.28), transparent 24%),
    radial-gradient(circle at 50% 56%, rgba(0,0,0,0.20), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 26%, rgba(0,0,0,0.24) 100%);
}

.main-sparkles {
  position: fixed;
  left: 50%;
  width: min(100%, 460px);
  transform: translateX(-50%);
  z-index: 2;
}

.music-btn {
  position: fixed;
  z-index: 20;
  top: 16px;
  left: calc(50% - min(50vw, 230px) + 16px);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(8, 37, 29, 0.72);
  color: var(--gold);
  backdrop-filter: blur(12px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.18);
}

.hero {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 74px 22px calc(var(--nav-height) + 38px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  min-height: 74vh;
  border-radius: 34px;
  padding: 38px 22px 30px;
  display: grid;
  align-content: center;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(12, 54, 45, 0.82), rgba(5, 41, 35, 0.82)),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.22), transparent 26%);
  border: 1px solid rgba(255,255,255,0.26);
  backdrop-filter: blur(18px);
  box-shadow:
    0 34px 110px rgba(0,0,0,0.42),
    inset 0 0 0 1px rgba(231,199,122,0.16);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 26px;
  border: 1px solid rgba(231,199,122,0.26);
  pointer-events: none;
}

.monogram {
  width: 86px;
  height: 86px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255,255,255,0.30), transparent 22%),
    linear-gradient(145deg, #f0d28c, #a5732a 70%);
  box-shadow: 0 18px 38px rgba(0,0,0,0.26);
}

.monogram span {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.8rem;
  color: var(--ivory);
}

.kicker {
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.76);
  margin-bottom: 14px;
}

.hero-card h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3.3rem, 14vw, 5.1rem);
  line-height: 0.88;
  font-weight: 600;
  color: var(--gold-soft);
  text-shadow:
    0 8px 22px rgba(0,0,0,0.28),
    0 0 18px rgba(231,199,122,0.08);
}

.hero-card h1 span,
.hero-card h1 em {
  display: block;
}

.hero-card h1 em {
  font-style: normal;
  font-size: 0.45em;
  color: var(--ivory);
  margin: 8px 0;
}

.date-line {
  margin-top: 22px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  line-height: 1.45;
  color: rgba(255,250,240,0.92);
}

.divider {
  width: 82%;
  height: 22px;
  margin: 26px auto 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(90deg, transparent, rgba(231,199,122,0.82), transparent) center / 100% 1px no-repeat;
}

.divider span {
  width: 12px;
  height: 12px;
  background: var(--gold);
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(231,199,122,0.40);
}

.tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem;
  font-style: italic;
  color: rgba(255,250,240,0.92);
}

.hashtag {
  margin-top: 6px;
  color: rgba(255,255,255,0.82);
  font-size: 0.95rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 30px;
}

.info-box {
  min-height: 116px;
  padding: 16px 12px;
  border-radius: 18px;
  display: grid;
  align-content: center;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: inset 0 0 0 1px rgba(231,199,122,0.08);
}

.info-box small {
  color: var(--gold);
  font-size: 0.68rem;
  letter-spacing: 0.20em;
}

.info-box strong {
  color: var(--ivory);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  line-height: 1.3;
}

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(100%, 460px);
  min-height: var(--nav-height);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 10px 4px calc(10px + env(safe-area-inset-bottom, 0px));
  background:
    linear-gradient(180deg, rgba(4, 44, 39, 0.92), rgba(2, 32, 28, 0.96));
  border-top: 1px solid rgba(231,199,122,0.22);
  backdrop-filter: blur(18px);
  box-shadow: 0 -20px 55px rgba(0,0,0,0.32);
}

.bottom-nav a {
  display: grid;
  place-items: center;
  gap: 5px;
  color: rgba(255,250,240,0.92);
}

.bottom-nav span {
  color: var(--gold);
  font-size: 1.45rem;
  line-height: 1;
}

.bottom-nav b {
  font-size: 0.76rem;
  font-weight: 500;
}

/* responsive */
@media (max-width: 380px) {
  .door-wrap {
    width: 84vw;
    height: min(66vh, 520px);
  }

  .seal {
    width: 110px;
    height: 110px;
  }

  .seal span {
    font-size: 3.4rem;
  }

  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-card {
    padding-left: 18px;
    padding-right: 18px;
  }

  .info-grid {
    gap: 10px;
  }

  .info-box strong {
    font-size: 1rem;
  }
}


/* ================================
   SCROLL SECTIONS
================================ */
.content-section {
  position: relative;
  z-index: 3;
  padding: 26px 22px;
}

.content-section[data-feature="false"] {
  display: none !important;
}

.luxury-panel,
.details-grid article,
.wish-card {
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(12, 54, 45, 0.78), rgba(5, 41, 35, 0.76)),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.12), transparent 32%);
  border: 1px solid rgba(255,255,255,0.20);
  backdrop-filter: blur(16px);
  box-shadow:
    0 28px 80px rgba(0,0,0,0.30),
    inset 0 0 0 1px rgba(231,199,122,0.12);
}

.luxury-panel {
  padding: 28px 22px;
  text-align: center;
}

.arabic {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  margin-bottom: 20px;
  color: rgba(255,250,240,0.94);
}

.intro-text {
  line-height: 1.8;
  color: rgba(255,250,240,0.90);
}

.parents-line {
  margin-top: 18px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  color: var(--gold-soft);
  line-height: 1.3;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 18px;
}

.section-title-wrap p {
  color: rgba(255,255,255,0.70);
  letter-spacing: 0.24em;
  font-size: 0.72rem;
}

.section-title-wrap h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.25rem;
  color: var(--gold-soft);
  margin-top: 6px;
  line-height: 1;
}

.details-grid {
  display: grid;
  gap: 14px;
}

.details-grid article {
  padding: 18px 16px;
}

.details-grid small {
  display: block;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
  margin-bottom: 8px;
}

.details-grid strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--ivory);
}

.details-grid span {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,0.74);
  line-height: 1.5;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.countdown-grid div {
  min-height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.countdown-grid strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.35rem;
  line-height: 1;
  color: var(--gold-soft);
}

.countdown-grid span {
  margin-top: 6px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.72);
}

.gallery-preview {
  border-radius: 28px;
  padding: 10px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 28px 80px rgba(0,0,0,0.30);
}

.gallery-preview img {
  width: 100%;
  border-radius: 22px;
  display: block;
}

.wishes-list {
  display: grid;
  gap: 14px;
}

.wish-card {
  padding: 18px 16px;
  text-align: center;
}

.wish-card p {
  color: rgba(255,250,240,0.92);
  line-height: 1.65;
  font-style: italic;
}

.wish-card strong {
  display: block;
  margin-top: 10px;
  color: var(--gold-soft);
}

.closing-section {
  padding-bottom: calc(var(--nav-height) + 34px);
}

.closing-panel h2 {
  margin-top: 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.7rem;
  color: var(--gold-soft);
}

.closing-panel p {
  line-height: 1.8;
  color: rgba(255,250,240,0.90);
}


/* =========================================================
   REQUIRED FUNCTION FIXES
   - optional couple preview
   - optional one-pair parents
   - optional sections
   - scroll sections
========================================================= */

[data-feature="false"] {
  display: none !important;
}

.content-section {
  position: relative;
  z-index: 3;
  padding: 26px 22px;
}

.couple-preview {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 120px));
  justify-content: center;
  gap: 18px;
  margin: 18px auto 8px;
}

.portrait-mini {
  text-align: center;
}

.portrait-frame {
  width: 116px;
  height: 132px;
  margin: 0 auto 10px;
  padding: 6px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.18), rgba(255,255,255,0.07)),
    rgba(8, 37, 29, 0.62);
  border: 1px solid rgba(231,199,122,0.38);
  box-shadow:
    0 16px 36px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 16px;
  object-fit: cover;
}

.portrait-mini strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--gold-soft);
}

.luxury-panel,
.details-grid article,
.wish-card {
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(12, 54, 45, 0.78), rgba(5, 41, 35, 0.76)),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.12), transparent 32%);
  border: 1px solid rgba(255,255,255,0.20);
  backdrop-filter: blur(16px);
  box-shadow:
    0 28px 80px rgba(0,0,0,0.30),
    inset 0 0 0 1px rgba(231,199,122,0.12);
}

.luxury-panel {
  padding: 28px 22px;
  text-align: center;
}

.arabic {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  margin-bottom: 20px;
  color: rgba(255,250,240,0.94);
}

.intro-text {
  line-height: 1.8;
  color: rgba(255,250,240,0.90);
}

.section-label,
.section-title-wrap p {
  color: rgba(255,255,255,0.70);
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  margin-bottom: 12px;
}

.parents-copy {
  color: rgba(255,250,240,0.90);
  line-height: 1.8;
}

.parents-line {
  margin-top: 18px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: var(--gold-soft);
  line-height: 1.3;
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 18px;
}

.section-title-wrap h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.25rem;
  color: var(--gold-soft);
  margin-top: 6px;
  line-height: 1;
}

.details-grid {
  display: grid;
  gap: 14px;
}

.details-grid article {
  padding: 18px 16px;
}

.details-grid small {
  display: block;
  color: var(--gold);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
  margin-bottom: 8px;
}

.details-grid strong {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  line-height: 1.15;
  color: var(--ivory);
}

.details-grid span {
  display: block;
  margin-top: 8px;
  color: rgba(255,255,255,0.74);
  line-height: 1.5;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.countdown-grid div {
  min-height: 88px;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 18px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.countdown-grid strong {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.35rem;
  line-height: 1;
  color: var(--gold-soft);
}

.countdown-grid span {
  margin-top: 6px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.72);
}

.gallery-preview {
  border-radius: 28px;
  padding: 10px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 28px 80px rgba(0,0,0,0.30);
}

.gallery-preview img {
  width: 100%;
  border-radius: 22px;
  display: block;
}

.wishes-list {
  display: grid;
  gap: 14px;
}

.wish-card {
  padding: 18px 16px;
  text-align: center;
}

.wish-card p {
  color: rgba(255,250,240,0.92);
  line-height: 1.65;
  font-style: italic;
}

.wish-card strong {
  display: block;
  margin-top: 10px;
  color: var(--gold-soft);
}

.closing-section {
  padding-bottom: calc(var(--nav-height) + 34px);
}

.closing-panel h2 {
  margin-top: 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.7rem;
  color: var(--gold-soft);
}

.closing-panel p {
  line-height: 1.8;
  color: rgba(255,250,240,0.90);
}

@media (max-width: 380px) {
  .couple-preview {
    grid-template-columns: repeat(2, minmax(0, 104px));
    gap: 12px;
  }

  .portrait-frame {
    width: 104px;
    height: 118px;
  }
}


/* =========================================================
   FLOW FIX: groom/bride after parents + smoother scroll
========================================================= */

[data-feature="false"] {
  display: none !important;
}

.couple-section {
  padding-top: 18px;
}

.couple-showcase {
  position: relative;
  min-height: 540px;
  display: grid;
  gap: 34px;
  padding: 10px 0 26px;
}

.couple-profile {
  position: relative;
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 18px;
  align-items: center;
}

.couple-profile.bride-profile {
  grid-template-columns: 1fr 128px;
}

.couple-profile.bride-profile h3 {
  text-align: right;
}

.portrait-frame.large {
  width: 128px;
  height: 148px;
  padding: 7px;
  border-radius: 14px;
  transform: rotate(-6deg);
  background:
    linear-gradient(145deg, rgba(231,199,122,0.46), rgba(255,255,255,0.12)),
    rgba(8, 37, 29, 0.70);
  border: 6px ridge rgba(231,199,122,0.70);
  box-shadow:
    0 18px 42px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.10);
}

.bride-profile .portrait-frame.large {
  transform: rotate(6deg);
}

.portrait-frame.large img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 8px;
  object-fit: cover;
}

.couple-profile h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.15rem;
  font-weight: 500;
  color: var(--ivory);
  line-height: 1.18;
  text-shadow:
    0 8px 20px rgba(0,0,0,0.35),
    0 0 14px rgba(231,199,122,0.10);
}

.groom-profile {
  margin-top: 10px;
}

.bride-profile {
  margin-top: 18px;
}

@media (max-width: 380px) {
  .couple-showcase {
    min-height: 500px;
  }

  .couple-profile {
    grid-template-columns: 112px 1fr;
    gap: 14px;
  }

  .couple-profile.bride-profile {
    grid-template-columns: 1fr 112px;
  }

  .portrait-frame.large {
    width: 112px;
    height: 130px;
  }

  .couple-profile h3 {
    font-size: 1.85rem;
  }
}


/* =========================================================
   PERFORMANCE OPTIMIZATION
   Reduce GPU-heavy blur/filter/particle cost
========================================================= */

.opening-bg {
  filter: brightness(0.82) saturate(1.02) !important;
  transform: none !important;
}

.main-bg {
  filter: brightness(0.78) saturate(1.02) contrast(1.02) !important;
}

.opening-screen.hide {
  pointer-events: none;
}

/* Less expensive sparkles */
.sparkle {
  box-shadow: 0 0 6px rgba(255,255,255,0.22) !important;
  will-change: opacity, transform;
}

/* Reduce expensive blur on panels */
.hero-card,
.luxury-panel,
.details-grid article,
.wish-card,
.bottom-nav {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Reduce huge shadows slightly */
.hero-card,
.luxury-panel,
.details-grid article,
.wish-card,
.gallery-preview {
  box-shadow:
    0 18px 46px rgba(0,0,0,0.24),
    inset 0 0 0 1px rgba(231,199,122,0.10) !important;
}

/* Smooth rendering hints */
.site,
.opening-screen {
  contain: paint;
}

@media (prefers-reduced-motion: reduce) {
  .sparkle {
    animation: none !important;
  }
}


/* =========================================================
   POLISHED FIX
   - slower auto-scroll default
   - prettier background without heavy GPU blur
   - bottom nav fixed properly
========================================================= */

/* Remove earlier optimization that can cause fixed nav to behave like normal content */
.site,
.opening-screen {
  contain: none !important;
}

/* Restore richer background mood without heavy blur */
.opening-bg {
  background:
    linear-gradient(rgba(5, 23, 17, 0.54), rgba(5, 23, 17, 0.78)),
    radial-gradient(circle at 50% 12%, rgba(255, 245, 210, 0.18), transparent 32%),
    url('assets/images/magica-wide.jpg') center / cover !important;
  filter: saturate(1.06) brightness(0.86) !important;
  transform: none !important;
}

.main-bg {
  background:
    linear-gradient(rgba(5, 20, 15, 0.32), rgba(5, 20, 15, 0.64)),
    radial-gradient(circle at 50% 14%, rgba(255, 248, 225, 0.14), transparent 30%),
    url('assets/images/magica-stage.jpg') center / cover !important;
  filter: saturate(1.08) contrast(1.04) brightness(0.86) !important;
  transform: translateX(-50%) !important;
}

.main-overlay {
  background:
    radial-gradient(circle at 50% 4%, rgba(255,248,225,0.26), transparent 24%),
    radial-gradient(circle at 50% 56%, rgba(0,0,0,0.18), transparent 42%),
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 28%, rgba(0,0,0,0.22) 100%) !important;
}

/* Keep glass feel but lighter than heavy backdrop-filter */
.hero-card,
.luxury-panel,
.details-grid article,
.wish-card {
  background:
    linear-gradient(180deg, rgba(12, 54, 45, 0.74), rgba(5, 41, 35, 0.72)),
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.16), transparent 32%) !important;
}

/* Force bottom nav to stay fixed at viewport bottom */
.bottom-nav {
  position: fixed !important;
  left: 50% !important;
  right: auto !important;
  bottom: 0 !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  width: min(100%, 460px) !important;
  z-index: 999 !important;
  margin: 0 !important;
}

/* Give enough bottom space so content does not hide behind fixed nav */
.site {
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 24px) !important;
}

/* Closing section no need excessive padding now because .site handles it */
.closing-section {
  padding-bottom: 34px !important;
}


/* ==================================================
   FINAL FIX
   - typography back to elegant wedding look
   - background slightly blurred for readability
   - popup modals for contact/calendar/rsvp/location
   - 4-item fixed bottom nav
================================================== */

#heroNames,
.couple-profile h3,
.seal span,
.monogram,
.parents-line,
.closing-panel h2 {
  font-family: 'Cormorant Garamond', serif !important;
}

.kicker,
.section-label,
.section-title-wrap p,
.info-box small,
.details-grid small,
.date-line,
.tagline,
.hashtag,
body,
button,
input,
select,
textarea {
  font-family: 'Inter', sans-serif !important;
}

#heroNames {
  font-size: clamp(2.55rem, 7.1vw, 4.2rem) !important;
  line-height: 0.98 !important;
  font-weight: 600 !important;
  letter-spacing: -0.03em !important;
  text-align: center;
}

#heroNames em {
  display: block;
  margin: 8px 0 10px;
  font-style: normal;
  font-size: 0.72em;
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 500;
}

.hero-card {
  background:
    linear-gradient(180deg, rgba(5, 55, 45, 0.78), rgba(3, 35, 29, 0.74)) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Blur background main page */
.main-bg {
  filter: blur(1px) saturate(1.03) contrast(1.03) brightness(0.73) !important;
  transform: translateX(-50%) scale(1.025) !important;
}

.main-overlay {
  background:
    linear-gradient(180deg, rgba(3,17,13,0.26), rgba(3,17,13,0.60)),
    radial-gradient(circle at 50% 10%, rgba(255,248,225,0.08), transparent 28%),
    radial-gradient(circle at 50% 55%, rgba(0,0,0,0.18), transparent 42%) !important;
}

.bottom-nav {
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 0 !important;
  padding-inline: 8px;
}

.bottom-nav a,
.bottom-nav button.nav-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  min-height: 84px;
  display: grid;
  place-items: center;
  gap: 2px;
  cursor: pointer;
}

.bottom-nav b {
  font-size: 0.88rem;
}

.modal-layer[hidden] {
  display: none !important;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 10, 8, 0.58);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-card {
  position: relative;
  z-index: 2;
  width: min(100%, 380px);
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, rgba(10, 55, 45, 0.92), rgba(4, 32, 26, 0.92));
  box-shadow:
    0 30px 70px rgba(0,0,0,0.32),
    inset 0 1px 0 rgba(255,255,255,0.10);
  padding: 26px 22px 22px;
  color: var(--ivory);
}

.modal-card[hidden] {
  display: none !important;
}

.modal-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  line-height: 1.02;
  margin-bottom: 10px;
  font-weight: 600;
}

.modal-kicker {
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255,248,236,0.84);
  margin-bottom: 10px;
}

.modal-copy {
  color: rgba(255,248,236,0.84);
  line-height: 1.55;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: rgba(255,248,236,0.8);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.modal-actions.stacked {
  grid-template-columns: 1fr;
}

.modal-action-btn {
  appearance: none;
  min-height: 50px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0 16px;
  border: 1px solid rgba(231,199,122,0.56);
  background:
    linear-gradient(180deg, rgba(231,199,122,0.16), rgba(231,199,122,0.06)),
    rgba(8, 31, 24, 0.75);
  color: var(--ivory);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}

.modal-action-btn.secondary {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.rsvp-form {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}

.rsvp-form label {
  display: grid;
  gap: 8px;
}

.rsvp-form label span {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255,248,236,0.94);
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.07);
  color: var(--ivory);
  padding: 14px 16px;
  outline: none;
  font: inherit;
}

.rsvp-form select option {
  color: #111;
}

.rsvp-form input::placeholder,
.rsvp-form textarea::placeholder {
  color: rgba(255,255,255,0.48);
}

.rsvp-form input:focus,
.rsvp-form select:focus,
.rsvp-form textarea:focus {
  border-color: rgba(231,199,122,0.74);
  box-shadow: 0 0 0 3px rgba(231,199,122,0.12);
}

body.modal-open {
  overflow: hidden;
}

/* Ensure main content is not hidden behind fixed nav */
.closing-section {
  padding-bottom: calc(28px + var(--nav-height)) !important;
}


/* Intro & parents text format refinement */
.intro-panel {
  padding-top: 30px;
  padding-bottom: 26px;
}

.intro-line {
  margin: 0;
  line-height: 1.5;
  color: rgba(255,250,240,0.94);
  font-size: 1.02rem;
  font-weight: 500;
}

.intro-line + .intro-line {
  margin-top: 2px;
}

.parent-panel {
  text-align: center;
}

.parent-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.85rem;
  line-height: 1.25;
  color: var(--gold-soft);
  font-weight: 600;
  margin: 0;
}

.parent-and {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  color: var(--ivory);
  margin: 10px 0;
}

.parents-invite-block {
  margin-top: 22px;
}

.parents-invite-line {
  margin: 0;
  color: rgba(255,250,240,0.92);
  line-height: 1.55;
  font-size: 1rem;
}

.parents-invite-line + .parents-invite-line {
  margin-top: 2px;
}

.parents-invite-line.emphasis {
  font-weight: 500;
}

.couple-section .section-title-wrap {
  margin-top: 2px;
}


/* ==================================================
   V6 SMALL BOTTOM NAV
   Compact premium bottom bar
================================================== */

:root {
  --nav-height: 68px;
}

.bottom-nav {
  min-height: var(--nav-height) !important;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px)) !important;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)) !important;
  grid-template-columns: repeat(4, 1fr) !important;
  align-items: center !important;
  background:
    linear-gradient(180deg, rgba(4, 44, 39, 0.94), rgba(2, 31, 27, 0.98)) !important;
  border-top: 1px solid rgba(231,199,122,0.18) !important;
}

.bottom-nav a,
.bottom-nav button.nav-btn {
  min-height: 54px !important;
  height: 54px !important;
  padding: 3px 2px !important;
  gap: 3px !important;
  display: grid !important;
  place-items: center !important;
  align-content: center !important;
}

.bottom-nav span,
.bottom-nav .nav-icon {
  font-size: 1.08rem !important;
  line-height: 1 !important;
  color: var(--gold) !important;
  display: block !important;
  height: 18px !important;
  overflow: hidden !important;
  font-family: "Times New Roman", serif !important;
}

.bottom-nav b {
  font-size: 0.72rem !important;
  line-height: 1.05 !important;
  font-weight: 600 !important;
  color: rgba(255,250,240,0.92) !important;
}

.site {
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px) + 12px) !important;
}

.closing-section {
  padding-bottom: calc(18px + var(--nav-height)) !important;
}

.modal-layer {
  padding-bottom: calc(var(--nav-height) + 20px) !important;
}

@media (max-width: 380px) {
  :root {
    --nav-height: 64px;
  }

  .bottom-nav a,
  .bottom-nav button.nav-btn {
    min-height: 50px !important;
    height: 50px !important;
  }

  .bottom-nav span,
  .bottom-nav .nav-icon {
    font-size: 1rem !important;
    height: 17px !important;
  }

  .bottom-nav b {
    font-size: 0.68rem !important;
  }
}


/* ==================================================
   V6.1 NAV ICON ONLY FIX
   Based on v6 clickable version.
   Does NOT touch opening door/button/script.
================================================== */

.bottom-nav .nav-icon-text {
  color: var(--gold) !important;
  font-family: "Times New Roman", Georgia, serif !important;
  font-size: 1.08rem !important;
  line-height: 1 !important;
  display: block !important;
  height: 18px !important;
  overflow: visible !important;
  text-align: center !important;
}

/* Force phone icon to render as text style, not red emoji */
.bottom-nav .nav-icon-text:first-child {
  font-variant-emoji: text;
}

.bottom-nav b {
  margin-top: 2px !important;
}

@media (max-width: 380px) {
  .bottom-nav .nav-icon-text {
    font-size: 1rem !important;
    height: 17px !important;
  }
}


/* ==================================================
   V6.6 DATE / VENUE CENTER FIX
================================================== */

.date-line {
  display: grid !important;
  gap: 4px !important;
  text-align: center !important;
  justify-items: center !important;
  line-height: 1.35 !important;
}

.date-line span {
  display: block !important;
}

.date-line span:first-child {
  white-space: nowrap;
}

.date-line span:last-child {
  max-width: 92%;
}


/* ==================================================
   V6.7 MOBILE DATE 2-LINE FORCE
   Force wedding date and venue to stay as two lines on mobile.
================================================== */

#heroDateLine.date-line,
.date-line {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  gap: 4px !important;
  white-space: normal !important;
  line-height: 1.35 !important;
}

#heroDateLine.date-line span,
.date-line span,
.date-line-date,
.date-line-venue {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

.date-line-date {
  white-space: nowrap !important;
}

.date-line-venue {
  white-space: normal !important;
  max-width: 92% !important;
  margin-inline: auto !important;
}

@media (max-width: 600px) {
  #heroDateLine.date-line,
  .date-line {
    display: flex !important;
    flex-direction: column !important;
  }

  #heroDateLine.date-line::before,
  #heroDateLine.date-line::after {
    display: none !important;
  }
}


/* ==================================================
   V6.8 BUTTON ACTIONS FIX
   Google Calendar / Maps / Waze are now buttons,
   not anchor tags, to avoid new-tab behavior.
================================================== */

button.modal-action-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  font: inherit !important;
  cursor: pointer !important;
}


/* ==================================================
   V6.9 ALL EXTERNAL ACTIONS AS BUTTONS
================================================== */

button.modal-action-btn {
  appearance: none !important;
  -webkit-appearance: none !important;
  font: inherit !important;
  cursor: pointer !important;
}

button.modal-action-btn[hidden] {
  display: none !important;
}


/* ==================================================
   CLOSING TITLE UPDATE
   Only closing section spacing/title refinement.
================================================== */

.closing-panel .section-title-wrap {
  margin-bottom: 18px !important;
}

.closing-panel .section-title-wrap h2 {
  font-size: 2.1rem !important;
  line-height: 1.1 !important;
}

.closing-panel p {
  line-height: 1.75 !important;
}

.closing-panel p + p {
  margin-top: 18px !important;
}
