/* =====================================================================
   SINASEP — sitio público (sinasep.cl)
   Paleta clara y confiable, con azul institucional como acento.
   ===================================================================== */

:root {
  /* Marca */
  --brand: #011840;
  --brand-700: #07275a;
  --brand-500: #1d3a78;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;

  /* Fondos */
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --bg-soft: #eef2f9;

  /* Texto */
  --text: #0f1b2e;
  --text-muted: #5b6b82;
  --text-soft: #8896a8;
  --text-on-brand: #ffffff;

  /* Bordes y sombras */
  --line: #e5eaf2;
  --line-strong: #d6deea;
  --shadow-sm: 0 1px 2px rgba(15, 27, 46, 0.04), 0 1px 3px rgba(15, 27, 46, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 27, 46, 0.06), 0 2px 4px rgba(15, 27, 46, 0.04);
  --shadow-lg: 0 16px 40px rgba(15, 27, 46, 0.10), 0 4px 12px rgba(15, 27, 46, 0.06);

  /* Estado */
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;

  /* Tipografía y radios */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Layout */
  --container: 1200px;
  --header-h: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4 {
  color: var(--brand);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.25rem, 4.5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

/* =====================================================================
   Botones
   ===================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand);
  color: var(--text-on-brand);
  border-color: var(--brand);
}

.btn-primary:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: var(--text-on-brand);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--brand);
  border-color: var(--line-strong);
}

.btn-secondary:hover {
  background: var(--bg-alt);
  border-color: var(--brand);
  color: var(--brand);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: transparent;
  padding: 0.5rem 0.9rem;
}

.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--brand);
}

.btn-lg {
  padding: 0.95rem 1.75rem;
  font-size: 1rem;
}

/* =====================================================================
   Header / Nav
   ===================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--brand);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.nav-brand img {
  height: 36px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-sm);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--brand);
  background: var(--bg-alt);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.55rem;
  cursor: pointer;
  color: var(--brand);
}

@media (max-width: 880px) {
  .nav-links,
  .nav-actions .btn-secondary {
    display: none;
  }
  .nav-toggle {
    display: inline-flex;
  }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    right: 1rem;
    left: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.6rem;
    box-shadow: var(--shadow-lg);
  }
}

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

.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(37, 99, 235, 0.08), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(1, 24, 64, 0.05), transparent 60%),
    var(--bg);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.18fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  background: var(--bg-soft);
  color: var(--brand);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
}

.hero-eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.hero-acronym {
  margin: 0 0 0.85rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  max-width: 40em;
  line-height: 1.45;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero .lead {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 36em;
}

.hero-cta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.hero-trust {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: var(--text-soft);
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.hero-trust .sep {
  width: 1px;
  height: 18px;
  background: var(--line-strong);
}

/* Mockup visual a la derecha del hero (ventana tipo escritorio; más alta = más mapa) */
.hero-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3.55;
  min-height: clamp(300px, 36vw, 420px);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-500) 100%);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: clamp(0.75rem, 1.5vw, 1.15rem);
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 80% 20%, rgba(255,255,255,0.12), transparent 60%),
    radial-gradient(400px 300px at 20% 90%, rgba(37,99,235,0.18), transparent 60%);
}

.hero-visual .panel {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 0.85rem 0.9rem 0.85rem;
  display: grid;
  grid-template-rows: auto minmax(200px, 1fr) auto;
  gap: 0.65rem;
  backdrop-filter: blur(6px);
}

.hero-visual .panel-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-visual .panel-top .pill {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.hero-visual .panel-body {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.hero-visual .panel-body:not(.ops-cockpit-map) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
  border-radius: var(--radius-md);
}

/* Mapa operativo estilizado (calles + ruta + incidente) */
.hero-visual .ops-cockpit-map {
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
  border-radius: var(--radius-md);
  background: #070f28;
}

.hero-visual .ops-cockpit-map::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 48px rgba(0, 0, 0, 0.22);
}

