/* ============================================
   DOS SANTOS — Escritório de BPM Agêntico 2.0
   Palette: Terracota · Areia · Off-white
   Animações: GSAP + ScrollTrigger + Lenis + CSS
   ============================================ */

:root {
  --bg: #f4ede1;
  --bg-2: #ece2cf;
  --bg-deep: #211913;
  --ink: #1d1612;
  --ink-soft: #4a3b30;
  --paper: #faf6ee;
  --terracota: #b8533a;
  --terracota-deep: #8c3c27;
  --clay: #d97a4f;
  --rust: #6b2a15;
  --line: rgba(29, 22, 18, 0.14);
  --line-strong: rgba(29, 22, 18, 0.30);

  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --ease: cubic-bezier(0.65, 0, 0.05, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { scroll-behavior: smooth; }
html.js { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
@media (hover: hover) and (pointer: fine) {
  html.js body { cursor: none; }
}

::selection { background: var(--terracota); color: var(--paper); }
a { color: inherit; text-decoration: none; }
em { font-style: italic; color: var(--terracota); font-weight: inherit; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============================================
   CURSOR
   ============================================ */
.cursor, .cursor-dot {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.cursor {
  width: 40px; height: 40px;
  border: 1.5px solid var(--terracota);
  transition: width .3s var(--ease), height .3s var(--ease), background .3s var(--ease), opacity .3s;
  opacity: 0;
}
.cursor-dot { width: 6px; height: 6px; background: var(--terracota); opacity: 0; }
.cursor.is-active, .cursor-dot.is-active { opacity: 1; }
.cursor.hover { width: 72px; height: 72px; background: rgba(184, 83, 58, 0.12); }
@media (hover: none), (pointer: coarse) { .cursor, .cursor-dot { display: none; } }

/* ============================================
   SCROLL PROGRESS
   ============================================ */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%;
  background: linear-gradient(90deg, var(--terracota), var(--clay));
  transform: scaleX(0); transform-origin: 0 50%;
  z-index: 200; will-change: transform;
}

/* ============================================
   ANIMATED BACKGROUND
   ============================================ */
.bg-mesh { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: var(--bg); }
.blob {
  position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.5;
  will-change: transform;
}
.blob-1 { width: 46vw; height: 46vw; left: -10vw; top: -8vw;
  background: radial-gradient(circle, var(--clay), transparent 70%); animation: float1 22s ease-in-out infinite; }
.blob-2 { width: 40vw; height: 40vw; right: -8vw; top: 18vh;
  background: radial-gradient(circle, var(--terracota), transparent 70%); opacity: 0.35; animation: float2 28s ease-in-out infinite; }
.blob-3 { width: 38vw; height: 38vw; left: 24vw; bottom: -12vw;
  background: radial-gradient(circle, #e9b27e, transparent 70%); opacity: 0.4; animation: float3 25s ease-in-out infinite; }
@keyframes float1 { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(8vw,6vh) scale(1.15);} }
@keyframes float2 { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(-7vw,-5vh) scale(1.1);} }
@keyframes float3 { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(5vw,-7vh) scale(0.9);} }

.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px; opacity: 0.5;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 75%);
}
.bg-noise { position: absolute; inset: 0; opacity: 0.035; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ============================================
   NAV
   ============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 22px clamp(16px, 5vw, 64px);
  transition: padding .4s var(--ease), background .4s var(--ease), backdrop-filter .4s;
}
.nav.scrolled {
  padding: 14px clamp(16px, 5vw, 64px);
  background: rgba(244, 237, 225, 0.72); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-logo { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 17px; letter-spacing: -0.02em; }
.logo-mark { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--terracota);
  position: relative; transition: transform .5s var(--ease); }
.logo-mark::after { content:''; position:absolute; inset: 4px; border-radius:50%; background: var(--terracota); transform: scale(0); transition: transform .4s var(--ease); }
.nav-logo:hover .logo-mark { transform: rotate(180deg); }
.nav-logo:hover .logo-mark::after { transform: scale(1); }
.logo-text em { color: var(--terracota); }
.nav-links { display: flex; gap: 36px; }
.nav-links a { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; position: relative; overflow: hidden; padding: 4px 0; }
.nav-links a span { display: inline-block; transition: transform .4s var(--ease); }
.nav-links a::after { content:''; position:absolute; left:0; bottom:0; width:100%; height:1.5px; background: var(--terracota); transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s var(--ease); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 22px; }
.nav-signin {
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  position: relative; overflow: hidden; padding: 4px 0;
}
.nav-signin span { display: inline-block; transition: transform .4s var(--ease); }
.nav-signin::after { content:''; position:absolute; left:0; bottom:0; width:100%; height:1.5px; background: var(--terracota); transform: scaleX(0); transform-origin: 0 50%; transition: transform .4s var(--ease); }
.nav-signin:hover::after { transform: scaleX(1); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 9px; white-space: nowrap;
  font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em;
  padding: 11px 22px; border: 1.5px solid var(--ink); border-radius: 100px;
  transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}
.nav-cta svg { transition: transform .4s var(--ease); }
.nav-cta:hover { background: var(--ink); color: var(--paper); }
.nav-cta:hover svg { transform: translateX(4px); }
.nav-lang {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.04em; color: var(--ink-soft);
}
.nav-lang a { position: relative; padding: 2px 1px; transition: color .3s var(--ease); }
.nav-lang a:hover { color: var(--terracota); }
.nav-lang .lang-current { color: var(--terracota); font-weight: 700; }
.nav-lang .lang-sep { opacity: 0.4; }
@media (max-width: 720px) { .nav-links { display: none; } .nav-actions { gap: 14px; } }
@media (max-width: 480px) {
  .nav { gap: 8px; }
  .nav-actions { gap: 8px; }
  .nav-signin { display: none; }
  .nav-cta { padding: 7px 12px; gap: 0; font-size: 10.5px; }
  .nav-cta svg { display: none; }
  .nav-lang { gap: 6px; font-size: 10px; }
  .nav-lang .lang-sep { display: none; }
}
@media (max-width: 320px) { .nav-lang { display: none; } }

/* ============================================
   LAYOUT BASE
   ============================================ */
.hero, .pipeline, .contato { position: relative; padding: 0 clamp(20px, 5vw, 64px); }
.section-head { max-width: 1300px; margin: 0 auto; padding-bottom: 56px; }
.kicker {
  display: inline-block; font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--terracota); margin-bottom: 22px; padding-left: 28px; position: relative;
}
.kicker::before { content:''; position:absolute; left:0; top:50%; width:18px; height:1.5px; background: var(--terracota); }
.section-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 5vw, 62px);
  line-height: 1.08; letter-spacing: -0.025em; max-width: 1100px; font-variation-settings: "opsz" 144;
}

