/* ITSUR — sitio independiente (sin plantilla) */
:root {
  /* Negro-gris: un poco más claro (sin pasar a tema claro) */
  --bg0: #12131a;
  --bg1: #1a1c27;
  --bg2: #232530;
  --line: rgba(255, 255, 255, 0.11);
  --text: #f4f4f8;
  --muted: #abadbc;
  --accent: #7c3aed;
  --accent2: #06b6d4;
  --accent-soft: rgba(124, 58, 237, 0.15);
  --radius: 18px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

/* Capa ambiental: malla violeta/cyan muy suave (no tapa el contenido) */
@media (prefers-reduced-motion: no-preference) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.48;
    background:
      radial-gradient(ellipse 90% 70% at 15% 5%, rgba(124, 58, 237, 0.26), transparent 52%),
      radial-gradient(ellipse 80% 60% at 85% 15%, rgba(6, 182, 212, 0.18), transparent 48%),
      radial-gradient(ellipse 60% 45% at 50% 95%, rgba(124, 58, 237, 0.12), transparent 55%),
      radial-gradient(ellipse 50% 40% at 50% 20%, rgba(255, 255, 255, 0.03), transparent 50%);
    animation: fx-mesh-drift 22s ease-in-out infinite alternate;
  }

  /* Textura de puntos muy suave (profundidad) */
  body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image: radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 15%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, #000 15%, transparent 72%);
  }
}

body > *:not(#scroll-progress):not(#back-top):not(#toast-root) {
  position: relative;
  z-index: 1;
}

@keyframes fx-mesh-drift {
  0% {
    opacity: 0.36;
    transform: scale(1) translate(0, 0);
  }
  100% {
    opacity: 0.5;
    transform: scale(1.02) translate(-1.5%, 1%);
  }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
    opacity: 0.38;
    transform: none;
  }

  body::after {
    opacity: 0.22;
  }

  .hero h1 {
    animation: none;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--text);
  }

  .site-header::after {
    animation: none;
  }

  .btn-primary::after {
    display: none;
  }

  .hero-badge {
    animation: none;
  }

  .btn-light:hover {
    transform: none;
  }
}

#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 10000;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  pointer-events: none;
  box-shadow: 0 0 14px rgba(124, 58, 237, 0.45);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent2);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(100% - clamp(1.25rem, 5vw, 2rem), var(--max));
  margin-inline: auto;
  padding-inline: 0;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  padding-top: max(0.75rem, env(safe-area-inset-top));
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  background: rgba(18, 19, 26, 0.88);
  backdrop-filter: blur(16px) saturate(1.15);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
}

@media (prefers-reduced-motion: no-preference) {
  .site-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(6, 182, 212, 0.15) 20%,
      rgba(124, 58, 237, 0.35) 50%,
      rgba(6, 182, 212, 0.15) 80%,
      transparent 100%
    );
    background-size: 200% 100%;
    animation: fx-header-shine 10s ease-in-out infinite;
    pointer-events: none;
  }
}

@keyframes fx-header-shine {
  0%,
  100% {
    background-position: 0% 50%;
    opacity: 0.65;
  }
  50% {
    background-position: 100% 50%;
    opacity: 1;
  }
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease, filter 0.25s ease;
}

.logo:hover {
  opacity: 0.92;
  filter: brightness(1.08) drop-shadow(0 0 16px rgba(6, 182, 212, 0.2));
}

.logo-img {
  display: block;
  height: 42px;
  width: auto;
  max-width: min(240px, 54vw);
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 420px) {
  .logo-img {
    height: 34px;
    max-width: min(200px, 58vw);
  }
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  flex-shrink: 0;
  touch-action: manipulation;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list a {
  position: relative;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.45rem 0.2rem;
  transition: color 0.2s ease, text-shadow 0.25s ease;
}

.nav-list a:hover {
  color: var(--text);
  text-shadow: 0 0 20px rgba(6, 182, 212, 0.12);
}

@media (prefers-reduced-motion: no-preference) {
  .nav-list a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent2), var(--accent));
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    opacity: 0.9;
  }

  .nav-list a:hover::after {
    transform: scaleX(1);
    transform-origin: left center;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg1);
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 1rem 1rem;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    display: none;
    max-height: min(70vh, 420px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  }

  .nav.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-list li {
    border-bottom: 1px solid var(--line);
  }

  .nav-list li:last-child {
    border-bottom: none;
  }

  .nav-list a {
    display: flex;
    align-items: center;
    padding: 0.85rem 0.25rem;
    min-height: 44px;
  }
}

