/* ===== Design tokens ===== */
:root {
  --bg-deep: #020203;
  --bg-base: #050506;
  --bg-elevated: #0c0c10;
  --bg-elevated-2: #131319;
  --fg: #f2f2f5;
  --fg-muted: #9497a6;
  --fg-dim: #6b6e7d;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.14);
  --accent-1: #7c5cff;
  --accent-2: #22d3ee;
  --accent-grad: linear-gradient(120deg, var(--accent-1), var(--accent-2));
  --accent-glow: rgba(124,92,255,0.35);
  --whatsapp: #25d366;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --ease-out: cubic-bezier(0.16,1,0.3,1);
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--bg-base);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::selection { background: var(--accent-1); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ===== Ambient overlay ===== */
.noise-overlay {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.035; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.cursor-glow {
  position: fixed; top: 0; left: 0; width: 420px; height: 420px; z-index: 0;
  pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0; transition: opacity 0.4s var(--ease-out);
  will-change: transform;
}
@media (hover: hover) { .cursor-glow.active { opacity: 0.5; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.85em 1.4em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
  white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn-primary {
  background: var(--accent-grad);
  color: #08080b;
  box-shadow: 0 8px 30px -8px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -8px var(--accent-glow); }
.btn-ghost {
  background: rgba(255,255,255,0.03);
  border-color: var(--border-strong);
  color: var(--fg);
}
.btn-ghost:hover { background: rgba(255,255,255,0.07); transform: translateY(-2px); }
.btn-lg { padding: 1em 1.9em; font-size: 1rem; }
.btn-nav-cta { padding: 0.6em 1.1em; font-size: 0.85rem; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 14px 24px;
  transition: background 0.3s var(--ease-out), border-color 0.3s var(--ease-out), backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(5,5,6,0.75);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav-inner {
  max-width: var(--container); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
}
.brand-mark { display: inline-flex; }
.nav-links { display: flex; align-items: center; gap: 28px; font-size: 0.92rem; color: var(--fg-muted); }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover { color: var(--fg); }
.nav-burger {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-burger span { width: 20px; height: 2px; background: var(--fg); border-radius: 2px; transition: transform 0.3s var(--ease-out), opacity 0.3s; }
.nav-mobile {
  display: none; flex-direction: column; gap: 18px; padding: 24px 8px 12px;
  font-size: 1rem;
}
.nav-mobile a { color: var(--fg-muted); }
.nav-mobile .btn { align-self: flex-start; margin-top: 8px; }

@media (max-width: 860px) {
  .nav-links, .btn-nav-cta { display: none; }
  .nav-burger { display: flex; }
  .nav.mobile-open .nav-mobile { display: flex; }
}

/* ===== Section shared ===== */
main { position: relative; z-index: 2; }
section { padding: 140px 24px; max-width: var(--container); margin: 0 auto; position: relative; }
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-title { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin: 14px 0 16px; }
.section-sub { color: var(--fg-muted); font-size: 1.05rem; line-height: 1.65; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-2);
  padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 999px;
  background: rgba(124,92,255,0.06);
}
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-grad); box-shadow: 0 0 12px var(--accent-glow); }

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

.mono-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--fg-muted); letter-spacing: 0.02em; }

/* scroll reveal (JS toggles .is-visible) */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* ===== Hero ===== */
.hero { padding-top: 180px; padding-bottom: 100px; overflow: visible; }
.hero-blobs { position: absolute; inset: -10% -10% auto -10%; height: 900px; z-index: -1; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35; animation: drift 22s ease-in-out infinite; }
.blob-1 { width: 480px; height: 480px; background: var(--accent-1); top: -100px; left: 0; }
.blob-2 { width: 420px; height: 420px; background: var(--accent-2); top: 60px; right: 40px; animation-delay: -7s; }
.blob-3 { width: 320px; height: 320px; background: #ff5ca8; top: 300px; left: 40%; opacity: 0.18; animation-delay: -14s; }
@keyframes drift {
  0%, 100% { transform: translate(0,0) scale(1); }
  33% { transform: translate(40px, 30px) scale(1.08); }
  66% { transform: translate(-30px, 10px) scale(0.95); }
}

.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 60px; align-items: center; }
.hero-title { font-size: clamp(2.4rem, 5vw, 3.6rem); }
.hero-sub { margin-top: 24px; color: var(--fg-muted); font-size: 1.1rem; max-width: 540px; line-height: 1.7; }
.hero-sub strong { color: var(--fg); font-weight: 600; }
.hero-cta-row { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-note { margin-top: 22px; color: var(--fg-dim); font-size: 0.9rem; }
.hero-note strong { color: var(--fg-muted); }

/* Phone mockup */
.hero-visual { position: relative; display: flex; justify-content: center; }
.phone-frame {
  width: 320px; background: var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: 32px;
  padding: 14px 14px 20px; box-shadow: 0 40px 100px -30px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.02);
  position: relative;
}
.phone-notch { width: 90px; height: 18px; background: var(--bg-deep); border-radius: 12px; margin: 0 auto 12px; }
.phone-header { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.phone-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: #08080b; font-family: var(--font-display);
}
.phone-name { font-size: 0.9rem; font-weight: 600; }
.phone-status { font-size: 0.75rem; color: var(--fg-dim); display: flex; align-items: center; gap: 6px; }
.dot-online { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; display: inline-block; }
.phone-chat { min-height: 340px; display: flex; flex-direction: column; gap: 10px; justify-content: flex-end; }

.chat-bubble {
  max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 0.86rem; line-height: 1.45;
  opacity: 0; transform: translateY(10px) scale(0.98); animation: bubbleIn 0.45s var(--ease-out) forwards;
}
.chat-bubble.in { align-self: flex-start; background: var(--bg-elevated-2); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.chat-bubble.out { align-self: flex-end; background: linear-gradient(120deg, rgba(124,92,255,0.25), rgba(34,211,238,0.2)); border: 1px solid rgba(124,92,255,0.4); border-bottom-right-radius: 4px; }
@keyframes bubbleIn { to { opacity: 1; transform: translateY(0) scale(1); } }

.typing-dots { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--bg-elevated-2); border: 1px solid var(--border); border-radius: 16px; border-bottom-left-radius: 4px; opacity: 0; animation: bubbleIn 0.4s var(--ease-out) forwards; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-dim); animation: typingBounce 1.1s ease-in-out infinite; }
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.floating-card {
  position: absolute; background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 10px 14px; display: flex; flex-direction: column; gap: 3px;
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.6);
  animation: floatY 6s ease-in-out infinite;
}
.floating-card-1 { top: 10%; left: -60px; animation-delay: -1s; }
.floating-card-2 { bottom: 8%; right: -40px; animation-delay: -3s; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.fc-label { font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.06em; color: var(--fg-dim); text-transform: uppercase; }
.fc-value { font-size: 0.82rem; font-weight: 600; display: flex; align-items: center; gap: 6px; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 40px; }
  .floating-card { display: none; }
}

