/* ========================================
   GLOBAL.CSS - Design Tokens & Reset
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
  /* Colors - Primary (Bunker Brand) */
  --color-primary: #9B4DCA;
  --color-primary-dark: #7B3BA0;
  --color-primary-glow: rgba(155, 77, 202, 0.4);

  /* Colors - Secondary (Bunker Brand) */
  --color-secondary: #2D3142;
  --color-secondary-light: #4A4E64;

  /* Colors - Neutrals */
  --color-black: #0A0A0A;
  --color-dark: #141414;
  --color-gray-900: #1A1A1A;
  --color-gray-800: #262626;
  --color-gray-700: #404040;
  --color-gray-400: #999999;
  --color-gray-200: #E5E5E5;
  --color-white: #F5F5F0;
  --color-pure-white: #FFFFFF;

  /* Colors - Accents */
  --color-glow-cyan: rgba(155, 77, 202, 0.3);
  --color-glow-edge: rgba(0, 180, 255, 0.15);

  /* Typography - Single Font Family */
  --font-primary: 'Outfit', sans-serif;

  /* ========================================
     SISTEMA TIPOGRÁFICO - BUNKER
     ======================================== */

  /* Fonte */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Pesos */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;

  /* Tamanhos - Responsivos */
  --fs-display: clamp(36px, 8vw, 64px);
  --fs-h1: clamp(28px, 6vw, 48px);
  --fs-h2: clamp(24px, 5vw, 36px);
  --fs-h3: clamp(20px, 3vw, 24px);
  --fs-h4: clamp(18px, 2.5vw, 20px);
  --fs-body-lg: clamp(17px, 2vw, 18px);
  --fs-body: 16px;
  --fs-body-sm: 14px;
  --fs-caption: 12px;

  /* Line Heights */
  --lh-tight: 1.1;
  --lh-snug: 1.25;
  --lh-normal: 1.4;
  --lh-relaxed: 1.6;

  /* Letter Spacing */
  --ls-tighter: -0.03em;
  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.02em;
  --ls-wider: 0.05em;

  /* ========================================
     CORES DE TEXTO - BUNKER
     Nota: NÃO inclui laranja (exclusivo Beep)
     ======================================== */

  /* Textos */
  --color-text-primary: #FFFFFF;
  --color-text-secondary: rgba(255, 255, 255, 0.75);
  --color-text-tertiary: rgba(255, 255, 255, 0.55);
  --color-text-muted: rgba(255, 255, 255, 0.4);

  /* Font Sizes - Standardized Hierarchy */
  --text-display: clamp(2.5rem, 5vw + 1rem, 5rem);
  --text-h1: clamp(2rem, 4vw + 0.5rem, 3.5rem);
  --text-h2: clamp(1.5rem, 2.5vw + 0.5rem, 2.25rem);
  --text-h3: clamp(1.125rem, 1.5vw + 0.5rem, 1.5rem);
  --text-body: clamp(1rem, 0.5vw + 0.875rem, 1.125rem);
  --text-small: clamp(0.75rem, 0.5vw + 0.5rem, 0.875rem);
  --text-xs: clamp(0.7rem, 0.3vw + 0.5rem, 0.8rem);

  /* Legacy size aliases for compatibility */
  --text-sm: var(--text-small);
  --text-base: var(--text-body);
  --text-lg: clamp(1rem, 0.5vw + 0.875rem, 1.125rem);
  --text-xl: var(--text-h3);
  --text-2xl: var(--text-h2);
  --text-3xl: var(--text-h1);
  --text-4xl: var(--text-display);
  --text-5xl: clamp(3.5rem, 6vw + 1rem, 6rem);
  --text-hero: var(--text-display);

  /* Font Weights */
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;
  --weight-extrabold: 800;
  --weight-black: 900;

  /* Line Heights */
  --leading-none: 1.0;
  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;

  /* Letter Spacing */
  --tracking-tighter: -0.03em;
  --tracking-tight: -0.02em;
  --tracking-normal: 0;
  --tracking-wide: 0.02em;
  --tracking-wider: 0.05em;
  --tracking-widest: 0.15em;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* Layout */
  --container-max: 1920px;
  --container-padding: clamp(1rem, 3vw, 2rem);
  --header-height: 80px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-slower: 800ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

  /* Z-index layers */
  --z-base: 1;
  --z-header: 100;
  --z-menu: 200;
  --z-loader: 1000;
  --z-edge-glow: 50;

  /* Border radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ========================================
   CLASSES TIPOGRÁFICAS - TÍTULOS
   ======================================== */