/* Hero — altura natural en escritorio (evita bloque negro vacío antes de Clientes) */
.hero {
  min-height: auto;
  padding: 8rem 0 2.5rem;
  padding-top: max(8rem, calc(4rem + env(safe-area-inset-top)));
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 50% at 70% -10%, rgba(124, 58, 237, 0.2), transparent),
    radial-gradient(ellipse 50% 40% at 0% 50%, rgba(6, 182, 212, 0.08), transparent),
    var(--bg0);
}

@media (prefers-reduced-motion: no-preference) {
  .hero::before {
    content: "";
    position: absolute;
    width: min(70vw, 520px);
    height: min(70vw, 520px);
    top: -15%;
    right: -8%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%, rgba(124, 58, 237, 0.28), transparent 68%);
    filter: blur(56px);
    pointer-events: none;
    z-index: 0;
    animation: fx-orb-a 20s ease-in-out infinite alternate;
  }

  .hero::after {
    content: "";
    position: absolute;
    width: min(55vw, 420px);
    height: min(55vw, 420px);
    bottom: -12%;
    left: -6%;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 50%, rgba(6, 182, 212, 0.18), transparent 65%);
    filter: blur(48px);
    pointer-events: none;
    z-index: 0;
    animation: fx-orb-b 24s ease-in-out infinite alternate;
  }
}

@keyframes fx-orb-a {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.85;
  }
  100% {
    transform: translate(-4%, 6%) scale(1.06);
    opacity: 1;
  }
}

@keyframes fx-orb-b {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.75;
  }
  100% {
    transform: translate(5%, -4%) scale(1.08);
    opacity: 0.95;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .hero::after {
    animation: none;
  }
}

.hero .wrap,
.hero > .wrap {
  position: relative;
  z-index: 1;
}

@media (max-width: 900px) {
  .hero {
    min-height: min(100dvh, 920px);
    min-height: min(100svh, 920px);
    padding-bottom: 2.75rem;
  }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent2);
  border: 1px solid rgba(6, 182, 212, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.25rem;
  background: rgba(6, 182, 212, 0.06);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-badge {
    animation: fx-badge-glow 5s ease-in-out infinite;
  }
}

@keyframes fx-badge-glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
  }
  50% {
    box-shadow: 0 0 28px rgba(6, 182, 212, 0.18);
  }
}

.hero h1 {
  font-family: var(--font);
  font-size: clamp(1.85rem, 4.5vw, 2.65rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: var(--text);
}

@media (prefers-reduced-motion: no-preference) {
  @supports ((-webkit-background-clip: text) or (background-clip: text)) {
    .hero h1 {
      background: linear-gradient(
        115deg,
        var(--text) 0%,
        #e8e8f2 35%,
        #a5f3fc 55%,
        var(--accent2) 85%,
        var(--text) 100%
      );
      background-size: 220% auto;
      -webkit-background-clip: text;
      background-clip: text;
      color: transparent;
      animation: fx-hero-title-shine 14s ease-in-out infinite alternate;
    }
  }
}

@keyframes fx-hero-title-shine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.hero-lead {
  color: var(--muted);
  font-size: 1.0625rem;
  font-weight: 400;
  max-width: 36ch;
  margin: 0 0 1.75rem;
}

@media (max-width: 900px) {
  .hero-lead {
    margin-inline: auto;
  }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@media (max-width: 900px) {
  .hero-actions {
    justify-content: center;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  min-height: 48px;
  border-radius: 999px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--accent), #5b21b6);
  color: #fff;
  box-shadow: 0 12px 40px rgba(124, 58, 237, 0.35);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.18) 48%,
    rgba(255, 255, 255, 0.06) 52%,
    transparent 65%
  );
  transform: translateX(-120%);
  transition: transform 0.65s ease;
  pointer-events: none;
}

.btn-primary:hover {
  box-shadow: 0 16px 52px rgba(124, 58, 237, 0.5);
}

.btn-primary:hover::after {
  transform: translateX(120%);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: rgba(6, 182, 212, 0.5);
  color: var(--accent2);
}

.hero-visual {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--bg2), var(--bg1));
  padding: 1rem;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-visual:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 58, 237, 0.15);
  }
}