/* ===== Logos strip ===== */
.logos-strip { padding: 40px 24px 0; text-align: center; }
.logos-label { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-dim); margin-bottom: 22px; }
.logos-row { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.logo-pill {
  padding: 10px 18px; border-radius: 999px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.02); font-size: 0.92rem; color: var(--fg-muted);
}

/* ===== Pipeline / scrollytelling ===== */
.pipeline { padding-bottom: 40px; }
.pipeline-pin { position: relative; height: 480px; }
.pipeline-track {
  display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 24px;
  position: sticky; top: 120px;
}
.pipeline-stage {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px 24px; display: flex; flex-direction: column; gap: 14px; min-height: 340px;
  transition: border-color 0.3s, transform 0.3s;
}
.pipeline-stage:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.stage-index { font-family: var(--font-mono); font-size: 0.85rem; color: var(--accent-2); }
.pipeline-stage h3 { font-size: 1.15rem; }
.pipeline-stage p { color: var(--fg-muted); font-size: 0.92rem; line-height: 1.6; }
.stage-visual { margin-top: auto; padding-top: 18px; border-top: 1px dashed var(--border); display: flex; flex-direction: column; gap: 8px; }
.mini-bubble { padding: 8px 12px; border-radius: 12px; font-size: 0.8rem; max-width: 90%; }
.mini-bubble-in { background: var(--bg-elevated-2); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 3px; }
.mini-bubble-out { background: linear-gradient(120deg, rgba(124,92,255,0.25), rgba(34,211,238,0.2)); border: 1px solid rgba(124,92,255,0.4); align-self: flex-start; border-bottom-left-radius: 3px; }
.ai-pulse { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-grad); position: relative; }
.ai-pulse::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--accent-1); animation: pulseRing 2s ease-out infinite; }
@keyframes pulseRing { 0% { transform: scale(0.8); opacity: 0.8; } 100% { transform: scale(1.6); opacity: 0; } }
.mono-ok { color: #34d399; }

@media (max-width: 900px) {
  .pipeline-pin { height: auto; }
  .pipeline-track { position: static; grid-template-columns: 1fr; }
}

/* ===== Bento grid ===== */
.bento-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(180px, auto); gap: 20px;
}
.bento-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden;
  transition: border-color 0.3s, transform 0.15s;
  grid-column: span 1;
}
.bento-card-lg { grid-column: span 2; }
.bento-card:hover { border-color: var(--border-strong); }
.bento-icon {
  width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: rgba(124,92,255,0.1); color: var(--accent-2);
}
.bento-card h3 { font-size: 1.08rem; }
.bento-card p { color: var(--fg-muted); font-size: 0.92rem; line-height: 1.6; }
.mini-chart { display: flex; align-items: flex-end; gap: 6px; height: 60px; margin-top: 10px; }
.mini-chart span { flex: 1; height: var(--h); background: var(--accent-grad); border-radius: 4px 4px 0 0; opacity: 0.75; }

