/* ========================================
   2. RESET & BASE
   ======================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

::selection {
  background: var(--blue);
  color: #fff;
}

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

/* ========================================
   3. PRELOADER (V1 style)
   ======================================== */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner {
  text-align: center;
}

.preloader-logo {
  width: 180px;
  height: auto;
  margin: 0 auto 30px;
  opacity: 0.9;
  overflow: visible;
}

.preloader-logo img {
  width: 100%;
}

.preloader-bar {
  width: 200px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 16px;
  overflow: hidden;
}

.preloader-progress {
  height: 100%;
  width: 0%;
  background: var(--gradient-blue);
  border-radius: 2px;
  transition: width 0.3s var(--ease-out);
}

.preloader-text {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--text-muted);
}

/* ========================================
   4. SCROLL PROGRESS BAR
   ======================================== */

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: var(--blue);
  z-index: 9999;
  transition: none;
}

/* ========================================
   5. THREE.JS CANVAS (V1 3D effect)
   ======================================== */

#hero-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* ========================================
   6. GRAIN OVERLAY
   ======================================== */

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.03;
  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='4' seed='2' /%3E%3C/filter%3E%3Crect width='400' height='400' filter='url(%23noiseFilter)' /%3E%3C/svg%3E");
}

/* ========================================
   7. CUSTOM CURSOR (V1 style)
   ======================================== */

.cursor-dot {
  position: fixed;
  width: 6px;
  height: 6px;
  background: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-outline {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(30, 136, 229, 0.25);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9997;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), border-color 0.3s;
}

.cursor-dot.hover {
  width: 12px;
  height: 12px;
  background: var(--gold);
}

.cursor-outline.hover {
  width: 50px;
  height: 50px;
  border-color: rgba(212, 168, 48, 0.3);
}

@media (pointer: coarse) {
  .cursor-dot, .cursor-outline { display: none; }
}

/* ========================================
