/* Nexa Landing — globals */
:root {
  --bg: #04080F;
  --bg-2: #070C16;
  --bg-3: #0B121F;
  --surface: #0F1726;
  --surface-2: #131C2E;
  --border: rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.14);
  --fg: #F5F7FA;
  --fg-2: #A8B0BF;
  --fg-3: #6B7385;
  --accent: #4D7CFE;
  --accent-2: #7AA0FF;
  --accent-glow: rgba(77,124,254,0.35);
  --whatsapp: #25D366;

  --serif-wordmark: 'Cinzel', 'Trajan Pro', 'Cormorant Garamond', 'Times New Roman', serif;
  --serif-display: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;

  --max-w: 1280px;
  --pad-x: clamp(20px, 5vw, 80px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

/* ---- Layout ---- */
.container { max-width: var(--max-w); margin: 0 auto; padding-left: var(--pad-x); padding-right: var(--pad-x); }
.section { padding: clamp(80px, 12vw, 160px) 0; position: relative; }

/* ---- Type ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: ''; width: 24px; height: 1px; background: var(--fg-3); display: inline-block;
}
.display {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.display .ital { font-style: italic; color: var(--fg-2); }
.display .accent { color: var(--accent-2); font-style: italic; }
.h2 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 80px);
  line-height: 1;
  letter-spacing: -0.015em;
}
.h3 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.lead {
  font-size: clamp(16px, 1.4vw, 19px);
  color: var(--fg-2);
  max-width: 56ch;
  line-height: 1.55;
}
.body { color: var(--fg-2); font-size: 15px; line-height: 1.6; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  font-family: var(--sans); font-weight: 500; font-size: 14.5px;
  letter-spacing: 0.005em;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .25s, color .25s, border-color .25s;
  white-space: nowrap;
  position: relative;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: var(--fg); color: var(--bg); }
.btn.primary:hover { background: #fff; }
.btn.ghost { color: var(--fg); border: 1px solid var(--border-2); }
.btn.ghost:hover { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.25); }
.btn.wsp { background: transparent; color: var(--fg); border: 1px solid var(--border-2); }
.btn.wsp .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--whatsapp); box-shadow: 0 0 12px var(--whatsapp); }
.btn .arrow { transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---- Reveal-on-scroll ---- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }
.reveal.d4 { transition-delay: .32s; }
.reveal.d5 { transition-delay: .4s; }

/* ---- Decorative grid bg ---- */
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black 30%, transparent 75%);
}

/* ---- Floating orbs ---- */
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55; pointer-events: none;
  animation: floatY 14s ease-in-out infinite;
}
@keyframes floatY {
  0%,100% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-30px) translateX(10px); }
}
@keyframes floatY2 {
  0%,100% { transform: translateY(0) translateX(0) scale(1); }
  50% { transform: translateY(20px) translateX(-15px) scale(1.05); }
}

/* ---- Marquee ---- */
.marquee {
  overflow: hidden; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-track {
  display: flex; gap: 80px; animation: marquee 40s linear infinite;
  width: max-content;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---- Services grid: 3 cols × 2 rows ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ---- Showreel size cap ---- */
.showreel-wrap { max-width: 880px; margin: 0 auto; }

/* ---- Word reveal ---- */
.word-reveal .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px);
  animation: wordUp .9s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes wordUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Custom cursor (desktop only) ---- */
@media (hover: hover) and (pointer: fine) {
  body.has-cursor { cursor: none; }
  body.has-cursor a, body.has-cursor button { cursor: none; }
  .cursor-dot {
    position: fixed; top: 0; left: 0;
    width: 8px; height: 8px;
    background: var(--accent-2);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: width .25s, height .25s;
    mix-blend-mode: difference;
  }
  .cursor-ring {
    position: fixed; top: 0; left: 0;
    width: 38px; height: 38px;
    border: 1px solid rgba(122,160,255,0.55);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: width .3s cubic-bezier(.2,.8,.2,1), height .3s cubic-bezier(.2,.8,.2,1), border-color .3s;
  }
  body.cursor-hover .cursor-ring { width: 64px; height: 64px; border-color: var(--accent-2); }
  body.cursor-hover .cursor-dot { width: 4px; height: 4px; }
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none !important; }
}