.hero-visual img {
  border-radius: calc(var(--radius) - 6px);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.4), rgba(6, 182, 212, 0.2));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Sections */
section {
  padding: 4.5rem 0;
}

.section-head {
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

.section-kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent2);
  margin: 0 0 0.5rem;
  text-shadow: 0 0 28px rgba(6, 182, 212, 0.18);
}

.section-title {
  font-family: var(--font);
  font-size: clamp(1.5rem, 2.75vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin: 0 0 0.75rem;
  line-height: 1.28;
}

.section-desc {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
  line-height: 1.65;
}

/* Clientes — panel, logos grandes (nitidez: object-fit + tamaños razonables) */
.clients-showcase {
  --clients-tilt-x: 0deg;
  --clients-tilt-y: 0deg;
}

.clients {
  background: linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 100%);
  border-block: 1px solid var(--line);
  padding: 1.35rem 0 1.75rem;
  position: relative;
  overflow: hidden;
}

.clients-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 100% 80% at 50% -30%, rgba(124, 58, 237, 0.14), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(6, 182, 212, 0.06), transparent 45%),
    radial-gradient(ellipse 60% 50% at 0% 80%, rgba(124, 58, 237, 0.05), transparent 45%);
}

.clients-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}

.clients-block {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

.clients-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto 0.85rem;
  padding: 0 0.5rem;
}

.clients-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5ee7f9;
  padding: 0.4rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(6, 182, 212, 0.45);
  background: linear-gradient(145deg, rgba(6, 182, 212, 0.14), rgba(124, 58, 237, 0.08));
  margin: 0 auto 0.6rem;
  box-shadow: 0 0 28px rgba(6, 182, 212, 0.14);
}

.clients-title {
  margin: 0;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  color: var(--text);
  text-align: center;
  width: 100%;
  text-wrap: balance;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .clients-title {
    background: linear-gradient(115deg, var(--text) 0%, var(--text) 45%, var(--accent2) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.clients-sub {
  margin: 0.55rem 0 0;
  font-size: clamp(0.95rem, 1.9vw, 1.08rem);
  color: #b4b4c4;
  line-height: 1.55;
  font-weight: 500;
  letter-spacing: 0.01em;
  max-width: 34em;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  text-wrap: balance;
}

.clients-live {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(94, 231, 249, 0.88);
  text-align: center;
  width: 100%;
}

.clients-live:not([hidden]) {
  display: block;
}

.clients-panel {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding: 1.15rem clamp(0.75rem, 2.2vw, 1.85rem) 1.05rem;
  border-radius: 1.35rem;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 20px 44px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.clients-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    125deg,
    rgba(124, 58, 237, 0.45),
    rgba(6, 182, 212, 0.25) 40%,
    rgba(124, 58, 237, 0.2) 70%,
    rgba(6, 182, 212, 0.35)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.65;
}

/* Carrusel infinito de logos */
.clients-carousel {
  width: 100%;
  position: relative;
  z-index: 1;
  margin-top: 0.15rem;
}

.clients-carousel__mask {
  overflow: hidden;
  width: 100%;
  padding: 0.4rem 0 0.2rem;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.clients-track {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
}

.clients-carousel:not(.clients-carousel--ready) .clients-carousel__mask {
  display: flex;
  justify-content: center;
}

.clients-carousel:not(.clients-carousel--ready) .clients-track {
  width: auto;
  max-width: 100%;
}

.clients-carousel.clients-carousel--ready .clients-track {
  will-change: transform;
}

.clients-row {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 1.8vw, 1.25rem);
  flex: 0 0 auto;
  margin: 0;
  padding: 0.2rem 0 0;
  list-style: none;
  position: relative;
  z-index: 1;
}

.clients-slide--clone {
  pointer-events: none;
}

.clients-carousel.clients-carousel--ready .clients-slide:hover {
  border-color: rgba(6, 182, 212, 0.42);
  box-shadow:
    0 0 0 1px rgba(6, 182, 212, 0.18),
    0 20px 48px rgba(0, 0, 0, 0.42),
    0 0 36px rgba(124, 58, 237, 0.12);
}

.clients-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0.55rem 0.75rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    background 0.35s ease;
  transform: perspective(28rem) rotateX(var(--clients-tilt-x, 0deg)) rotateY(var(--clients-tilt-y, 0deg)) translateZ(0);
}

.clients-slide-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.clients-slide:hover {
  will-change: transform;
  border-color: rgba(124, 58, 237, 0.45);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.15),
    0 16px 40px rgba(0, 0, 0, 0.35);
}

.clients-slide:hover .clients-slide-inner {
  transform: translateY(-3px);
}

.clients-logo {
  display: block;
  width: auto;
  height: auto;
  max-height: 64px;
  max-width: clamp(140px, 26vw, 260px);
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  -ms-interpolation-mode: bicubic;
  filter: grayscale(1) brightness(1.06);
  transition: filter 0.35s ease;
}

.clients-slide:hover .clients-logo {
  filter: grayscale(0) brightness(1.1);
}

/* Logo con fondo claro (DUX) */
.clients-slide--logo-light {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(0, 0, 0, 0.06);
}

.clients-slide--logo-light .clients-logo {
  filter: none;
  max-height: 92px;
  max-width: min(460px, 52vw);
}

.clients-slide--logo-light:hover {
  border-color: rgba(124, 58, 237, 0.4);
}

.clients-slide--logo-light:hover .clients-logo {
  filter: none;
}

/* Marca a color */
.clients-slide--brand .clients-logo {
  filter: none;
}

.clients-slide--brand:hover .clients-logo {
  filter: none;
}

/* CESAC — vertical */
.clients-slide--logo-tall {
  min-height: 6.75rem;
  padding: 0.55rem 0.95rem;
}

.clients-slide--logo-tall .clients-logo {
  max-height: 120px;
  max-width: min(240px, 44vw);
}

/* ANCPUAC — sello */
.clients-slide--logo-seal {
  padding: 0.5rem;
}

.clients-slide--logo-seal .clients-logo {
  max-height: 118px;
  max-width: 118px;
}

@media (prefers-reduced-motion: reduce) {
  .clients-slide {
    transform: none;
  }

  .clients-slide:hover .clients-slide-inner {
    transform: none;
  }
}

/* Stats */
.stats {
  background: var(--bg1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--line);
  transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .stat:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 58, 237, 0.32);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
  }
}

