/* ============================================================
   IngeTax v2 — Design system
   Clean · White · Premium · Modern animations
============================================================ */

:root {
  /* Typography — Stripe / startup feel (Inter only, tight tracking) */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-feat: "cv11", "ss01", "ss03";

  /* Ink (neutrals) */
  --ink-950: #050914;
  --ink-900: #0A0F1C;
  --ink-800: #1E293B;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748B;
  --ink-400: #94A3B8;
  --ink-300: #CBD5E1;
  --ink-200: #E2E8F0;
  --ink-100: #F1F5F9;
  --ink-50:  #F8FAFC;
  --white:   #FFFFFF;

  /* Teal */
  --teal-900: #042F2E;
  --teal-800: #134E4A;
  --teal-700: #115E59;
  --teal-600: #0F766E;
  --teal-500: #14B8A6;
  --teal-400: #2DD4BF;
  --teal-100: #CCFBF1;
  --teal-50:  #F0FDFA;

  /* Amber */
  --amber-700: #B45309;
  --amber-600: #D97706;
  --amber-500: #F59E0B;
  --amber-400: #FBBF24;
  --amber-100: #FEF3C7;
  --amber-50:  #FFFBEB;

  /* Surfaces */
  --surface:      #FFFFFF;
  --surface-tint: #FCFDFE;
  --surface-mute: #F8FAFC;

  /* Radius */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-2xl: 32px;
  --r-full: 999px;

  /* Layout */
  --nav-h: 84px;
  --container-max: 1240px;
  --container-pad: 24px;

  /* Shadows — ligeras y premium */
  --shadow-xs: 0 1px 2px rgba(10,15,28,0.04);
  --shadow-sm: 0 2px 8px -2px rgba(10,15,28,0.06);
  --shadow-md: 0 8px 24px -8px rgba(10,15,28,0.08);
  --shadow-lg: 0 24px 48px -20px rgba(10,15,28,0.12);
  --shadow-xl: 0 40px 80px -30px rgba(10,15,28,0.18);
  --shadow-ring-teal: 0 0 0 1px rgba(15,118,110,0.12), 0 20px 40px -16px rgba(15,118,110,0.18);

  /* Easing */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================================
   Reset
============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-sans);
  font-feature-settings: var(--font-feat);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; }
input, textarea, select { font: inherit; color: inherit; }

/* Selection */
::selection { background: var(--teal-100); color: var(--teal-900); }

/* ============================================================
   Layout
============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--container-pad);
  padding-right: var(--container-pad);
}

.section { padding: 88px 0; position: relative; }
.section-sm { padding: 64px 0; }
.section-lg { padding: 112px 0; }

/* ============================================================
   Typography scale — editorial
============================================================ */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--teal-700);
  background: var(--teal-50);
  border: 1px solid rgba(15,118,110,0.12);
  border-radius: var(--r-full);
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.18);
}

.display-1 {
  font-family: var(--font-sans);
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: var(--ink-900);
}

.display-2 {
  font-size: clamp(1.875rem, 4.2vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink-900);
}

