/* =========================================================
   +Cerca — styles.css
   Mobile-first, single-page, brand-aligned, WCAG AA
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* palette */
  --c-navy: #0B2A5B;
  --c-turq: #16C5D8;
  --c-nfc:  #2F80ED;
  /* variantes oscuras para TEXTO sobre fondo claro (contraste AA >= 4.5) */
  --c-nfc-text:  #1B63C8;
  --c-turq-text: #0E7C86;
  --c-bg:   #FFFFFF;
  --c-bg-2: #F5F7FA;
  --c-text: #0B2A5B;
  --c-mute: #5F6C7B;
  --c-line: #E5EAF0;

  /* type */
  --ff-display: 'Space Grotesk', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ff-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --ff-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;

  /* scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  /* radius */
  --r-sm: 8px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 999px;

  /* shadow */
  --sh-1: 0 1px 2px rgba(11,42,91,.06);
  --sh-2: 0 4px 12px rgba(11,42,91,.08);
  --sh-3: 0 12px 28px rgba(11,42,91,.18);
  --sh-4: 0 20px 45px -10px rgba(11,42,91,.25);

  /* layout */
  --container: 1200px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* ponytail: oculta el body hasta que i18n.js aplique el idioma guardado,
   asi los visitantes que ya eligieron ingles no ven un flash en espanol. */
html.i18n-pending body { visibility: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--c-nfc-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; color: inherit; }
:focus-visible {
  outline: 3px solid var(--c-turq);
  outline-offset: 2px;
  border-radius: 4px;
}
::selection { background: var(--c-turq); color: var(--c-navy); }

main:focus { outline: none; }
/* ponytail: smooth fade when the language switches. 180ms matches i18n.js setTimeout. */
[data-i18n], [data-i18n-aria], [data-i18n-placeholder] {
  transition: opacity 180ms ease;
}
html.i18n-swapping [data-i18n],
html.i18n-swapping [data-i18n-aria],
html.i18n-swapping [data-i18n-placeholder] {
  opacity: 0;
}

/* skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--c-navy);
  color: #fff;
  border-radius: var(--r-sm);
  z-index: 1000;
  transition: top .2s;
}
.skip-link:focus { top: var(--s-4); }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--s-4);
}
.section {
  padding: var(--s-7) 0;
}
.section--soft { background: var(--c-bg-2); }
.section--dark {
  background: var(--c-navy);
  color: #fff;
}
/* .section.section--dark (dos clases) para pesar mas que .section h2 / .section
   .lead de mas abajo - con la misma especificidad ganaba la regla que aparece
   despues en el archivo y el texto quedaba navy sobre navy (invisible). */
.section.section--dark h1,
.section.section--dark h2,
.section.section--dark h3,
.section.section--dark .lead { color: #fff; }
.section--dark .kicker { color: var(--c-turq); }

.kicker {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-nfc-text);
  margin-bottom: var(--s-3);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--c-line);
  transition: box-shadow 220ms cubic-bezier(.22,1,.36,1), border-color 220ms cubic-bezier(.22,1,.36,1);
}
.nav.is-scrolled {
  border-bottom-color: transparent;
  box-shadow: 0 1px 16px rgba(11,42,91,.1);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  height: 64px;
}
.nav__logo {
  display: flex;
  align-items: center;
  margin-right: auto;
}
.nav__logo img {
  height: 32px;
  width: auto;
}
.nav__links {
  display: none;
  gap: var(--s-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  color: var(--c-text);
  font-weight: 500;
  font-size: 14px;
}
.nav__links a:hover { color: var(--c-nfc-text); text-decoration: none; }
.nav__links a.is-active,
.nav__drawer a.is-active { color: var(--c-nfc-text); font-weight: 700; }
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.lang-switch {
  position: relative;
  display: inline-flex;
  padding: 2px;
  background: var(--c-bg-2);
  border-radius: var(--r-xl);
  font-size: 13px;
  font-weight: 600;
}
.lang-switch__indicator {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 2px;
  width: calc(50% - 2px);
  background: var(--c-navy);
  border-radius: var(--r-xl);
  transition: transform 260ms cubic-bezier(.22,1,.36,1);
  z-index: 0;
}
.lang-switch.lang--en .lang-switch__indicator { transform: translateX(100%); }
.lang-switch button {
  position: relative;
  z-index: 1;
  padding: 4px 10px;
  border-radius: var(--r-xl);
  color: var(--c-mute);
  transition: color 180ms cubic-bezier(.22,1,.36,1);
}
.lang-switch button[aria-pressed='true'] {
  color: #fff;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  color: var(--c-navy);
}
.nav-toggle:hover { background: var(--c-bg-2); }
.nav-toggle svg { width: 22px; height: 22px; }
.nav__drawer {
  display: none;
  border-top: 1px solid var(--c-line);
  background: #fff;
  padding: var(--s-4) 0;
}
.nav__drawer.is-open { display: block; }
.nav__drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.nav__drawer a {
  display: block;
  padding: var(--s-3) var(--s-4);
  color: var(--c-text);
  font-weight: 500;
  border-radius: var(--r-sm);
}
.nav__drawer a:hover { background: var(--c-bg-2); text-decoration: none; }

@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav-toggle { display: none; }
  .nav__drawer { display: none !important; }
}

