/* ============================================================
   ETHEREAL UNION — Design System
   Wedding Coming Soon: Diego & Emma
   Migrated from Tailwind CDN → Vanilla CSS
   ============================================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Colors — Material 3 Dark Theme */
  --surface: #121317;
  --surface-dim: #121317;
  --surface-bright: #38393d;
  --surface-container-lowest: #0d0e12;
  --surface-container-low: #1a1b1f;
  --surface-container: #1e1f23;
  --surface-container-high: #292a2e;
  --surface-container-highest: #343539;
  --on-surface: #e3e2e7;
  --on-surface-variant: #c4c7c8;
  --inverse-surface: #e3e2e7;
  --inverse-on-surface: #2f3034;
  --outline: #8e9192;
  --outline-variant: #444748;
  --surface-tint: #c6c6c7;

  --primary: #ffffff;
  --on-primary: #2f3131;
  --primary-container: #e2e2e2;
  --on-primary-container: #636565;
  --inverse-primary: #5d5f5f;

  --secondary: #e6c185;
  --on-secondary: #422c00;
  --secondary-container: #5e4515;
  --on-secondary-container: #d6b379;
  --secondary-fixed: #ffdeaa;
  --secondary-fixed-dim: #e6c185;

  --tertiary: #ffffff;
  --on-tertiary: #2f3131;
  --tertiary-container: #e2e2e2;

  --error: #ffb4ab;
  --on-error: #690005;

  --background: #121317;
  --on-background: #e3e2e7;

  /* Typography */
  --font-display: 'Bodoni Moda', 'Georgia', 'Times New Roman', serif;
  --font-body: 'Manrope', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --unit: 8px;
  --gutter: 32px;
  --margin-mobile: 24px;
  --margin-desktop: 80px;
  --section-gap: 160px;
  --container-max: 1440px;

  /* Border Radius — Sharp geometry */
  --radius: 4px;
  --radius-lg: 8px;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-normal: 500ms;
  --duration-slow: 1000ms;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--background);
  color: var(--on-background);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

::selection {
  background-color: var(--secondary);
  color: var(--on-secondary);
}

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

/* --- Background Layer --- */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  opacity: 0.8;
  transform: scale(1.15);
  transform-origin: center 30%;
}

.bg-overlay-dark {
  position: absolute;
  inset: 0;
  background-color: rgba(18, 19, 23, 0.50);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.bg-overlay-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--background) 0%,
    rgba(18, 19, 23, 0.2) 50%,
    transparent 100%
  );
}

/* Spotlight effect — subtle radial glow behind content */
.bg-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 45%,
    rgba(230, 193, 133, 0.04) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* --- Main Canvas --- */
.main-canvas {
  position: relative;
  z-index: 10;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 96px var(--margin-mobile);
  min-height: 100vh;
  min-height: 100dvh;
}

.content-wrapper {
  max-width: 768px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* --- Top Label --- */
.label-top {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out-expo) 0.2s forwards;
}

/* --- Main Title --- */
.title-main {
  font-family: var(--font-display);
  font-size: clamp(36px, 10vw, 56px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--primary);
  margin-bottom: 24px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(24px);
  animation: slideUp 1.2s var(--ease-out-expo) 0.4s forwards;
}

/* --- Subtitle (Date) --- */
.subtitle-date {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--on-surface-variant);
  opacity: 0;
  margin-bottom: 16px;
  animation: fadeInUp 1s var(--ease-out-expo) 0.7s forwards;
}

/* --- Location & Time --- */
.subtitle-location {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.4;
  color: var(--on-surface-variant);
  opacity: 0;
  margin-bottom: 64px;
  max-width: 90%;
  animation: fadeInUp 1s var(--ease-out-expo) 0.8s forwards;
}

/* --- Countdown Section --- */
.countdown-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 80px;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-out-expo) 0.9s forwards;
}

.countdown-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 112px;
  background: rgba(30, 31, 35, 0.20);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius);
  transition: all var(--duration-normal) var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.countdown-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 50% 0%,
    rgba(230, 193, 133, 0.08) 0%,
    transparent 60%
  );
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out-expo);
}