.lead {
  font-size: clamp(1.0625rem, 1.4vw, 1.1875rem);
  line-height: 1.55;
  color: var(--ink-500);
  max-width: 62ch;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.text-muted { color: var(--ink-500); }
.text-ink   { color: var(--ink-900); }
.text-teal  { color: var(--teal-700); }

/* ============================================================
   Buttons
============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 20px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--r-md);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  will-change: transform;
  position: relative;
  white-space: nowrap;
}

.btn-sm { padding: 8px 14px; font-size: 0.875rem; border-radius: var(--r-md); }
.btn-lg { padding: 14px 24px; font-size: 0.9375rem; }

.btn-primary {
  background: var(--amber-600);
  color: white;
  box-shadow: 0 10px 24px -10px rgba(217,119,6,0.55), inset 0 1px 0 rgba(255,255,255,0.18);
}
.btn-primary:hover {
  background: var(--amber-700);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(217,119,6,0.65), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-900);
  border: 1px solid var(--ink-200);
}
.btn-ghost:hover {
  background: var(--ink-50);
  border-color: var(--ink-300);
  transform: translateY(-2px);
}

.btn-ink {
  background: var(--ink-900);
  color: white;
}
.btn-ink:hover {
  background: var(--ink-800);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(10,15,28,0.35);
}

.btn-teal {
  background: var(--teal-600);
  color: white;
  box-shadow: 0 10px 24px -10px rgba(15,118,110,0.55);
}
.btn-teal:hover { background: var(--teal-700); transform: translateY(-2px); }

.btn .arrow {
  width: 16px; height: 16px;
  transition: transform 0.3s var(--ease);
}
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================================
   Navigation — minimal + glass
============================================================ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.88);
  border-bottom-color: var(--ink-100);
}

.nav-inner {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  color: var(--ink-900);
}
.nav-logo .lg-inge { color: var(--teal-700); }
.nav-logo .lg-tax  { color: var(--amber-600); }

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  position: relative;
  padding: 10px 16px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-600);
  border-radius: var(--r-full);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink-900); background: var(--ink-50); }

.nav-cta { display: flex; align-items: center; gap: 10px; }

/* Mobile nav toggle */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-full);
  color: var(--ink-900);
  transition: background 0.2s var(--ease);
}
.nav-burger:hover { background: var(--ink-100); }
.nav-burger svg { width: 22px; height: 22px; }

@media (max-width: 960px) {
  .nav-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
  }
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-cta .btn { display: none; }
}

/* ============================================================
   Mobile drawer (panel lateral con menú)
============================================================ */
.nav-drawer {
  position: fixed;
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  width: min(320px, 100%);
  background: white;
  z-index: 95;
  transform: translateX(100%);
  transition: transform 0.32s var(--ease);
  box-shadow: -8px 0 32px rgba(10, 15, 28, 0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  visibility: hidden;
}
.nav-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

.nav-drawer-inner {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}
.nav-drawer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nav-drawer-links a {
  display: block;
  padding: 14px 16px;
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--ink-700);
  border-radius: var(--r-md);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-drawer-links a:hover,
.nav-drawer-links a:active {
  background: var(--ink-50);
  color: var(--ink-900);
}
.nav-drawer-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--ink-100);
  margin-top: auto;
}
.nav-drawer-cta .btn {
  justify-content: center;
  width: 100%;
}

.nav-drawer-backdrop {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: rgba(10, 15, 28, 0.4);
  opacity: 0;
  pointer-events: none;
  z-index: 94;
  transition: opacity 0.32s var(--ease);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.nav-drawer-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Solo desktop oculta el drawer completamente */
@media (min-width: 961px) {
  .nav-drawer,
  .nav-drawer-backdrop { display: none !important; }
}

/* ============================================================
   Hero
============================================================ */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + 40px) 0 96px;
  overflow: hidden;
  isolation: isolate;
}

/* Background: grid + radial mesh */
.hero-bg {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(15,118,110,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15,118,110,0.06) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 0%, transparent 75%);
}

.hero-blob {
  position: absolute;
  width: 900px; height: 900px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.5;
  animation: blob-drift 18s var(--ease-smooth) infinite alternate;
}
.hero-blob.blob-1 {
  top: -250px; right: -200px;
  background: radial-gradient(circle, rgba(20,184,166,0.35), transparent 70%);
}
.hero-blob.blob-2 {
  bottom: -300px; left: -250px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(251,191,36,0.18), transparent 70%);
  animation-duration: 22s;
  animation-delay: -3s;
}

@keyframes blob-drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.05); }
  100% { transform: translate(-30px, 40px) scale(0.95); }
}

/* Hero content */
.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  justify-content: center;
  margin-bottom: 32px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease) 0.1s forwards;
}

.hero-title {
  margin-bottom: 28px;
}