/* ---------- Buttons ---------- */
/* ponytail: cubic-bezier(.22,1,.36,1) = easeOutQuart; movement and color ease differently
   so the lift feels physical, the color change feels instant. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 12px 20px;
  border-radius: var(--r-sm);
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  text-decoration: none !important;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 260ms cubic-bezier(.22,1,.36,1),
    box-shadow 260ms cubic-bezier(.22,1,.36,1),
    background-color 180ms cubic-bezier(.22,1,.36,1),
    border-color 180ms cubic-bezier(.22,1,.36,1),
    color 180ms cubic-bezier(.22,1,.36,1);
  will-change: transform;
}
.btn:active { transform: translateY(0) scale(.98); transition-duration: 80ms; }
.btn--primary {
  position: relative;
  overflow: hidden;
  background: var(--c-navy);
  color: #fff;
  box-shadow: var(--sh-2);
}
.btn--primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.25), transparent);
  transform: skewX(-20deg);
  transition: left 550ms ease;
}
.btn--primary:hover::after { left: 150%; }
.btn--primary:hover { background: #0d3470; transform: translateY(-2px); box-shadow: var(--sh-3); }
.btn--ghost {
  background: transparent;
  color: var(--c-navy);
  border-color: var(--c-line);
}
.btn--ghost:hover { background: var(--c-bg-2); border-color: var(--c-nfc); transform: translateY(-1px); }
.btn--turq {
  background: var(--c-turq);
  color: var(--c-navy);
  font-weight: 700;
}
.btn--turq:hover { background: #14b3c4; transform: translateY(-2px); box-shadow: var(--sh-3); }

/* ---------- Hero ---------- */
.hero {
  padding: var(--s-6) 0 var(--s-7);
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: start;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 6px 12px;
  background: rgba(22, 197, 216, .12);
  color: var(--c-navy);
  border-radius: var(--r-xl);
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: var(--s-4);
}
.hero__badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-turq);
  box-shadow: 0 0 0 4px rgba(22,197,216,.2);
  animation: badgePulse 2.4s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(22,197,216,.2); }
  50% { box-shadow: 0 0 0 8px rgba(22,197,216,.06); }
}
.hero::before {
  content: '';
  position: absolute;
  top: -220px;
  right: -180px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(47,128,237,.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.hero h1 {
  font-family: var(--ff-display);
  font-size: clamp(2rem, 1.5rem + 3vw, 3.5rem);
  line-height: 1.05;
  font-weight: 700;
  margin: 0 0 var(--s-4);
  letter-spacing: -0.02em;
  color: var(--c-navy);
}
.hero .lead {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  color: var(--c-mute);
  margin: 0 0 var(--s-4);
  max-width: 60ch;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.hero__card-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 360px;
}
.hero__card-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, rgba(22,197,216,.18), transparent 70%);
  z-index: 0;
  filter: blur(40px);
}
.hero-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  transform-origin: top center;
  margin: 0;
}
card-3d {
  display: inline-block;
  width: 340px;
  height: 500px;
}
.hero-card__hint {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 14px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-xl);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-mute);
  box-shadow: var(--sh-1);
}
.hero-card__hint svg { width: 18px; height: 18px; stroke: var(--c-turq); fill: none; stroke-width: 2; }
.hero-card__hint svg text { stroke: none; fill: var(--c-turq); font-family: var(--ff-mono); font-size: 6px; font-weight: 700; }