.stat-num {
  font-family: var(--font);
  font-size: clamp(1.65rem, 3.5vw, 2.1rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.35rem;
  line-height: 1.4;
  font-weight: 400;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
  }
}

.about-aside {
  position: relative;
}

.about-aside-figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.25),
    0 20px 48px rgba(0, 0, 0, 0.35);
  background: var(--bg2);
}

.about-aside-figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  vertical-align: middle;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.check-list li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

/* Mission / accordion */
.mvv {
  background: var(--bg1);
}

.mvv-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .mvv-grid {
    grid-template-columns: 1fr;
  }
}

.mvv-quote {
  font-size: 1.0625rem;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
  font-weight: 400;
}

.mvv-panels {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

details.mvv-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg2);
  overflow: hidden;
}

details.mvv-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.25rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

details.mvv-item summary::-webkit-details-marker {
  display: none;
}

.mvv-num {
  font-family: var(--font);
  font-size: 0.8125rem;
  color: var(--accent2);
  font-weight: 700;
}

details.mvv-item .inner {
  padding: 0 1.25rem 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
  border-top: 1px solid var(--line);
}

details.mvv-item .inner ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
}

.mvv-aside {
  border-radius: var(--radius);
  min-height: 280px;
  background-color: var(--bg2);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  border: 1px solid var(--line);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.svc-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg2), var(--bg1));
  border: 1px solid var(--line);
  transition: border-color 0.22s ease, transform 0.22s ease, box-shadow 0.25s ease;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.svc-card:hover {
  border-color: rgba(124, 58, 237, 0.45);
  transform: translateY(-4px);
  box-shadow:
    0 0 0 1px rgba(124, 58, 237, 0.12),
    0 20px 48px rgba(0, 0, 0, 0.32),
    0 0 40px rgba(124, 58, 237, 0.08);
}

.svc-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  color: var(--accent2);
  font-size: 1.35rem;
}

.svc-card h3 {
  font-size: 1rem;
  margin: 0 0 0.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.svc-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.svc-card h3 a:hover {
  color: var(--accent2);
}

.svc-card p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--muted);
  font-weight: 400;
}

/* Sistemas demo */
.demo-systems {
  position: relative;
  background: linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 45%, var(--bg0) 100%);
  border-block: 1px solid var(--line);
  overflow: hidden;
}

