/* ==========================================================================
   POWERINVOICE SAAS — MASTER LIGHT THEME STYLESHEET
   Identidade Visual: Metrikx Navy (#050B14) & Vibrant Orange (#FF6B00 / #EA580C)
   Padrão: Light Editorial + High-Tech DSS Console + Content Architecture
   ========================================================================== */

:root {
  /* Surfaces — Clean High-End Light Theme */
  --bg-page: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #F1F5F9;
  --bg-surface-elevated: #FFFFFF;
  --border-subtle: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);

  /* Navy Brand Tokens */
  --navy-950: #030712;
  --navy-900: #050B14;
  --navy-850: #0A1628;
  --navy-800: #0E1E38;
  --navy-700: #162A4D;
  --navy-600: #1E3A6B;
  --navy-500: #2C5294;
  --navy-400: #3E72C4;
  --navy-300: #6BA1F0;
  --navy-200: #A8CBFD;
  --navy-100: #DBEAFE;
  --navy-50:  #EFF6FF;

  /* Orange Metrikx Brand Tokens */
  --orange-950: #431407;
  --orange-900: #7C2D12;
  --orange-800: #9A3412;
  --orange-700: #C2410C;
  --orange-600: #EA580C;
  --orange-500: #FF6B00; /* Core Metrikx Orange */
  --orange-400: #FF8A00;
  --orange-300: #FDBA74;
  --orange-200: #FED7AA;
  --orange-100: #FFEDD5;
  --orange-50:  #FFF7ED;

  /* Secondary Accents */
  --cyan-500: #00B4D8;
  --cyan-600: #0284C7;
  --cyan-400: #38BDF8;
  --cyan-50:  #F0F9FF;
  
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --emerald-50:  #ECFDF5;

  /* Typography */
  --font-display: 'Archivo', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Motion & Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-editorial: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base resets & typography */
html {
  scroll-behavior: smooth;
  background-color: var(--bg-page);
  color: var(--navy-900);
}

body {
  font-family: var(--font-display);
  background-color: var(--bg-page);
  color: var(--navy-900);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ==========================================================================
   PROGRESSIVE MULTI-LAYER GRADIENT BLUR HEADER (Design System)
   ========================================================================== */
.gradient-blur {
  position: fixed;
  z-index: 40;
  inset: 0 0 auto 0;
  height: 90px;
  pointer-events: none;
}
.gradient-blur > div,
.gradient-blur::before,
.gradient-blur::after {
  position: absolute;
  inset: 0;
}
.gradient-blur::before {
  content: "";
  z-index: 1;
  backdrop-filter: blur(0.5px);
  mask: linear-gradient(to top, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 12.5%, rgba(0,0,0,1) 25%, rgba(0,0,0,0) 37.5%);
}
.gradient-blur > div:nth-of-type(1) {
  z-index: 2;
  backdrop-filter: blur(1px);
  mask: linear-gradient(to top, rgba(0,0,0,0) 12.5%, rgba(0,0,0,1) 25%, rgba(0,0,0,1) 37.5%, rgba(0,0,0,0) 50%);
}
.gradient-blur > div:nth-of-type(2) {
  z-index: 3;
  backdrop-filter: blur(2px);
  mask: linear-gradient(to top, rgba(0,0,0,0) 25%, rgba(0,0,0,1) 37.5%, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 62.5%);
}
.gradient-blur > div:nth-of-type(3) {
  z-index: 4;
  backdrop-filter: blur(4px);
  mask: linear-gradient(to top, rgba(0,0,0,0) 37.5%, rgba(0,0,0,1) 50%, rgba(0,0,0,1) 62.5%, rgba(0,0,0,0) 75%);
}
.gradient-blur > div:nth-of-type(4) {
  z-index: 5;
  backdrop-filter: blur(8px);
  mask: linear-gradient(to top, rgba(0,0,0,0) 50%, rgba(0,0,0,1) 62.5%, rgba(0,0,0,1) 75%, rgba(0,0,0,0) 87.5%);
}
.gradient-blur > div:nth-of-type(5) {
  z-index: 6;
  backdrop-filter: blur(16px);
  mask: linear-gradient(to top, rgba(0,0,0,0) 62.5%, rgba(0,0,0,1) 75%, rgba(0,0,0,1) 87.5%, rgba(0,0,0,0) 100%);
}
.gradient-blur > div:nth-of-type(6) {
  z-index: 7;
  backdrop-filter: blur(24px);
  mask: linear-gradient(to top, rgba(0,0,0,0) 75%, rgba(0,0,0,1) 87.5%, rgba(0,0,0,1) 100%);
}
.gradient-blur::after {
  content: "";
  z-index: 8;
  backdrop-filter: blur(36px);
  mask: linear-gradient(to top, rgba(0,0,0,0) 87.5%, rgba(0,0,0,1) 100%);
}

/* ==========================================================================
   TRANSPARENT LETTERING & TYPOGRAPHY EFFECTS (Design System)
   ========================================================================== */

/* Stroke Outline Lettering */
.lettering-stroke-navy {
  -webkit-text-stroke-width: 1.5px;
  -webkit-text-stroke-color: rgba(5, 11, 20, 0.6);
  color: transparent;
  transition: -webkit-text-stroke-color 0.3s ease;
}
.lettering-stroke-navy:hover {
  -webkit-text-stroke-color: rgba(5, 11, 20, 0.95);
}

.lettering-stroke-orange {
  -webkit-text-stroke-width: 1.5px;
  -webkit-text-stroke-color: rgba(255, 107, 0, 0.8);
  color: transparent;
  transition: -webkit-text-stroke-color 0.3s ease;
}
.lettering-stroke-orange:hover {
  -webkit-text-stroke-color: #EA580C;
}

/* Mega Ghost / Watermark Typography in Light Theme */
.lettering-ghost-light {
  position: absolute;
  pointer-events: none;
  user-select: none;
  line-height: 0.8;
  font-weight: 900;
  letter-spacing: -0.05em;
  opacity: 0.035;
  color: #050B14;
  z-index: 0;
  text-transform: uppercase;
}

/* Gradient-Clipped Text */
.lettering-gradient-orange {
  background: linear-gradient(135deg, #FF6B00 0%, #EA580C 50%, #C2410C 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lettering-gradient-navy {
  background: linear-gradient(135deg, #050B14 0%, #162A4D 50%, #2C5294 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hero word interactive proximity variation */
.hero-word {
  display: inline-block;
  will-change: font-weight, font-variation-settings, color;
  transition: color 0.2s ease;
}

/* ==========================================================================
   SCROLL REVEAL (IntersectionObserver)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-editorial), transform 0.7s var(--ease-editorial);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   MICRO-ANIMATIONS & PINGS (Content Architecture style)
   ========================================================================== */
@keyframes status-ping {
  75%, 100% {
    transform: scale(2.4);
    opacity: 0;
  }
}
.animate-status-ping {
  animation: status-ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.animate-cursor-blink {
  animation: cursor-blink 1s step-start infinite;
}

@keyframes hero-scroll-cue {
  0% { transform: translateY(-100%); }
  50% { transform: translateY(100%); }
  100% { transform: translateY(200%); }
}
.animate-hero-scroll-cue {
  animation: hero-scroll-cue 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes orange-glow-pulse {
  0%, 100% {
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3), 0 0 30px rgba(255, 107, 0, 0.1);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 107, 0, 0.55), 0 0 45px rgba(255, 107, 0, 0.2);
  }
}
.glow-orange-pulse {
  animation: orange-glow-pulse 3s infinite ease-in-out;
}

/* Continuous Marquee loop */
@keyframes marqy-loop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.marqy-track {
  display: flex;
  width: max-content;
  animation: marqy-loop 28s linear infinite;
}
.marqy-track:hover {
  animation-play-state: paused;
}

/* ==========================================================================
   3D TILT CARDS & GLASSMORPHISM CLARO
   ========================================================================== */
.fade-card {
  position: relative;
  transition: transform 0.35s var(--ease-out-expo), box-shadow 0.35s ease, border-color 0.35s ease;
  transform-style: preserve-3d;
}
.fade-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 35px -10px rgba(5, 11, 20, 0.08), 0 0 20px rgba(255, 107, 0, 0.1);
  border-color: rgba(255, 107, 0, 0.45);
}

/* Border Gradient */
.border-gradient-orange {
  position: relative;
}
.border-gradient-orange::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.6) 0%, rgba(5, 11, 20, 0.1) 50%, rgba(0, 180, 216, 0.4) 100%);
  pointer-events: none;
  z-index: 2;
}