@media (max-width: 1023px) {
  .hero-card { transform: scale(0.85); margin-bottom: -90px; }
}
@media (max-width: 767px) {
  .hero-card { transform: scale(0.7); margin-bottom: -180px; }
  .hero__card-wrap { min-height: 280px; }
}
@media (min-width: 1024px) {
  .hero__grid { grid-template-columns: 1.1fr 1fr; gap: var(--s-7); align-items: center; }
  .hero__card-wrap { min-height: 500px; }
}

/* ---------- Typography ---------- */
.section h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.75rem, 1.4rem + 2vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-navy);
  margin: 0 0 var(--s-3);
}
.section .lead {
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  color: var(--c-mute);
  max-width: 60ch;
  margin: 0 0 var(--s-5);
}

/* ---------- Problem ---------- */
.problem__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.problem__item {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.problem__item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-nfc), var(--c-turq));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s cubic-bezier(.22,1,.36,1);
}
.problem__item:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.problem__item:hover::before { transform: scaleX(1); }
.problem__item .num {
  display: block;
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--c-turq-text);
  margin-bottom: var(--s-3);
}
.problem__item h3 {
  font-family: var(--ff-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 var(--s-2);
  color: var(--c-navy);
}
.problem__item p {
  margin: 0;
  color: var(--c-mute);
  font-size: 15px;
}

@media (min-width: 768px)  { .problem__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .problem__grid { grid-template-columns: repeat(4, 1fr); } }

/* ---------- Problem: data cards ---------- */
.stats {
  list-style: none;
  margin: 0 0 var(--s-6);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.stat {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-nfc), var(--c-turq));
}
.stat p { margin: 0; }
.stat .stat__num {
  font-family: var(--ff-display);
  font-size: clamp(2.5rem, 2rem + 2vw, 3.25rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-navy);
  margin-bottom: var(--s-3);
}
.stat .stat__text {
  color: var(--c-text);
  font-size: 15px;
  flex: 1;
}
.stat .stat__src {
  margin-top: var(--s-4);
  padding-top: var(--s-3);
  border-top: 1px solid var(--c-line);
  font-size: 13px;
  line-height: 1.4;
}
.stat__src a {
  color: var(--c-mute);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.stat__src a:hover { color: var(--c-navy); }

@media (min-width: 768px) { .stats { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Solution ---------- */
.solution__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.solution__card {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  transition: transform 220ms cubic-bezier(.22,1,.36,1), box-shadow 220ms cubic-bezier(.22,1,.36,1), border-color 220ms cubic-bezier(.22,1,.36,1);
  outline: none;
}
.solution__card:hover,
.flip-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--sh-3);
  border-color: var(--c-turq);
}
.solution__card .tag {
  display: block;
  font-family: var(--ff-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-nfc-text);
  padding-bottom: var(--s-2);
  border-bottom: 1px solid var(--c-line);
}
.solution__card h3 {
  font-family: var(--ff-display);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--c-navy);
}
.solution__card p {
  margin: 0;
  color: var(--c-mute);
  font-size: 15px;
}

