/* =========================================
   FONT DECLARATION — Tangier (Primary)
   ========================================= */
@font-face {
  font-family: "Tangier";
  src: url("assets/font/Tangier.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* =========================================
   CSS VARIABLES — Elegant Palette
   ========================================= */
:root {
  /* Brand Palette */
  --color-ash-grey:    #B6BBB5;
  --color-pale-peach:  #EEDAC9;
  --color-powder-blue: #B6C7DB;
  --color-dusty-blue:  #6E8FB3;
  --color-dusk-blue:   #365583;
  --color-baltic-blue: #3F618E;

  /* Semantic Roles (Minimal/White approach) */
  --color-primary:     var(--color-dusk-blue);
  --color-secondary:   var(--color-baltic-blue);
  --color-accent:      var(--color-dusty-blue);
  --color-background:  transparent;                     /* Clean white background */
  --color-surface:     rgba(255, 255, 255, 0.65);                     /* White cards */
  --color-surface-alt: rgba(255, 255, 255, 0.4);                     /* Very subtle off-white */
  --color-text:        var(--color-dusk-blue);
  
  /* Typography */
  --font-primary:   "Tangier", "Playfair Display", serif;
  --font-secondary: "Playfair Display", Georgia, serif;
  --font-utility:   "Inter", system-ui, sans-serif;

  /* Font Sizes */
  --text-landing-names: clamp(48px, 7vw, 110px);
  --text-hero-title:    clamp(36px, 7vw, 96px);

  /* Visual Effects */
  --shadow-soft: 0 10px 40px rgba(54, 85, 131, 0.08);
  --shadow-nav:  0 4px 20px rgba(54, 85, 131, 0.05);
}

/* =========================================
   BASE RESET
   ========================================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background: #e9eef2;
  color: var(--color-text);
  font-family: var(--font-secondary);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Headings use Tangier */
h1, h2, h3, .font-tangier {
  font-family: var(--font-primary);
  font-weight: normal;
}

/* =========================================
   LOADING SCREEN
   ========================================= */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #FAF6F1;
  overflow: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

/* Subtle elegant gradient background for loader */
#loading-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 10%, rgba(182,199,219,0.28) 0%, transparent 65%),
    radial-gradient(ellipse 55% 50% at 88% 85%, rgba(238,218,201,0.45) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 90%  5%, rgba(110,143,179,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(250,246,241,1)    0%, rgba(245,238,228,0.85) 100%);
  pointer-events: none;
}

.loading__monogram {
  width: clamp(180px, 25vw, 280px);
  height: auto;
  position: relative;
  z-index: 1;
  animation: monogramPulse 3s ease-in-out infinite;
}

@keyframes monogramPulse {
  0%, 100% { transform: scale(1);     opacity: 1; }
  50%       { transform: scale(1.05); opacity: 0.85; }
}

@keyframes floatPetal {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  20% { opacity: 0.8; }
  80% { opacity: 0.8; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}



/* Elegant loader animation below monogram */
.loading__spinner {
  margin-top: 2rem;
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1;
}

.loading__spinner::before,
.loading__spinner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.loading__spinner::before {
  border-top-color: var(--color-dusty-blue);
  border-bottom-color: var(--color-pale-peach);
  animation: spin 2s linear infinite;
}

.loading__spinner::after {
  border-left-color: var(--color-dusk-blue);
  border-right-color: var(--color-powder-blue);
  animation: spin 1.5s linear infinite reverse;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* =========================================
   LANDING PAGE
   ========================================= */
.landing {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FAF6F1;
}

/* Very subtle floral watermark background */
.landing__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 15% 10%, rgba(182,199,219,0.28) 0%, transparent 65%),
    radial-gradient(ellipse 55% 50% at 88% 85%, rgba(238,218,201,0.45) 0%, transparent 60%),
    radial-gradient(ellipse 60% 70% at 90%  5%, rgba(110,143,179,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(250,246,241,1)    0%, rgba(245,238,228,0.85) 100%);
  z-index: 0;
}

.landing__flower {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  opacity: 0.8;
}

.landing__flower--top-left {
  top: -20px;
  left: -20px;
  width: clamp(180px, 25vw, 360px);
}

.landing__flower--bottom-right {
  bottom: -20px;
  right: -20px;
  width: clamp(160px, 22vw, 300px);
}

.landing__content {
  position: relative;
  z-index: 10;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.landing__names {
  font-size: var(--text-landing-names);
  color: var(--color-dusk-blue);
  line-height: 0.9;
  margin: 1rem 0;
  display: flex;
  flex-direction: column;
}

.landing.is-leaving {
  pointer-events: none;
}

/* ─── Landing Divider (line–diamond–line) ─── */
.landing-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 240px;
  margin: 2rem 0;
}

.landing-divider__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-dusty-blue), transparent);
  opacity: 0.45;
}

