/* ============================================================================
   TRAID PREMIUM — Design System for PymeInside
   Dark-mode de alta gama · glassmorphism · gradient-mesh · Outfit + Inter
   Autosuficiente: reset + tokens + componentes. NO depende de main.css.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   0. RESET / BASE
--------------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1.25rem); /* compensa nav sticky, atado al token */
  overflow-x: clip; /* mata el scroll horizontal por transforms de AOS (fade-left bajo el fold). Nav es fixed → seguro */
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg-base);
  background-image:
    radial-gradient(1100px 700px at 12% -8%, rgba(22, 184, 122, .10), transparent 58%),
    radial-gradient(900px 600px at 92% 4%, rgba(15, 181, 201, .08), transparent 58%),
    radial-gradient(800px 800px at 50% 125%, rgba(22, 184, 122, .07), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Capa de grain/noise sobre todo el sitio (CSS puro, sin assets) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img,
picture,
svg,
video { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }

button,
input,
textarea,
select { font: inherit; color: inherit; }

ul, ol { list-style: none; padding: 0; }

:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
  border-radius: 6px;
}
/* foco que sigue la forma real del control (pills/circulares) y resalta sobre fills de color */
.btn:focus-visible,
.wa-fab:focus-visible,
.nav__user:focus-visible,
.footer__social a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: inherit;
  box-shadow: 0 0 0 4px rgba(15, 181, 201, .6);
}

/* skip-link: oculto fuera de viewport hasta recibir foco con teclado (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 9999;
  padding: .7rem 1.1rem;
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  color: #fff;
  border: 1px solid var(--purple);
}
.skip-link:focus { left: 1rem; top: 1rem; }

::selection {
  background: rgba(22, 184, 122, .45);
  color: #fff;
}

/* ---------------------------------------------------------------------------
   1. TOKENS
--------------------------------------------------------------------------- */
:root {
  /* Fuentes */
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Color base — más oscuro/neutro para que el logo y el verde resalten */
  --bg-base: #04070a;
  --bg-panel: #0a1311;
  --bg-panel-2: #0d1714;

  /* Acentos (LUZ, no relleno) */
  --purple: #16b87a;
  --purple-300: #6ee7b7;
  --pink: #0fb5c9;
  --pink-300: #67e8f9;
  --grad-accent: linear-gradient(120deg, var(--purple) 0%, var(--pink) 100%);
  --grad-accent-soft: linear-gradient(120deg, rgba(22, 184, 122, .9), rgba(15, 181, 201, .9));

  /* Texto */
  --text: #f3f4f6;
  --text-soft: #cbd0da;
  --text-mut: #9ca3af;
  --text-dim: #6b7280;

  /* Glass / bordes */
  --glass-bg: rgba(255, 255, 255, .045);
  --glass-bg-2: rgba(255, 255, 255, .065);
  --glass-stroke: rgba(255, 255, 255, .10);
  --hairline: rgba(255, 255, 255, .08);

  /* Radios */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;     /* rounded-2xl */
  --r-xl: 30px;
  --r-pill: 999px;

  /* Sombras */
  --shadow-sm: 0 4px 18px rgba(0, 0, 0, .35);
  --shadow-md: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-lg: 0 40px 90px rgba(0, 0, 0, .55);
  --glow-purple: 0 0 0 1px rgba(22, 184, 122, .35), 0 14px 40px rgba(22, 184, 122, .35);
  --glow-pink: 0 0 0 1px rgba(15, 181, 201, .35), 0 14px 40px rgba(15, 181, 201, .30);
  --glow-mix: 0 18px 50px rgba(22, 184, 122, .35), 0 8px 30px rgba(15, 181, 201, .25);

  /* Blur */
  --blur-glass: 16px;
  --blur-nav: 20px;

  /* Espaciado */
  --space-1: .35rem;
  --space-2: .65rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.25rem;
  --space-6: 3.25rem;
  --space-7: 5rem;
  --space-8: 7.5rem;

  /* Layout */
  --container: 1180px;
  --container-narrow: 880px;
  --nav-h: 72px;

  /* Transición */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --t-fast: .18s var(--ease);
  --t: .35s var(--ease);
}

