/* ==========================================================================
   DIGESTEP — BASE DESIGN SYSTEM & TOKENS
   Awwwards-Level Digital Experience Architecture
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:ital,wght@0,300;0,400;0,500;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Syne:wght@500;600;700;800&display=swap');

:root {
  /* Color Palette — True Brand Navy & Bioluminescent Botanical Lime */
  --bg-dark: #050811;
  --bg-deep: #080d1a;
  --bg-surface: #0c1426;
  --bg-surface-elevated: #111d38;
  --bg-glass: rgba(11, 22, 44, 0.65);
  --bg-glass-card: rgba(12, 20, 38, 0.7);

  --brand-navy: #0B162C;
  --brand-lime: #8DC63F;
  --brand-lime-vibrant: #9EE438;
  --brand-lime-soft: rgba(141, 198, 63, 0.15);
  --brand-lime-glow: rgba(141, 198, 63, 0.35);

  --accent-cyan: #06B6D4;
  --accent-cyan-soft: rgba(6, 182, 212, 0.15);

  --text-pure: #FFFFFF;
  --text-main: #F1F5F9;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --text-accent: #8DC63F;

  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-lime: rgba(141, 198, 63, 0.3);
  --border-lime-strong: #8DC63F;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Fluid Spacing & Sizes */
  --site-max-w: 1440px;
  --gutter-x: clamp(1.25rem, 4vw, 4rem);
  --nav-height: 84px;

  /* Transitions & Animation Curves */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-elastic: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: 0.2s var(--ease-out-expo);
  --transition-normal: 0.4s var(--ease-out-expo);
  --transition-slow: 0.8s var(--ease-out-expo);

  /* Elevation Shadows & Glows */
  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 10px 40px -10px rgba(0, 0, 0, 0.7);
  --glow-lime: 0 0 50px -10px rgba(141, 198, 63, 0.25);
  --glow-bottle: 0 20px 80px -15px rgba(141, 198, 63, 0.2), 0 0 40px -10px rgba(6, 182, 212, 0.15);
}

/* ==========================================================================
   Reset & Base Elements
   ========================================================================== */

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

html {
  font-size: 16px;
  scroll-behavior: auto; /* Handled via Lenis for momentum physics */
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  selection-background-color: var(--brand-lime);
  selection-color: var(--bg-dark);
}

::selection {
  background: var(--brand-lime);
  color: var(--bg-dark);
}

img, picture, svg, video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Cinematic Overlays & Noise Texture
   ========================================================================== */

/* Organic Ambient Particle Canvas Background */
#ambient-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.85;
}

/* Atmospheric Noise Layer */
.noise-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Subtle Technical Hairline Grid */
.grid-bg-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  background-size: 80px 80px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black 40%, transparent 85%);
}

/* Main Site Wrapper (sits above canvas) */
.site-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* ==========================================================================
   Custom Magnetic Interactive Cursor (Desktop)
   ========================================================================== */

.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background-color: var(--brand-lime);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo), background-color 0.3s, opacity 0.3s;
  box-shadow: 0 0 15px var(--brand-lime);
}

.cursor-follower {
  position: fixed;
  top: 0;
  left: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(141, 198, 63, 0.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-pure);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: width 0.35s var(--ease-out-expo), height 0.35s var(--ease-out-expo), border-color 0.3s, background-color 0.3s;
}

.cursor-follower.is-active {
  width: 84px;
  height: 84px;
  border-color: var(--brand-lime);
  background-color: rgba(11, 22, 44, 0.75);
}

.cursor-follower.is-dragging {
  width: 90px;
  height: 90px;
  border-color: var(--accent-cyan);
  background-color: rgba(6, 182, 212, 0.2);
}

/* Hide custom cursor on mobile / touch devices */
@media (hover: none) and (pointer: coarse) {
  .custom-cursor, .cursor-follower {
    display: none !important;
  }
}

/* ==========================================================================
   Typography Foundations
   ========================================================================== */

h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text-pure);
}

.font-mono {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.text-gradient-lime {
  background: linear-gradient(135deg, #FFFFFF 20%, var(--brand-lime-vibrant) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #FFFFFF 20%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Container Utilities */
.container {
  width: 100%;
  max-width: var(--site-max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter-x);
  padding-right: var(--gutter-x);
}

.container-wide {
  width: 100%;
  max-width: 1680px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter-x);
  padding-right: var(--gutter-x);
}

/* Section Spacing */
.section-py {
  padding-top: clamp(4rem, 9vw, 9rem);
  padding-bottom: clamp(4rem, 9vw, 9rem);
  position: relative;
}

/* Technical Label / Eyebrow */
.technical-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: clamp(0.625rem, 2.2vw, 0.75rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-lime);
  background: var(--brand-lime-soft);
  border: 1px solid var(--border-lime);
  padding: 0.35rem 0.75rem;
  border-radius: 2px;
  margin-bottom: 1.25rem;
  max-width: 100%;
  flex-wrap: wrap;
}

.technical-tag::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--brand-lime);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--brand-lime);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}