.landing-divider__diamond {
  width: 6px;
  height: 6px;
  background: var(--color-dusty-blue);
  transform: rotate(45deg);
  opacity: 0.55;
}

/* Landing petals canvas — sits inside the landing at z-5 */
#landing-petals-canvas {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

/* Individual petal elements injected by JS */
.landing-petal {
  position: absolute;
  top: -40px;
  border-radius: 80% 20% 80% 20%;
  opacity: 0;
  animation: landingPetalFall linear infinite;
}

@keyframes landingPetalFall {
  0%   { transform: translateY(-40px) rotate(0deg) translateX(0px);    opacity: 0; }
  5%   { opacity: 0.55; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(110vh) rotate(720deg) translateX(60px);  opacity: 0; }
}

/* =========================================
   MAIN CONTENT & SMART NAVBAR
   ========================================= */
.main-content {
  opacity: 0;
  visibility: hidden;
  min-height: 100vh;
}

.main-content.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Navbar states */
#navbar {
  transition: background-color 0.4s ease, box-shadow 0.4s ease;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Transparent state (top of page) */
.navbar--transparent {
  background-color: transparent !important;
  box-shadow: none !important;
}
.navbar--transparent .nav-link,
.navbar--transparent .nav-brand {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.elegant-card {
  background: var(--color-surface);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Dresscode hover animation */
.dresscode-card {
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.5s ease;
}
.dresscode-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(54, 85, 131, 0.1);
}

.color-circle {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.color-circle:hover {
  transform: translateY(-6px) scale(1.15);
}
.navbar--transparent .nav-logo {
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

/* Scrolled state (sticky) */
.navbar--scrolled {
  background-color: var(--color-surface) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-nav) !important;
}
.navbar--scrolled .nav-link,
.navbar--scrolled .nav-brand {
  color: var(--color-dusty-blue) !important;
  text-shadow: none;
}
.navbar--scrolled .nav-countdown {
  color: var(--color-dusty-blue) !important;
  background-color: rgba(54, 85, 131, 0.05) !important;
  border-color: rgba(54, 85, 131, 0.2) !important;
  box-shadow: none !important;
}
.navbar--scrolled .nav-countdown-dot {
  background-color: var(--color-dusty-blue) !important;
}
.navbar--scrolled .nav-logo {
  filter: none;
}

#nav-countdown-wrapper {
  transition: opacity 0.4s ease;
}

/* Active Nav Link */
.nav-link {
  position: relative;
  transition: color 0.3s;
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--color-pale-peach);
  transition: width 0.3s ease;
}
.nav-link.active::after {
  width: 100%;
}
.navbar--transparent .nav-link.active::after {
  background-color: #ffffff;
}

.hero-gradient {
  background: linear-gradient(
    to bottom,
    rgba(233, 238, 242, 0) 0%,
    rgba(233, 238, 242, 0) 40%,
    rgba(233, 238, 242, 0.8) 80%,
    #e9eef2 100%
  );
}

@media (min-width: 768px) {
  .hero-gradient {
    background: linear-gradient(
      to bottom,
      rgba(233, 238, 242, 0) 0%,
      rgba(233, 238, 242, 0) 60%,
      rgba(233, 238, 242, 0.8) 85%,
      #e9eef2 100%
    );
  }
}

.hero-countdown {
  display: flex;
  gap: clamp(1rem, 3vw, 2.5rem);
  justify-content: center;
  margin-top: 2rem;
}

.hero-countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 1rem clamp(0.8rem, 2vw, 1.5rem);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  min-width: clamp(70px, 15vw, 100px);
}

.hero-countdown-unit--mobile {
  background: rgba(54, 85, 131, 0.07);
  border: 1px solid rgba(54, 85, 131, 0.15);
  backdrop-filter: none;
}