/* Word stagger reveal */
.hero-title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: word-up 0.9s var(--ease) forwards;
}
.hero-title .word:nth-child(1)  { animation-delay: 0.15s; }
.hero-title .word:nth-child(2)  { animation-delay: 0.22s; }
.hero-title .word:nth-child(3)  { animation-delay: 0.29s; }
.hero-title .word:nth-child(4)  { animation-delay: 0.36s; }
.hero-title .word:nth-child(5)  { animation-delay: 0.43s; }
.hero-title .word:nth-child(6)  { animation-delay: 0.50s; }
.hero-title .word:nth-child(7)  { animation-delay: 0.57s; }
.hero-title .word:nth-child(8)  { animation-delay: 0.64s; }
.hero-title .word:nth-child(9)  { animation-delay: 0.71s; }
.hero-title .word:nth-child(10) { animation-delay: 0.78s; }
.hero-title .word:nth-child(11) { animation-delay: 0.85s; }
.hero-title .word:nth-child(12) { animation-delay: 0.92s; }
.hero-title .word:nth-child(13) { animation-delay: 0.99s; }
.hero-title .word:nth-child(14) { animation-delay: 1.06s; }
.hero-title .word:nth-child(15) { animation-delay: 1.13s; }

.hero-title .highlight {
  color: var(--teal-700);
  position: relative;
  display: inline-block;
}
.hero-title .highlight::after {
  content: '';
  position: absolute;
  left: 0.08em; right: 0.08em;
  bottom: 0.08em;
  height: 0.12em;
  background: var(--teal-500);
  border-radius: 2px;
  opacity: 0.28;
  transform-origin: left center;
  animation: underline-in 0.8s var(--ease) 1.25s both;
}

@keyframes underline-in {
  from { transform: scaleX(0); opacity: 0; }
  to   { transform: scaleX(1); opacity: 0.28; }
}

.hero-lead {
  margin: 0 auto 40px;
  max-width: 640px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease) 1.25s forwards;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-bottom: 72px;
  opacity: 0;
  animation: fade-up 0.8s var(--ease) 1.4s forwards;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 28px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-500);
  opacity: 0;
  animation: fade-up 0.8s var(--ease) 1.55s forwards;
}
.hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-trust-item .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20,184,166,0.18);
}

/* Scroll cue */
.hero-scroll {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-400);
  opacity: 0;
  animation: fade-up 0.8s var(--ease) 1.8s forwards;
}
.hero-scroll-line {
  width: 1px; height: 36px;
  background: linear-gradient(to bottom, var(--ink-300), transparent);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: '';
  position: absolute;
  left: 0; top: -20px;
  width: 100%; height: 20px;
  background: linear-gradient(to bottom, transparent, var(--teal-600));
  animation: scroll-dot 2.4s var(--ease-smooth) infinite;
}

@keyframes scroll-dot {
  0%   { transform: translateY(0); opacity: 0; }
  20%  { opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(56px); opacity: 0; }
}

/* Key animations */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes word-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Section heads
============================================================ */

.section-head {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}
.section-head .eyebrow { margin-bottom: 20px; }
.section-head .display-2 { margin-bottom: 16px; }
.section-head .lead { margin-left: auto; margin-right: auto; }

/* ============================================================
   Stages — Cómo te acompañamos
============================================================ */

.stages { background: var(--white); position: relative; }

.stages-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stage-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 24px 56px;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-xl);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease), box-shadow 0.35s var(--ease);
  overflow: hidden;
  isolation: isolate;
}
.stage-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,184,166,0.05), transparent 65%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
  z-index: -1;
}
.stage-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15,118,110,0.22);
  box-shadow: var(--shadow-md);
}
.stage-card:hover::before { opacity: 1; }

.stage-num {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-300);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s var(--ease);
}
.stage-card:hover .stage-num { color: var(--teal-600); }

.stage-icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--teal-50);
  color: var(--teal-700);
  transition: transform 0.35s var(--ease), background 0.35s var(--ease);
}
.stage-card:hover .stage-icon {
  background: var(--teal-600);
  color: white;
  transform: translateY(-2px) scale(1.05);
}
.stage-icon svg { width: 20px; height: 20px; }

.stage-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.stage-desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-500);
  letter-spacing: -0.005em;
}

.stage-arrow {
  position: absolute;
  bottom: 20px; right: 20px;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink-50);
  color: var(--ink-400);
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: all 0.35s var(--ease);
}
.stage-card:hover .stage-arrow {
  opacity: 1;
  transform: translate(0, 0);
  background: var(--teal-600);
  color: white;
}
.stage-arrow svg { width: 13px; height: 13px; }