.demo-systems::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(124, 58, 237, 0.09), transparent 60%);
}

.section-head--demo,
#sistemas-demo .section-head {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  max-width: 38rem;
}

.section-head--demo .section-desc,
#sistemas-demo .section-head .section-desc {
  max-width: 36rem;
  margin-inline: auto;
}

.section-head--demo .section-desc-link,
#sistemas-demo .section-head .section-desc-link {
  color: var(--accent2);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

.section-head--demo .section-desc-link:hover,
#sistemas-demo .section-head .section-desc-link:hover {
  color: #5ee7f9;
}

.demo-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 20px 50px rgba(0, 0, 0, 0.28);
}

/* ID = mayor prioridad; rejilla siempre visible (no depende solo de .demo-grid) */
#sistemas-demo .demo-grid {
  display: grid;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1.25rem);
  align-items: stretch;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 960px) {
  #sistemas-demo .demo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  #sistemas-demo .demo-grid {
    grid-template-columns: 1fr;
  }
}

#sistemas-demo .demo-card,
.demo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-width: 0;
  border-radius: 16px;
  background: var(--bg2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.demo-card:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
  transform: translateY(-4px);
}

.demo-card-accent {
  height: 3px;
  width: 100%;
  flex-shrink: 0;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent2) 100%);
  opacity: 0.95;
}

.demo-card-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 1.2rem 1.25rem 1.15rem;
}

.demo-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.demo-num {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.07);
  user-select: none;
}

.demo-tag {
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(6, 182, 212, 0.95);
  padding: 0.3rem 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(6, 182, 212, 0.35);
  background: rgba(6, 182, 212, 0.1);
}

#sistemas-demo .demo-card .demo-icon,
.demo-card .demo-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.28), rgba(6, 182, 212, 0.14));
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
  color: #7dd3fc;
}

#sistemas-demo .demo-card .demo-icon svg {
  width: 26px;
  height: 26px;
}

.demo-card h3 {
  font-size: 1.0625rem;
  margin: 0 0 0.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  color: var(--text);
}

.demo-card p {
  margin: 0;
  flex: 1 1 auto;
  font-size: 0.9rem;
  line-height: 1.58;
  color: var(--muted);
}

.demo-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.demo-cta:hover {
  color: var(--accent2);
  border-color: rgba(6, 182, 212, 0.45);
  background: rgba(6, 182, 212, 0.08);
}

.demo-card:hover .demo-cta {
  border-color: rgba(124, 58, 237, 0.25);
}

@media (max-width: 768px) {
  .section-head--demo {
    margin-bottom: 1.5rem;
  }

  .demo-panel {
    padding: 0.85rem;
    border-radius: 16px;
  }

  .demo-card-inner {
    padding: 1.05rem 1.1rem 1rem;
  }

  .demo-num {
    font-size: 1.5rem;
  }
}

/* CTA band */
.cta-band {
  padding: 3.5rem 0;
  background: linear-gradient(120deg, #1e1b4b 0%, #0e7490 42%, #312e81 78%, #1e1b4b 100%);
  background-size: 220% 220%;
  border-block: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

@media (prefers-reduced-motion: no-preference) {
  .cta-band {
    animation: fx-cta-flow 16s ease infinite;
  }
}

@keyframes fx-cta-flow {
  0%,
  100% {
    background-position: 0% 40%;
  }
  50% {
    background-position: 100% 60%;
  }
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% -20%, rgba(255, 255, 255, 0.08), transparent 55%);
  pointer-events: none;
}

.cta-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.cta-inner h2 {
  font-family: var(--font);
  font-size: clamp(1.2rem, 2.25vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
}

.cta-inner p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9375rem;
  line-height: 1.55;
  font-weight: 400;
}

.btn-light {
  background: #fff;
  color: #1e1b4b;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-light:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* Servicios que ofrecemos — rejilla */
.filter-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  padding-bottom: 0.35rem;
  margin-inline: calc(-1 * clamp(0.5rem, 2vw, 1rem));
  padding-inline: clamp(0.5rem, 2vw, 1rem);
  scrollbar-width: thin;
}

.filter-row::-webkit-scrollbar {
  height: 4px;
}

.filter-row::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}