/* ---------------------------------------------------------------------------
   2. TIPOGRAFÍA
--------------------------------------------------------------------------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: #fff;
  text-wrap: balance;
}

h1 { font-size: clamp(2.6rem, 6.5vw, 4.75rem); font-weight: 800; letter-spacing: -.035em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); font-weight: 700; }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
h4 { font-size: 1.18rem; font-weight: 600; }

p { color: var(--text-soft); }
p.lead {
  font-size: clamp(1.05rem, 1.9vw, 1.3rem);
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 60ch;
}

/* medida de lectura cómoda en párrafos largos (cards densas de Modelos) */
.card p { max-width: 68ch; }

strong, b { color: #fff; font-weight: 600; }

a.link {
  color: var(--purple-300);
  background: linear-gradient(var(--pink-300), var(--pink-300)) no-repeat left bottom / 0 1px;
  transition: background-size var(--t), color var(--t-fast);
}
a.link:hover { color: var(--pink-300); background-size: 100% 1px; }

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .82rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--purple-300);
  margin-bottom: var(--space-3);
}

.muted { color: var(--text-mut); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }

/* ---------------------------------------------------------------------------
   3. LAYOUT / CONTAINERS / SECTIONS
--------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.2rem);
}
.container.narrow { max-width: var(--container-narrow); }

.section {
  position: relative;
  padding-block: clamp(3rem, 6vw, 5rem);
  z-index: 1;
}
.section.tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section.panel { background: linear-gradient(180deg, rgba(255,255,255,.018), transparent 70%); }

/* offset robusto de anclas: que el título quede despejado bajo el nav sticky */
:is(.section, .hero)[id] { scroll-margin-top: calc(var(--nav-h) + 1.25rem); }

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(2rem, 3.5vw, 2.75rem);
  text-align: center;
}
.section-head p { margin-top: var(--space-3); color: var(--text-soft); font-size: 1.08rem; line-height: 1.6; max-width: 60ch; margin-inline: auto; }
.section-head.left { margin-inline: 0; text-align: left; }

/* Grids reutilizables */
.grid { display: grid; gap: clamp(1.1rem, 2.5vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Cards angostas dentro del split (col ~45% del ancho útil): a 3 columnas el
   texto envuelve a 1 palabra por línea. Reflow automático con piso de ancho. */
.split .grid-3 { grid-template-columns: 1fr; align-content: center; }
.split .grid-3 > .card { align-self: start; }

/* Layout asimétrico hero / split */
.split {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  align-content: center;
}
.split.reverse { direction: rtl; }
.split.reverse > * { direction: ltr; }

/* ---------------------------------------------------------------------------
   4. BLOBS / GRADIENT-MESH / DECOR
--------------------------------------------------------------------------- */
.mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: layout paint; /* acota repaint de los blobs animados al rectángulo del mesh */
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .55;
  will-change: transform;
}
.blob.purple { background: radial-gradient(circle, rgba(22, 184, 122,.85), transparent 65%); }
.blob.pink   { background: radial-gradient(circle, rgba(15, 181, 201,.7), transparent 65%); }
.blob.b1 { width: 520px; height: 520px; top: -140px; left: -80px; animation: float 16s var(--ease) infinite; }
.blob.b2 { width: 460px; height: 460px; right: -120px; top: 10%; animation: float 20s var(--ease) infinite reverse; }
.blob.b3 { width: 380px; height: 380px; left: 35%; bottom: -160px; opacity: .35; animation: float 24s var(--ease) infinite; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, -30px, 0) scale(1.08); }
}

/* línea de acento decorativa */
.accent-line {
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, transparent, rgba(22, 184, 122,.6), rgba(15, 181, 201,.6), transparent);
  border: 0;
  margin: var(--space-5) 0;
}