@media (max-width: 1024px) {
  .stages-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .stages-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Diagnóstico banner (fondo blanco, contenedor con gradiente suave)
============================================================ */

.diag {
  padding: 40px 0 120px;
  background: var(--white);
  position: relative;
}

.diag-card {
  position: relative;
  padding: 72px 64px;
  border-radius: var(--r-2xl);
  background:
    radial-gradient(ellipse 60% 80% at 95% 10%, rgba(20,184,166,0.13), transparent 60%),
    radial-gradient(ellipse 50% 70% at 5% 95%, rgba(251,191,36,0.10), transparent 60%),
    var(--white);
  border: 1px solid var(--ink-100);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  isolation: isolate;
}
.diag-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(15,118,110,0.25), transparent 50%, rgba(217,119,6,0.15));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.diag-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
  position: relative;
}

.diag-head .eyebrow { margin-bottom: 18px; }

.diag-title {
  font-size: clamp(1.75rem, 3.4vw, 2.625rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: var(--ink-900);
  margin-bottom: 16px;
}
.diag-desc {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink-500);
  margin-bottom: 28px;
  max-width: 50ch;
}
.diag-ctas { display: flex; gap: 10px; flex-wrap: wrap; }

/* Steps visual */
.diag-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}
.diag-steps::before {
  content: '';
  position: absolute;
  left: 19px; top: 24px; bottom: 24px;
  width: 1px;
  background: linear-gradient(to bottom, var(--teal-200, #99F6E4), var(--ink-100) 90%);
  z-index: 0;
}

.diag-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 14px 14px;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  color: var(--ink-800);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  transform: translateX(24px);
  opacity: 0;
  transition: transform 0.7s var(--ease), opacity 0.7s var(--ease);
  position: relative;
  z-index: 1;
}
.reveal.is-in .diag-step { transform: translateX(0); opacity: 1; }
.reveal.is-in .diag-step:nth-child(1) { transition-delay: 0.1s; }
.reveal.is-in .diag-step:nth-child(2) { transition-delay: 0.22s; }
.reveal.is-in .diag-step:nth-child(3) { transition-delay: 0.34s; }
.reveal.is-in .diag-step:nth-child(4) { transition-delay: 0.46s; }

.diag-step-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  background: var(--teal-600);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 4px var(--white), 0 0 0 5px rgba(15,118,110,0.15);
}

@media (max-width: 900px) {
  .diag-card { padding: 48px 32px; }
  .diag-inner { grid-template-columns: 1fr; gap: 36px; }
}

/* ============================================================
   Plan contable
============================================================ */

.plans { background: var(--white); position: relative; }

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 36px 32px;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-xl);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.plan:hover {
  transform: translateY(-3px);
  border-color: var(--ink-200);
  box-shadow: var(--shadow-md);
}
.plan.is-featured {
  border: 1.5px solid var(--teal-600);
  box-shadow: 0 0 0 6px rgba(15,118,110,0.06), var(--shadow-md);
}
.plan.is-featured:hover { box-shadow: 0 0 0 6px rgba(15,118,110,0.08), var(--shadow-lg); }

.plan-ribbon {
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  background: var(--teal-600);
  color: white;
  border-radius: var(--r-full);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: -0.003em;
  white-space: nowrap;
  box-shadow: 0 6px 16px -4px rgba(15,118,110,0.4);
}

.plan-tier {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-400);
  margin-bottom: 8px;
}

.plan-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 12px;
}

.plan-pitch {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-500);
  letter-spacing: -0.005em;
  margin-bottom: 24px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 20px 0;
  border-top: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
  margin-bottom: 24px;
}
.plan-price-from {
  font-size: 0.8125rem;
  color: var(--ink-400);
  font-weight: 500;
}
.plan-price-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.plan-price-unit {
  font-size: 0.9375rem;
  color: var(--ink-500);
  font-weight: 500;
  letter-spacing: -0.005em;
}

