/* css/global.css */
@import url('./reset.css');
@import url('./variables.css');
@import url('./typography.css');
@import url('./layout.css');
@import url('./components.css');
@import url('./animations.css');

/* Global generic styles that don't fit elsewhere */

::selection {
  background-color: var(--accent-highlight);
  color: var(--text-primary);
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  position: relative;
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
}

/* Premium Noise Grain Texture overlay */
/* Using a highly subtle, high-frequency noise base64 svg */
body::after {
  content: "";
  position: fixed;
  inset: -200px; /* Oversize to prevent edge bleed on scroll/resize */
  width: calc(100% + 400px);
  height: calc(100% + 400px);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.035; /* Very subtle */
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

/* Warm subtle gradient background for depth in specific sections */
.bg-warm-depth {
  background: radial-gradient(circle at top right, rgba(232, 224, 213, 0.03), transparent 50%),
              radial-gradient(circle at bottom left, rgba(232, 224, 213, 0.02), transparent 40%);
  background-color: var(--bg-secondary);
}

/* Subtle floating blurred accent orbs for extreme premium feel */
.ambient-light {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.05;
  max-width: 100vw;
  overflow: hidden;
}

@media (hover: none) and (pointer: coarse), (max-width: 991px) {
  .custom-cursor {
    display: none !important;
  }
}

.ambient-primary {
  background: var(--accent-primary);
}

.ambient-secondary {
  background: #FFFFFF;
}

/* Ensure content stays above ambient lights */
.section > .container {
  position: relative;
  z-index: 1;
}

/* Preloader */
#preloader {
  position: fixed;
  inset: 0;
  background-color: var(--bg-primary);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1.2s var(--ease-premium), visibility 1.2s var(--ease-premium);
}
#preloader.hidden {
  opacity: 0;
  visibility: hidden;
}
#preloader h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-family: var(--font-heading);
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.2s var(--ease-premium) forwards 0.2s;
}

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

html {
  scroll-behavior: auto; /* Handled by lenis/custom smooth scroll, keep auto to avoid conflicts */
}

/* Utility to completely clear backgrounds for layering */
.bg-transparent {
  background-color: transparent !important;
}

/* Horizontal Line Dividers - Premium */
hr.premium-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
  margin: var(--space-12) 0;
}
