/* InformáticaPymes — Sistema de diseño v2 (premium)
   Tipografía Inter variable · tokens refinados · animaciones sutiles
   Mantiene < 10KB gzip y 0 dependencias externas. */

/* ============= TOKENS ============= */
:root {
  /* Brand */
  --brand-50:  #fff5f1;
  --brand-100: #ffe2d6;
  --brand-200: #ffc1aa;
  --brand-400: #f3784e;
  --brand: #eb5d3f;
  --brand-600: #d04a30;
  --brand-700: #ad3a23;

  /* Slate (secundario) */
  --slate-50:  #f3f6fa;
  --slate-100: #e8eff5;
  --slate-200: #cdd9e6;
  --slate-400: #7d99b4;
  --slate: #527fa2;
  --slate-700: #3a627f;
  --slate-900: #1f3a50;

  /* Ink (neutros) */
  --ink: #0b1426;
  --ink-700: #1a2740;
  --ink-soft: #3d4a64;
  --muted: #647284;

  /* Superficies */
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --bg-deep: #0a1020;
  --line: #e4eaf2;
  --line-strong: #d0d9e6;

  /* Estado */
  --success: #16a34a;
  --warn: #d97706;

  /* Efectos */
  --shadow-sm: 0 2px 6px rgba(15,20,38,.06);
  --shadow: 0 12px 32px -8px rgba(15,20,38,.12);
  --shadow-lg: 0 24px 56px -12px rgba(15,20,38,.16);
  --shadow-brand: 0 14px 38px -10px rgba(235,93,63,.45);
  --ring-brand: 0 0 0 4px rgba(235,93,63,.15);

  /* Tipografía */
  --font-sans: "Inter", "InterVar", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "InterVar", ui-sans-serif, system-ui, sans-serif;

  /* Espaciados */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --container: 1200px;
  --section-y: clamp(64px, 9vw, 112px);

  /* Animación */
  --t-fast: 180ms cubic-bezier(.2,.7,.3,1);
  --t: 280ms cubic-bezier(.2,.7,.3,1);
  --t-slow: 600ms cubic-bezier(.2,.7,.3,1);
}

/* ============= BASE ============= */
*,*::before,*::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  font-feature-settings: "ss01", "cv11", "calt";
}
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--brand-600); }
a:focus-visible { outline: none; box-shadow: var(--ring-brand); border-radius: 4px; }