@media (min-width: 768px)  { .solution__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Flip cards (solution) ---------- */
.flip-card {
  perspective: 1400px;
  cursor: pointer;
}
.flip-card__inner {
  position: relative;
  width: 100%;
  min-height: 280px;
  transform-style: preserve-3d;
  transition: transform 620ms cubic-bezier(.22,1,.36,1);
  border-radius: var(--r-md);
}
.flip-card__face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: #fff;
  border-radius: var(--r-md);
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.flip-card__face--back {
  transform: rotateY(180deg);
  background: var(--c-bg-2);
  padding: var(--s-4);
  align-items: center;
  justify-content: center;
}
.flip-card__face--back img {
  width: 100%;
  height: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: var(--s-2);
}
.flip-card__placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  color: var(--c-turq);
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.flip-card__hint {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(22,197,216,.12);
  opacity: .7;
  transition: opacity 220ms ease, transform 220ms ease;
}
.flip-card__hint svg {
  width: 15px;
  height: 15px;
  stroke: var(--c-turq);
  fill: none;
  stroke-width: 2;
}
.flip-card__placeholder svg {
  width: 56px;
  height: 56px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .8;
}

/* ponytail: hover only on devices with real hover; keyboard/touch toggle via
   .is-flipped (JS keeps it in sync with aria-pressed, see index.html) */
@media (hover: hover) {
  .flip-card:hover .flip-card__inner { transform: rotateY(180deg); }
}
.flip-card.is-flipped .flip-card__inner { transform: rotateY(180deg); }

@media (prefers-reduced-motion: reduce) {
  .flip-card__inner { transition: none; }
}

/* ---------- Carousel (gallery) ---------- */
.carousel {
  position: relative;
  margin-top: var(--s-5);
}
.carousel__track {
  display: flex;
  gap: var(--s-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: var(--s-2) 0;
}
.carousel__track::-webkit-scrollbar { display: none; }
.gallery__item {
  position: relative;
  flex: 0 0 auto;
  width: 78%;
  max-width: 360px;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: start;
  transition: transform 260ms cubic-bezier(.22,1,.36,1), box-shadow 260ms cubic-bezier(.22,1,.36,1);
}
.gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-3);
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms cubic-bezier(.22,1,.36,1);
}
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(11,42,91,0);
  transition: background-color 220ms ease;
}
.gallery__item:hover::after { background: rgba(11,42,91,.18); }
.gallery__zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(.7);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: none;
}
.gallery__item:hover .gallery__zoom,
.gallery__item:focus-visible .gallery__zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.gallery__zoom svg { width: 18px; height: 18px; stroke: var(--c-navy); fill: none; stroke-width: 2; }
.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--c-navy);
  box-shadow: var(--sh-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 180ms cubic-bezier(.22,1,.36,1), transform 220ms cubic-bezier(.22,1,.36,1), box-shadow 220ms cubic-bezier(.22,1,.36,1);
}
.carousel__btn:hover {
  background: var(--c-navy);
  color: #fff;
  transform: translateY(-50%) scale(1.06);
  box-shadow: var(--sh-3);
}
.carousel__btn:active { transform: translateY(-50%) scale(.95); }
.carousel__btn svg { width: 22px; height: 22px; }
.carousel__btn--prev { left: var(--s-2); }
.carousel__btn--next { right: var(--s-2); }
.carousel__btn:disabled { opacity: .35; cursor: not-allowed; transform: translateY(-50%); }
.carousel__btn:disabled:hover { background: #fff; color: var(--c-navy); transform: translateY(-50%); box-shadow: var(--sh-2); }

.carousel__progress {
  height: 3px;
  background: var(--c-line);
  border-radius: var(--r-xl);
  margin-top: var(--s-4);
  overflow: hidden;
}
.carousel__progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--c-nfc), var(--c-turq));
  border-radius: inherit;
  transition: width 120ms linear;
}

@media (min-width: 768px)  {
  .carousel__track { gap: var(--s-4); padding: var(--s-3) 0; }
  .gallery__item { width: 46%; max-width: 340px; }
  .carousel__btn { width: 48px; height: 48px; }
  .carousel__btn--prev { left: var(--s-3); }
  .carousel__btn--next { right: var(--s-3); }
}
@media (min-width: 1024px) {
  .gallery__item { width: 32%; max-width: 360px; }
  .carousel__btn--prev { left: calc(var(--s-4) * -1); }
  .carousel__btn--next { right: calc(var(--s-4) * -1); }
}