.hero-visual .ops-perspective {
  position: absolute;
  inset: 0;
  perspective: 1100px;
  /* Encuadre hacia el punto del incidente (~144,88 en viewBox 400×260), no hacia el borde inferior */
  perspective-origin: 40% 36%;
  overflow: hidden;
}

.hero-visual .ops-scene {
  position: absolute;
  inset: -32% -28% -40% -28%;
  /* rotateX con origen en el sitio del incidente evita el “vacío” oscuro arriba al cargar */
  transform: rotateX(52deg) translateY(-5%) translateZ(-20px) scale(1.06);
  transform-origin: 36% 34%;
  transform-style: preserve-3d;
  pointer-events: none;
  backface-visibility: hidden;
}

.hero-visual .ops-streets,
.hero-visual .ops-route {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  shape-rendering: geometricPrecision;
}

.hero-visual .ops-route {
  z-index: 1;
}

.hero-visual .ops-route-dash {
  stroke-dashoffset: 0;
  animation: ops-route-march 1.1s linear infinite;
}

@keyframes ops-route-march {
  to { stroke-dashoffset: -20; }
}

.hero-visual .ops-pulse-ring-svg {
  transform-origin: 0px 0px;
  animation: ops-pulse-svg 2.45s ease-out infinite;
}

.hero-visual .ops-pulse-ring-delay {
  animation-delay: 1.22s;
}

.hero-visual .ops-incident-core {
  filter: drop-shadow(0 0 5px rgba(255, 77, 77, 0.85)) drop-shadow(0 0 0.5px rgba(255, 255, 255, 0.5));
}

@keyframes ops-pulse-svg {
  0% {
    transform: scale(0.4);
    opacity: 0.92;
  }
  100% {
    transform: scale(3.6);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual .ops-route-dash {
    animation: none;
  }
  .hero-visual .ops-pulse-ring-svg {
    animation: none;
    opacity: 0.42;
    transform: scale(1.85);
  }
  .hero-visual .ops-scene {
    transform: none;
    transform-origin: 50% 50%;
    inset: 0;
  }
  .hero-visual .ops-perspective {
    perspective: none;
  }
}

.hero-visual .panel-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  align-items: stretch;
}

.hero-visual .stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  color: #fff;
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.hero-visual .stat .stat-label {
  display: block;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.52);
}

.hero-visual .stat b {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}

.hero-visual .stat .stat-meta {
  display: block;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.58);
  line-height: 1.3;
}

.hero-visual .stat-code b {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual {
    aspect-ratio: 5 / 4.35;
    min-height: 280px;
  }
  .hero-visual .panel {
    grid-template-rows: auto minmax(180px, 1fr) auto;
  }
  .hero-visual .ops-scene {
    inset: -28% -24% -34% -24%;
    transform: rotateX(50deg) translateY(-4%) translateZ(-14px) scale(1.02);
    transform-origin: 36% 34%;
  }
  .hero-visual .ops-perspective {
    perspective-origin: 40% 36%;
    perspective: 900px;
  }
}

/* =====================================================================
   Secciones genéricas
   ===================================================================== */

.section {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(2rem, 4vw, 3rem);
}

.section-header .eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  margin-bottom: 0.85rem;
}

.section-header p {
  font-size: 1.0625rem;
}

/* =====================================================================
   Tarjetas de módulos / features
   ===================================================================== */

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

.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.card:hover {
  color: inherit;
}

a.card h3 {
  color: var(--brand);
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.25rem;
}

.card h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.4rem;
}

.card p {
  font-size: 0.9375rem;
  margin: 0;
}

/* =====================================================================
   Sección "Por qué" — beneficios con bullets
   ===================================================================== */

.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.benefit {
  text-align: left;
}

.benefit .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.benefit h3 {
  font-size: 1.0625rem;
  margin-bottom: 0.4rem;
}

.benefit p {
  font-size: 0.9375rem;
  margin: 0;
}

/* =====================================================================
   CTA final
   ===================================================================== */