/* ============= TIPOGRAFÍA ============= */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -.022em;
  line-height: 1.1;
  font-weight: 800;
}
h1 {
  font-size: clamp(2.1rem, 4.8vw, 3.75rem);
  letter-spacing: -.03em;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.7rem, 3.3vw, 2.5rem);
  letter-spacing: -.025em;
}
h3 { font-size: 1.18rem; font-weight: 700; letter-spacing: -.012em; }
h4 { font-size: 1rem; font-weight: 700; }
p  { margin: 0 0 1em; color: var(--ink-soft); }
.lead { font-size: 1.15rem; color: var(--ink-soft); line-height: 1.65; }
.muted { color: var(--muted); }
.center { text-align: center; }
::selection { background: var(--brand); color: #fff; }

/* ============= LAYOUT ============= */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--section-y) 0; position: relative; }
.section--soft { background: var(--bg-soft); }
.section--ink { background: var(--bg-deep); color: #e7ecf3; position: relative; overflow: hidden; }
.section--ink::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(800px 400px at 80% -10%, rgba(235,93,63,.18), transparent 60%),
    radial-gradient(600px 300px at 0% 100%, rgba(82,127,162,.22), transparent 60%);
  pointer-events: none;
}
.section--ink h1, .section--ink h2, .section--ink h3 { color: #fff; }
.section--ink p { color: #b9c2d2; }
.section--ink .container { position: relative; z-index: 1; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 14px;
}
.section--ink .eyebrow { color: #ffb39a; }

.section__head { max-width: 760px; margin-bottom: 48px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }

/* ============= BOTONES ============= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  padding: .9em 1.5em;
  font-weight: 600; font-size: .98rem; line-height: 1;
  border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: transform var(--t-fast), background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast);
}
.btn:hover { transform: translateY(-1.5px); }
.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: var(--shadow-brand);
}
.btn-primary:hover { background: var(--brand-600); color: #fff; box-shadow: 0 18px 42px -12px rgba(208,74,48,.55); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--ink); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); backdrop-filter: blur(8px); }
.btn-ghost-light:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-700); color: #fff; }
.btn-sm { padding: .58em 1.05em; font-size: .9rem; }
.btn-lg { padding: 1.05em 1.7em; font-size: 1.02rem; }

/* ============= HEADER ============= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(228,234,242,.7);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; }
.site-header__logo { display: inline-flex; align-items: center; }
.site-header__logo img { height: 52px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 9px 14px; color: var(--ink); font-weight: 500; font-size: .94rem;
  border-radius: 10px; transition: color var(--t-fast), background var(--t-fast);
}
.nav a:hover { color: var(--brand); background: var(--brand-50); }
.nav__cta { margin-left: 12px; }
.nav-toggle { display: none; }

/* MEGA MENU dropdown */
.nav__group { position: relative; }
.nav__trigger {
  appearance: none; background: transparent; border: 0; cursor: pointer;
  font: inherit; padding: 9px 12px;
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--ink); font-weight: 500; font-size: .94rem;
  border-radius: 10px;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav__trigger:hover, .nav__group:focus-within .nav__trigger, .nav__trigger[aria-expanded="true"] {
  color: var(--brand); background: var(--brand-50);
}
.nav__trigger svg { transition: transform var(--t-fast); flex: 0 0 12px; }
.nav__group:hover .nav__trigger svg,
.nav__trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav__mega {
  position: absolute; top: calc(100% + 12px); left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(720px, 92vw);
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  display: grid; grid-template-columns: 1fr 1fr 200px; gap: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t), transform var(--t);
  z-index: 60;
}
.nav__mega::before {
  /* puente invisible para evitar flicker al pasar al menú */
  content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px;
}
.nav__group:hover .nav__mega,
.nav__group:focus-within .nav__mega,
.nav__mega.is-open {
  opacity: 1; pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav__mega-col { display: flex; flex-direction: column; gap: 4px; }
.nav__mega-title {
  display: block; font-size: .72rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .12em;
  margin: 4px 0 8px 12px;
}
.nav__mega a {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  background: transparent !important;
  color: var(--ink);
}
.nav__mega a:hover { background: var(--bg-soft) !important; }
.nav__mega-ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--brand-50); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 36px;
}
.nav__mega a strong { display: block; font-weight: 600; font-size: .92rem; color: var(--ink); line-height: 1.25; }
.nav__mega a small { display: block; font-size: .8rem; color: var(--muted); margin-top: 2px; }
.nav__mega a:hover strong { color: var(--brand); }
.nav__mega-cta {
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-700) 100%);
  color: #fff; border-radius: var(--radius);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 10px;
  justify-content: center;
}
.nav__mega-cta strong { color: #fff; font-size: 1rem; font-weight: 700; }
.nav__mega-cta p { color: #b9c2d2; font-size: .82rem; margin: 0; line-height: 1.5; }
.nav__mega-cta .btn { align-self: flex-start; }

/* Lang switcher */
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 8px; margin: 0 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; font-size: .82rem; font-weight: 600;
}
.lang-switch a {
  padding: 4px 8px; border-radius: 999px;
  color: var(--muted); text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
}
.lang-switch a:hover { color: var(--brand); background: var(--brand-50); }
.lang-switch a.is-active { color: #fff; background: var(--ink); }
.lang-switch span { color: var(--line-strong); font-size: .7rem; }

/* ============= HERO ============= */
.hero {
  position: relative; overflow: hidden;
  padding: clamp(40px, 5vw, 64px) 0 clamp(48px, 6vw, 80px);
  background: #fff;
  isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(1200px 600px at 75% -10%, rgba(82,127,162,.16), transparent 60%),
    radial-gradient(900px 480px at 0% 100%, rgba(235,93,63,.13), transparent 55%),
    linear-gradient(180deg, #fbfcff 0%, #f4f7fc 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(15,28,46,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15,28,46,.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  opacity: .6;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: center;
}
.hero__col { min-width: 0; }
.hero__badge {
  display: inline-flex; align-items: center; gap: 9px; padding: 8px 14px;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: .8rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 20px;
  box-shadow: var(--shadow-sm); line-height: 1;
}
.hero__badge .dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 4px rgba(22,163,74,.18); animation: pulse-dot 2s ease-out infinite; flex: 0 0 8px; }
@keyframes pulse-dot { 0%,100% { box-shadow: 0 0 0 4px rgba(22,163,74,.18); } 50% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } }
.hero h1 {
  margin-bottom: .35em;
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
  hyphens: manual;
  -webkit-hyphens: manual;
  overflow-wrap: break-word;
  word-break: normal;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-400) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero__sub { font-size: 1.13rem; color: var(--ink-soft); max-width: 560px; margin-bottom: 28px; line-height: 1.6; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .88rem; color: var(--ink-soft); }
.hero__trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust svg { color: var(--success); flex: 0 0 14px; }

/* Hero artwork: dashboard glassmorphism con tarjetas flotantes */
.hero__art {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1/1;
  margin-left: auto;
}
.hero__art-bg {
  position: absolute; inset: 0;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 28% 22%, var(--brand-400) 0%, transparent 42%),
    radial-gradient(circle at 78% 82%, var(--slate) 0%, transparent 48%),
    linear-gradient(135deg, var(--slate-700) 0%, var(--slate-900) 100%);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero__art-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.hero__card {
  position: absolute; background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: .88rem;
}

/* Main dashboard card — ocupa zona central izquierda */
.hero__card--main {
  top: 17%;
  left: 6%;
  width: 70%;
  padding: 18px 20px;
  animation: float-soft 6s ease-in-out infinite;
  z-index: 1;
}
.hero__card--main h4 { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero__card--main h4 .dot-live { width: 9px; height: 9px; background: var(--success); border-radius: 50%; animation: pulse-dot 2s ease-out infinite; flex: 0 0 9px; }
.hero__card--main ul { list-style: none; padding: 0; margin: 0; }
.hero__card--main li {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
  font-size: .82rem; gap: 12px;
}
.hero__card--main li:last-child { border: 0; }
.hero__card--main li > span:first-child {
  color: var(--ink-soft);
  flex: 1 1 auto; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero__card--main .ok { color: var(--success); font-weight: 700; font-variant-numeric: tabular-nums; flex: 0 0 auto; white-space: nowrap; }

/* Metric card — esquina superior derecha, fuera del marco */
.hero__card--metric {
  top: 5%;
  right: -6%;
  width: 175px;
  padding: 14px 18px;
  animation: float-soft 7s ease-in-out infinite -2s;
  z-index: 2;
}
.hero__card--metric .label { font-size: .68rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.hero__card--metric .num { font-size: 1.75rem; font-weight: 800; color: var(--ink); margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; }
.hero__card--metric .delta { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; color: var(--success); font-weight: 600; margin-top: 4px; }

/* Shield card — esquina inferior derecha, fuera del marco */
.hero__card--shield {
  bottom: 7%;
  right: -5%;
  width: 200px;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  animation: float-soft 8s ease-in-out infinite -1s;
  z-index: 2;
}
.hero__card--shield .ico {
  width: 38px; height: 38px; border-radius: 10px; background: var(--brand-50); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 38px;
}
.hero__card--shield strong { display: block; font-size: .92rem; color: var(--ink); line-height: 1.15; }
.hero__card--shield span { display: block; font-size: .76rem; color: var(--muted); margin-top: 2px; }

@keyframes float-soft {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ============= TRUST STRIP (marquee) ============= */
.trust-strip {
  padding: 32px 0; background: #fff;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.trust-strip__label { text-align: center; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; font-weight: 600; }
.marquee {
  display: flex; gap: 56px; align-items: center;
  width: max-content;
  animation: marquee 35s linear infinite;
}
.marquee:hover { animation-play-state: paused; }
.marquee img {
  max-height: 32px; width: auto; max-width: 130px;
  opacity: .55; filter: grayscale(.85);
  transition: opacity var(--t), filter var(--t);
}
.marquee img:hover { opacity: 1; filter: none; }
.marquee img[src*="conexia"],
.marquee img[src*="tecinfobcn"] { max-height: 22px; max-width: 100px; }
.marquee__viewport { mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%); }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ============= BENTO SERVICES ============= */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(160px, auto);
  gap: 18px;
}
.bento__tile {
  position: relative;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex; flex-direction: column; gap: 14px;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  overflow: hidden;
}
.bento__tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.bento__tile h3 { margin: 0 0 4px; font-size: 1.22rem; }
.bento__tile p  { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.bento__tile .ico {
  width: 46px; height: 46px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand);
  transition: transform var(--t);
}
.bento__tile:hover .ico { transform: scale(1.06) rotate(-3deg); }
.bento__link { font-weight: 600; color: var(--brand); display: inline-flex; gap: 4px; align-items: center; margin-top: auto; }
.bento__link:hover { gap: 10px; }
.bento__tile--big {
  grid-column: span 6;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-700) 100%);
  color: #fff;
  position: relative;
}
.bento__tile--big::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(235,93,63,.4) 0%, transparent 50%),
    radial-gradient(circle at 10% 90%, rgba(82,127,162,.4) 0%, transparent 50%);
}
.bento__tile--big > * { position: relative; }
.bento__tile--big h3 { color: #fff; font-size: 1.6rem; }
.bento__tile--big p  { color: #b9c2d2; }
.bento__tile--big .ico { background: rgba(255,255,255,.12); color: #fff; }
.bento__tile--big .bento__link { color: var(--brand-400); }
.bento__tile--small { grid-column: span 3; }
.bento__tile--mid { grid-column: span 6; }
@media (max-width: 980px) {
  .bento__tile--big,
  .bento__tile--mid,
  .bento__tile--small { grid-column: span 6; }
}
@media (max-width: 580px) {
  .bento__tile--big,
  .bento__tile--mid,
  .bento__tile--small { grid-column: span 12; }
}

/* ============= CARDS clásicas (refinadas) ============= */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
  position: relative;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.card__icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand-50); color: var(--brand); margin-bottom: 16px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--ink-soft); margin-bottom: 16px; font-size: .96rem; }
