/* ============================================
   BASE — Canvas, overlays, loader, utilities
   Styles needed by the main page beyond reset
   ============================================ */

/* 3D Canvas */
#canvas-3d {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-canvas);
  pointer-events: none;
}

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

/* Custom cursor */
.cursor-dot {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--c-accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  mix-blend-mode: difference;
  transition: transform 0.15s var(--ease-out);
}

.cursor-ring {
  position: fixed;
  width: 40px;
  height: 40px;
  border: 1px solid var(--c-accent-light);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-cursor);
  opacity: 0.5;
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

/* Loading screen */
.loader {
  position: fixed;
  inset: 0;
  z-index: var(--z-loader);
  background: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.5rem;
}

.loader-text {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 3rem);
  color: var(--c-text-strong);
  letter-spacing: 0.3em;
  text-transform: uppercase;
}
.loader-text span {
  color: var(--c-accent);
}

.loader-bar {
  width: 200px;
  height: 1px;
  background: var(--c-line);
  position: relative;
  overflow: hidden;
}

.loader-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: var(--c-accent);
}

.loader-status {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-text-dim);
}

/* Reveal helpers (used by GSAP) */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

/* Sections common z-index */
section {
  position: relative;
  z-index: var(--z-content);
}

.section-padding {
  padding: var(--section-pad) var(--page-gutter);
}

/* Scroll pulse animation */
@keyframes scrollPulse {
  0%   { top: -100%; }
  50%  { top: 100%; }
  100% { top: 100%; }
}

@keyframes scrollTextPulse {
  0%   { background-position: 0% 100%; }
  50%  { background-position: 0% 0%; }
  100% { background-position: 0% 100%; }
}

/* Marquee animation */
@keyframes marquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Theme toggle styles moved to shared/theme.css */

/* ---- LIGHT SWITCH HOVER ---- */
body.switch-hover {
  cursor: pointer;
}
body.switch-hover .cursor-dot {
  transform: scale(2) !important;
  background: #ffd699;
}
body.switch-hover .cursor-ring {
  opacity: 0 !important;
}