/* ---- Proceso grid w/ arrows ---- */
.proceso-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  padding-top: 48px;
}
.proceso-step { height: 100%; }
@media (max-width: 1100px) {
  .proceso-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .proceso-grid { grid-template-columns: 1fr; gap: 14px; }
}
.proceso-arrow { display: none;
}
@media (max-width: 880px) {
  .proceso-grid { grid-template-columns: 1fr; gap: 24px; }
  .proceso-arrow { display: none; }
  .proceso-step { padding: 24px 0; border-bottom: 1px solid var(--border); }
}

/* Ambient floating motion — applied globally to orbs */
@keyframes ambientFloat {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.05); }
  66% { transform: translate(-30px, 25px) scale(0.95); }
}
.orb { animation: ambientFloat 22s ease-in-out infinite; will-change: transform; }
.orb:nth-child(2n) { animation-duration: 28s; animation-direction: reverse; }
.orb:nth-child(3n) { animation-duration: 34s; animation-delay: -8s; }

/* Mobile breathing room */
@media (max-width: 720px) {
  .section { padding: 56px 0 !important; }
  .container { padding: 0 20px !important; }
  .h2 { font-size: clamp(26px, 7vw, 36px) !important; line-height: 1.15 !important; }
  .display { font-size: clamp(32px, 9vw, 48px) !important; line-height: 1.08 !important; }
  .lead { font-size: 15px !important; }
  .body { font-size: 14.5px !important; }
  .eyebrow { font-size: 10.5px !important; }
}
@media (max-width: 720px) {
  /* Pipeline: stack columns vertically */
  .mock-pipeline-grid { flex-direction: column !important; }
  .mock-pipeline-grid > div { width: 100% !important; }
  .mock-pipeline-grid .pipeline-cards { min-height: auto !important; max-height: 180px; overflow: hidden; }

  /* Dashboard: fit in viewport */
  .mock-dash-stats { grid-template-columns: 1fr 1fr !important; }
  .mock-dash-stats > div:nth-child(3) { grid-column: 1 / -1; }
  .mock-dash-hero-num { font-size: 34px !important; }

  /* CRM: shrink table to fit, hide last column */
  .mock-crm-wrap { overflow: hidden; }
  .mock-crm-wrap table { width: 100% !important; font-size: 11px !important; }
  .mock-crm-wrap th:last-child, .mock-crm-wrap td:last-child { display: none; }

  /* Inline mobile mock viewer: more breathing room */
  .mobile-mock-inline { padding: 16px !important; min-height: 320px; }
}

/* ---- Animated mocks ---- */
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.2; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}
@keyframes pipelineSlide {
  0% { transform: translate(0, 0); opacity: 1; }
  20% { transform: translate(0, 0); opacity: 1; }
  35% { transform: translate(110%, 0); opacity: 0; }
  36% { transform: translate(0, 0); opacity: 0; }
  50% { transform: translate(0, 0); opacity: 1; }
  70% { transform: translate(110%, 0); opacity: 0; }
  71% { transform: translate(0, 0); opacity: 0; }
  85% { transform: translate(0, 0); opacity: 1; }
  100% { transform: translate(0, 0); opacity: 1; }
}
@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}
@keyframes barGrow {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
@keyframes blinkCursor {
  50% { opacity: 0; }
}

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: border-color .3s, transform .3s, background .3s;
}
.card:hover { border-color: var(--border-2); background: var(--surface-2); }

/* ---- Mark icons (scoped) ---- */
.nexa-mark { color: var(--fg); }