/* word mask reveal — visível por padrão (sem opacity:0) */
.word { display: inline-block; }
.hero-title .line, .contato-title .line, .section-title { overflow: hidden; }
.hero-title .line, .contato-title .line { display: block; }

/* ============================================
   HERO
   ============================================ */
.hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; padding-top: 120px; padding-bottom: 60px; max-width: 1300px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--ink-soft);
  padding: 9px 16px; border: 1px solid var(--line); border-radius: 100px; background: rgba(250, 246, 238, 0.5);
  backdrop-filter: blur(4px); margin-bottom: 36px;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--terracota); box-shadow: 0 0 0 0 rgba(184,83,58,0.5); animation: pulse 2s infinite; }
@keyframes pulse { 0%{ box-shadow: 0 0 0 0 rgba(184,83,58,0.5);} 70%{ box-shadow: 0 0 0 10px rgba(184,83,58,0);} 100%{ box-shadow: 0 0 0 0 rgba(184,83,58,0);} }

.hero-title {
  font-family: var(--serif); font-weight: 400; font-size: clamp(42px, 8.5vw, 118px);
  line-height: 0.98; letter-spacing: -0.035em; font-variation-settings: "opsz" 144;
}
.hero-lede {
  font-family: var(--serif); font-weight: 300; font-size: clamp(18px, 2.1vw, 25px);
  line-height: 1.5; max-width: 720px; margin-top: 36px; color: var(--ink-soft);
}
.hero-lede strong { color: var(--ink); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 44px; }

.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; padding: 17px 30px; border-radius: 100px;
  overflow: hidden; transition: color .4s var(--ease), border-color .4s var(--ease);
}
.btn span, .btn svg { position: relative; z-index: 2; transition: transform .4s var(--ease); }
.btn::before { content:''; position:absolute; inset:0; z-index:1; transform: translateY(101%); transition: transform .5s var(--ease); }
.btn:hover::before { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary::before { background: var(--terracota); }
.btn-primary:hover svg { transform: translateY(3px); }
.btn-ghost { border: 1.5px solid var(--line-strong); color: var(--ink); }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover { color: var(--paper); border-color: var(--ink); }

.hero-stats { display: flex; flex-wrap: wrap; gap: clamp(28px, 5vw, 72px); margin-top: 80px; border-top: 1px solid var(--line); padding-top: 36px; }
.stat { display: flex; flex-wrap: wrap; align-items: baseline; max-width: 230px; }
.stat-num { font-family: var(--serif); font-weight: 500; font-size: clamp(34px, 4vw, 50px); line-height: 1; color: var(--ink); letter-spacing: -0.02em; }
.stat-suffix { font-family: var(--serif); font-size: clamp(18px, 2vw, 24px); color: var(--terracota); }
.stat-lbl { flex-basis: 100%; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); margin-top: 12px; font-family: var(--mono); }