.card__link { font-weight: 600; color: var(--brand); display: inline-flex; gap: 4px; align-items: center; }
.card__link:hover { gap: 10px; }

/* ============= SECTORS ============= */
.sectors { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.sector {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink); font-weight: 500; font-size: .94rem;
  transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
}
.sector:hover { color: var(--brand); border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.sector__ico {
  width: 34px; height: 34px; border-radius: 9px; background: var(--slate-100); color: var(--slate);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px;
  transition: background var(--t-fast), color var(--t-fast);
}
.sector:hover .sector__ico { background: var(--brand-50); color: var(--brand); }

/* ============= STATS ============= */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 32px; }
.stat { text-align: center; }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 800; line-height: 1;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-400) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.stat__label { color: var(--ink-soft); margin-top: 10px; font-weight: 500; font-size: .96rem; }

/* ============= WHY US ============= */
.whyus { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.whyus__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; }
.whyus__list li { display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: start; }
.whyus__list .ico {
  width: 44px; height: 44px; border-radius: 12px; background: var(--brand-50); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
}
.whyus__list strong { font-size: 1.05rem; color: var(--ink); }
.whyus__list .muted { display: block; margin-top: 2px; font-size: .96rem; }

/* ============= PROCESS TIMELINE ============= */
.process {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px;
  position: relative;
}
.process__step {
  position: relative; padding: 30px 24px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.process__step:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-100); }