.hero-countdown-unit--dark {
  background: rgba(54, 85, 131, 0.12);
  border: 1px solid rgba(182, 199, 219, 0.3);
  backdrop-filter: blur(4px);
}

.countdown-val--mobile {
  color: var(--color-powder-blue) !important;
}

.countdown-val--dark {
  color: #ffffff !important;
}

.countdown-lbl--dark {
  color: var(--color-dusty-blue);
}

.hero-countdown--sm {
  gap: clamp(0.5rem, 1.5vw, 1rem);
}

.countdown-val--sm {
  font-size: clamp(20px, 2.5vw, 32px) !important;
}

.countdown-val {
  font-family: var(--font-primary);
  font-size: clamp(32px, 5vw, 48px);
  color: #ffffff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 1.2em;
  text-align: center;
}

.countdown-lbl {
  font-family: var(--font-utility);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-dusk-blue);
  margin-top: 0.5rem;
}

/* =========================================
   DECORATIVE ELEMENTS
   ========================================= */
.section-monogram {
  display: block;
  width: clamp(80px, 12vw, 120px);
  height: auto;
  margin: 0 auto 1.5rem;
}

.section-flower {
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}

/* Second declaration removed or merged */
.elegant-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Subtle elegant gradient backgrounds */



/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
  .hero-countdown {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .hero-countdown-unit {
    min-width: calc(50% - 0.5rem);
    padding: 0.8rem;
  }
  .section-monogram {
    width: 90px;
  }
}

@media (max-width: 480px) {
  .landing__names { font-size: 42px; }
  .hero-countdown-unit { padding: 0.5rem; }
  .countdown-val { font-size: 28px; }
  #dress-code-bg-text {
    font-size: clamp(40px, 12vw, 80px) !important;
  }
}


/* Dress Code Dynamic Styles */
#dress-code.is-dark h2,
#dress-code.is-dark h4,
#dress-code.is-dark p {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
#dress-code.is-dark .section-monogram {
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
#dress-code.is-dark #dress-code-bg-text {
  color: #ffffff !important;
  opacity: 0.1 !important;
}
#dress-code-bg-text {
  opacity: 0.05 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Alternating section background */
.bg-alt-tint {
  background-color: #dfe6ec;
}


/* RSVP Loader */
.loader {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--color-dusty-blue);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

/* RSVP Clean Underline Inputs */
.rsvp-input {
  border: none;
  border-bottom: 1px solid #ccc;
  background-color: transparent !important;
  outline: none;
  transition: border-color 0.3s ease;
  border-radius: 0;
}

.rsvp-input:focus,
.rsvp-textarea:focus,
#invitationCode:focus {
  outline: none !important;
  box-shadow: none !important;
}

#invitationCode:focus {
  border-bottom-color: var(--color-dusk-blue) !important;
}

.rsvp-input:focus {
  border-bottom-color: #ccc !important;
}

.rsvp-input::placeholder {
  color: #aab4be;
}

/* Fix browser autofill styling */
.rsvp-input:-webkit-autofill,
.rsvp-input:-webkit-autofill:hover, 
.rsvp-input:-webkit-autofill:focus, 
.rsvp-input:-webkit-autofill:active,
#invitationCode:-webkit-autofill,
#invitationCode:-webkit-autofill:hover,
#invitationCode:-webkit-autofill:focus,
#invitationCode:-webkit-autofill:active {
    -webkit-text-fill-color: var(--color-baltic-blue) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* RSVP Textarea (bordered box) */
.rsvp-textarea {
  border: 1px solid #ccc;
  background-color: transparent !important;
  outline: none;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.rsvp-textarea:focus {
  border-color: #ccc !important;
}

.rsvp-textarea::placeholder {
  color: #aab4be;
}

/* =========================================
   GALLERY SWIPER
   ========================================= */
.gallery-swiper {
  width: 100%;
  padding-bottom: 3rem; /* Space for pagination */
}

.gallery-swiper .swiper-slide {
  width: 300px;
  height: 200px; /* 3:2 aspect ratio */
  transition: all 0.5s ease;
  opacity: 0.4;
  transform: scale(0.85);
}

@media (min-width: 768px) {
  .gallery-swiper .swiper-slide {
    width: 600px;
    height: 400px; /* 3:2 aspect ratio */
  }
}

.gallery-swiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
}

.gallery-swiper .swiper-pagination-bullet {
  text-align: center;
}