.plan-features {
  list-style: none;
  flex: 1;
  margin: 0 0 24px;
  padding: 0;
}
.plan-features li {
  position: relative;
  padding-left: 28px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-700);
  margin-bottom: 12px;
  letter-spacing: -0.005em;
}
.plan-features li::before {
  content: '';
  position: absolute;
  left: 0; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background-color: var(--teal-50);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F766E' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-repeat: no-repeat;
  background-position: center;
}

.plan-cta {
  width: 100%;
  justify-content: center;
}

.plans-note {
  margin: 28px auto 0;
  max-width: 720px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-500);
  padding: 14px 20px;
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  letter-spacing: -0.005em;
}

@media (max-width: 900px) {
  .plans-grid { grid-template-columns: 1fr; gap: 24px; }
  .plan.is-featured { margin-top: 10px; }
}

/* ============================================================
   Calculadora
============================================================ */

.calc { background: var(--white); position: relative; }

.calc-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-2xl);
  padding: 48px;
  box-shadow: var(--shadow-sm);
}

.calc-intro { margin-bottom: 8px; }
.calc-intro .eyebrow { margin-bottom: 14px; }
.calc-intro .display-2 {
  font-size: clamp(1.625rem, 2.8vw, 2rem);
  margin-bottom: 10px;
}
.calc-intro .lead { font-size: 0.9375rem; margin-bottom: 24px; }

.calc-tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--ink-50);
  border-radius: var(--r-md);
  gap: 4px;
  margin-bottom: 24px;
}
.calc-tab {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-500);
  border-radius: var(--r-sm);
  transition: all 0.2s var(--ease);
  letter-spacing: -0.005em;
}
.calc-tab.is-active {
  background: white;
  color: var(--ink-900);
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--ink-100);
}

.calc-form { display: flex; flex-direction: column; gap: 18px; }

.calc-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-600);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}

.calc-input-wrap { position: relative; }
.calc-input-wrap::before {
  content: '$';
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-400);
  font-size: 0.9375rem;
  pointer-events: none;
}

.calc-input {
  width: 100%;
  padding: 12px 14px 12px 28px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-900);
  background: white;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  letter-spacing: -0.005em;
}
.calc-input:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}

.calc-hint {
  font-size: 0.75rem;
  color: var(--ink-400);
  margin-top: 4px;
  letter-spacing: -0.005em;
}

.calc-result {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(20,184,166,0.15), transparent 60%),
    linear-gradient(180deg, var(--teal-50) 0%, white 80%);
  border: 1px solid rgba(15,118,110,0.15);
  border-radius: var(--r-xl);
  overflow: hidden;
}

.calc-result-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-700);
}

.calc-result-value {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--ink-900);
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  transition: opacity 0.2s var(--ease);
}

.calc-result-rate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: white;
  border: 1px solid rgba(15,118,110,0.2);
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--teal-700);
  align-self: flex-start;
  letter-spacing: -0.005em;
  font-variant-numeric: tabular-nums;
}

.calc-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(15,118,110,0.15);
}
.calc-breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--ink-600);
  letter-spacing: -0.005em;
}
.calc-breakdown-row strong {
  font-variant-numeric: tabular-nums;
  color: var(--ink-900);
  font-weight: 600;
}

.calc-disclaimer {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-500);
  letter-spacing: -0.005em;
}

@media (max-width: 900px) {
  .calc-card { grid-template-columns: 1fr; padding: 32px; gap: 32px; }
}
@media (max-width: 560px) {
  .calc-card { padding: 24px; }
}

/* ============================================================
   Recursos
============================================================ */

.resources { background: var(--white); }
.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.resource-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 28px 26px;
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-xl);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
  color: inherit;
}
.resource-card:hover {
  transform: translateY(-3px);
  border-color: rgba(15,118,110,0.22);
  box-shadow: var(--shadow-md);
}
.resource-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: -0.003em;
  color: var(--teal-700);
  background: var(--teal-50);
  border-radius: var(--r-full);
  align-self: flex-start;
  text-transform: uppercase;
}
.resource-title {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.resource-desc {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-500);
  letter-spacing: -0.005em;
  flex: 1;
}
.resource-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: var(--ink-400);
  padding-top: 14px;
  border-top: 1px solid var(--ink-100);
}
.resource-arrow {
  display: inline-flex;
  color: var(--ink-400);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}