/* ---------- 404 ---------- */
.notfound {
  display: flex;
  /* "safe" centering: si el contenido no entra (pantallas bajas/moviles),
     el navegador cae a top-align en vez de desbordar hacia arriba y quedar
     tapado por el header sticky - antes el "404" grande se cortaba ahi. */
  align-items: safe center;
  justify-content: safe center;
  /* Solo resta el header (altura fija, real); el footer queda fuera del
     calculo y simplemente fluye debajo, sin asumir cuantas lineas ocupa. */
  min-height: calc(100dvh - 64px);
  padding: var(--s-8) 0;
}
.notfound__inner {
  text-align: center;
  max-width: 56ch;
  margin: 0 auto;
}
.notfound__code {
  display: block;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: clamp(6rem, 4rem + 10vw, 11rem);
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, var(--c-nfc), var(--c-turq));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--s-3);
}
.notfound__inner h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  line-height: 1.2;
  font-weight: 700;
  color: var(--c-navy);
  margin: 0 0 var(--s-3);
}
.notfound__inner .lead {
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  color: var(--c-mute);
  margin: 0 0 var(--s-5);
}

/* ---------- Pricing (institucional) ---------- */
.pricing__intro {
  max-width: 640px;
  margin: 0 auto var(--s-7);
  text-align: center;
}
.pricing__intro .lead { margin-left: auto; margin-right: auto; }
.pricing__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 8px 16px;
  background: rgba(11,42,91,.08);
  color: var(--c-navy);
  border-radius: var(--r-xl);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: var(--s-4);
}
.pricing__badge svg {
  width: 16px;
  height: 16px;
  stroke: var(--c-navy);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}
.pricing__title {
  font-family: var(--ff-display);
  font-size: clamp(1.75rem, 1.4rem + 2vw, 2.5rem);
  line-height: 1.15;
  /* peso medio (no el 700 extremo del resto de los h2 del sitio) */
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--c-navy);
  margin: 0 0 var(--s-3);
}
.pricing__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
  max-width: 900px;
  margin: 0 auto var(--s-7);
}
.pricing__mini-card {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-4) var(--s-5);
  box-shadow: 0 1px 2px rgba(11,42,91,.04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pricing__mini-card:hover {
  transform: translateY(-3px);
  border-color: rgba(11,42,91,.18);
  box-shadow: 0 12px 24px -12px rgba(11,42,91,.25);
}
.pricing__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(11,42,91,.08);
  flex-shrink: 0;
}
.pricing__mini-card svg {
  width: 20px;
  height: 20px;
  stroke: var(--c-navy);
  fill: none;
  stroke-width: 1.75;
  flex-shrink: 0;
}
.pricing__mini-card span:not(.pricing__icon) {
  font-size: 14px;
  line-height: 1.4;
  color: var(--c-text);
  padding-top: 8px;
}
.pricing__action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
  text-align: center;
}
.pricing__reference {
  font-size: 13px;
  color: var(--c-mute);
  max-width: 320px;
}
@media (min-width: 768px) {
  .pricing__cards { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Vision ---------- */
#vision { position: relative; overflow: hidden; }
#vision::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(22,197,216,.12), transparent 60%);
  pointer-events: none;
}
.vision__text {
  position: relative;
  max-width: 60ch;
  margin: 0 auto;
  text-align: center;
}
.vision__text::before {
  content: '\201C';
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--ff-display);
  font-size: 72px;
  font-weight: 700;
  color: rgba(255,255,255,.1);
  line-height: 1;
  pointer-events: none;
}