@media (max-width: 980px) { .bento-grid { grid-template-columns: repeat(2, 1fr); } .bento-card-lg { grid-column: span 2; } }
@media (max-width: 600px) { .bento-grid { grid-template-columns: 1fr; } .bento-card-lg { grid-column: span 1; } }

/* ===== Cases ===== */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.case-card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px; transition: border-color 0.3s, transform 0.25s;
}
.case-card:hover { border-color: var(--border-strong); transform: translateY(-4px); }
.case-monogram {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  background: rgba(124,92,255,0.1); color: var(--accent-2); border: 1px solid var(--border-strong);
}
.case-card h3 { margin-top: 14px; font-size: 1.2rem; }
.case-tag { font-family: var(--font-mono); font-size: 0.75rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.05em; margin: 8px 0 14px; }
.case-card p:last-child { color: var(--fg-muted); font-size: 0.92rem; line-height: 1.65; }

@media (max-width: 900px) { .cases-grid { grid-template-columns: 1fr; } }

/* ===== Why section ===== */
.why { padding-top: 60px; }
.why-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 60px; }
.why-copy .section-title { margin-top: 14px; }
.why-list { display: flex; flex-direction: column; gap: 30px; }
.why-item { display: flex; gap: 20px; padding-bottom: 26px; border-bottom: 1px solid var(--border); }
.why-item:last-child { border-bottom: none; }
.why-num { flex-shrink: 0; color: var(--accent-2); font-size: 0.9rem; padding-top: 4px; }
.why-item h4 { font-size: 1.05rem; margin-bottom: 8px; }
.why-item p { color: var(--fg-muted); font-size: 0.92rem; line-height: 1.6; }

@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr; } }

/* ===== Final CTA ===== */
.final-cta { text-align: center; }
.final-cta-inner {
  background: radial-gradient(circle at 50% 0%, rgba(124,92,255,0.18), transparent 60%), var(--bg-elevated);
  border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 80px 40px; display: flex; flex-direction: column; align-items: center; gap: 22px;
}
.final-cta-inner h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); max-width: 620px; }
.final-cta-inner p { color: var(--fg-muted); max-width: 480px; font-size: 1.05rem; }
.final-cta-note { font-family: var(--font-mono); font-size: 0.85rem; color: var(--fg-dim); max-width: none; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); padding: 60px 24px 30px; position: relative; z-index: 2; }
.footer-inner { max-width: var(--container); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 30px; }
.footer-brand { max-width: 320px; }
.footer-brand p { color: var(--fg-dim); font-size: 0.88rem; margin-top: 10px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; color: var(--fg-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--fg); }
.footer-copy { max-width: var(--container); margin: 0 auto; color: var(--fg-dim); font-size: 0.8rem; border-top: 1px solid var(--border); padding-top: 24px; }

/* ===== Responsive section padding ===== */
@media (max-width: 700px) {
  section { padding: 90px 20px; }
  .final-cta-inner { padding: 50px 24px; }
}