.resource-card:hover .resource-arrow {
  transform: translateX(4px);
  color: var(--teal-600);
}

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

/* ============================================================
   Agenda
============================================================ */

.agenda { background: var(--white); }
.agenda-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  align-items: start;
}
.agenda-side { position: sticky; top: calc(var(--nav-h) + 40px); }
.agenda-side .eyebrow { margin-bottom: 16px; }
.agenda-side .display-2 { margin-bottom: 14px; }
.agenda-side .lead { margin-bottom: 24px; }
.agenda-points {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agenda-points li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--ink-600);
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.agenda-points svg {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--teal-600);
  margin-top: 2px;
}

.calendly-wrap {
  border: 1px solid var(--ink-100);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

@media (max-width: 900px) {
  .agenda-grid { grid-template-columns: 1fr; }
  .agenda-side { position: static; }
}

/* ============================================================
   Contacto
============================================================ */

.contact { background: var(--white); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { margin-bottom: 16px; }
.form-field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 6px;
  letter-spacing: -0.005em;
}
.form-input, .form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  color: var(--ink-900);
  background: var(--white);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  letter-spacing: -0.005em;
  font-family: inherit;
}
.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}
.form-textarea { resize: vertical; min-height: 120px; }

/* Feedback de envío del form (loading / success / error) */
.form-status {
  display: none;
  margin: 0 0 16px;
  padding: 14px 18px;
  border-radius: var(--r-lg);
  font-size: 0.9375rem;
  line-height: 1.55;
  border: 1px solid transparent;
}
.form-status.is-loading,
.form-status.is-success,
.form-status.is-error { display: block; }
.form-status.is-loading {
  color: var(--ink-700);
  background: var(--ink-50);
  border-color: var(--ink-100);
}
.form-status.is-success {
  color: var(--teal-800);
  background: var(--teal-50);
  border-color: var(--teal-100);
}
.form-status.is-error {
  color: #7F1D1D;
  background: #FEF2F2;
  border-color: #FECACA;
}
.form-status a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.form-status strong { font-weight: 700; }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  background: var(--ink-50);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-xl);
}
.contact-info-row { display: flex; gap: 14px; align-items: flex-start; }
.contact-info-icon {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  background: var(--white);
  color: var(--teal-700);
  border-radius: 10px;
  border: 1px solid var(--ink-100);
  flex-shrink: 0;
}
.contact-info-icon svg { width: 18px; height: 18px; }
.contact-info-row h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 4px;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.contact-info-row p, .contact-info-row a {
  font-size: 0.9375rem;
  color: var(--ink-600);
  letter-spacing: -0.005em;
}
.contact-info-row a:hover { color: var(--teal-700); }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   FAQ
============================================================ */

.faq { background: var(--white); }
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.faq-item.is-open {
  border-color: rgba(15,118,110,0.25);
  box-shadow: var(--shadow-sm);
}
.faq-q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  text-align: left;
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink-900);
  letter-spacing: -0.015em;
  transition: color 0.2s var(--ease);
}
.faq-q:hover { color: var(--teal-700); }
.faq-icon {
  flex-shrink: 0;
  width: 26px; height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink-50);
  color: var(--ink-500);
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease);
}
.faq-icon svg { width: 13px; height: 13px; }
.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
  background: var(--teal-600);
  color: white;
}
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.faq-a-inner {
  padding: 0 24px 24px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--ink-600);
  letter-spacing: -0.005em;
}

/* ============================================================
   Footer
============================================================ */