/* ---------------------------------------------------------------------------
   5. NAV (glass sticky)
--------------------------------------------------------------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(8, 5, 14, .55);
  backdrop-filter: blur(var(--blur-nav)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur-nav)) saturate(150%);
  border-bottom: 1px solid var(--hairline);
  transition: background var(--t), box-shadow var(--t);
  will-change: background;
}
.nav.scrolled {
  background: rgba(8, 5, 14, .82);
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.nav__inner {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2.2rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  color: #fff;
}
/* en el nav mostramos solo el mark (montaña): recorta el "PYME INSIDE" del SVG; al lado va el wordmark "PymeInside" */
.nav__brand img { width: 46px; height: 30px; object-fit: cover; object-position: center top; filter: drop-shadow(0 4px 12px rgba(22, 184, 122,.55)); }
.nav__brand span b { color: var(--purple-300); font-weight: 700; }

.nav__menu {
  display: flex;
  align-items: center;
  gap: clamp(.4rem, 1.6vw, 1.3rem);
}
.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .7rem .6rem;
  font-size: .96rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color var(--t-fast);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--grad-accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-fast);
}
.nav__link:hover { color: #fff; }
.nav__link:hover::after,
.nav__link.active::after { transform: scaleX(1); }
.nav__link.active { color: #fff; }

.nav__actions { display: flex; align-items: center; gap: .7rem; }
/* acceso discreto a user.html */
.nav__user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-stroke);
  background: var(--glass-bg);
  color: var(--text-mut);
  transition: color var(--t-fast), border-color var(--t-fast), background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.nav__user:hover {
  color: #fff;
  border-color: var(--purple);
  background: rgba(22, 184, 122,.18);
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(22, 184, 122,.35), 0 8px 22px rgba(22, 184, 122,.30);
}
.nav__user:active { transform: translateY(0) scale(.96); }

/* hamburguesa */
.nav__toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-sm);
  width: 44px; height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  display: block;
  width: 20px; height: 2px;
  background: #fff;
  border-radius: 2px;
  position: relative;
  transition: var(--t-fast);
}
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after { position: absolute; top: 6px; }
/* morph a "X" cuando el menú está abierto (hook = aria-expanded) */
.nav__toggle[aria-expanded="true"] span { background: transparent; }
.nav__toggle[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }

/* ---------------------------------------------------------------------------
   6. BOTONES
--------------------------------------------------------------------------- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  padding: .95rem 1.6rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);
}
.btn > * { position: relative; z-index: 1; }
.btn:active { transform: translateY(1px) scale(.99); }

.btn--primary {
  color: #fff;
  background: var(--grad-accent);
  box-shadow: var(--glow-mix);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.btn--primary::after { /* sheen de barrido al hover */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s var(--ease);
  pointer-events: none;
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(22, 184, 122,.5), 0 10px 36px rgba(15, 181, 201,.4);
}
.btn--primary:hover::after { transform: translateX(120%); }