/* ---- WhatsApp floating ---- */
.fab-wsp {
  position: fixed; bottom: 28px; right: 28px; z-index: 100;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--whatsapp);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.5);
  animation: pulse 2.4s ease-out infinite;
  transition: transform .3s;
  color: #fff;
}
.fab-wsp:hover { transform: scale(1.06); }
@keyframes pulse {
  0% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.5); }
  70% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 18px rgba(37,211,102,0); }
  100% { box-shadow: 0 8px 24px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0); }
}

@media (max-width: 720px) {
  .fab-wsp { width: 54px; height: 54px; bottom: 20px; right: 20px; }
}

/* Global ambient orbs (fixed bg layer) */
.ambient-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  overflow: hidden; background: var(--bg);
}
.ambient-bg .orb-g {
  position: absolute; border-radius: 50%; filter: blur(80px);
  will-change: transform;
}
.ambient-bg .o1 { width: 620px; height: 620px; background: #4D7CFE; top: -120px; left: -160px; opacity: 0.14; animation: ambientFloat 26s ease-in-out infinite; }
.ambient-bg .o2 { width: 540px; height: 540px; background: #7AA0FF; top: 28%; right: -180px; opacity: 0.10; animation: ambientFloat 32s ease-in-out -10s infinite reverse; }
.ambient-bg .o3 { width: 480px; height: 480px; background: #5BD9A6; top: 55%; left: 15%; opacity: 0.07; animation: ambientFloat 38s ease-in-out -16s infinite; }
.ambient-bg .o4 { width: 420px; height: 420px; background: #4D7CFE; bottom: -120px; right: 8%; opacity: 0.12; animation: ambientFloat 30s ease-in-out -6s infinite reverse; }
.ambient-bg::after { content:''; position: absolute; inset: 0; background: rgba(4,8,15,0.35); pointer-events: none; }

body { background: var(--bg); }
main { position: relative; z-index: 1; }
nav, footer, .top-banner { position: relative; z-index: 2; }
.section { background-color: transparent !important; }
.section[style*="bg-2"], .section[style*="--bg-2"] { background-color: rgba(7,12,22,0.4) !important; }

/* Floating decorative shapes (page-wide, fixed bg layer) */
.ambient-bg { height: 100%; }
.float-shape { position: absolute; will-change: transform; pointer-events: none; }
.g-dot { display: block; border-radius: 50%; }
.g-dot.lg { width: 12px; height: 12px; background: #7AA0FF; box-shadow: 0 0 24px #4D7CFE; }
.g-dot.sm { width: 8px; height: 8px; background: rgba(245,247,250,0.7); }
.g-dot.glow { background: #5BD9A6; box-shadow: 0 0 24px #5BD9A6; }
@keyframes shapeFloat { 0%,100% { transform: translateY(0) rotate(0deg);} 50% { transform: translateY(-22px) rotate(6deg);} }
@keyframes shapeFloatR { 0%,100% { transform: translateY(0) rotate(0deg);} 50% { transform: translateY(20px) rotate(-8deg);} }
.fs-x       { animation: shapeFloat 14s ease-in-out infinite; }
.fs-sq1     { animation: shapeFloatR 11s ease-in-out -3s infinite; }
.fs-sq2     { animation: shapeFloat 13s ease-in-out -5s infinite; }
.fs-curve   { animation: shapeFloat 18s ease-in-out -2s infinite; opacity: 0.85; }
.fs-dot1    { animation: shapeFloatR 9s ease-in-out -1s infinite; }
.fs-dot2    { animation: shapeFloat 10s ease-in-out -4s infinite; }
.fs-dot3    { animation: shapeFloatR 12s ease-in-out -6s infinite; }
.fs-sq3     { animation: shapeFloat 15s ease-in-out -7s infinite; }
.fs-x2      { animation: shapeFloatR 16s ease-in-out -2s infinite; }
.fs-dot4    { animation: shapeFloat 11s ease-in-out -3s infinite; }
.fs-curve2  { animation: shapeFloatR 19s ease-in-out -8s infinite; opacity: 0.7; }
@media (max-width: 720px) {
  .fs-curve, .fs-curve2 { display: none; }
  .float-shape svg { transform: scale(0.7); }
}