.process__num {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem; margin-bottom: 18px;
  box-shadow: var(--shadow-brand);
  font-family: var(--font-display);
}
.process__step h3 { margin-bottom: 8px; }
.process__step p { margin: 0; font-size: .94rem; }

/* ============= PARTNERS ============= */
.partners { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; align-items: center; }
.partners__item {
  display: flex; align-items: center; justify-content: center;
  padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  min-height: 92px;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.partners__item:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.partners__item img { max-height: 38px; width: auto; max-width: 140px; object-fit: contain; opacity: .9; transition: opacity var(--t-fast); }
.partners__item:hover img { opacity: 1; }
/* Logos con aspecto ancho (Conexia, TecInfoBcn) — reducir para nivelarlos */
.partners__item img[src*="conexia"],
.partners__item img[src*="tecinfobcn"] { max-height: 26px; max-width: 110px; }

/* ============= TESTIMONIOS ============= */
.testimonials { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.testimonial {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px;
  display: flex; flex-direction: column; gap: 18px; position: relative;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.testimonial:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.testimonial::before {
  content: "“"; position: absolute; top: -6px; left: 22px;
  font-family: Georgia, serif; font-size: 80px; line-height: 1;
  color: var(--brand); opacity: .22;
}
.testimonial__stars { color: #f59e0b; letter-spacing: 2px; font-size: 1rem; }
.testimonial__text { color: var(--ink); font-size: 1.02rem; flex: 1; line-height: 1.6; }
.testimonial__author { display: flex; align-items: center; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); }
.testimonial__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--slate) 0%, var(--slate-700) 100%);
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; flex: 0 0 44px; font-size: .92rem;
}
.testimonial__author strong { display: block; color: var(--ink); font-size: .95rem; }
.testimonial__author span { color: var(--muted); font-size: .85rem; }