.btn--ghost {
  color: var(--text);
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover {
  color: #fff;
  border-color: var(--purple);
  background: rgba(22, 184, 122,.16);
  transform: translateY(-2px);
}

.btn--wa {
  color: #fff;
  background: linear-gradient(120deg, #0f7a3b, #16a34a);
  box-shadow: 0 14px 40px rgba(37,211,102,.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}
.btn--wa:hover { transform: translateY(-2px); box-shadow: 0 20px 52px rgba(37,211,102,.5); }

.btn--lg { padding: 1.15rem 2.1rem; font-size: 1.05rem; }
.btn--sm { padding: .65rem 1.1rem; font-size: .88rem; }
.btn--block { display: flex; width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem; }
.btn-row.center { justify-content: center; }

/* ---------------------------------------------------------------------------
   7. BADGES / PILLS
--------------------------------------------------------------------------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .95rem;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--text-soft);
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-pill);
  backdrop-filter: blur(10px);
}
.pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--grad-accent);
  box-shadow: 0 0 12px rgba(22, 184, 122,.8);
}
.pill--accent { color: #fff; border-color: rgba(22, 184, 122,.45); background: rgba(22, 184, 122,.14); }

.badge-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(40px, 6vw, 52px); height: clamp(40px, 6vw, 52px);
  flex: 0 0 clamp(40px, 6vw, 52px);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: #fff;
  border-radius: var(--r-md);
  background: rgba(22, 184, 122,.16);
  border: 1px solid rgba(22, 184, 122,.4);
  box-shadow: inset 0 0 22px rgba(22, 184, 122,.25);
}

/* ---------------------------------------------------------------------------
   8. CARDS (glass + borde gradiente)
--------------------------------------------------------------------------- */
.card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.1rem);
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-lg);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  box-shadow: var(--shadow-md);
  overflow: hidden;
  contain: paint; /* acota repaint del hover (lift+glow) y los muchos backdrop-filter de la página */
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
/* borde gradiente sutil con mask */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(22, 184, 122,.55), rgba(15, 181, 201,.35) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: .7;
  transition: opacity var(--t);
  pointer-events: none;
}
/* glow superior tenue al hover */
.card::after {
  content: "";
  position: absolute;
  top: -40%; left: 50%;
  width: 120%; height: 60%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(22, 184, 122,.35), transparent);
  opacity: 0;
  transition: opacity var(--t);
  pointer-events: none;
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(22, 184, 122,.4);
  box-shadow: var(--glow-mix);
}
.card:active { transform: translateY(-2px) scale(.997); } /* feedback de toque en touch (sin hover) */
.card:hover::before { opacity: 1; }
.card:hover::after { opacity: .8; }

.card > * { position: relative; z-index: 1; }
.card h3 {
  margin-bottom: .6rem;
  line-height: 1.18;            /* override del 1.08 global para títulos a 2 líneas */
  overflow-wrap: break-word;    /* nunca truncar; solo parte palabras muy largas */
}
.card p { color: var(--text-soft); font-size: .98rem; line-height: 1.55; }

.card--feature { display: flex; flex-direction: column; gap: .9rem; min-width: 0; }
/* títulos a altura natural (cards apiladas) — sin min-height que deje huecos bajo títulos cortos */
.split .grid-3 .card--feature h3 { min-height: 0; }
.card--numbered { display: flex; gap: clamp(.8rem, 2vw, 1.2rem); align-items: flex-start; }
.card--numbered .card__body { flex: 1; min-width: 0; }
/* ritmo vertical entre <p> rótulo y <ul> apilados (el reset global elimina sus márgenes) */
.card__body > * + * { margin-top: .7rem; }
/* título de cards numeradas: más chico para que palabras largas (Automatizaciones) entren en la columna */
.card--numbered .card__body h3 { font-size: clamp(1.2rem, 1.7vw, 1.5rem); line-height: 1.18; }

/* cards numeradas CON imagen banner (Servicios): van en COLUMNA — imagen arriba, badge, body full-width.
   La clase card--numbered es flex-row; con un .card__media banner adentro el body colapsaba a 0 (título vertical). */
.card--numbered:has(.card__media) { flex-direction: column; align-items: stretch; gap: .35rem; }
.card--numbered:has(.card__media) .card__body { width: 100%; }

/* icono / media de card */
.card__icon {
  width: 76px; height: 76px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: rgba(22, 184, 122,.12);
  border: 1px solid rgba(22, 184, 122,.3);
  margin-bottom: .7rem;
  overflow: hidden;
}
/* tiles (imágenes) llenan el recuadro como thumbnail nítido; los SVG quedan a su tamaño */
.card__icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.card__icon svg { width: 38px; height: 38px; }
.card__media {
  margin: calc(-1 * clamp(1.5rem, 3vw, 2.1rem)) calc(-1 * clamp(1.5rem, 3vw, 2.1rem)) 1.2rem;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t); }
.card:hover .card__media img { transform: scale(1.06); will-change: transform; }

/* stat card */
.stat { text-align: center; }
.stat__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1;
}
.stat__label { color: var(--text-mut); font-size: .92rem; margin-top: .4rem; }

