/* ==============================================
   TOKENS
   ============================================== */
:root {
  --bg: #08080c;
  --bg-elevated: #101018;
  --bg-subtle: #16161f;
  --text: #ededef;
  --text-2: #8a8a98;
  --text-3: #5a5a68;
  --accent: #1A8FFF;
  --accent-2: #4EAFCB;
  --gradient: linear-gradient(135deg, #1A8FFF, #4EAFCB);
  --border: rgba(255,255,255,0.05);
  --radius: 16px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==============================================
   RESET
   ============================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, textarea {
  font: inherit; border: none; outline: none;
  background: none; color: inherit;
}
img { max-width: 100%; display: block; }

/* ==============================================
   LAYOUT
   ============================================== */
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ==============================================
   REVEAL
   ============================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ==============================================
   HEADER
   ============================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}

.header.scrolled {
  background: rgba(8, 8, 12, 0.95);
  border-color: rgba(255,255,255,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 72px;
  max-width: 1120px;
  margin: 0 auto;
}

.logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.logo-img { height: 34px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  font-size: 0.8125rem;
  font-weight: 450;
  color: var(--text-2);
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--bg);
  background: var(--text);
  transition: opacity 0.2s;
  flex-shrink: 0;
  text-decoration: none;
}
.nav-cta:hover {
  opacity: 0.88;
}
.nav-cta-arrow {
  transition: transform 0.2s;
  display: inline-block;
}
.nav-cta:hover .nav-cta-arrow {
  transform: translateX(2px);
}

.menu-toggle {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 6px;
  border-radius: 6px;
  transition: background 0.2s;
}
.menu-toggle:hover { background: rgba(255,255,255,0.06); }
.menu-toggle span {
  width: 18px; height: 1.5px;
  background: var(--text); display: block;
  transition: all 0.3s;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* ==============================================
   HERO
   ============================================== */
.hero {
  position: relative; z-index: 1;
  padding: 200px 0 100px;
  text-align: center;
}
.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
  margin-bottom: 24px;
}
.hero-sub {
  font-size: 1.0625rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==============================================
   BUTTONS
   ============================================== */
.btn-main {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-main:hover { opacity: 0.88; }
.btn-main--full { width: 100%; }

/* ==============================================
   STATS BAR
   ============================================== */
.stats-bar {
  position: relative; z-index: 1;
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
}
.stat { text-align: center; }
.stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.stat-label {
  font-size: 0.8125rem;
  color: var(--text-3);
  margin-top: 4px;
}
.stat-divider {
  width: 1px; height: 40px;
  background: var(--border);
}

/* ==============================================
   SECTIONS
   ============================================== */
.section {
  position: relative; z-index: 1;
  padding: 96px 0;
}
.section--subtle {
  background: var(--bg-elevated);
}
.section-intro {
  margin-bottom: 56px;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-sub {
  font-size: 1.0625rem;
  color: var(--text-2);
  line-height: 1.7;
  max-width: 520px;
}

/* ==============================================
   SERVICES — 3-COLUMN GRID
   ============================================== */
.services {
  position: relative; z-index: 1;
  padding: 96px 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.services-cell {
  padding: 40px 36px;
  background: var(--bg);
  transition: background 0.4s var(--ease);
}
.services-cell:hover {
  background: var(--bg-elevated);
}

.services-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: rgba(26, 143, 255, 0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.services-icon i { width: 22px; height: 22px; }

.services-cell h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.services-cell p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* ==============================================
   PRODUCTS — 2-COLUMN GRID
   ============================================== */
.products-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}
.product-card {
  padding: 36px 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  transition: border-color 0.3s;
}
.product-card:hover {
  border-color: rgba(255,255,255,0.1);
}
.product-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.product-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

.services-banner {
  margin-top: 32px;
  padding: 20px 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  text-align: center;
}
.services-banner p {
  font-size: 0.9375rem;
  color: var(--text-2);
}
.services-banner a {
  color: var(--accent);
  transition: opacity 0.2s;
}
.services-banner a:hover {
  opacity: 0.8;
}

/* ==============================================
   CONSULTORIA DETAIL
   ============================================== */

/* Subsection title */
.subsection-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 28px;
}

/* Why section */
.why-section {
  margin-bottom: 64px;
}
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.why-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.why-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.why-item strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 4px;
}
.why-item p {
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.6;
}

/* Process section */
.process-section {
  margin-bottom: 64px;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.process-step {
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-subtle);
}
.process-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  opacity: 0.6;
}
.process-step h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.process-step p {
  font-size: 0.8125rem;
  color: var(--text-2);
  line-height: 1.7;
}

/* Stack section */
.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.stack-tag {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-subtle);
  transition: border-color 0.3s, color 0.3s;
}
.stack-tag:hover {
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
}

/* ==============================================
   CLIENTS GRID
   ============================================== */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elevated);
  min-height: 120px;
  transition: border-color 0.3s, background 0.3s;
}
.client-logo:hover {
  border-color: rgba(255,255,255,0.1);
  background: var(--bg-subtle);
}
.client-logo img {
  max-height: 100px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  filter: grayscale(1) brightness(1.8);
  opacity: 0.6;
  transition: filter 0.3s, opacity 0.3s;
}
.client-logo:hover img {
  filter: grayscale(0) brightness(1);
  opacity: 1;
}