/* ==========================================================================
   INTERACTIVE GLYPH FIELD CONTAINER (site_contentarchitecture.dev style)
   ========================================================================== */
.glyph-field-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #050B14;
  overflow: hidden;
}

@media (max-width: 1023px) {
  .glyph-field-wrapper {
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(5, 11, 20, 0.25), 0 0 35px rgba(255, 107, 0, 0.18);
  }
}

@media (min-width: 1024px) {
  .glyph-field-wrapper {
    border-radius: 0;
    border-left: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: none;
  }
}

.glyph-field-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  cursor: crosshair;
}

.glyph-cursor-label {
  pointer-events: none;
  position: absolute;
  z-index: 30;
  padding: 5px 12px;
  background-color: #FFFFFF;
  color: #050B14;
  border: 1px solid rgba(255, 107, 0, 0.6);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
  opacity: 0;
  transform: translate(18px, 18px);
  transition: opacity 0.15s ease;
  white-space: nowrap;
}

/* ==========================================================================
   TABS & CONSOLE DSS STYLING
   ========================================================================== */
.dss-tab-btn {
  transition: all 0.2s ease;
  position: relative;
}
.dss-tab-btn.active {
  background-color: #FFFFFF;
  color: #050B14;
  border-color: rgba(255, 107, 0, 0.5);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.dss-tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 15%;
  right: 15%;
  height: 2px;
  background-color: #FF6B00;
  border-radius: 2px;
}

.dss-panel {
  display: none;
}
.dss-panel.active {
  display: block;
}

/* ==========================================================================
   MODAL & TOAST
   ========================================================================== */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-window {
  transform: scale(0.96) translateY(12px);
  transition: transform 0.3s var(--ease-out-expo);
}
.modal-overlay.active .modal-window {
  transform: scale(1) translateY(0);
}

/* Reduced Motion preferences */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .marqy-track, .animate-status-ping, .glow-orange-pulse, .animate-hero-scroll-cue {
    animation: none !important;
  }
}