/* ---------------------------------------------------------------------------
   9. HERO
--------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(1.25rem, 3vw, 2.5rem));
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}
.hero__inner { position: relative; z-index: 2; }
.hero__logo {
  width: clamp(120px, 11vw, 150px);
  height: auto;
  margin-bottom: 1rem;
  /* segundo drop-shadow blanco: micro-halo para despegar el lettering navy del SVG del fondo dark */
  filter: drop-shadow(0 8px 24px rgba(22, 184, 122, .35)) drop-shadow(0 0 1px rgba(255, 255, 255, .55));
}
.hero h1 {
  margin-bottom: 1.4rem;
  font-size: clamp(2.4rem, 4.6vw, 3.6rem);   /* baja el máximo de 4.75rem para que el hero entre en viewport */
  line-height: 1.05;
}
.hero .lead { margin-bottom: 1.5rem; }
.hero .btn-row { margin-bottom: 1.75rem; }

.hero--split .hero__art {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-lg);
}
.hero--split .hero__art img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }

.hero__trust {
  display: flex; flex-wrap: wrap;
  gap: 1.4rem 2.2rem;
  align-items: center;
  color: var(--text-mut);
  font-size: .9rem;
}
.hero__trust .accent-line { width: 56px; margin: 0; }

/* ---------------------------------------------------------------------------
   10. FEATURE LISTS
--------------------------------------------------------------------------- */
.feature-list { display: flex; flex-direction: column; gap: .85rem; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.feature-list .tick {
  flex: 0 0 24px;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(22, 184, 122,.18);
  border: 1px solid rgba(22, 184, 122,.45);
  color: var(--purple-300);
  font-size: .75rem;
  margin-top: 2px;
}

/* ---------------------------------------------------------------------------
   11. MAPA (Leaflet) + contacto
--------------------------------------------------------------------------- */
.map-wrap {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--glass-stroke);
  box-shadow: var(--shadow-md);
  min-height: 380px;
}
#map, .leaflet-container {
  height: 100%;
  min-height: 380px;
  width: 100%;
  background: var(--bg-panel);
  border-radius: var(--r-lg);
  z-index: 1;
}
/* atenuar tiles para que combinen con el dark mode */
.leaflet-tile { filter: grayscale(.4) brightness(.72) contrast(1.05); }
.leaflet-control-attribution {
  background: rgba(8,5,14,.7) !important;
  color: var(--text-mut) !important;
}
.leaflet-control-attribution a { color: var(--purple-300) !important; }

/* ---------------------------------------------------------------------------
   12. FORMULARIOS (contacto mailto)
--------------------------------------------------------------------------- */
.form { display: grid; gap: 1.1rem; }
.form .field { display: flex; flex-direction: column; gap: .45rem; }
.form label {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: .9rem;
  color: var(--text-soft);
}
.form input,
.form textarea,
.form select {
  width: 100%;
  padding: .9rem 1.05rem;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-md);
  color: #fff;
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.form input::placeholder,
.form textarea::placeholder { color: var(--text-mut); }
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--purple);
  background: rgba(22, 184, 122,.08);
  box-shadow: 0 0 0 3px rgba(22, 184, 122,.22);
}
.form textarea { min-height: 140px; resize: vertical; }
.form .field--full { grid-column: 1 / -1; }
@media (min-width: 640px) { .form.cols-2 { grid-template-columns: 1fr 1fr; } }