.footer {
  background: var(--ink-50);
  border-top: 1px solid var(--ink-100);
  padding: 72px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand { max-width: 320px; }
.footer-brand .nav-logo { margin-bottom: 16px; }
.footer-brand p {
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--ink-500);
  letter-spacing: -0.005em;
  margin-bottom: 20px;
}
.footer-meta {
  font-size: 0.8125rem;
  color: var(--ink-400);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.footer-col h4 {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-900);
  margin-bottom: 16px;
  text-transform: uppercase;
}
.footer-col ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 0.9375rem;
  color: var(--ink-500);
  transition: color 0.2s var(--ease);
  letter-spacing: -0.005em;
}
.footer-col a:hover { color: var(--ink-900); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--ink-200);
  font-size: 0.8125rem;
  color: var(--ink-400);
}
.footer-socials { display: flex; gap: 8px; }
.footer-socials a {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-500);
  border: 1px solid var(--ink-200);
  transition: all 0.2s var(--ease);
}
.footer-socials a:hover {
  color: var(--teal-700);
  border-color: rgba(15,118,110,0.3);
  transform: translateY(-2px);
}
.footer-socials svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* ============================================================
   Reveal on scroll (IntersectionObserver-driven)
============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.08s; }
.reveal.delay-2 { transition-delay: 0.16s; }
.reveal.delay-3 { transition-delay: 0.24s; }
.reveal.delay-4 { transition-delay: 0.32s; }
.reveal.delay-5 { transition-delay: 0.40s; }
.reveal.delay-6 { transition-delay: 0.48s; }

/* Reduced motion */
@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;
  }
  .hero-title .word { opacity: 1; transform: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   Floating widgets: WhatsApp + Chatbot
============================================================ */

.fab {
  position: fixed;
  bottom: 24px;
  z-index: 90;
  width: 58px; height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  box-shadow: var(--shadow-lg), 0 10px 24px -8px rgba(10,15,28,0.25);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: var(--shadow-xl), 0 16px 32px -10px rgba(10,15,28,0.35); }
.fab svg { width: 28px; height: 28px; }

.fab-wa {
  left: 24px;
  background: #25D366;
}
.fab-wa:hover { background: #1fbe5b; }
.fab-wa::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(37,211,102,0.55);
  animation: pulseWa 2.4s var(--ease) infinite;
  pointer-events: none;
}
@keyframes pulseWa {
  0%   { box-shadow: 0 0 0 0 rgba(37,211,102,0.55); }
  70%  { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}

.fab-chat {
  right: 24px;
  background: var(--teal-600);
}
.fab-chat:hover { background: var(--teal-700); }
.fab-chat.is-active { transform: rotate(180deg); }

.fab-badge {
  position: absolute;
  top: -2px; right: -2px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  background: var(--amber-500);
  color: var(--ink-900);
  font-size: 0.625rem;
  font-weight: 800;
  border-radius: 50%;
  border: 2px solid white;
}

/* ---------- Chat teaser (burbuja de invitación) ---------- */

.chat-teaser {
  position: fixed;
  right: 96px;
  bottom: 28px;
  z-index: 92;
  max-width: 260px;
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 12px 38px 12px 14px;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--ink-800);
  letter-spacing: -0.005em;
  cursor: pointer;
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.chat-teaser.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.chat-teaser::after {
  content: '';
  position: absolute;
  right: -6px;
  bottom: 18px;
  width: 12px; height: 12px;
  background: white;
  border-right: 1px solid var(--ink-100);
  border-bottom: 1px solid var(--ink-100);
  transform: rotate(-45deg);
}
.chat-teaser strong {
  display: block;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.chat-teaser-close {
  position: absolute;
  top: 6px; right: 6px;
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-400);
  background: transparent;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.chat-teaser-close:hover { background: var(--ink-100); color: var(--ink-800); }
.chat-teaser-close svg { width: 12px; height: 12px; }

@media (max-width: 560px) {
  .chat-teaser { right: 80px; max-width: 210px; bottom: 20px; font-size: 0.8125rem; }
}

/* ---------- Exit-intent modal ---------- */

.exit-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(10, 15, 28, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
  padding: 20px;
}
.exit-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}
.exit-modal-card {
  width: 100%;
  max-width: 460px;
  background: white;
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.3s var(--ease);
  text-align: center;
}
.exit-modal.is-open .exit-modal-card { transform: translateY(0) scale(1); }

.exit-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-500);
  background: var(--ink-50);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.exit-modal-close:hover { background: var(--ink-100); color: var(--ink-900); }
.exit-modal-close svg { width: 14px; height: 14px; }

.exit-modal-emoji {
  font-size: 2.25rem;
  line-height: 1;
  margin-bottom: 14px;
}
.exit-modal h3 {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  margin-bottom: 10px;
  line-height: 1.25;
}
.exit-modal p {
  font-size: 0.9375rem;
  color: var(--ink-600);
  line-height: 1.6;
  letter-spacing: -0.005em;
  margin-bottom: 22px;
}
.exit-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.exit-modal-dismiss {
  font-size: 0.8125rem;
  color: var(--ink-400);
  margin-top: 16px;
  display: inline-block;
}
.exit-modal-dismiss:hover { color: var(--ink-700); }

/* ---------- Chatbot panel ---------- */

.chatbot {
  position: fixed;
  bottom: 96px;
  right: 24px;
  z-index: 95;
  width: 340px;
  max-width: calc(100vw - 32px);
  height: 440px;
  max-height: calc(100vh - var(--nav-h) - 140px);
  background: white;
  border: 1px solid var(--ink-100);
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  overflow: hidden;
}
.chatbot.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  color: white;
}
.chat-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: -0.02em;
  position: relative;
}
.chat-avatar::after {
  content: '';
  position: absolute;
  bottom: 1px; right: 1px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--teal-700);
}
.chat-header-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.chat-header-text strong {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.chat-header-text span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.75);
}
.chat-close {
  margin-left: auto;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(255,255,255,0.1);
  transition: background 0.2s var(--ease);
}
.chat-close:hover { background: rgba(255,255,255,0.22); }
.chat-close svg { width: 14px; height: 14px; }

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: var(--ink-50);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-msg {
  max-width: 82%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  letter-spacing: -0.005em;
  border-radius: 16px;
  animation: bubbleIn 0.28s var(--ease) both;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.from-bot {
  align-self: flex-start;
  background: white;
  color: var(--ink-800);
  border: 1px solid var(--ink-100);
  border-bottom-left-radius: 6px;
}
.chat-msg.from-user {
  align-self: flex-end;
  background: var(--teal-600);
  color: white;
  border-bottom-right-radius: 6px;
}
.chat-msg.is-typing {
  display: inline-flex;
  gap: 4px;
  padding: 14px 16px;
}
.chat-msg.is-typing span {
  width: 6px; height: 6px;
  background: var(--ink-400);
  border-radius: 50%;
  animation: typingDot 1.2s infinite ease-in-out;
}
.chat-msg.is-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-msg.is-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30%           { opacity: 1;   transform: translateY(-3px); }
}

.chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px;
}
.chat-quick button {
  padding: 8px 12px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--teal-700);
  background: white;
  border: 1px solid rgba(15,118,110,0.25);
  border-radius: var(--r-full);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chat-quick button:hover {
  background: var(--teal-600);
  color: white;
  border-color: var(--teal-600);
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: white;
  border-top: 1px solid var(--ink-100);
}
.chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--ink-200);
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  color: var(--ink-900);
  font-family: inherit;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.chat-input input:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(15,118,110,0.12);
}
.chat-input button {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--teal-600);
  color: white;
  transition: background 0.2s var(--ease);
}
.chat-input button:hover { background: var(--teal-700); }
.chat-input button:disabled { background: var(--ink-300); cursor: not-allowed; }
.chat-input button svg { width: 16px; height: 16px; }

@media (max-width: 560px) {
  .chatbot { right: 12px; left: 12px; width: auto; bottom: 88px; height: 70vh; }
  .fab-wa  { left: 16px; bottom: 16px; }
  .fab-chat { right: 16px; bottom: 16px; }
}

/* ============================================================
   Responsive
============================================================ */

@media (max-width: 768px) {
  :root { --nav-h: 64px; --container-pad: 20px; }
  .section    { padding: 80px 0; }
  .section-lg { padding: 100px 0; }
  .hero       { padding: calc(var(--nav-h) + 56px) 0 80px; }
  .hero-ctas  { margin-bottom: 48px; }
  .hero-trust { gap: 10px 18px; font-size: 0.75rem; }
}
