/* =================================================================
   SALLES — CONTROLLED CHAOS DESIGN SYSTEM
   Dark Luxury Editorial + Digital Lab + Experimental Interface
   ================================================================= */

:root {
  --bg-deep: #050505;
  --bg-card: #0a0a0d;
  --bg-elevated: #111116;
  --text-primary: #F4F4F5;
  --text-secondary: #8E8E93;
  --text-muted: #52525B;
  --accent-orange: #FF6A00;
  --accent-orange-glow: rgba(255, 106, 0, 0.25);
  --line-subtle: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.18);
  
  --font-display: 'Anton', 'Syne', sans-serif;
  --font-serif: 'Syne', sans-serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  background-color: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  background-color: var(--bg-deep);
  position: relative;
}

/* Accessibility: Visible Focus States */
:focus-visible {
  outline: 2px solid var(--accent-orange) !important;
  outline-offset: 3px !important;
}

/* 120Hz Volumetric Parallax Canvas Layering */
#parallax-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  display: block;
}

#ambient-torch {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

#smooth-content {
  position: relative;
  z-index: 5;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

svg.w-4 { width: 1rem !important; height: 1rem !important; }
svg.w-5 { width: 1.25rem !important; height: 1.25rem !important; }

/* =================================================================
   FLUID TYPOGRAPHY HIERARCHY & CALIBRATED EDITORIAL SPACING
   Anti-Collision Typography Engine: Desktop & Mobile Separate Tuning
   ================================================================= */
.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.font-mono {
  font-family: var(--font-mono);
}

.font-serif {
  font-family: var(--font-serif);
}

/* 02 — HERO MONUMENTAL HEADLINE */
.hero-headline {
  letter-spacing: -0.022em;
  word-break: break-word;
  hyphens: none;
}

.hero-monumental-line {
  font-size: clamp(2.1rem, 8.8vw, 7.8rem);
  line-height: 0.98;
  letter-spacing: -0.022em;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .hero-monumental-line {
    font-size: clamp(2.05rem, 8.8vw, 2.7rem);
    line-height: 1.01;
    letter-spacing: -0.02em;
  }
}

@media (max-width: 380px) {
  .hero-monumental-line {
    font-size: clamp(1.85rem, 8.4vw, 2.15rem);
    line-height: 1.02;
    letter-spacing: -0.018em;
  }
}