/* tarjeta de dato de contacto */
.contact-item { display: flex; align-items: center; gap: .9rem; }
.contact-item .ic {
  width: 46px; height: 46px;
  flex: 0 0 46px;
  display: grid; place-items: center;
  border-radius: var(--r-md);
  background: rgba(22, 184, 122,.15);
  border: 1px solid rgba(22, 184, 122,.35);
  color: var(--purple-300);
}
.contact-item .ic svg { width: 20px; height: 20px; }
.contact-item b { display: block; color: #fff; font-family: var(--font-display); }
.contact-item span { color: var(--text-mut); font-size: .92rem; }

/* ---------------------------------------------------------------------------
   13. FOOTER
--------------------------------------------------------------------------- */
.footer {
  position: relative;
  margin-top: clamp(3rem, 7vw, 6rem);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  background: linear-gradient(180deg, transparent, rgba(22, 184, 122,.06));
  border-top: 1px solid var(--hairline);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: clamp(1.8rem, 4vw, 3rem);
  margin-bottom: 2.5rem;
}
.footer__brand img { width: 64px; margin-bottom: 1rem; filter: drop-shadow(0 6px 18px rgba(22, 184, 122,.5)); }
.footer__brand p { color: var(--text-mut); max-width: 34ch; }
.footer h5, .footer__title {
  font-family: var(--font-display);
  font-size: .82rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-mut);
  margin-bottom: 1.1rem;
}
.footer__links { display: flex; flex-direction: column; gap: .65rem; }
.footer__links a { display: inline-block; padding-block: .25rem; color: var(--text-soft); font-size: .96rem; transition: color var(--t-fast); }
.footer__links a:hover { color: var(--purple-300); }

.footer__contact { display: flex; flex-direction: column; gap: .75rem; }
.footer__contact a { color: var(--text-soft); transition: color var(--t-fast); }
.footer__contact a:hover { color: #fff; }

.footer__social { display: flex; gap: .65rem; margin-top: 1rem; }
.footer__social a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  color: var(--text-mut);
  transition: var(--t-fast);
}
.footer__social a:hover {
  color: #fff;
  border-color: var(--purple);
  background: rgba(22, 184, 122,.18);
  transform: translateY(-2px);
}
.footer__social svg { width: 18px; height: 18px; }

.footer__bottom {
  display: flex; flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.8rem;
  border-top: 1px solid var(--hairline);
  color: var(--text-mut);
  font-size: .88rem;
}

/* ---------------------------------------------------------------------------
   14. WHATSAPP FAB
--------------------------------------------------------------------------- */
.wa-fab {
  position: fixed;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  z-index: 8900; /* debajo del nav (9000) para no tapar el menú mobile abierto */
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.15rem .85rem .95rem;
  border-radius: var(--r-pill);
  background: linear-gradient(120deg, #1faa54, #25d366);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  box-shadow: 0 14px 38px rgba(37,211,102,.45);
  transition: transform var(--t), box-shadow var(--t);
}
.wa-fab svg { width: 26px; height: 26px; }
.wa-fab__label { white-space: nowrap; }
.wa-fab { text-shadow: 0 1px 2px rgba(0, 0, 0, .45); }
.wa-fab:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 20px 50px rgba(37,211,102,.6); }
.wa-fab:active { transform: translateY(-1px) scale(.98); }
.wa-fab:hover::before,
.wa-fab:focus-visible::before { animation-play-state: paused; }

/* pulso sutil */
.wa-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(37,211,102,.5);
  animation: wa-pulse 2.6s var(--ease) infinite;
  pointer-events: none;
}
@keyframes wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.45); }
  70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}
@media (max-width: 560px) {
  .wa-fab__label { display: none; }
  .wa-fab { padding: .9rem; }
}

/* ---------------------------------------------------------------------------
   15. PANEL DE USUARIO (Firebase auth) — reskin
--------------------------------------------------------------------------- */
.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 2rem) 1.2rem 3rem;
  position: relative;
  isolation: isolate;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: clamp(1.8rem, 4vw, 2.6rem);
  background: var(--glass-bg-2);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-xl);
  backdrop-filter: blur(var(--blur-glass));
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 2;
}
.auth-card h2 { font-size: 1.8rem; margin-bottom: .4rem; }
.auth-card .sub { color: var(--text-mut); margin-bottom: 1.6rem; }
.auth-card .form { margin-bottom: 1.2rem; }
.auth-error {
  color: var(--pink-300);
  background: rgba(15, 181, 201,.1);
  border: 1px solid rgba(15, 181, 201,.3);
  border-radius: var(--r-sm);
  padding: .7rem .9rem;
  font-size: .9rem;
  margin-bottom: 1rem;
}
.auth-foot { text-align: center; color: var(--text-mut); font-size: .9rem; margin-top: 1rem; }

