/* =========================================
   FONT DECLARATION — Tangier (Primary)
   ========================================= */
@font-face {
  font-family: "Tangier";
  src: url("assets/font/Tangier.otf") format("opentype");
  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:  #ffffff;                     /* Clean white background */
  --color-surface:     #ffffff;                     /* White cards */
  --color-surface-alt: #fcfbfa;                     /* 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(64px, 8vw, 110px);
  --text-hero-title:    clamp(56px, 8vw, 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;
  max-width: 100vw;
}

body {
  background-color: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-secondary); /* Elegant serif for body */
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  max-width: 100vw;
}

/* 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: var(--color-background);
  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(circle at center, rgba(238,218,201,0.2) 0%, transparent 70%);
  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; }
}

/* 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: var(--color-background);
}

/* Very subtle floral watermark background */
.landing__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(238,218,201,0.15) 0%, transparent 80%);
  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;
}

/* =========================================
   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: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-nav) !important;
}
.navbar--scrolled .nav-link,
.navbar--scrolled .nav-brand {
  color: var(--color-dusk-blue) !important;
  text-shadow: none;
}
.navbar--scrolled .nav-logo {
  filter: none;
}

/* 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-dusty-blue);
  transition: width 0.3s ease;
}
.nav-link.active::after {
  width: 100%;
}
.navbar--transparent .nav-link.active::after {
  background-color: #ffffff;
}

/* =========================================
   HERO SECTION & COUNTDOWN
   ========================================= */
.hero-gradient {
  background: linear-gradient(
    to bottom,
    rgba(54, 85, 131, 0.4) 0%,
    rgba(54, 85, 131, 0.1) 40%,
    rgba(255, 255, 255, 0.9) 95%,
    rgba(255, 255, 255, 1) 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.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  padding: 1rem clamp(0.8rem, 2vw, 1.5rem);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  min-width: clamp(70px, 15vw, 100px);
}

.countdown-val {
  font-family: var(--font-primary);
  font-size: clamp(32px, 5vw, 48px);
  color: var(--color-dusk-blue);
  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-dusty-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;
}

.elegant-card {
  background: #ffffff;
  border: 1px solid rgba(238, 218, 201, 0.5); /* Pale peach border */
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Subtle elegant gradient backgrounds */
.bg-gradient-peach {
  background: linear-gradient(135deg, #ffffff 0%, rgba(238, 218, 201, 0.15) 100%);
}
.bg-gradient-blue {
  background: linear-gradient(135deg, #ffffff 0%, rgba(182, 199, 219, 0.15) 100%);
}

/* =========================================
   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: 56px; }
  .hero-countdown-unit { padding: 0.5rem; }
  .countdown-val { font-size: 28px; }
}