/* 03 — CAPÍTULO 01: "NÃO SOU SÓ UM CARA DO MARKETING" */
.chapter-headline-01 {
  font-size: clamp(2.4rem, 7.2vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  word-break: break-word;
}

@media (max-width: 640px) {
  .chapter-headline-01 {
    font-size: clamp(2.1rem, 7.8vw, 2.8rem);
    line-height: 1.03;
    letter-spacing: -0.02em;
  }
}

/* 03 — CAPÍTULO 02: "ATENÇÃO NÃO É O OBJETIVO" */
.headline-manifesto-premissa {
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  line-height: 0.99;
  letter-spacing: -0.025em;
  word-break: break-word;
}

@media (max-width: 640px) {
  .headline-manifesto-premissa {
    font-size: clamp(2.2rem, 9.5vw, 3.2rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
  }
}

.manifesto-axiom-word {
  font-size: clamp(2.4rem, 6.5vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.022em;
  word-break: break-word;
}

/* 03 — CAPÍTULO 03: "SALLES." */
.headline-salles-bio {
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  line-height: 0.96;
  letter-spacing: -0.025em;
}

@media (max-width: 640px) {
  .headline-salles-bio {
    font-size: clamp(2.5rem, 9vw, 3.5rem);
    line-height: 1.0;
    letter-spacing: -0.02em;
  }
}

/* 03 & 06 — CAPÍTULO 04: "EU ENTRO AQUI." & COMPETÊNCIAS */
.headline-eu-entro-aqui {
  font-size: clamp(2.8rem, 8vw, 6.8rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  word-break: break-word;
}

@media (max-width: 640px) {
  .headline-eu-entro-aqui {
    font-size: clamp(2.4rem, 10vw, 3.4rem);
    line-height: 1.03;
    letter-spacing: -0.02em;
  }
}

.competencia-headline {
  font-size: clamp(2.8rem, 7vw, 7.5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
}

@media (max-width: 640px) {
  .competencia-headline {
    font-size: clamp(2.2rem, 9vw, 3.2rem);
    line-height: 1.0;
    letter-spacing: -0.02em;
  }
}

/* 03 — CAPÍTULO 05: "TRABALHOS REAIS." */
.headline-trabalhos-reais {
  font-size: clamp(2.6rem, 6.5vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  word-break: break-word;
}

@media (max-width: 640px) {
  .headline-trabalhos-reais {
    font-size: clamp(2.3rem, 9vw, 3.2rem);
    line-height: 1.03;
    letter-spacing: -0.02em;
  }
}

/* 03 — CAPÍTULO 06: "QUANDO O MARKETING FALHA." */
.headline-override-title {
  font-size: clamp(2.6rem, 7.5vw, 5.8rem);
  line-height: 0.97;
  letter-spacing: -0.025em;
  word-break: break-word;
}

@media (max-width: 640px) {
  .headline-override-title {
    font-size: clamp(2.2rem, 8.8vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.02em;
  }
}

/* 03 — CAPÍTULO 07: "E É EXATAMENTE ESSA A IDEIA." */
.headline-cta-final {
  font-size: clamp(2.8rem, 8.5vw, 7.4rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  word-break: break-word;
}

@media (max-width: 640px) {
  .headline-cta-final {
    font-size: clamp(2.2rem, 11vw, 3.6rem);
    line-height: 1.04;
    letter-spacing: -0.02em;
  }
}

/* Generic Fallback Classes */
.chapter-headline {
  font-size: clamp(2.2rem, 7.5vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  word-break: break-word;
}

@media (max-width: 640px) {
  .chapter-headline {
    line-height: 1.03;
    letter-spacing: -0.02em;
  }
}

.chapter-headline-lg {
  font-size: clamp(2.5rem, 9vw, 7.2rem);
  line-height: 0.96;
  letter-spacing: -0.028em;
  word-break: break-word;
}

@media (max-width: 640px) {
  .chapter-headline-lg {
    line-height: 1.02;
    letter-spacing: -0.02em;
  }
}

.manifesto-word {
  font-size: clamp(2.4rem, 8.5vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.028em;
  word-break: break-word;
}

/* Text Gradient & Stroke */
.text-gradient-orange {
  background: linear-gradient(135deg, #FF6A00 0%, #FF9040 50%, #FFA866 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.stroke-text {
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.12);
  color: transparent;
}

.stroke-text-orange {
  -webkit-text-stroke: 1.5px #FF6A00;
  color: transparent;
}

.text-stroke-hover {
  transition: all 0.4s ease;
}

.text-stroke-hover:hover {
  -webkit-text-stroke: 0px transparent;
  color: #ffffff;
}

/* Noise Film Grain Overlay (Hardware-accelerated) */
.noise-overlay {
  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");
  background-repeat: repeat;
  mix-blend-mode: overlay;
}

/* Technical Blueprint Grid */
.technical-grid {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

/* Custom Interactive Cursor */
#cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  margin-left: -5px;
  border-radius: 9999px;
  background-color: var(--accent-orange);
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(-100px, -100px, 0);
}

#cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  margin-left: -22px;
  border-radius: 9999px;
  border: 1.5px solid rgba(255, 106, 0, 0.4);
  pointer-events: none;
  z-index: 9998;
  will-change: transform, border-color, background-color;
  backface-visibility: hidden;
  transform: translate3d(-100px, -100px, 0);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

@media (pointer: coarse) {
  #cursor-dot, #cursor-ring {
    display: none !important;
  }
}

/* Ambient Torch Spotlight */
#ambient-torch {
  background: radial-gradient(650px circle at var(--mouse-x, 50vw) var(--mouse-y, 50vh), rgba(255, 106, 0, 0.08), transparent 75%);
  will-change: background;
  contain: paint;
  transform: translateZ(0);
}

/* Lenis CSS standards */
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;
}

/* Buttons & Touch Targets */
.magnetic-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
  min-height: 44px;
}

.touch-target {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Kinetic Words Strip */
.kinetic-words-strip {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  contain: paint;
}

.kinetic-track {
  display: flex;
  width: max-content;
  animation: marquee 24s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
  transform: translate3d(0, 0, 0);
}

@keyframes marquee {
  0% { transform: translate3d(0%, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* Expectation Boxes */
.expectation-box {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  will-change: transform, border-color, background-color;
  transform: translate3d(0, 0, 0);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.25s ease, border-color 0.25s ease;
}

.expectation-box:hover {
  background: rgba(255, 106, 0, 0.05);
  border-color: rgba(255, 106, 0, 0.5);
  transform: translate3d(8px, 0, 0);
}

/* Provocation Items */
.provocation-item {
  position: relative;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.provocation-item:hover {
  transform: translate3d(12px, 0, 0);
}

.provocation-item .laser-line {
  will-change: width;
  transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scanline Effect */
.scanline {
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,255,255,0) 50%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.4)
  );
  background-size: 100% 4px;
}

/* =================================================================
   CINEMATIC PORTRAIT SHUTTER & OPTICAL REFRACTION (FASE 02)
   ================================================================= */
.portrait-container {
  position: relative;
  overflow: hidden;
  background-color: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: border-color 0.4s ease;
}

.portrait-container:hover {
  border-color: rgba(255, 106, 0, 0.4);
}

.portrait-shutter {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition: clip-path 0.55s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: clip-path, transform, filter;
}

.portrait-shutter.shutter-wipe {
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
}

/* Subtle optical refraction pulse during angle transition (without permanent facial warping) */
.optical-refract {
  filter: contrast(1.22) brightness(1.06) drop-shadow(2px 0 0 rgba(255, 106, 0, 0.4)) drop-shadow(-2px 0 0 rgba(0, 200, 255, 0.28)) !important;
  transform: scale(1.02);
  transition: filter 0.28s ease, transform 0.28s ease;
}

/* =================================================================
   EDITORIAL PROJECT CARDS (FASE 02)
   ================================================================= */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: rgba(12, 12, 16, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover, .project-card:focus-within {
  border-color: rgba(255, 106, 0, 0.7);
  box-shadow: 0 16px 40px -10px rgba(255, 106, 0, 0.2);
  transform: translateY(-4px);
}

.project-link {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1.25rem;
}

/* =================================================================
   SALLES OVERRIDE DIRECTIVE BOXES (TACTILE & ZERO SCROLL-LOCK)
   ================================================================= */
.override-box {
  position: relative;
  background: rgba(14, 14, 18, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 1.5rem;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.override-box:hover, .override-box:focus-visible, .override-box.active-pulse {
  background: rgba(255, 106, 0, 0.12);
  border-color: var(--accent-orange);
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(255, 106, 0, 0.26);
}

.override-box:active {
  transform: scale(0.98);
}

/* =================================================================
   PREFERS-REDUCED-MOTION (STRICT A11Y COMPLIANCE)
   ================================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  #parallax-canvas,
  #ambient-torch,
  #cursor-dot,
  #cursor-ring {
    display: none !important;
  }
  
  .kinetic-track {
    animation: none !important;
  }
  
  .portrait-shutter {
    clip-path: none !important;
    transition: none !important;
  }
}