.countdown-card:hover {
  background: rgba(30, 31, 35, 0.35);
  border-color: rgba(230, 193, 133, 0.20);
  transform: translateY(-2px);
}

.countdown-card:hover::before {
  opacity: 1;
}

.countdown-number {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--primary);
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
  transition: color var(--duration-normal) var(--ease-out-expo);
}

.countdown-card:hover .countdown-number {
  color: var(--secondary);
}

.countdown-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(230, 193, 133, 0.7);
  position: relative;
  z-index: 1;
}

/* --- Bottom Message --- */
.message-bottom {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--on-surface-variant);
  max-width: 480px;
  margin: 0 auto;
  opacity: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  padding-top: 32px;
  animation: fadeInUp 1s var(--ease-out-expo) 1.1s forwards;
}

/* --- Decorative Separator --- */
.separator-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeInUp 1s var(--ease-out-expo) 1.3s forwards;
}

.separator-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--secondary),
    transparent
  );
  opacity: 0.4;
}

.separator-dot {
  width: 6px;
  height: 6px;
  border: 1px solid var(--secondary);
  transform: rotate(45deg);
  opacity: 0.5;
}

/* --- Footer --- */
.site-footer {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 0 var(--margin-mobile) 48px;
  text-align: center;
}

.footer-inner {
  max-width: 768px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 32px;
}

.footer-contact {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(230, 193, 133, 0.5);
}

/* --- Floating Particles (decorative) --- */
.particles {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--secondary);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat linear infinite;
}

.particle:nth-child(1) {
  left: 15%;
  animation-duration: 18s;
  animation-delay: 0s;
}
.particle:nth-child(2) {
  left: 35%;
  animation-duration: 22s;
  animation-delay: 3s;
}
.particle:nth-child(3) {
  left: 55%;
  animation-duration: 20s;
  animation-delay: 6s;
}
.particle:nth-child(4) {
  left: 75%;
  animation-duration: 24s;
  animation-delay: 2s;
}
.particle:nth-child(5) {
  left: 90%;
  animation-duration: 19s;
  animation-delay: 5s;
}
.particle:nth-child(6) {
  left: 8%;
  animation-duration: 21s;
  animation-delay: 8s;
}
.particle:nth-child(7) {
  left: 45%;
  animation-duration: 17s;
  animation-delay: 4s;
}
.particle:nth-child(8) {
  left: 65%;
  animation-duration: 23s;
  animation-delay: 7s;
}

/* --- Keyframe Animations --- */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 0.9;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 0.8;
    transform: translateY(0);
  }
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.15;
  }
  90% {
    opacity: 0.05;
  }
  100% {
    transform: translateY(-20vh) scale(1);
    opacity: 0;
  }
}

/* --- Responsive — Desktop (≥768px) --- */
@media (min-width: 768px) {
  .main-canvas {
    padding: 96px var(--margin-desktop);
  }

  .label-top {
    margin-bottom: 48px;
    font-size: 13px;
  }

  .title-main {
    font-size: clamp(80px, 9vw, 120px);
    margin-bottom: 24px;
  }

  .subtitle-date {
    font-size: 40px;
    margin-bottom: 24px;
  }

  .subtitle-location {
    font-size: 20px;
    margin-bottom: 64px;
  }

  .countdown-grid {
    gap: var(--gutter);
  }

  .countdown-card {
    width: 128px;
    height: 144px;
  }

  .countdown-number {
    font-size: 48px;
  }

  .site-footer {
    padding: 0 var(--margin-desktop) 48px;
  }

  .particle {
    width: 3px;
    height: 3px;
  }
}

/* --- Responsive — Large Desktop (≥1200px) --- */
@media (min-width: 1200px) {
  .title-main {
    font-size: 140px;
  }

  .subtitle-date {
    font-size: 44px;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .particles {
    display: none;
  }
}

/* --- Print Styles --- */
@media print {
  .bg-layer,
  .particles {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .main-canvas {
    padding: 40px;
  }
}