/* ---------- Trust (Tu informacion, protegida) ---------- */
.trust__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-4);
}
.trust__item {
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: var(--s-5);
}
.trust__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--s-4);
  border-radius: 50%;
  background: rgba(11,42,91,.08);
}
.trust__icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--c-navy);
  fill: none;
  stroke-width: 1.75;
}
.trust__item h3 {
  font-family: var(--ff-display);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 var(--s-2);
  color: var(--c-navy);
}
.trust__item p {
  margin: 0;
  color: var(--c-mute);
  font-size: 15px;
}
.trust__more {
  margin: var(--s-5) 0 0;
  font-size: 15px;
  color: var(--c-mute);
}
.trust__more a {
  color: var(--c-navy);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 768px) { .trust__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Contact ---------- */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  max-width: 720px;
  margin: 0 auto;
}
.contact__form {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}
.field {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-navy);
}
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  color: var(--c-navy);
  font: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--c-mute); }
.field input:focus,
.field textarea:focus {
  outline: 0;
  border-color: var(--c-turq);
  box-shadow: 0 0 0 3px rgba(22,197,216,.18);
}
.field textarea { resize: none; min-height: 100px; overflow-y: hidden; }
.field__textarea-wrap {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  transition: border-color .2s, box-shadow .2s;
}
.field__textarea-wrap:focus-within {
  border-color: var(--c-turq);
  box-shadow: 0 0 0 3px rgba(22,197,216,.18);
}
.field__textarea-wrap textarea {
  border: none;
  background: transparent;
  padding: 12px 14px;
}
.field__textarea-wrap textarea:focus {
  border-color: transparent;
  box-shadow: none;
}
.field__counter-row {
  display: flex;
  justify-content: flex-end;
  padding: 0 14px 10px;
}
.field__counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: var(--r-xl);
  background: var(--c-bg-2);
  font-size: 11px;
  font-weight: 600;
  color: var(--c-mute);
  transition: background-color .2s, color .2s;
}
.field__counter.is-limit { background: rgba(192,57,43,.1); color: #c0392b; }
.field--checkbox { flex-direction: row; }
/* honeypot anti-spam: oculto para humanos, visible/rellenable para bots */
.contact__honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.checkbox {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  font-size: 14px;
  font-weight: 400;
  color: var(--c-text);
  cursor: pointer;
}
.checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--c-navy);
  cursor: pointer;
}
.checkbox a { color: var(--c-nfc-text); text-decoration: underline; }
.contact__alt {
  text-align: center;
  color: var(--c-mute);
  font-size: 14px;
}
.contact__alt a {
  color: var(--c-nfc-text);
  font-weight: 600;
}
.contact__status {
  margin: var(--s-2) 0 0;
  font-size: 14px;
  min-height: 1.4em;
}
.contact__status { scroll-margin-bottom: var(--s-5); outline: none; }
.contact__status--ok,
.contact__status--error {
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-sm);
  font-weight: 600;
}
.contact__status--ok { background: #E6F6EC; color: #0B5B30; border: 1px solid #A8DDBD; }
.contact__status--error { background: #FDECEA; color: #8A1C12; border: 1px solid #F1B5AF; }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  background: var(--c-navy);
  color: rgba(255,255,255,.85);
  padding: var(--s-6) 0 var(--s-4);
}
.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-turq), transparent);
  opacity: .5;
}
.footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-5);
  align-items: start;
}
.footer__brand img { height: 36px; width: auto; margin-bottom: var(--s-3); }
.footer__wordmark {
  display: block;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: var(--s-3);
}
.footer__brand p { margin: 0; font-size: 14px; color: rgba(255,255,255,.65); max-width: 40ch; }
.footer__nav { display: flex; flex-direction: column; gap: var(--s-2); }
.footer__nav a { color: rgba(255,255,255,.85); font-size: 14px; }
.footer__nav a:hover { color: var(--c-turq); text-decoration: none; }
.footer__bottom {
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: 13px;
  color: rgba(255,255,255,.55);
  text-align: center;
}

@media (min-width: 768px) {
  .footer__inner { grid-template-columns: 2fr 1fr 1fr; }
  .footer__bottom { text-align: left; }
}

