/* ============================================
   LANUK.X — Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Space+Mono:wght@400;700&display=swap');
@import 'reset.css';
@import 'variables.css';

/* ---- Base ---- */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 1rem;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
}

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

/* ---- Section Spacing ---- */
.section {
  padding: var(--space-24) 0;
}

.section--sm {
  padding: var(--space-16) 0;
}

/* ---- Section Label ---- */
.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

/* ---- Section Title ---- */
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-title span {
  color: var(--accent);
}

/* ---- Horizontal Rule ---- */
.hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-8) 0;
}

/* ---- Typography Utilities ---- */
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.font-mono { font-family: var(--font-mono); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--ease-base);
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--accent);
  color: var(--text-on-accent);
}

.btn--primary:hover {
  background: #d4ff1a;
  transform: translateY(-2px);
  box-shadow: var(--shadow-accent);
}

.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

/* ---- Category Pills ---- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--ease-fast);
}

.pill--design { border-color: #7c3aed33; color: #a78bfa; background: #7c3aed15; }
.pill--code   { border-color: #0ea5e933; color: #38bdf8; background: #0ea5e915; }
.pill--video  { border-color: #f59e0b33; color: #fbbf24; background: #f59e0b15; }
.pill--photo  { border-color: #ec489933; color: #f472b6; background: #ec489915; }
.pill--exp    { border-color: #c8ff0033; color: #c8ff00; background: #c8ff0015; }

/* ---- Noise Overlay ---- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  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.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.5;
}

/* ---- Custom Cursor ---- */
.cursor-dot,
.cursor-outline {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  z-index: 10000;
  transform: translate(-50%, -50%);
  transition: opacity var(--ease-fast);
}

.cursor-dot {
  width: 5px;
  height: 5px;
  background: var(--accent);
}

.cursor-outline {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(200, 255, 0, 0.5);
  transition: transform 0.12s ease, width 0.2s ease, height 0.2s ease, opacity var(--ease-fast);
}

.cursor-outline.hover {
  width: 50px;
  height: 50px;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .cursor-dot, .cursor-outline { display: none; }
}

/* ---- Scroll Progress ---- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
  z-index: 10000;
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 calc(10px + var(--scroll-progress, 0) * 24px) rgba(200, 255, 0, 0.45);
}

/* ---- Animated Grid Background ---- */
.grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,255,0,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,255,0,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  animation: grid-drift 18s linear infinite;
}

@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 120px 60px, 120px 60px; }
}

/* ---- Fade In Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ---- Scroll Reveal Animations ---- */
.scroll-reveal {
  opacity: 0;
  transform: translate3d(0, 34px, 0) scale(0.975);
  filter: blur(8px);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms),
    filter 0.8s cubic-bezier(0.16, 1, 0.3, 1) var(--reveal-delay, 0ms);
  will-change: opacity, transform, filter;
}

.scroll-reveal.in-view {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

[data-scroll-float] {
  --scroll-float: 0px;
  will-change: transform;
}

/* ---- Glitch Text ---- */
@keyframes glitch-1 {
  0%, 100% { clip-path: inset(0 0 100% 0); }
  10% { clip-path: inset(20% 0 60% 0); transform: translate(-3px, 0); }
  20% { clip-path: inset(50% 0 30% 0); transform: translate(3px, 0); }
  30% { clip-path: inset(70% 0 10% 0); transform: translate(-2px, 0); }
  40% { clip-path: inset(10% 0 80% 0); transform: translate(2px, 0); }
}

/* ---- Page Loader ---- */
#page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-logo {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  animation: loader-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes loader-pulse {
  from { opacity: 0.3; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- Focus Styles ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}