.countdown-lbl {
  font-family: var(--font-utility);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-dusk-blue);
  margin-top: 0.5rem;
}

/* =========================================
   DECORATIVE ELEMENTS
   ========================================= */
.section-monogram {
  display: block;
  width: clamp(80px, 12vw, 120px);
  height: auto;
  margin: 0 auto 1.5rem;
}

.section-flower {
  position: absolute;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}

/* Second declaration removed or merged */
.elegant-card {
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Subtle elegant gradient backgrounds */



/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 768px) {
  .hero-countdown {
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  .hero-countdown-unit {
    min-width: calc(50% - 0.5rem);
    padding: 0.8rem;
  }
  .section-monogram {
    width: 90px;
  }
}

@media (max-width: 480px) {
  .landing__names { font-size: 42px; }
  .hero-countdown-unit { padding: 0.5rem; }
  .countdown-val { font-size: 28px; }
  #dress-code-bg-text {
    font-size: clamp(40px, 12vw, 80px) !important;
  }
}


/* Dress Code Dynamic Styles */
#dress-code.is-dark h2,
#dress-code.is-dark h4,
#dress-code.is-dark p {
  color: #ffffff !important;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
#dress-code.is-dark .section-monogram {
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
#dress-code.is-dark #dress-code-bg-text {
  color: #ffffff !important;
  opacity: 0.1 !important;
}
#dress-code-bg-text {
  opacity: 0.05 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Alternating section background */
.bg-alt-tint {
  background-color: #dfe6ec;
}


/* RSVP Loader */
.loader {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--color-dusty-blue);
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

/* RSVP Clean Underline Inputs */
.rsvp-input {
  border: none;
  border-bottom: 1px solid #ccc;
  background-color: transparent !important;
  outline: none;
  transition: border-color 0.3s ease;
  border-radius: 0;
}

.rsvp-input:focus,
.rsvp-textarea:focus,
#invitationCode:focus {
  outline: none !important;
  box-shadow: none !important;
}

#invitationCode:focus {
  border-bottom-color: var(--color-dusk-blue) !important;
}

.rsvp-input:focus {
  border-bottom-color: #ccc !important;
}

.rsvp-input::placeholder {
  color: #aab4be;
}

/* Fix browser autofill styling */
.rsvp-input:-webkit-autofill,
.rsvp-input:-webkit-autofill:hover, 
.rsvp-input:-webkit-autofill:focus, 
.rsvp-input:-webkit-autofill:active,
#invitationCode:-webkit-autofill,
#invitationCode:-webkit-autofill:hover,
#invitationCode:-webkit-autofill:focus,
#invitationCode:-webkit-autofill:active {
    -webkit-text-fill-color: var(--color-baltic-blue) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* RSVP Textarea (bordered box) */
.rsvp-textarea {
  border: 1px solid #ccc;
  background-color: transparent !important;
  outline: none;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.rsvp-textarea:focus {
  border-color: #ccc !important;
}

.rsvp-textarea::placeholder {
  color: #aab4be;
}

/* =========================================
   GALLERY SWIPER
   ========================================= */
.gallery-swiper {
  width: 100%;
  padding-bottom: 3rem; /* Space for pagination */
}

.gallery-swiper .swiper-slide {
  width: 300px;
  height: 200px; /* 3:2 aspect ratio */
  transition: all 0.5s ease;
  opacity: 0.4;
  transform: scale(0.85);
}

@media (min-width: 768px) {
  .gallery-swiper .swiper-slide {
    width: 600px;
    height: 400px; /* 3:2 aspect ratio */
  }
}

.gallery-swiper .swiper-slide-active {
  opacity: 1;
  transform: scale(1);
}

.gallery-swiper .swiper-pagination-bullet {
  background-color: var(--color-dusty-blue);
  opacity: 0.4;
  transition: all 0.3s ease;
}

.gallery-swiper .swiper-pagination-bullet-active {
  opacity: 1;
  background-color: var(--color-dusk-blue);
  transform: scale(1.2);
}

/* =========================================
   AUDIO VISUALIZER
   ========================================= */
@keyframes audioBar {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

.visualizer-bar {
  transform-origin: bottom;
  animation: audioBar 1s ease-in-out infinite;
}

#audio-visualizer.is-paused .visualizer-bar {
  animation-play-state: paused;
  transform: scaleY(0.2) !important;
}