.cta-band {
  background: var(--brand);
  color: var(--text-on-brand);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 250px at 0% 0%, rgba(37,99,235,0.35), transparent 60%),
    radial-gradient(500px 250px at 100% 100%, rgba(255,255,255,0.08), transparent 60%);
  pointer-events: none;
}

.cta-band h2,
.cta-band p {
  color: #fff;
  position: relative;
}

.cta-band h2 {
  margin-bottom: 0.6rem;
}

.cta-band p {
  color: rgba(255,255,255,0.82);
  max-width: 36em;
  margin: 0 auto 1.5rem;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
}

.cta-band .btn-primary:hover {
  background: #f3f6ff;
  color: var(--brand);
}

.cta-band .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.cta-band .btn-secondary:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.cta-band-actions {
  position: relative;
  display: inline-flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* =====================================================================
   Página interior (Nosotros, Soluciones, Contacto)
   ===================================================================== */

.page-hero {
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.page-hero .eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.page-hero h1 {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  margin-bottom: 0.75rem;
}

.page-hero p {
  font-size: 1.0625rem;
  max-width: 640px;
  margin: 0 auto;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
}

.prose h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  font-size: 1rem;
  color: var(--text-muted);
}

.prose ul {
  padding-left: 1.2rem;
}

.prose ul li {
  margin-bottom: 0.4rem;
}

/* Valores institucionales */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.value-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.value-card h3 {
  color: var(--brand);
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.value-card p {
  font-size: 0.9375rem;
  margin: 0;
}

/* =====================================================================
   Soluciones — listado detallado
   ===================================================================== */

.solutions-list {
  display: grid;
  gap: 1.25rem;
}

.solution-item {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 1.25rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  align-items: start;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.solution-item .icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.solution-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.solution-item ul {
  margin: 0.6rem 0 0;
  padding-left: 1rem;
}

.solution-item li {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

/* Soluciones — grid de overview (categorías visibles al inicio) */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.overview-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.overview-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  color: inherit;
}

.overview-card .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.overview-card h3 {
  font-size: 1rem;
  margin: 0.25rem 0 0.2rem;
}

.overview-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

.overview-card .arrow {
  margin-top: auto;
  font-size: 0.8125rem;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Categoría — encabezado de sección de soluciones */
.category-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: clamp(2rem, 4vw, 3rem) 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.category-heading .badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
}

.category-heading h2 {
  margin: 0;
  font-size: 1.4rem;
}

.category-heading + p {
  margin-top: -0.25rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Infraestructura — features técnicas */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.tech-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.tech-item .icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tech-item h4 {
  margin: 0 0 0.2rem;
  font-size: 0.9375rem;
  color: var(--text);
}

.tech-item p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Integraciones — grid de proveedores externos */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.integration-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.85rem;
  align-items: center;
}

.integration-card .logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--bg-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.integration-card h4 {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text);
  font-weight: 600;
}

.integration-card .role {
  margin: 0.1rem 0 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* =====================================================================
   Formulario de contacto
   ===================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.contact-info {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.contact-info h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.contact-info .item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-info .item:last-child {
  border-bottom: none;
}

.contact-info .item .icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.contact-info .item strong {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
}

.contact-info .item span,
.contact-info .item a {
  color: var(--text);
  font-size: 0.9375rem;
}

.form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.field textarea {
  resize: vertical;
  min-height: 130px;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.form-msg {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-msg.success { color: var(--success); }
.form-msg.error { color: var(--danger); }

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

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

.site-footer {
  background: var(--brand);
  color: rgba(255, 255, 255, 0.8);
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand img {
  height: 40px;
  margin-bottom: 1rem;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  max-width: 28em;
  margin: 0;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li {
  margin-bottom: 0.6rem;
}

.footer-col a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9375rem;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 880px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* =====================================================================
   Utilidades
   ===================================================================== */

.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* Animaciones suaves al entrar en viewport */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }
  .reveal.in-view {
    opacity: 1;
    transform: translateY(0);
  }
}