.filter-btn {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.55rem 1.1rem;
  min-height: 44px;
  flex-shrink: 0;
  white-space: nowrap;
  scroll-snap-align: start;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.filter-btn:hover,
.filter-btn.is-active {
  background: var(--accent-soft);
  border-color: rgba(124, 58, 237, 0.45);
  color: var(--text);
}

.filter-btn.is-active {
  box-shadow: 0 0 22px rgba(124, 58, 237, 0.2);
}

.servicios-oferta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .servicios-oferta-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 520px) {
  .servicios-oferta-grid {
    grid-template-columns: 1fr;
  }
}

.servicio-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg2);
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.28s ease, box-shadow 0.32s ease;
}

.servicio-card.is-hidden {
  display: none;
}

.servicio-card img {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: no-preference) {
  .servicio-card:hover {
    transform: translateY(-5px);
    border-color: rgba(124, 58, 237, 0.35);
    box-shadow: 0 22px 56px rgba(0, 0, 0, 0.38);
  }

  .servicio-card:hover img {
    transform: scale(1.05);
  }
}

.servicio-card-body {
  padding: 1rem 1.15rem 1.25rem;
}

.servicio-card-body h3 {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.servicio-card-body p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
  font-weight: 400;
}

/* Contact */
.contact-section {
  background: linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 10%, var(--bg1) 100%);
  border-top: 1px solid var(--line);
  padding-top: 3.5rem;
  padding-bottom: 3rem;
}

.section-head--contact {
  max-width: 40rem;
  margin-bottom: 2.25rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.75rem 2.25rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.contact-card {
  padding: 1.5rem 1.5rem 1.65rem;
  border-radius: var(--radius);
  background: var(--bg2);
  border: 1px solid var(--line);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.contact-card--form {
  background: linear-gradient(165deg, rgba(124, 58, 237, 0.06), var(--bg2));
  border-color: rgba(124, 58, 237, 0.18);
}

.contact-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 1.15rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  letter-spacing: -0.01em;
}

.contact-info-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-info-item {
  display: flex;
  gap: 0.875rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.contact-info-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent2);
}

.contact-info-icon svg {
  display: block;
}

.contact-info-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent2);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.contact-info-value {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--muted);
}

.contact-info-value--link {
  color: var(--text);
  text-decoration: none;
  word-break: break-word;
}

.contact-info-value--link:hover {
  color: var(--accent2);
  text-decoration: underline;
}

.contact-photo {
  margin-top: 1.25rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  min-height: 180px;
}

.contact-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.contact-form .form-group {
  margin-bottom: 1rem;
}

.contact-form .form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.form-label-secondary {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.contact-form .form-group input,
.contact-form .form-group textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.45;
}

.contact-form .form-group textarea {
  min-height: 120px;
  resize: vertical;
  max-width: 100%;
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--muted);
  pointer-events: none;
}

.contact-form select,
.select-wrap select {
  width: 100%;
  padding: 0.75rem 2.25rem 0.75rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.4;
  appearance: none;
  cursor: pointer;
}

.contact-form .form-group input:focus,
.contact-form .form-group textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group--captcha {
  margin-top: 0.25rem;
}

.recaptcha-wrap {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  min-height: 78px;
  padding: 0.35rem 0;
  overflow: hidden;
}

.form-feedback {
  margin: 0.25rem 0 1rem;
  min-height: 0;
}

.form-loading {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
}

.form-msg {
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
}