/* ============= BLOG CARDS ============= */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.blog-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.blog-card__img {
  height: 200px; overflow: hidden;
  background: linear-gradient(135deg, var(--slate) 0%, var(--slate-700) 100%);
  position: relative;
}
.blog-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.blog-card:hover .blog-card__img img { transform: scale(1.04); }
.blog-card__body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.blog-card__date { font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.blog-card__title { color: var(--ink); font-weight: 700; font-size: 1.08rem; line-height: 1.35; margin: 0; }
.blog-card__title a { color: inherit; }
.blog-card__title a:hover { color: var(--brand); }
.blog-card__excerpt { color: var(--ink-soft); font-size: .95rem; margin: 0; flex: 1; }
.blog-card__link { font-weight: 600; color: var(--brand); margin-top: 8px; align-self: flex-start; display: inline-flex; gap: 4px; align-items: center; }
.blog-card__link:hover { gap: 10px; }

/* ============= CTA strip premium ============= */
.ctastrip {
  position: relative;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-700) 100%);
  color: #fff; border-radius: var(--radius-xl); padding: clamp(40px, 5.5vw, 64px);
  display: grid; grid-template-columns: 1.5fr .5fr; gap: 32px; align-items: center;
  box-shadow: var(--shadow-lg);
  overflow: hidden; isolation: isolate;
}
.ctastrip::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(800px 400px at 90% 10%, rgba(235,93,63,.45) 0%, transparent 55%),
    radial-gradient(600px 300px at 0% 100%, rgba(82,127,162,.4) 0%, transparent 60%);
}
.ctastrip h2 { color: #fff; margin-bottom: 10px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.ctastrip p  { color: #cfd6e2; margin: 0; max-width: 56ch; }
.ctastrip__actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.ctastrip .btn-primary { background: #fff; color: var(--brand); box-shadow: 0 10px 30px -10px rgba(0,0,0,.4); }
.ctastrip .btn-primary:hover { background: var(--brand-50); color: var(--brand-700); }

/* ============= FAQ ============= */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin-bottom: 10px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.faq details:hover { border-color: var(--line-strong); }
.faq details[open] { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.faq summary {
  cursor: pointer; font-weight: 600; color: var(--ink); list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: 0 0 22px; width: 22px; height: 22px;
  background: var(--brand-50); color: var(--brand); border-radius: 50%;
  background-image: linear-gradient(currentColor, currentColor), linear-gradient(currentColor, currentColor);
  background-size: 10px 2px, 2px 10px;
  background-position: center; background-repeat: no-repeat;
  color: var(--brand); transition: transform var(--t-fast);
}
.faq details[open] summary::after { background-size: 10px 2px, 0 0; }
.faq details > div { padding-top: 14px; color: var(--ink-soft); line-height: 1.65; }

/* ============= FOOTER ============= */
.site-footer { background: var(--bg-deep); color: #b9c2d2; padding: 72px 0 24px; position: relative; overflow: hidden; }
.site-footer::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(800px 400px at 90% 0%, rgba(235,93,63,.12) 0%, transparent 60%);
  pointer-events: none;
}
.site-footer .container { position: relative; }
.site-footer a { color: #b9c2d2; }
.site-footer a:hover { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.07); }
.site-footer__about p { color: #8b97ab; font-size: .94rem; line-height: 1.65; }
.site-footer h4, .site-footer__h { color: #fff; margin-bottom: 16px; font-size: .92rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; font-size: .94rem; }
.site-footer__legal { display: flex; justify-content: space-between; padding-top: 22px; font-size: .85rem; color: #8b97ab; gap: 16px; flex-wrap: wrap; }
.site-footer__legal a { margin-right: 16px; }
.site-footer__logo { height: 36px; margin-bottom: 18px; }

/* ============= FLOATING WHATSAPP ============= */
.fab-wa {
  position: fixed; bottom: 24px; right: 24px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; background: #25d366;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 14px 32px rgba(37,211,102,.45);
  transition: transform var(--t-fast);
  animation: pulse-wa 2.6s ease-out infinite;
}
.fab-wa:hover { transform: scale(1.08); color: #fff; }
@keyframes pulse-wa {
  0%, 100% { box-shadow: 0 14px 32px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); }
  50%      { box-shadow: 0 14px 32px rgba(37,211,102,.45), 0 0 0 16px rgba(37,211,102,0); }
}

/* ============= BREADCRUMBS ============= */
.crumbs { color: var(--muted); font-size: .88rem; margin-bottom: 18px; }
.crumbs a { color: var(--ink-soft); font-weight: 500; }
.crumbs a:hover { color: var(--brand); }
.crumbs__sep { margin: 0 8px; color: var(--line-strong); }

/* ============= PAGE HEADER (interior) ============= */
.page-header {
  padding: clamp(36px, 5vw, 64px) 0 clamp(28px, 4vw, 48px);
  background: linear-gradient(180deg, var(--bg-soft) 0%, transparent 100%);
  position: relative; overflow: hidden;
}
.page-header::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(700px 350px at 20% -10%, rgba(235,93,63,.08) 0%, transparent 60%),
    radial-gradient(600px 300px at 90% 100%, rgba(82,127,162,.08) 0%, transparent 60%);
}
.page-header .container { position: relative; }
.page-header h1 { margin-bottom: .35em; max-width: 22ch; }
.page-header h1 .accent {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-400) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-header__sub { font-size: 1.15rem; color: var(--ink-soft); max-width: 62ch; line-height: 1.65; }

/* ============= FEATURES ============= */
.feature-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.feature {
  display: grid; grid-template-columns: 46px 1fr; gap: 16px;
  padding: 24px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.feature:hover { transform: translateY(-2px); border-color: var(--brand-100); box-shadow: var(--shadow-sm); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; background: var(--slate-100); color: var(--slate); display: inline-flex; align-items: center; justify-content: center; }
.feature h3 { margin-bottom: 6px; font-size: 1.05rem; }
.feature p { margin: 0; font-size: .94rem; color: var(--ink-soft); }

/* ============= FORMULARIO ============= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid--full { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field input, .field textarea, .field select {
  font: inherit; padding: 13px 16px;
  border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); width: 100%;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring-brand);
}
.field textarea { min-height: 150px; resize: vertical; }
.field__hint { font-size: .82rem; color: var(--muted); }
.field__check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--ink-soft); }
.field__check input { width: auto; margin-top: 4px; }
.form-msg { padding: 16px 18px; border-radius: var(--radius); margin-bottom: 18px; }
.form-msg--ok { background: #ecfdf3; border: 1px solid #abefc6; color: #067647; }
.form-msg--err { background: #fef3f2; border: 1px solid #fda29b; color: #b42318; }

/* Contact split */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; }
.contact-info { display: flex; flex-direction: column; gap: 24px; }
.contact-info__item { display: grid; grid-template-columns: 46px 1fr; gap: 16px; align-items: start; }
.contact-info__ico { width: 46px; height: 46px; border-radius: 12px; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; }
.contact-info__item strong { display: block; color: var(--ink); margin-bottom: 2px; }
.contact-info__item p { margin: 0; color: var(--ink-soft); font-size: .96rem; }
.contact-info__item a { color: var(--ink-soft); font-weight: 600; }
.contact-info__item a:hover { color: var(--brand); }

/* ============= OFFICES grid ============= */
.offices {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px; margin-bottom: 28px;
}
.office {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
  display: flex; flex-direction: column; gap: 10px;
}
.office:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.office__city {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand);
}
.office__city svg { flex: 0 0 14px; }
.office h3 { font-size: 1.05rem; margin: 2px 0 0; line-height: 1.3; }
.office__addr { color: var(--ink-soft); font-size: .94rem; line-height: 1.55; margin: 0; }
.office__row { display: flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--ink); margin: 0; }
.office__row svg { flex: 0 0 14px; color: var(--muted); }
.office__row a { color: var(--ink); font-weight: 600; }
.office__row a:hover { color: var(--brand); }
.office__hours { font-size: .85rem; color: var(--muted); margin: 4px 0 0; line-height: 1.55; }
.office__cta {
  margin-top: auto; padding-top: 12px;
  display: inline-flex; gap: 6px; align-items: center;
  font-weight: 600; font-size: .9rem; color: var(--brand);
}
.office__cta:hover { gap: 12px; }
.office-map {
  margin-top: 20px; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 16/7;
  background: var(--bg-soft);
}
.office-map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ============= PROSE (artículos) ============= */
.prose { max-width: 720px; }
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose p { color: var(--ink); font-size: 1.05rem; line-height: 1.75; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .4em; color: var(--ink); line-height: 1.65; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose blockquote {
  border-left: 4px solid var(--brand); padding: .4em 1.2em; margin: 1.6em 0;
  background: var(--brand-50); color: var(--ink); font-style: italic; border-radius: 6px;
}
.prose img { border-radius: var(--radius); margin: 1.6em 0; box-shadow: var(--shadow-sm); }
.prose pre { background: var(--ink); color: #cdd6e2; padding: 20px; border-radius: var(--radius); overflow-x: auto; font-size: .92rem; line-height: 1.5; }
.prose code { background: var(--bg-soft); padding: 2px 6px; border-radius: 4px; font-size: .92em; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; }
.prose pre code { background: transparent; padding: 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.4em 0; font-size: .94rem; }
.prose th, .prose td { padding: 11px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { background: var(--bg-soft); font-weight: 700; }

/* ============= ARTICLE HEADER ============= */
.article-head { background: linear-gradient(180deg, var(--bg-soft) 0%, transparent 100%); padding: clamp(48px,7vw,80px) 0 clamp(32px,4vw,48px); position: relative; overflow: hidden; }
.article-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 350px at 70% 0%, rgba(82,127,162,.08), transparent 60%);
}
.article-head .container { position: relative; }
.article-head h1 { max-width: 24ch; margin-bottom: 16px; }
.article-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-body { padding: clamp(28px,4vw,40px) 0 clamp(56px,7vw,80px); }
.article-body__layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 56px; }
.article-aside .aside-box { background: var(--bg-soft); padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); position: sticky; top: 88px; }
.article-aside h4 { margin-bottom: 14px; }

/* ============= PAGINATION ============= */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 10px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  color: var(--ink); font-weight: 600; background: #fff;
  transition: all var(--t-fast);
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .is-current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ============= SCROLL REVEAL ============= */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.3,1);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ============= RESPONSIVE ============= */

/* Tablet horizontal y desktop pequeño */
@media (max-width: 1100px) {
  .hero__card--main { width: 72%; }
  .hero__card--metric { width: 160px; right: -3%; }
  .hero__card--shield { width: 185px; right: -3%; }
}

@media (max-width: 980px) {
  .hero { padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 6vw, 72px); }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .hero__art { max-width: 480px; margin: 8px auto 0; }
  .hero__sub { max-width: none; }
  .hero__card--main { width: 70%; left: 5%; }
  .hero__card--metric { right: 0; }
  .hero__card--shield { right: 0; }
  .whyus { grid-template-columns: 1fr; }
  .ctastrip { grid-template-columns: 1fr; }
  .ctastrip__actions { justify-content: flex-start; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .article-body__layout { grid-template-columns: 1fr; gap: 32px; }
  .article-aside .aside-box { position: static; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .section { padding: clamp(56px, 8vw, 88px) 0; }
}

@media (max-width: 820px) {
  .partners { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
  .bento__tile--big, .bento__tile--mid, .bento__tile--small { grid-column: span 6; }
  .process { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .container { padding: 0 18px; }
  h1 { font-size: clamp(1.85rem, 7vw, 2.5rem); }
  h2 { font-size: clamp(1.5rem, 5.5vw, 1.95rem); }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.7rem); }
  .hero__sub { font-size: 1.05rem; }
  .hero__ctas .btn { flex: 1 1 auto; }
  .hero__trust { gap: 6px 16px; font-size: .82rem; }
  .nav {
    position: fixed; inset: 68px 14px auto;
    flex-direction: column; align-items: stretch;
    background: #fff; padding: 16px; gap: 4px;
    border-radius: var(--radius-lg);
    transform: scale(.96); opacity: 0; pointer-events: none;
    transition: transform var(--t), opacity var(--t);
    box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  }
  .nav.is-open { transform: scale(1); opacity: 1; pointer-events: auto; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .nav__cta { margin: 12px 0 0; }
  /* Mega-menú colapsa inline */
  .nav__group { width: 100%; }
  .nav__trigger {
    width: 100%; justify-content: space-between;
    padding: 12px 14px; font-size: 1rem;
  }
  .nav__mega {
    position: static; transform: none; width: 100%;
    grid-template-columns: 1fr;
    padding: 0; border: 0; box-shadow: none; background: transparent;
    margin: 0 0 4px;
    max-height: 0; overflow: hidden;
    opacity: 1; pointer-events: auto;
    transition: max-height var(--t);
  }
  .nav__mega.is-open { max-height: 1200px; padding: 8px 0; }
  .nav__group:hover .nav__mega { /* en móvil solo abre por click */
    max-height: 0; padding: 0;
  }
  .nav__group:hover .nav__mega.is-open { max-height: 1200px; padding: 8px 0; }
  .nav__mega-title { margin: 12px 0 4px 8px; }
  .nav__mega a { padding: 10px 8px; }
  .nav__mega-cta { padding: 16px; margin-top: 8px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 11px;
    border: 1px solid var(--line); background: #fff; cursor: pointer;
    color: var(--ink);
  }
  .site-header__inner { padding: 14px 0; }
  .site-header__logo img { height: 44px; }
  .page-header { padding: clamp(40px, 7vw, 64px) 0 clamp(24px, 4vw, 36px); }
  .page-header h1 { max-width: none; }
  .page-header__sub { font-size: 1.02rem; }
  .ctastrip { padding: 32px 24px; border-radius: var(--radius-lg); }
  .ctastrip h2 { font-size: 1.4rem; }
  .stats { gap: 28px; }
  .stat__num { font-size: clamp(2rem, 9vw, 2.6rem); }
  .testimonial { padding: 24px; }
  .feature, .card, .bento__tile, .process__step { padding: 22px; }
  .partners__item { padding: 18px 16px; min-height: 78px; }
  .partners__item img { max-height: 30px; }
  .trust-strip { padding: 24px 0; }
  .marquee { gap: 36px; }
  .marquee img { max-height: 26px; }
  .fab-wa { width: 54px; height: 54px; bottom: 18px; right: 18px; }
  .site-footer { padding: 56px 0 20px; }
  .site-footer__grid { gap: 28px; padding-bottom: 28px; }
  .crumbs { font-size: .82rem; }
}

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .article-meta { gap: 12px; font-size: .85rem; }
  .bento__tile--big, .bento__tile--mid, .bento__tile--small { grid-column: span 12; }
  .partners { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
  .partners__item { padding: 14px 12px; min-height: 70px; }
  .partners__item img { max-height: 28px; }
}

/* Móvil: ocultar tarjetas flotantes auxiliares para que el dashboard principal
   se vea limpio sin solapes. Mantenemos la principal. */
@media (max-width: 540px) {
  .hero__art { max-width: 360px; aspect-ratio: 1.05/1; }
  .hero__card--main { left: 8%; right: 8%; width: auto; padding: 16px 18px; }
  .hero__card--main h4 { font-size: .9rem; }
  .hero__card--main li { font-size: .78rem; padding: 6px 0; gap: 8px; }
  .hero__card--metric, .hero__card--shield { display: none; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .section__head { margin-bottom: 32px; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: clamp(1.85rem, 9vw, 2.3rem); }
  .hero__ctas { flex-direction: column; align-items: stretch; }
  .hero__ctas .btn { justify-content: center; }
}

/* Reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ============= STICKY CTA BAR ============= */
.cta-bar {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 55;
  display: none; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(11,20,38,.95); color: #fff;
  border-radius: 999px; box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.08);
  transform: translateY(120%); transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.cta-bar.is-visible { transform: translateY(0); }
.cta-bar.is-active { display: flex; }
.cta-bar__msg { flex: 1 1 auto; min-width: 0; font-size: .92rem; color: #cdd6e2; line-height: 1.3; }
.cta-bar__msg strong { color: #fff; display: block; font-weight: 700; font-size: 1rem; }
.cta-bar__actions { display: inline-flex; gap: 6px; align-items: center; flex: 0 0 auto; }
.cta-bar a.btn {
  padding: .55em 1em; font-size: .88rem; gap: 4px; line-height: 1;
}
.cta-bar .btn-tel { background: var(--brand); color: #fff; border-color: var(--brand); }
.cta-bar .btn-wa  { background: #25d366; color: #fff; border-color: #25d366; }
.cta-bar .btn-cta { background: #fff; color: var(--ink); border-color: #fff; }
.cta-bar__close {
  flex: 0 0 auto; background: transparent; border: 0; color: rgba(255,255,255,.6);
  cursor: pointer; padding: 6px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.cta-bar__close:hover { color: #fff; background: rgba(255,255,255,.08); }

@media (max-width: 720px) {
  .cta-bar { padding: 8px 10px; gap: 6px; left: 8px; right: 8px; bottom: 8px; }
  .cta-bar__msg { display: none; }
  .cta-bar a.btn { font-size: .82rem; padding: .55em .9em; }
  /* Subimos el FAB WA para no solapar */
  .cta-bar.is-active ~ .fab-wa { bottom: 78px; }
}

/* ============= MODAL CONTACTO RÁPIDO ============= */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(11,20,38,.7);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  padding: 16px;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  max-width: 480px; width: 100%; padding: 28px;
  box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
  position: relative;
  animation: modal-in .22s ease-out;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.modal__close {
  position: absolute; top: 14px; right: 14px;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: var(--bg-soft); color: var(--ink-soft); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal__close:hover { background: var(--brand-50); color: var(--brand); }
.modal h3 { font-size: 1.4rem; margin-bottom: 6px; }
.modal p.lead { font-size: .98rem; margin-bottom: 18px; }
.modal .form-grid { gap: 12px; }

/* ============= TABLA COMPARATIVA ============= */
.compare {
  display: grid; gap: 4px;
  background: var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.compare__row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 4px;
  background: var(--line);
}
.compare__row--head { background: transparent; }
.compare__cell {
  background: #fff; padding: 16px 22px;
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .95rem; color: var(--ink);
  line-height: 1.45;
}
.compare__cell--label { font-weight: 600; align-items: center; }
.compare__cell--bad { background: #fff5f3; color: #7a1d0e; }
.compare__cell--bad svg { color: #c84418; flex: 0 0 16px; margin-top: 3px; }
.compare__cell--good { background: #f0fbf2; color: #06502c; }
.compare__cell--good svg { color: var(--success); flex: 0 0 16px; margin-top: 3px; }
.compare__row--head .compare__cell { padding: 18px 22px 14px; flex-direction: column; gap: 2px; }
.compare__row--head .compare__cell--bad,
.compare__row--head .compare__cell--good {
  background: var(--ink); color: #fff;
}
.compare__row--head .compare__cell--bad strong,
.compare__row--head .compare__cell--good strong { color: #fff; font-size: 1.05rem; }
.compare__row--head .compare__cell--bad .muted,
.compare__row--head .compare__cell--good .muted { color: #93a2b5; font-size: .82rem; }

@media (max-width: 820px) {
  .compare__row { grid-template-columns: 1fr; gap: 0; padding: 0; }
  .compare__row--head { display: none; }
  .compare__cell { padding: 14px 18px; }
  .compare__cell--label {
    background: var(--bg-soft); font-weight: 700;
    border-top: 4px solid var(--brand);
    margin-top: 8px;
  }
  .compare__cell--bad::before { content: "✗ Sin gestionar: "; font-weight: 700; }
  .compare__cell--good::before { content: "✓ Con nosotros: "; font-weight: 700; }
}

/* ============= RISK REVERSAL BANNER ============= */
.risk-reversal {
  display: grid; grid-template-columns: 48px 1fr auto; gap: 16px; align-items: center;
  background: linear-gradient(135deg, var(--brand-50) 0%, #fff5ec 100%);
  border: 1px solid var(--brand-200); border-radius: var(--radius);
  padding: 18px 22px;
  margin-top: 24px;
}
.risk-reversal__ico {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--brand); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-brand);
}
.risk-reversal__text strong {
  display: block; color: var(--ink); font-size: 1.02rem; line-height: 1.3;
}
.risk-reversal__text span {
  display: block; font-size: .9rem; color: var(--ink-soft); margin-top: 4px;
}
@media (max-width: 600px) {
  .risk-reversal { grid-template-columns: 48px 1fr; }
  .risk-reversal a.btn { grid-column: 1 / -1; justify-content: center; }
}

/* ============= PARTNER BADGES (con años) ============= */
.partner-badges {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.partner-badge {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; flex-direction: column; gap: 6px;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.partner-badge:hover { transform: translateY(-3px); border-color: var(--brand); box-shadow: var(--shadow-sm); }
.partner-badge img { max-height: 30px; max-width: 130px; width: auto; object-fit: contain; }
.partner-badge img[src*="conexia"],
.partner-badge img[src*="tecinfobcn"] { max-height: 22px; max-width: 105px; }
.partner-badge__since { font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.partner-badge__level { font-size: .92rem; font-weight: 600; color: var(--ink); }

/* ============= INTERNAL NAV (related cities/services) ============= */
.related-nav {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px;
}
.related-nav h3 { font-size: 1.1rem; margin-bottom: 14px; }
.related-nav__list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px;
  list-style: none; padding: 0; margin: 0;
}
.related-nav__list a {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 500; font-size: .92rem;
  transition: background var(--t-fast), color var(--t-fast);
}
.related-nav__list a:hover { background: var(--bg-soft); color: var(--brand); }
.related-nav__list svg { color: var(--brand); flex: 0 0 14px; }

/* ============= CASOS DE ÉXITO ============= */
.case-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.case-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; position: relative;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.case-card__sector {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--slate-100); color: var(--slate-700);
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 12px;
}
.case-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.case-card p { color: var(--ink-soft); font-size: .94rem; margin-bottom: 14px; }
.case-card__metric {
  display: flex; align-items: baseline; gap: 6px;
  padding-top: 14px; border-top: 1px dashed var(--line);
}
.case-card__metric strong {
  font-size: 1.45rem; font-weight: 800; color: var(--brand);
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.case-card__metric span { font-size: .85rem; color: var(--muted); }

/* ============= CHIPS multi-select (servicios) ============= */
.chip-group {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip-group__label {
  display: block; font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin-bottom: 12px;
}
.chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; font-size: .9rem; font-weight: 500;
  border: 1.5px solid var(--line-strong); border-radius: 999px;
  background: #fff; color: var(--ink-soft); cursor: pointer;
  user-select: none; transition: all var(--t-fast);
  line-height: 1;
}
.chip input {
  position: absolute; opacity: 0; pointer-events: none;
  width: 0; height: 0;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip:has(input:checked),
.chip.is-checked {
  background: var(--brand); color: #fff; border-color: var(--brand);
  box-shadow: 0 6px 18px -6px rgba(235,93,63,.5);
}
.chip:has(input:checked)::before,
.chip.is-checked::before {
  content: ""; display: inline-block; width: 14px; height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-size: 14px; background-repeat: no-repeat;
  flex: 0 0 14px;
}
.chip:focus-within { outline: none; box-shadow: var(--ring-brand); }

/* Skip link a11y */
.skip { position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 0 0 8px 0; }
.skip:focus { left: 0; top: 0; }