.typo-display {
  font-family: var(--font-family);
  font-size: var(--fs-display);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tighter);
}

.typo-h1 {
  font-family: var(--font-family);
  font-size: var(--fs-h1);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}

.typo-h2 {
  font-family: var(--font-family);
  font-size: var(--fs-h2);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
}

.typo-h3 {
  font-family: var(--font-family);
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
}

.typo-h4 {
  font-family: var(--font-family);
  font-size: var(--fs-h4);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
}

/* ========================================
   CLASSES TIPOGRÁFICAS - CORPO
   ======================================== */

.typo-body {
  font-family: var(--font-family);
  font-size: var(--fs-body);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
}

.typo-body-lg {
  font-family: var(--font-family);
  font-size: var(--fs-body-lg);
  font-weight: var(--fw-regular);
  line-height: var(--lh-relaxed);
}

.typo-body-sm {
  font-family: var(--font-family);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
}

.typo-caption {
  font-family: var(--font-family);
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  line-height: var(--lh-normal);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
}

/* ========================================
   CLASSES DE COR DE TEXTO
   ======================================== */

.text-primary {
  color: var(--color-text-primary);
}

.text-secondary {
  color: var(--color-text-secondary);
}

.text-tertiary {
  color: var(--color-text-tertiary);
}

.text-muted {
  color: var(--color-text-muted);
}

/* ========================================
   CLASSES PARA MÉTRICAS E NÚMEROS
   ======================================== */

.typo-metric {
  font-family: var(--font-family);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: var(--fw-extrabold);
  line-height: 1;
  letter-spacing: var(--ls-tighter);
  font-variant-numeric: tabular-nums;
}

.typo-metric-label {
  font-family: var(--font-family);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-medium);
  color: var(--color-text-tertiary);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
}