.form-msg--error {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.form-msg--ok {
  color: #a5f3fc;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.btn-block {
  width: 100%;
  margin-top: 0.25rem;
}

/* Footer */
.site-footer {
  padding: 2.25rem 0;
  padding-bottom: max(2.25rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--bg0);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem 2rem;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

.footer-brand {
  min-width: 0;
}

.footer-logo-img {
  display: block;
  height: 38px;
  width: auto;
  max-width: min(200px, 70vw);
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .footer-logo-img {
    margin-inline: auto;
    object-position: center;
  }
}

.footer-tagline {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 400;
}

.footer-meta {
  text-align: right;
}

@media (max-width: 640px) {
  .footer-meta {
    text-align: center;
  }
}

.footer-copy {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

.footer-mail {
  margin: 0;
  font-size: 0.9rem;
}

.footer-mail a {
  color: var(--accent2);
  font-weight: 500;
}

.back-top {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  right: max(1rem, env(safe-area-inset-right));
  width: 48px;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--bg2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 999;
}

.back-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-top:hover {
  border-color: var(--accent2);
  color: var(--accent2);
}

/* Toast */
#toast-root {
  position: fixed;
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 10001;
  padding: 0.9rem 1.35rem;
  max-width: min(92vw, 420px);
  border-radius: 12px;
  background: var(--bg2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.92rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#toast-root.is-show {
  transform: translateX(-50%) translateY(0);
}

#toast-root.is-error {
  border-color: rgba(248, 113, 113, 0.45);
}

/* ——— Tablet (landscape / iPad) ——— */
@media (max-width: 1024px) {
  section {
    padding: 3.5rem 0;
  }

  .section-head {
    margin-bottom: 2rem;
  }

  .hero-grid {
    gap: 2rem;
  }

  .servicios-oferta-grid {
    gap: 1rem;
  }

  .contact-grid {
    gap: 2rem;
  }

  .mvv-grid {
    gap: 2rem;
  }
}

/* ——— Móvil y tablet vertical ——— */
@media (max-width: 768px) {
  section {
    padding: 2.75rem 0;
  }

  .hero {
    min-height: auto;
    padding-top: max(6.5rem, calc(3.5rem + env(safe-area-inset-top)));
    padding-bottom: 2.5rem;
  }

  .hero-grid {
    gap: 1.75rem;
  }

  .hero h1 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  .hero-lead {
    font-size: 1rem;
    max-width: none;
  }

  .hero-visual {
    max-width: min(100%, 420px);
    margin-inline: auto;
  }

  .hero-visual img {
    max-height: min(42vh, 320px);
    width: 100%;
    object-fit: contain;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .clients {
    padding: 1.25rem 0 1.5rem;
  }

  .clients-header {
    margin-bottom: 0.65rem;
    padding-inline: 0.35rem;
  }

  .clients-title {
    font-size: clamp(1.35rem, 5.5vw, 1.65rem);
  }

  .clients-panel {
    padding: 0.95rem 0.45rem 0.85rem;
    border-radius: 1.1rem;
  }

  .clients-carousel__mask {
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 4%, #000 96%, transparent 100%);
  }

  .clients-row {
    justify-content: center;
    gap: 0.4rem;
    padding-inline: 0.2rem;
    padding-top: 0.15rem;
  }

  .clients-slide {
    padding: 0.45rem 0.55rem;
  }

  .clients-logo {
    max-height: 56px;
    max-width: min(200px, 38vw);
  }

  .clients-slide--logo-light .clients-logo {
    max-height: 72px;
    max-width: min(320px, 78vw);
  }

  .clients-slide--logo-tall .clients-logo {
    max-height: 96px;
    max-width: min(200px, 42vw);
  }

  .clients-slide--logo-tall {
    min-height: 5.5rem;
  }

  .clients-slide--logo-seal .clients-logo {
    max-height: 96px;
    max-width: 96px;
  }

  .stats-grid {
    gap: 1rem;
  }

  .stat {
    padding: 1.15rem 0.75rem;
  }

  .stat-label {
    font-size: 0.8125rem;
  }

  .about-grid {
    gap: 2rem;
  }

  .mvv-aside {
    min-height: 200px;
  }

  .cta-band {
    padding: 2.5rem 0;
  }

  .cta-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 1.25rem;
  }

  .cta-inner .btn {
    width: 100%;
    max-width: 320px;
    margin-inline: auto;
  }

  .contact-section {
    padding-top: 2.75rem;
    padding-bottom: 2.5rem;
  }

  .contact-card {
    padding: 1.2rem 1.15rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1rem;
  }

  .site-footer {
    padding-top: 1.75rem;
    padding-bottom: max(1.75rem, env(safe-area-inset-bottom));
  }
}

/* ——— Pantallas muy estrechas ——— */
@media (max-width: 400px) {
  .hero-badge {
    font-size: 0.6875rem;
    padding: 0.3rem 0.65rem;
  }

  .stats-grid {
    gap: 0.65rem;
  }

  .stat-num {
    font-size: clamp(1.35rem, 8vw, 1.75rem);
  }

  .stat {
    padding: 0.85rem 0.5rem;
  }

  .filter-btn {
    font-size: 0.8125rem;
    padding: 0.5rem 0.9rem;
  }
}

/* ——— Hover solo donde hay puntero fino ——— */
@media (hover: none) {
  .svc-card:hover {
    transform: none;
  }

  .svc-card:active {
    border-color: rgba(124, 58, 237, 0.35);
  }
}