.dash-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* ---------------------------------------------------------------------------
   16. UTILIDADES
--------------------------------------------------------------------------- */
.hidden { display: none !important; }
.relative { position: relative; }
.full-w { width: 100%; }
.mt-1 { margin-top: var(--space-3); }
.mt-2 { margin-top: var(--space-4); }
.mt-3 { margin-top: var(--space-5); }
.mb-2 { margin-bottom: var(--space-4); }
.gap-sm { gap: .6rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-stroke);
  border-radius: var(--r-lg);
  backdrop-filter: blur(var(--blur-glass));
}

/* ---------------------------------------------------------------------------
   17. AOS fallback (si AOS no carga, el contenido es visible)
--------------------------------------------------------------------------- */
[data-aos] { transition-timing-function: var(--ease); }

/* ---------------------------------------------------------------------------
   18. RESPONSIVE
--------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .split, .hero--split .split { grid-template-columns: 1fr; }
  .split.reverse { direction: ltr; }
  .hero--split .hero__art { order: -1; }
}

@media (max-width: 760px) {
  :root { --nav-h: 64px; }

  /* el fondo fixed con 3 gradients fuerza repaint en cada frame de scroll en touch (jank) */
  body { background-attachment: scroll; }

  .nav__menu {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem clamp(1.1rem, 4vw, 2.2rem) 1.6rem;
    background: rgba(8,5,14,.96);
    backdrop-filter: blur(var(--blur-nav));
    border-bottom: 1px solid var(--hairline);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--t), opacity var(--t);
  }
  .nav__menu.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav__link { width: 100%; padding: .85rem 0; border-bottom: 1px solid var(--hairline); font-size: 1.05rem; }
  .nav__link::after { display: none; }
  /* en el menú desplegable el underline se oculta: marcar el activo con borde lateral */
  .nav__link.active { color: #fff; box-shadow: inset 2px 0 0 var(--purple); padding-left: .6rem; }
  .nav__toggle { display: inline-flex; }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }

  .btn-row .btn { width: 100%; }
  .card--numbered { flex-direction: row; }

  /* mobile: el FAB flotante ya cubre WhatsApp → sacamos el botón del nav (libera la barra y evita overflow) */
  .nav__actions .btn { display: none; }

  /* mobile: ocultar imágenes/secciones decorativas y dejar lo importante (texto, servicios, casos, contacto) */
  .mobile-hide { display: none !important; }

  /* mobile: el texto + CTA del hero van PRIMERO, la imagen decorativa después */
  .hero--split .hero__art { order: 1; margin-top: var(--space-4); }

  /* infografía rasterizada: ilegible en 375px y su contenido ya está en la tabla comparativa */
  .infografia { display: none; }

  /* banners de las cards de Servicios: en mobile cada card ocupaba casi una pantalla entera */
  .card--numbered .card__media { display: none; }
  .card--numbered:has(.card__media) { flex-direction: row; }

  /* títulos más medidos en pantallas chicas (evita 3-4 líneas) */
  h2 { font-size: clamp(1.6rem, 5.4vw, 2rem); line-height: 1.18; }

  /* FAB: respetar área segura (notch / barra de gestos) */
  .wa-fab { bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); right: calc(1rem + env(safe-area-inset-right, 0px)); }
}

@media (max-width: 420px) {
  h1 { font-size: clamp(2rem, 9vw, 2.6rem); }
}

/* ---------------------------------------------------------------------------
   19. PREFERS-REDUCED-MOTION
--------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .blob { animation: none; }
  /* garantiza que el contenido revelado por AOS quede visible aunque la animación no dispare */
  [data-aos] { opacity: 1 !important; transform: none !important; }
}