/* ==============================================
   CTA / FORM
   ============================================== */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.cta-text .section-sub { margin-bottom: 28px; }
.cta-list { display: flex; flex-direction: column; gap: 14px; }
.cta-list li {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9375rem;
  color: var(--text-2);
}
.cta-list i { color: var(--accent); flex-shrink: 0; }

.form {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.form-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-3);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--text-3); }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26, 143, 255, 0.1);
}
.form-field textarea { resize: vertical; min-height: 80px; }

.btn-main .btn-label { position: relative; z-index: 1; }
.btn-main .btn-spinner {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.3s;
}
.btn-main.loading .btn-label { opacity: 0; }
.btn-main.loading .btn-spinner { opacity: 1; }
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-success {
  display: none; text-align: center; padding: 32px 0;
}
.form-success.show { display: block; }
.form-success i { color: #22c55e; margin-bottom: 12px; }
.form-success strong { display: block; margin-bottom: 4px; }
.form-success p { color: var(--text-2); font-size: 0.875rem; }

/* ==============================================
   FOOTER
   ============================================== */
.footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--border);
  padding: 56px 0 28px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 64px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-3);
  line-height: 1.7;
  margin-top: 16px;
  max-width: 300px;
}
.footer-cols { display: flex; gap: 64px; }
.footer-cols h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 16px;
}
.footer-cols a,
.footer-cols span {
  display: block;
  font-size: 0.875rem;
  color: var(--text-2);
  padding: 4px 0;
  transition: color 0.25s;
}
.footer-cols a:hover { color: var(--text); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-size: 0.75rem;
  color: var(--text-3);
}

/* ==============================================
   RESPONSIVE
   ============================================== */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .clients-grid { grid-template-columns: repeat(4, 1fr); }
  .cta-grid { grid-template-columns: 1fr; gap: 48px; }
}

@media (max-width: 768px) {
  .wrap { padding: 0 20px; }

  .header-inner { padding: 0 20px; }

  .nav {
    position: fixed; top: 0; right: -100%;
    width: 280px; height: 100vh;
    background: rgba(8,8,12,0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    padding: 72px 24px 32px;
    gap: 4px;
    transition: right 0.3s;
    border-left: 1px solid var(--border);
  }
  .nav a {
    padding: 10px 12px;
    font-size: 0.875rem;
  }
  .nav.open { right: 0; }
  .menu-toggle { display: flex; z-index: 101; }

  .hero { padding: 160px 0 72px; }
  .hero-title { font-size: 2rem; }

  .stats-bar-inner {
    flex-wrap: wrap; gap: 24px;
    justify-content: space-around;
  }
  .stat-divider { display: none; }

  .section { padding: 72px 0; }
  .services { padding-top: 72px; }

  .clients-grid { grid-template-columns: repeat(3, 1fr); }

  .cta-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .footer-top { flex-direction: column; gap: 32px; }
  .footer-cols { gap: 48px; }
}

@media (max-width: 480px) {
  .hero-actions { flex-direction: column; align-items: center; }
  .stats-bar-inner { flex-direction: column; gap: 16px; }
  .stat-value { font-size: 1.25rem; }
  .footer-cols { flex-direction: column; gap: 32px; }
  .form { padding: 24px; }
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
}