.scroll-hint { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 12px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); }
.scroll-hint-line { width: 1px; height: 50px; background: var(--line-strong); position: relative; overflow: hidden; }
.scroll-hint-line::after { content:''; position:absolute; top:-50%; left:0; width:100%; height:50%; background: var(--terracota); animation: scrolldown 1.8s var(--ease) infinite; }
@keyframes scrolldown { 0%{ top:-50%;} 100%{ top:100%;} }
@media (max-width: 720px){ .scroll-hint { display:none; } }

/* ============================================
   PIPELINE
   ============================================ */
.pipeline { padding-top: 140px; padding-bottom: 140px; }
.steps { max-width: 1300px; margin: 0 auto; position: relative; padding-left: 40px; }
.track { position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.track-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0%; background: linear-gradient(var(--terracota), var(--clay)); border-radius: 2px; }

.step {
  display: grid; grid-template-columns: 64px 1fr auto; align-items: start; gap: 28px;
  padding: 30px 0; border-bottom: 1px solid var(--line); position: relative;
  transition: transform .5s var(--ease);
}
.step::before { content:''; position:absolute; left:-47px; top:38px; width:12px; height:12px; border-radius:50%; background: var(--bg); border: 2px solid var(--line-strong); transition: border-color .4s var(--ease), background .4s var(--ease), transform .4s var(--ease); }
.step:hover { transform: translateX(10px); }
.step:hover::before { border-color: var(--terracota); background: var(--terracota); transform: scale(1.3); }
.step-id { font-family: var(--mono); font-size: 14px; color: var(--terracota); font-weight: 500; padding-top: 5px; }
.step-body h4 { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.1; letter-spacing: -0.01em; margin-bottom: 10px; transition: color .3s var(--ease); }
.step:hover .step-body h4 { color: var(--terracota); }
.step-body p { font-size: 14.5px; line-height: 1.6; color: var(--ink-soft); max-width: 560px; margin-bottom: 12px; }
.step-out { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: var(--terracota-deep); background: rgba(184, 83, 58, 0.08); padding: 5px 11px; border-radius: 6px; }
.step-model { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); padding-top: 7px; white-space: nowrap; }
@media (max-width: 760px) {
  .steps { padding-left: 28px; }
  .step { grid-template-columns: 44px 1fr; gap: 16px; }
  .step-model { grid-column: 2; padding-top: 4px; }
  .step::before { left:-35px; }
}

/* ============================================
   CONTATO
   ============================================ */
.contato { min-height: 100vh; display: flex; align-items: center; background: var(--bg-deep); color: var(--paper); margin-top: 40px; border-radius: 40px 40px 0 0; padding-top: 100px; padding-bottom: 80px; }
.contato .kicker { color: var(--clay); }
.contato .kicker::before { background: var(--clay); }
.contato-inner { max-width: 1200px; margin: 0 auto; width: 100%; }
.contato-title { font-family: var(--serif); font-weight: 300; font-size: clamp(44px, 9vw, 130px); line-height: 0.96; letter-spacing: -0.03em; margin: 18px 0 56px; font-variation-settings: "opsz" 144; }
.contato-title em { color: var(--clay); }

.contato-mail { display: inline-flex; align-items: center; gap: 16px; font-family: var(--serif); font-size: clamp(20px, 3vw, 34px); padding: 26px 0; border-top: 1px solid rgba(244,237,225,0.2); border-bottom: 1px solid rgba(244,237,225,0.2); width: 100%; transition: gap .4s var(--ease), color .4s var(--ease); }
.contato-mail svg { transition: transform .4s var(--ease); }
.contato-mail:hover { gap: 28px; color: var(--clay); }
.contato-mail:hover svg { transform: translate(4px,-4px); }

.contato-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 56px; border-top: 1px solid rgba(244,237,225,0.12); }
.contato-link { display: flex; flex-direction: column; gap: 8px; padding: 28px 0; border-bottom: 1px solid rgba(244,237,225,0.12); transition: padding-left .4s var(--ease); }
.contato-link:hover { padding-left: 14px; }
.cl-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--clay); }
.cl-handle { font-size: 16px; color: var(--paper); }
@media (max-width: 760px){ .contato-grid { grid-template-columns: 1fr; } .contato { border-radius: 28px 28px 0 0; } }

.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-top: 70px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; color: rgba(244,237,225,0.5); }

/* ============================================
   REVEAL STATE (só quando JS vivo — evita flash;
   o JS limpa via gsap se algo falhar)
   ============================================ */
.js [data-fade] { will-change: transform, opacity; }