.typo-metric-sm {
  font-family: var(--font-family);
  font-size: clamp(24px, 4vw, 32px);
  font-weight: var(--fw-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* ========================================
   EFEITOS DE TEXTO (OPCIONAIS)
   Prefixo: fx-
   ======================================== */

/* Brilho sutil */
.fx-glow {
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.15);
}

/* Brilho mais forte */
.fx-glow-strong {
  text-shadow:
    0 0 20px rgba(255, 255, 255, 0.2),
    0 0 40px rgba(255, 255, 255, 0.1);
}

/* Gradiente branco sutil */
.fx-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, rgba(255, 255, 255, 0.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradiente prata/premium */
.fx-gradient-silver {
  background: linear-gradient(135deg, #E5E5E5 0%, #A3A3A3 50%, #E5E5E5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Destaque com fundo sutil */
.fx-highlight {
  padding: 0.1em 0.3em;
  margin: 0 -0.1em;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

/* ========================================
   CSS Reset
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  color: var(--color-white);
  background-color: var(--color-black);
  overflow-x: hidden;
}

body.loading {
  overflow: hidden;
}

/* Remove default styles */
ul,
ol {
  list-style: none;
}

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

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

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

input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ========================================
   Utility Classes
   ======================================== */

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

/* Text utilities */
.text-primary {
  color: var(--color-primary);
}

.text-white {
  color: var(--color-white);
}

.text-gray {
  color: var(--color-gray-400);
}

.text-center {
  text-align: center;
  margin-bottom: var(--space-4);
}

.text-uppercase {
  text-transform: uppercase;
}

.text-bold {
  font-weight: var(--weight-bold);
}

/* Font family utilities */
.font-primary {
  font-family: var(--font-primary);
}

.font-secondary {
  font-family: var(--font-secondary);
}

/* Visibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Animation utilities */
.animate-fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slower), transform var(--transition-slower);
}

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

.animate-fade-up {
  opacity: 0;
  transform: translateY(50px);
}

.animate-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.animate-scale-in {
  opacity: 0;
  transform: scale(0.95);
}

.animate-scale-in.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

/* Stagger delays */
.delay-1 {
  transition-delay: 0.1s;
}

.delay-2 {
  transition-delay: 0.2s;
}

.delay-3 {
  transition-delay: 0.3s;
}

.delay-4 {
  transition-delay: 0.4s;
}

.delay-5 {
  transition-delay: 0.5s;
}

/* Selection */
::selection {
  background-color: var(--color-primary);
  color: var(--color-black);
}

/* ========================================
   Digital Topography Background
   ======================================== */
.topo-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background-color: transparent;
  /* Fallback */
}

/* Layers */
.topo-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

.topo-layer svg {
  width: 100%;
  height: 100%;
}

.topo-line {
  fill: none;
  stroke: #9B4DCA;
  stroke-width: 1.5;
  /* Default, overridden by specific adjustments */
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  opacity: 0.8;
}

/* Layer Specifics (Refining stroke widths per layer depth) */
/* Layer 1 (Deepest) */
.topo-layer[data-speed="0.05"] .topo-line {
  stroke-width: 1.5;
  opacity: 1;
}

/* Layer 2 */
.topo-layer[data-speed="0.12"] .topo-line {
  stroke-width: 1.2;
  opacity: 0.9;
}

/* Layer 3 */
.topo-layer[data-speed="0.2"] .topo-line {
  stroke-width: 1.0;
  opacity: 0.8;
}

/* Layer 4 (Shallowest) */
.topo-layer[data-speed="0.3"] .topo-line {
  stroke-width: 0.8;
  opacity: 0.7;
}


/* Glows */
.topo-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
}

.topo-glow--1 {
  bottom: -20%;
  left: -10%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(155, 77, 202, 0.15) 0%, transparent 70%);
}

.topo-glow--2 {
  top: -15%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(155, 77, 202, 0.1) 0%, transparent 70%);
}

/* Breathing Animation (Simulated Morph) */
@keyframes topo-breathe {

  0%,
  100% {
    transform: scale(1) translateY(0);
  }

  50% {
    transform: scale(1.02) translateY(-10px);
  }
}

.topo-layer svg {
  animation: topo-breathe 20s ease-in-out infinite;
}

.topo-layer:nth-child(3) svg {
  animation-delay: 0s;
  animation-duration: 25s;
}

/* Layer 1 */
.topo-layer:nth-child(4) svg {
  animation-delay: -5s;
  animation-duration: 30s;
}

/* Layer 2 */
.topo-layer:nth-child(5) svg {
  animation-delay: -10s;
  animation-duration: 22s;
}

/* Layer 3 */
.topo-layer:nth-child(6) svg {
  animation-delay: -2s;
  animation-duration: 28s;
}

/* Layer 4 */

/* Responsive */
@media (max-width: 1024px) {

  .topo-layer[data-speed="0.2"],
  .topo-layer[data-speed="0.3"] {
    opacity: 0.5 !important;
  }
}

@media (max-width: 768px) {

  /* Simplify for mobile */
  .topo-layer[data-speed="0.2"],
  .topo-layer[data-speed="0.3"] {
    display: none;
  }

  .topo-glow {
    opacity: 0.3;
  }

  .topo-glow--2 {
    display: none;
  }

  .topo-layer svg {
    animation: none;
    /* Disable animation for performance */
  }
}

@media (prefers-reduced-motion: reduce) {

  .topo-layer,
  .topo-layer svg,
  .topo-glow {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}