/* ══════════════════════════════════════════
   DESIGN SYSTEM — Base Styles & Utilities
   ══════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
  line-height: 1.6;
}

/* ── Typography ── */
h1,
h2,
h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
}

/* ── Layout ── */
.container {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 var(--sp-md);
}

/* ── Atmospheric Background ── */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.atmosphere::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(200, 245, 232, 0.07), transparent 60%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(224, 200, 245, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 40% at 50% 50%, rgba(232, 245, 200, 0.04), transparent 50%);
  animation: atmDrift 30s ease-in-out infinite alternate;
}

.atmosphere::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 70% 30%, rgba(245, 220, 200, 0.05), transparent 50%),
    radial-gradient(ellipse 90% 60% at 30% 80%, rgba(200, 245, 232, 0.04), transparent 50%);
  animation: atmDrift2 25s ease-in-out infinite alternate;
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px;
}

/* ── Glass Utilities ── */
.glass {
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-clear {
  backdrop-filter: var(--glass-clear-blur);
  -webkit-backdrop-filter: var(--glass-clear-blur);
  background: var(--glass-clear-bg);
  border: 1px solid var(--glass-clear-border);
  box-shadow: var(--glass-clear-shadow);
}

.glass-frosted {
  backdrop-filter: var(--glass-frosted-blur);
  -webkit-backdrop-filter: var(--glass-frosted-blur);
  background: var(--glass-frosted-bg);
  border: 1px solid var(--glass-frosted-border);
  box-shadow: var(--glass-frosted-shadow);
}

/* ── Animations ── */
@keyframes atmDrift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }

  100% {
    transform: translate(30px, -20px) scale(1.05);
    opacity: 0.8;
  }
}

@keyframes atmDrift2 {
  0% {
    transform: translate(0, 0) scale(1.05);
    opacity: 0.8;
  }

  100% {
    transform: translate(-20px, 15px) scale(1);
    opacity: 1;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@keyframes softPulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.35;
    transform: scale(0.7);
  }
}

@keyframes nodeGlow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(232, 245, 200, 0.25), 0 0 40px rgba(232, 245, 200, 0.1);
  }

  50% {
    box-shadow: 0 0 30px rgba(232, 245, 200, 0.4), 0 0 60px rgba(232, 245, 200, 0.15);
  }
}