/* ---------- Legal (Terminos / Privacidad) ---------- */
.legal {
  padding: var(--s-7) 0 var(--s-9);
}
.legal__layout {
  max-width: 72ch;
  margin: 0 auto;
}
.legal__header .kicker { display: block; margin-bottom: var(--s-3); }
.legal__header h1 {
  font-family: var(--ff-display);
  font-size: clamp(1.75rem, 1.4rem + 2vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--c-navy);
  margin: 0 0 var(--s-3);
}
.legal__updated {
  font-size: 14px;
  color: var(--c-mute);
  margin: 0 0 var(--s-6);
  padding-bottom: var(--s-5);
  border-bottom: 1px solid var(--c-line);
}
.legal__body h2 {
  font-family: var(--ff-display);
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  line-height: 1.3;
  font-weight: 700;
  color: var(--c-navy);
  margin: var(--s-7) 0 var(--s-3);
}
.legal__body h3 {
  font-family: var(--ff-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--c-navy);
  margin: var(--s-5) 0 var(--s-2);
}
.legal__body p {
  color: var(--c-text);
  margin: 0 0 var(--s-4);
}
.legal__body ul {
  margin: 0 0 var(--s-4);
  padding-left: 1.25em;
  color: var(--c-text);
}
.legal__body li { margin-bottom: var(--s-2); }
.legal__body strong { color: var(--c-navy); }
.legal__body a { text-decoration: underline; }
.legal__body hr {
  border: 0;
  border-top: 1px solid var(--c-line);
  margin: var(--s-6) 0;
}
.legal__body em {
  display: block;
  font-size: 13px;
  color: var(--c-mute);
  font-style: italic;
}

.legal__body h2 { scroll-margin-top: 96px; }
.legal__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.9em;
  height: 1.9em;
  margin-right: .6em;
  border-radius: 50%;
  background: rgba(11,42,91,.08);
  font-family: var(--ff-mono);
  font-size: .7em;
  font-weight: 600;
  vertical-align: .1em;
}
/* Indice lateral fijo con barra de progreso (legal.js la llena y la retrae) */
.legal__aside { margin: 0 0 var(--s-6); }
.legal__toc { font-size: 14px; }
.legal__toc summary {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  background: var(--c-bg-2);
  font-family: var(--ff-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-navy);
  cursor: pointer;
  list-style: none;
}
.legal__toc summary::-webkit-details-marker { display: none; }
.legal__toc summary::after {
  content: '';
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid var(--c-navy);
  border-bottom: 2px solid var(--c-navy);
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}
.legal__toc details[open] summary::after { transform: rotate(-135deg); }
.legal__toc-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--c-mute);
}
.legal__toc-wrap {
  position: relative;
  margin-top: var(--s-4);
  padding-left: var(--s-4);
}
.legal__toc-track {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 2px;
  background: var(--c-line);
}
.legal__toc-fill {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
  border-radius: 2px;
  background: linear-gradient(var(--c-nfc), var(--c-turq));
  transition: height .12s linear;
}
.legal__toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.legal__toc-list a {
  display: flex;
  gap: var(--s-2);
  padding: 5px 0;
  color: var(--c-mute);
  line-height: 1.35;
  text-decoration: none;
  transition: color .15s;
}
.legal__toc-list a:hover { color: var(--c-navy); }
.legal__toc-list a[aria-current="true"] { color: var(--c-navy); font-weight: 600; }
.legal__toc-n {
  flex: 0 0 1.6em;
  font-family: var(--ff-mono);
  font-size: 12px;
  line-height: 1.6;
}
/* Texto centrado en la pagina; el indice vive en el margen izquierdo */
@media (min-width: 1240px) {
  .legal__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 72ch) minmax(0, 1fr);
    max-width: none;
  }
  .legal__header { grid-column: 2; grid-row: 1; }
  .legal__aside {
    grid-column: 1;
    grid-row: 1 / span 2;
    justify-self: end;
    width: 190px;
    margin: 0 var(--s-6) 0 0;
  }
  .legal__body { grid-column: 2; grid-row: 2; }
  .legal__toc { position: sticky; top: 96px; }
  .legal__toc summary {
    padding: 0 0 var(--s-3);
    border: 0;
    border-radius: 0;
    background: none;
    pointer-events: none;
    cursor: default;
  }
  .legal__toc summary::after,
  .legal__toc-current { display: none; }
  .legal__toc-wrap { margin-top: 0; }
}

.legal__lettered {
  margin: 0 0 var(--s-4);
  padding-left: 1.5em;
  list-style: lower-alpha;
}
.legal__lettered li::marker { font-weight: 600; color: var(--c-navy); }
.legal__callout {
  margin: 0 0 var(--s-5);
  padding: var(--s-4) var(--s-5);
  background: #FFF8E1;
  border-left: 4px solid #E0A800;
  border-radius: var(--r-sm);
}
.legal__callout-title {
  margin: 0 0 var(--s-3);
  font-family: var(--ff-display);
  font-weight: 700;
  color: var(--c-navy);
}
.legal__callout ul { margin: 0; }
.legal__callout li:last-child { margin-bottom: 0; }
@media print {
  .nav, .footer, .legal__notice, .legal__aside, .back-to-top { display: none !important; }
  .legal { padding: 0; }
  .legal__layout { display: block; max-width: none; }
  .legal__body a { color: inherit; text-decoration: none; }
  mark.todo { background: none; color: inherit; }
}

.legal__notice {
  margin: 0 0 var(--s-4);
  padding: var(--s-3) var(--s-4);
  background: var(--c-bg-2);
  border-left: 3px solid var(--c-nfc);
  border-radius: var(--r-sm);
  font-size: 14px;
  color: var(--c-text);
}
.legal__notice:empty { display: none; }
.legal__summary {
  margin: 0 0 var(--s-6);
  padding: var(--s-4) var(--s-5);
  background: var(--c-bg-2);
  border-radius: var(--r-md);
}
.legal__summary h2 { margin-top: 0; }
.legal__summary p:last-child { margin-bottom: 0; }
/* Marcadores pendientes: bien visibles para que no se publiquen sin completar */
mark.todo {
  background: #FFF3BF;
  color: #5C4400;
  padding: 0 4px;
  border-radius: 4px;
}

/* ---------- Lightbox ---------- */
html.lightbox-open { overflow: hidden; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,42,91,.92);
  padding: var(--s-5);
}
.lightbox[hidden] { display: none; }
.lightbox__figure {
  margin: 0;
  max-width: min(90vw, 720px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}
.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: var(--r-md);
  box-shadow: var(--sh-4);
}
.lightbox__count {
  color: rgba(255,255,255,.75);
  font-family: var(--ff-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.lightbox__close {
  position: absolute;
  top: var(--s-5);
  right: var(--s-5);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 180ms ease;
}
.lightbox__close:hover { background: rgba(255,255,255,.2); }
.lightbox__close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.lightbox__nav {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin: 0 var(--s-4);
  transition: background-color 180ms ease, transform 180ms ease;
}
.lightbox__nav:hover { background: rgba(255,255,255,.2); }
.lightbox__nav:active { transform: scale(.92); }
.lightbox__nav svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; }

@media (max-width: 640px) {
  .lightbox { flex-direction: column; }
  .lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); margin: 0; }
  .lightbox__nav--prev { left: var(--s-3); }
  .lightbox__nav--next { right: var(--s-3); }
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: var(--s-5);
  bottom: var(--s-5);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-3);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 220ms cubic-bezier(.22,1,.36,1), transform 220ms cubic-bezier(.22,1,.36,1), background-color 180ms ease;
  z-index: 90;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: #0d3470; }
.back-to-top svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; }
.back-to-top--light { background: #fff; color: var(--c-navy); }
.back-to-top--light:hover { background: var(--c-bg-2); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s cubic-bezier(.22,1,.36,1), transform .6s cubic-bezier(.22,1,.36,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
