/* ==========================================================================
   GSTALTEK — hoja de estilos
   --------------------------------------------------------------------------
    1. Fuentes            7. Hero                 13. Footer
    2. Tokens             8. Servicios            14. WhatsApp flotante
    3. Base               9. Por qué elegirnos    15. Video (dialog)
    4. Utilidades        10. Portafolio           16. Animación de entrada
    5. Componentes       11. Nosotros             17. Responsive
    6. Header            12. Contacto             18. Movimiento reducido e impresión
   ========================================================================== */


/* 1. Fuentes ----------------------------------------------------------------
   Inter auto-hospedada (subconjunto latino: español completo). Sin conexiones
   a Google: carga más rápido y no envía la IP de tus visitantes a terceros. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/inter-latin-700.woff2") format("woff2");
}


/* 2. Tokens -----------------------------------------------------------------
   Todos los colores de interfaz salen de aquí. Los textos y botones cumplen
   WCAG AA (contraste 4.5:1; bordes e íconos 3:1). Cambia un valor y se
   actualiza en todo el sitio. */

:root {
  /* Paleta del manual de marca */
  --noche: #0A0F1E;
  --cian: #1FD1F9;
  --azul: #2F8BFF;
  --indigo: #5B45EE;
  --violeta: #8A4DFF;

  /* Variantes del mismo tono, ajustadas para que el texto cumpla AA */
  --azul-600: #1F6FEB;     /* inicio del degradado de botones (4.6:1 con blanco) */
  --indigo-700: #4B3FE0;   /* el morado de la tarjeta del manual (6.8:1 con blanco) */
  --indigo-300: #7B6AF5;   /* Índigo sobre fondos oscuros (4.4:1 o más) */

  /* Las tres caras del cubo: fondos oscuros con matiz */
  --cara-azul: #101E42;
  --cara-morada: #1E1942;
  --cara-cian: #0D2E41;

  /* Degradados en el orden del logo: cian → azul → índigo → violeta */
  --grad-marca: linear-gradient(90deg, var(--cian), var(--azul) 35%, var(--indigo) 70%, var(--violeta));
  --grad-titulo-oscuro: linear-gradient(90deg, var(--cian), var(--azul) 50%, var(--violeta));
  --grad-titulo-claro: linear-gradient(90deg, var(--azul-600), var(--indigo) 55%, var(--violeta));
  --grad-boton: linear-gradient(90deg, var(--azul-600), var(--indigo));

  /* Nombres que usa el resto de la hoja (apuntan a la paleta) */
  --brand-300: var(--cian);
  --brand-400: var(--cian);      /* acentos y foco sobre fondo oscuro (10.5:1) */
  --brand-500: var(--azul);      /* bordes, líneas e íconos decorativos */
  --brand-600: var(--indigo);    /* texto, enlaces y foco sobre fondo claro (5.4:1 o más) */
  --brand-700: var(--indigo-700);
  --cyan: var(--cian);

  /* Fondos */
  --navy-950: var(--noche);
  --navy-900: var(--noche);
  --navy-850: #0F1530;
  --navy-800: var(--cara-azul);
  --light-bg: #F3F4F8;         /* el gris del manual (#E8EBF1), aclarado para secciones grandes */
  --white: #fff;

  /* Texto */
  --text-on-dark: #F1F3FA;
  --heading-on-dark: #fff;
  --muted-on-dark: #A4ACC7;    /* 7.8:1 o más sobre todos los fondos oscuros */
  --text-on-light: var(--noche);
  --muted-on-light: #535B72;   /* 6.1:1 sobre claro */

  /* Formulario */
  --field-text: #1B2138;
  --field-bg: #FBFBFD;
  --field-border: #8A90A6;     /* 3.1:1: el campo se distingue del fondo */
  --placeholder: #5E6580;      /* 5.6:1 */
  --error: #b83a4a;            /* 5.6:1 */
  --success: #168256;          /* 4.8:1 */

  /* Líneas */
  --line-light: rgba(10, 15, 30, .1);
  --line-dark: rgba(140, 160, 220, .15);

  /* Tipografía (rem: respeta el tamaño de letra que elija cada usuario) */
  --font-sans: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --fs-2xs: .75rem;      /* 12px: mínimo para texto */
  --fs-xs: .8125rem;     /* 13px */
  --fs-sm: .875rem;      /* 14px */
  --fs-md: 1rem;         /* 16px */
  --fs-lg: 1.0625rem;    /* 17px */
  --fs-h3: 1.0625rem;
  --fs-h2: clamp(2.125rem, 3.5vw, 2.9375rem);
  --fs-h1: clamp(2.5rem, 4.6vw, 3.75rem);

  /* Forma y espacio */
  --radius-sm: 10px;
  --radius-md: 15px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --gutter: 28px;
  --header-h: 76px;
  --section-y: 88px;
}


/* 3. Base ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html:has(dialog[open]) {
  overflow: hidden;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text-on-dark);
  background: var(--navy-950);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
}

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

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

button {
  cursor: pointer;
}

:where(ul[role="list"]) {
  list-style: none;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important; /* única excepción: "hidden" siempre debe ocultar */
}

:focus-visible {
  outline: 2px solid var(--brand-400);
  outline-offset: 3px;
}

.section-light :focus-visible,
.contact-form-wrap :focus-visible {
  outline-color: var(--brand-600);
}

::selection {
  background: rgba(91, 69, 238, .45);
  color: #fff;
}


/* 4. Utilidades ------------------------------------------------------------ */

.container {
  width: min(1180px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-on-light);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.sprite {
  position: absolute;
  overflow: hidden;
}

.icon {
  display: inline-block;
  flex: none;
  fill: currentColor;
  vertical-align: -.125em;
}


/* 5. Componentes ----------------------------------------------------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-2xs);
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: #DDE2F3;
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 18px;
  height: 2px;
  background: var(--grad-marca);
}

.eyebrow-dark {
  color: var(--muted-on-light);
}

.section-light {
  background: var(--light-bg);
  color: var(--text-on-light);
}

.section-heading h2,
.portfolio h2,
.about h2,
.why-copy h2,
.contact-copy h2 {
  margin-top: 14px;
  font-size: var(--fs-h2);
  line-height: 1.05;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.section-light h2 span {
  color: var(--indigo);
  background-image: var(--grad-titulo-claro);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.btn .icon {
  font-size: .9em;
}

.btn-primary {
  color: #fff;
  background: var(--grad-boton);
  box-shadow: 0 14px 35px rgba(91, 69, 238, .28);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 19px 38px rgba(91, 69, 238, .36);
}

.btn-primary:disabled {
  cursor: progress;
  opacity: .75;
  transform: none;
}

.btn-outline {
  color: #fff;
  border-color: var(--brand-500);
  background: rgba(47, 139, 255, .06);
}

.btn-outline:hover {
  background: rgba(47, 139, 255, .14);
  transform: translateY(-2px);
}

.btn-outline-light {
  color: var(--brand-600);
  border-color: var(--brand-600);
  background: transparent;
}

.btn-outline-light:hover {
  color: #fff;
  background: var(--brand-600);
}


/* 6. Header ---------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  background: rgba(10, 15, 30, .85);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(140, 160, 220, .1);
  transition: background-color .25s ease, box-shadow .25s ease;
}

.site-header.scrolled {
  background: rgba(10, 15, 30, .96);
  box-shadow: 0 15px 40px rgba(0, 0, 0, .18);
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
}

/* Logotipo según el manual de marca: cubo (SVG del sprite, versión para fondo
   oscuro) + nombre con espaciado amplio. Archivos sueltos en img/logo-*.svg */
.brand-logo {
  flex: none;
  width: auto;
  height: 44px;
}

.brand-name {
  margin-right: -.28em; /* compensa el espacio después de la última letra */
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: .28em;
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: var(--fs-sm);
  color: #E3E7F5;
}

.nav-link {
  position: relative;
  padding: 26px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  height: 2px;
  background: var(--grad-marca);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  border: 1px solid var(--brand-500);
  border-radius: var(--radius-pill);
  color: #fff;
  background: rgba(47, 139, 255, .06);
  transition: background-color .2s ease;
}

.nav-cta:hover {
  background: rgba(47, 139, 255, .16);
}

.nav-toggle {
  display: none;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: inline-block;
}


/* 7. Hero ------------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding-top: var(--header-h);
  background:
    radial-gradient(ellipse 45% 70% at 85% 25%, rgba(47, 139, 255, .14), transparent 70%),
    radial-gradient(ellipse 45% 60% at 0% 100%, rgba(91, 69, 238, .16), transparent 70%),
    var(--noche);
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, #1A2240 1px, transparent 1.25px); /* la trama de puntos del manual */
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}

.hero-grid::after {
  content: "";
  position: absolute;
  top: -150px;
  right: -110px;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 139, 255, .1), transparent 63%);
}

.hero-inner {
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 24px;
  padding-block: 40px 56px;
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero h1 {
  margin: 18px 0 20px;
  font-size: var(--fs-h1);
  line-height: 1.05;
  letter-spacing: -.045em;
  text-wrap: balance;
}

.hero h1 > span {
  display: inline-block; /* el remate se equilibra en sus propias líneas */
  text-wrap: balance;
}

.hero h1 .grad {
  color: var(--cian);
  background-image: var(--grad-titulo-oscuro);
}

.hero-lead {
  max-width: 540px;
  margin-bottom: 30px;
  color: #B8BFD8;
  font-size: var(--fs-lg);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.btn-video {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #E3E7F5;
  font-size: var(--fs-sm);
}

.btn-video-icon {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--brand-500);
  border-radius: 50%;
  background: rgba(47, 139, 255, .1);
  color: #fff;
  font-size: .75rem;
}

/* Ilustración del hero.
   Todas las medidas están en "cqw" (1% del ancho de la ilustración), así la
   composición escala completa en cualquier pantalla sin recortes ni hacks. */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 600px;
  aspect-ratio: 600 / 470;
  justify-self: end;
  container-type: inline-size;
  isolation: isolate;
}

.blue-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2.5cqw);
  pointer-events: none;
}

.orb-one {
  top: 3.333cqw;
  right: 11.667cqw;
  width: 41.667cqw;
  height: 41.667cqw;
  background: rgba(47, 139, 255, .2);
}

.orb-two {
  bottom: 6.667cqw;
  left: 10cqw;
  width: 30cqw;
  height: 30cqw;
  background: rgba(138, 77, 255, .18);
}

.server-tower {
  position: absolute;
  top: 15cqw;
  left: 6cqw;
  width: 28cqw;
  padding: 2.5cqw;
  border: 1px solid rgba(47, 139, 255, .35);
  border-radius: 2.5cqw;
  background: linear-gradient(155deg, rgba(16, 30, 66, .88), rgba(10, 15, 30, .96));
  box-shadow: inset 0 0 5cqw rgba(47, 139, 255, .07), 0 3.333cqw 8.333cqw rgba(0, 0, 0, .4);
}

.server-top {
  margin-bottom: 2.167cqw;
  color: var(--cian);
  font-size: 1.333cqw;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.server-row {
  display: grid;
  grid-template-columns: 1fr 2.167cqw 2.333cqw;
  gap: 1.333cqw;
  align-items: center;
  padding: 1.5cqw 0;
  border-top: 1px solid rgba(140, 160, 220, .14);
}

.server-row .bar {
  height: .667cqw;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--azul) 0%, rgba(47, 139, 255, .12) 70%);
}

.server-row .led {
  width: 1cqw;
  height: 1cqw;
  border-radius: 50%;
  background: var(--cian);
  box-shadow: 0 0 2.333cqw var(--cian);
}

.server-row .port {
  width: 1.667cqw;
  height: 1cqw;
  border: 1px solid var(--indigo);
  border-radius: .5cqw;
  background: var(--cara-morada);
}

.monitor {
  position: absolute;
  top: 16.667cqw;
  right: 15cqw;
  width: 66.667cqw;
  height: 43.333cqw;
  overflow: hidden;
  border: 1.333cqw solid #20284A;
  border-radius: 3.333cqw 3.333cqw 2cqw 2cqw;
  background: #070B17;
  transform: perspective(150cqw) rotateY(-8deg) rotateX(2deg);
  box-shadow: -5cqw 5cqw 13.333cqw rgba(0, 0, 0, .4), 0 0 11.667cqw rgba(91, 69, 238, .2);
}

.monitor-top {
  display: flex;
  justify-content: space-between;
  padding: 1.833cqw 2.167cqw;
  background: var(--cara-azul);
  color: var(--cian);
  font-size: 1.333cqw;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.monitor-top .icon {
  color: var(--azul);
}

.code-window {
  padding: 2.333cqw 3cqw;
  color: #C9D0EA;
  font: 1.833cqw/1.5 var(--font-mono);
}

.c1 { color: #A98BFF; }
.c2 { color: var(--cian); }
.c3 { color: var(--azul); }
.c4 { color: #A8B4FF; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 1cqw;
  height: 13.333cqw;
  padding: 2cqw 3cqw 3.667cqw;
}

.chart span {
  width: 2.167cqw;
  border-radius: .5cqw .5cqw 0 0;
  background: linear-gradient(var(--cian), var(--azul) 45%, var(--indigo));
  opacity: .7;
}

.chart span:nth-child(1) { height: 32%; }
.chart span:nth-child(2) { height: 55%; }
.chart span:nth-child(3) { height: 42%; }
.chart span:nth-child(4) { height: 72%; }
.chart span:nth-child(5) { height: 88%; }

.chart .chart-base {
  position: absolute;
  left: 3cqw;
  right: 3cqw;
  bottom: 3.667cqw;
  width: auto;
  height: 0;
  border-top: 1px dashed rgba(140, 160, 220, .2);
  background: none;
  opacity: 1;
}

.phone {
  position: absolute;
  right: 3.333cqw;
  bottom: 6.667cqw;
  width: 18.333cqw;
  height: 34.167cqw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.667cqw;
  border: .833cqw solid #283152;
  border-radius: 3.667cqw;
  background:
    radial-gradient(circle at 50% 33%, rgba(91, 69, 238, .24), transparent 34%),
    linear-gradient(145deg, var(--noche), var(--cara-azul));
  box-shadow: 0 5cqw 10.833cqw rgba(0, 0, 0, .45), 0 0 7.5cqw rgba(91, 69, 238, .22);
  transform: rotate(5deg);
}

.phone-camera {
  position: absolute;
  top: 1.333cqw;
  width: 5cqw;
  height: .667cqw;
  border-radius: 99px;
  background: #2A3354;
}

.phone-brand {
  width: 7.5cqw;
  height: 7.5cqw;
  display: grid;
  place-items: center;
  border-radius: 2.167cqw;
  background: #0a0f1e;
  box-shadow: 0 0 5cqw rgba(47, 139, 255, .35);
}

.phone-brand svg {
  width: auto;
  height: 72%;
}

.phone strong {
  font-size: 1.833cqw;
  line-height: 1.15;
  text-align: center;
}

.phone small {
  color: #9AA3C4;
  font-size: 1.167cqw;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.hero-side-label {
  position: absolute;
  top: 4cqw;
  right: 0;
  display: grid;
  gap: 1.667cqw;
  color: #9AA3C4;
  font-size: 1.167cqw;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.hero-side-label::before {
  content: "";
  position: absolute;
  top: -.667cqw;
  left: -1.667cqw;
  width: 1px;
  height: 15cqw;
  background: linear-gradient(var(--cian), var(--violeta) 75%, transparent);
}


/* 8. Servicios ------------------------------------------------------------- */

.services {
  padding-block: var(--section-y);
}

.section-heading.split {
  display: grid;
  grid-template-columns: 1.1fr .8fr;
  align-items: end;
  gap: 50px;
  margin-bottom: 40px;
}

.section-heading p {
  max-width: 460px;
  justify-self: end;
  color: var(--muted-on-light);
  font-size: var(--fs-md);
  line-height: 1.6;
}

/* Pilares: una columna por área (Desarrollo, Infraestructura, Marketing, Diseño)
   con su lista de servicios. Los divisores entre columnas se dibujan con
   box-shadow y el contenedor recorta los del borde exterior: funciona con
   cualquier número de columnas o de servicios, sin reglas nth-child. */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border-top: 1px solid var(--line-light);
}

.pillar {
  padding: 32px 24px 12px;
  box-shadow: -1px 0 0 var(--line-light), 0 -1px 0 var(--line-light);
}

.pillar-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--noche);   /* como el ícono de app del manual */
  color: var(--cian);
  font-size: 1.375rem;
}

.pillar h3 {
  margin-bottom: 6px;
  font-size: 1.3125rem;
  letter-spacing: -.02em;
}

.pillar-head p {
  color: var(--muted-on-light);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.pillar-services {
  margin-top: 20px;
}

.service-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line-light);
}

.service-item h4 {
  margin-bottom: 4px;
  font-size: var(--fs-md);
  line-height: 1.3;
  transition: color .2s ease;
}

.service-item p {
  color: var(--muted-on-light);
  font-size: var(--fs-sm);
  line-height: 1.5;
}

.service-item:hover h4 {
  color: var(--brand-600);
}

/* Botón "Cotizar": se ve la flecha; el texto completo es para lectores de pantalla.
   Toda la fila es clicable y el foco se dibuja alrededor de la fila completa. */
.card-link {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #CDD0E0;
  border-radius: 50%;
  color: var(--brand-600);
  font-size: .875rem;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.service-item:hover .card-link {
  border-color: var(--brand-600);
  background: var(--brand-600);
  color: #fff;
}

.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-link:focus-visible {
  outline: none;
}

.card-link:focus-visible::after {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: 6px;
}


/* 9. Por qué elegirnos ----------------------------------------------------- */

.why-us {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-y);
  background: linear-gradient(120deg, var(--noche) 0%, #16143A 55%, var(--noche) 100%);
}

.tech-lines {
  position: absolute;
  inset: 0;
  opacity: .17;
  background:
    radial-gradient(circle at 15% 10%, rgba(138, 77, 255, .3), transparent 22%),
    repeating-linear-gradient(160deg, transparent 0 30px, rgba(123, 106, 245, .22) 31px 32px, transparent 33px 66px);
}

.why-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: .9fr 1.3fr;
  align-items: center;
  gap: 56px;
}

.why-copy h2 {
  color: var(--heading-on-dark);
}

.why-copy h2 span {
  color: var(--cian);
  background-image: var(--grad-titulo-oscuro);
}

.why-copy p {
  max-width: 430px;
  margin: 16px 0 26px;
  color: var(--muted-on-dark);
  font-size: var(--fs-md);
  line-height: 1.6;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
}

.why-item {
  min-height: 210px;
  padding: 18px 20px;
  box-shadow: -1px 0 0 var(--line-dark), 0 -1px 0 var(--line-dark);
}

.why-icon {
  margin-bottom: 24px;
  color: var(--brand-400);
  font-size: 1.75rem;
}

.why-item h3 {
  margin-bottom: 10px;
  font-size: var(--fs-h3);
  line-height: 1.2;
  text-wrap: balance;
}

.why-item p {
  color: var(--muted-on-dark);
  font-size: var(--fs-sm);
  line-height: 1.55;
}


/* 10. Portafolio ----------------------------------------------------------- */

.portfolio {
  padding-block: var(--section-y);
}

.portfolio-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 32px;
}

.portfolio-top p {
  max-width: 360px;
  margin: 14px 0 22px;
  color: var(--muted-on-light);
  font-size: var(--fs-md);
  line-height: 1.6;
}

.filters {
  align-self: flex-start;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

html:not(.js) .filters {
  display: none; /* sin JS no pueden filtrar: mejor no mostrarlos */
}

.filter {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #C3C7DA;
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--muted-on-light);
  font-size: var(--fs-sm);
  transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.filter:hover,
.filter[aria-pressed="true"] {
  border-color: var(--brand-600);
  color: var(--brand-600);
}

.filter[aria-pressed="true"] {
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--brand-600);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.project-card {
  overflow: hidden;
  border: 1px solid #E1E3EE;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 8px 28px rgba(10, 15, 30, .05);
}

.project-media {
  position: relative;
  height: 195px;
  overflow: hidden;
}

.media-web {
  background:
    radial-gradient(circle at 70% 20%, rgba(47, 139, 255, .5), transparent 30%),
    linear-gradient(145deg, var(--cara-azul), var(--noche));
}

.media-app {
  background:
    radial-gradient(circle at 30% 20%, rgba(31, 209, 249, .3), transparent 27%),
    linear-gradient(145deg, var(--cara-cian), var(--noche));
}

.media-marketing {
  background:
    radial-gradient(circle at 75% 30%, rgba(138, 77, 255, .42), transparent 30%),
    linear-gradient(145deg, var(--cara-morada), var(--noche));
}

.media-branding {
  background: linear-gradient(145deg, #F1F0FF, #E5E2FA);
}

.fake-browser {
  position: absolute;
  inset: 20px 25px 18px;
  overflow: hidden;
  border: 1px solid rgba(140, 160, 220, .22);
  border-radius: 10px;
  background: #0E1430;
  box-shadow: 0 18px 35px rgba(0, 0, 0, .35);
}

.browser-bar {
  height: 20px;
  background: #161D3A;
  border-bottom: 1px solid rgba(140, 160, 220, .14);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 12px;
}

.dashboard span {
  height: 28px;
  border: 1px solid #28316A;
  border-radius: 5px;
  background: #172045;
}

.mini-chart {
  position: relative;
  grid-column: 1 / -1;
  height: 58px;
  border: 1px solid #28316A;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(47, 139, 255, .2), rgba(47, 139, 255, .02));
}

.mini-chart::after {
  content: "";
  position: absolute;
  inset: 16px 10px 10px;
  opacity: .7;
  background: linear-gradient(135deg, transparent 0 20%, #1FD1F9 21% 23%, transparent 24% 37%, #2F8BFF 38% 40%, transparent 41% 58%, #8A4DFF 59% 61%, transparent 62%);
}

.fake-phone {
  position: absolute;
  top: 16px;
  left: 50%;
  width: 91px;
  height: 175px;
  padding: 28px 10px 10px;
  border: 5px solid #283152;
  border-radius: 20px;
  background: var(--noche);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .45);
  transform: translateX(-50%) rotate(4deg);
}

.fake-phone-top {
  position: absolute;
  top: 8px;
  left: 50%;
  width: 25px;
  height: 4px;
  border-radius: 8px;
  background: #2F3A60;
  transform: translateX(-50%);
}

.app-icon {
  width: 34px;
  height: 34px;
  margin: 0 auto 13px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--azul), var(--indigo));
}

.app-row {
  height: 11px;
  margin-bottom: 8px;
  border: 1px solid #28316A;
  border-radius: 5px;
  background: #172045;
}

.social-grid {
  position: absolute;
  inset: 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  place-items: center;
  gap: 9px;
}

.social-grid span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(140, 160, 220, .22);
  border-radius: 13px;
  background: rgba(16, 30, 66, .72);
  color: var(--cian);
  font-size: 22px;
}

.growth-line {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 25px;
  height: 54px;
  border-top: 1px solid rgba(140, 160, 220, .2);
}

.growth-line::after {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 36px;
  opacity: .75;
  background: linear-gradient(140deg, transparent 0 5%, #1FD1F9 6% 8%, transparent 9% 20%, #2F8BFF 21% 23%, transparent 24% 40%, #5B45EE 41% 43%, transparent 44% 60%, #8A4DFF 61% 63%, transparent 64%);
}

.brand-sheet {
  position: absolute;
  inset: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid #DAD6F3;
  border-radius: 12px;
  background: rgba(255, 255, 255, .63);
  box-shadow: 0 20px 35px rgba(60, 50, 140, .12);
  color: var(--noche);
}

.brand-sheet-logo {
  width: auto;
  height: 56px;
  margin-bottom: 12px;
}

.brand-sheet span {
  margin-right: -.28em;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .28em;
}

.brand-sheet em {
  margin-top: 4px;
  color: #6A6F88;
  font-size: 7px;
  font-style: normal;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.project-info {
  padding: 16px 16px 18px;
}

.project-info h3 {
  margin-bottom: 6px;
  font-size: .9375rem;
  line-height: 1.3;
}

.project-info p {
  color: var(--muted-on-light);
  font-size: var(--fs-xs);
}


/* 11. Nosotros ------------------------------------------------------------- */

.about {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  background: var(--navy-850);
}

.about-image {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(91, 69, 238, .42), transparent 35%),
    linear-gradient(135deg, var(--cara-azul), var(--noche) 80%);
}

.about-image::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background:
    linear-gradient(rgba(140, 160, 220, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 160, 220, .12) 1px, transparent 1px);
  background-size: 52px 52px;
  transform: perspective(600px) rotateX(55deg) scale(1.4);
  transform-origin: center bottom;
}

.building {
  position: absolute;
  left: 10%;
  right: 14%;
  bottom: 0;
  height: 81%;
  border: 1px solid rgba(140, 160, 220, .25);
  background: linear-gradient(110deg, rgba(47, 139, 255, .28), rgba(10, 15, 30, .75));
  clip-path: polygon(16% 100%, 35% 8%, 100% 0, 100% 100%);
}

.floor {
  position: absolute;
  left: 23%;
  right: 4%;
  height: 1px;
  background: rgba(140, 160, 220, .22);
}

.floor:nth-child(1) { top: 23%; }
.floor:nth-child(2) { top: 43%; }
.floor:nth-child(3) { top: 63%; }
.floor:nth-child(4) { top: 82%; }

.building-glow {
  position: absolute;
  inset: 12% 20% auto;
  height: 170px;
  background: radial-gradient(circle, rgba(138, 77, 255, .3), transparent 70%);
  filter: blur(20px);
}

.about-watermark {
  position: absolute;
  left: 50px;
  bottom: 45px;
  color: #F1F3FA;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: .28em;
  text-shadow: 0 10px 30px rgba(0, 0, 0, .55);
}

.about-content {
  padding-block: 72px;
  background: linear-gradient(140deg, var(--noche), #0F1530);
}

.narrow-about {
  width: min(640px, 100% - 2 * var(--gutter));
}

.about h2 {
  color: var(--heading-on-dark);
}

.about h2 span {
  color: var(--cian);
  background-image: var(--grad-titulo-oscuro);
}

.about-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 28px;
}

.about-card {
  padding: 18px 20px;
  border-left: 1px solid var(--line-dark);
}

.about-icon {
  margin-bottom: 18px;
  color: var(--brand-400);
  font-size: 1.75rem;
}

.about-card h3 {
  margin-bottom: 8px;
  font-size: var(--fs-md);
}

.about-card p {
  color: var(--muted-on-dark);
  font-size: var(--fs-sm);
  line-height: 1.55;
}


/* 12. Contacto ------------------------------------------------------------- */

.contact-section {
  position: relative;
  overflow: hidden;
  /* Arriba menos espacio: al llegar con "Cotiza tu proyecto" el formulario completo cabe en pantalla */
  padding-block: 32px var(--section-y);
  background: linear-gradient(135deg, var(--noche) 0%, #0E1430 58%, var(--noche) 100%);
}

.contact-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .75;
  background:
    radial-gradient(circle at 83% 18%, rgba(31, 209, 249, .12), transparent 27%),
    radial-gradient(circle at 15% 100%, rgba(138, 77, 255, .18), transparent 30%),
    repeating-linear-gradient(150deg, transparent 0 42px, rgba(140, 160, 220, .05) 43px 44px, transparent 45px 88px);
}

.contact-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  align-items: start;
  gap: 64px;
}

.contact-copy {
  padding-top: 8px;
}

.contact-copy h2 {
  font-size: clamp(2.375rem, 4vw, 3.5rem);
  line-height: 1.02;
  color: var(--heading-on-dark);
}

.contact-copy h2 span {
  color: var(--cian);
  background-image: var(--grad-titulo-oscuro);
}

.contact-copy > p {
  max-width: 470px;
  margin-top: 16px;
  color: var(--muted-on-dark);
  font-size: var(--fs-md);
  line-height: 1.65;
}

.contact-details {
  display: grid;
  gap: 14px;
  margin-top: 32px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: 100%;
  color: #E3E7F5;
}

.contact-detail-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid rgba(47, 139, 255, .3);
  border-radius: 11px;
  background: rgba(16, 30, 66, .6);
  color: var(--cian);
  font-size: 1rem;
}

.contact-detail small {
  display: block;
  margin-bottom: 2px;
  color: #9098B6;
  font-size: var(--fs-2xs);
}

.contact-detail strong {
  display: block;
  color: #F1F3FA;
  font-size: .9375rem;
  font-weight: 600;
  transition: color .2s ease;
}

a.contact-detail:hover strong {
  color: var(--cian);
}

.contact-form-wrap {
  padding: 20px 28px 22px;
  border: 1px solid rgba(140, 160, 220, .18);
  border-radius: 18px;
  background: var(--white);
  color: var(--text-on-light);
  box-shadow: 0 25px 70px rgba(0, 0, 0, .24);
}

.contact-form {
  display: grid;
  gap: 10px;
}

.req {
  color: var(--brand-600);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
}

.form-group {
  display: grid;
  align-content: start;
  gap: 5px;
}

.form-group > label:not(.form-check) {
  color: var(--field-text);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.35;
}

/* 16px en los campos: con menos, el iPhone hace zoom al tocarlos */
.form-group input:not([type="checkbox"]),
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--field-border);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: var(--field-text);
  font-size: var(--fs-md);
  line-height: 1.4;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.form-group textarea {
  min-height: 88px;      /* 3 renglones; crece solo mientras escriben (script.js) */
  max-height: 260px;
  resize: vertical;
}

.form-group ::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.form-group input:not([type="checkbox"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand-600);
  background: var(--white);
  outline: 2px solid transparent; /* visible en modo de alto contraste de Windows */
  box-shadow: 0 0 0 3px rgba(91, 69, 238, .22);
}

.form-group [aria-invalid="true"] {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(184, 58, 74, .12);
}

.field-error {
  color: var(--error);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted-on-light);
  font-size: var(--fs-sm);
  line-height: 1.5;
  cursor: pointer;
}

.form-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--brand-600);
}

.form-check a,
.privacy-short a,
.form-status a {
  color: var(--brand-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.privacy-short {
  color: var(--muted-on-light);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.privacy-short strong {
  color: var(--field-text);
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 2px;
}

.form-submit {
  min-width: 200px;
  min-height: 46px;
}

.form-status {
  min-height: 1.5em;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status.success {
  color: var(--success);
}

.form-status.error {
  color: var(--error);
}

.form-note {
  color: var(--muted-on-light);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.form-note .req {
  font-weight: 700;
}

/* reCAPTCHA: su insignia flotante se oculta (taparía el botón de WhatsApp) y en su lugar va este aviso.
   Google permite ocultarla así, con visibility, siempre que el aviso se vea. */
.grecaptcha-badge {
  position: fixed !important;
  bottom: 0;
  right: 0;
  visibility: hidden;
}

.recaptcha-note {
  display: none;
  color: var(--muted-on-light);
  font-size: var(--fs-2xs);
  line-height: 1.5;
}

.has-recaptcha .recaptcha-note {
  display: block;
}

.recaptcha-note a {
  color: var(--brand-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* 13. Footer --------------------------------------------------------------- */

.site-footer {
  padding: 36px 0 22px;
  border-top: 1px solid rgba(140, 160, 220, .12);
  background: var(--navy-950);
}

.footer-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 28px;
}

.footer-brand .brand-logo {
  height: 40px;
}

.footer-brand .brand-name {
  font-size: 1rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
  color: #AAB2CC;
  font-size: var(--fs-sm);
}

.footer-nav a {
  padding-block: 6px;
}

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

.socials {
  display: flex;
  gap: 10px;
}

.socials a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(140, 160, 220, .25);
  border-radius: 50%;
  color: #C9CFE3;
  font-size: .875rem;
}

.socials a:hover {
  border-color: var(--brand-400);
  color: var(--brand-400);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid rgba(140, 160, 220, .12);
  color: #7F88A5;
  font-size: var(--fs-xs);
}


/* 14. WhatsApp flotante ---------------------------------------------------- */

.whatsapp-float {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #1a8f4c;
  color: #fff;
  font-size: 1.75rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  transition: transform .2s ease, opacity .2s ease, visibility .2s ease;
}

.whatsapp-float:hover {
  transform: scale(1.06);
}

.whatsapp-float.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
}


/* 15. Video (dialog nativo: atrapa el foco, cierra con Esc y lo devuelve) -- */

.video-dialog {
  width: min(880px, 100% - 32px);
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  border: 1px solid rgba(140, 160, 220, .22);
  border-radius: var(--radius-lg);
  background: var(--navy-850);
  color: var(--text-on-dark);
  box-shadow: 0 30px 100px rgba(0, 0, 0, .45);
}

.video-dialog::backdrop {
  background: rgba(5, 8, 18, .8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.video-dialog-inner {
  position: relative;
  padding: 10px;
}

.video-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #000;
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.modal-close {
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 1;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--brand-500);
  border-radius: 50%;
  background: var(--noche);
  color: #fff;
  font-size: 1rem;
}


/* 16. Animación de entrada --------------------------------------------------
   Solo se ocultan si hay JS (clase .js en <html>). Sin JS, o si script.js
   falla, todo el contenido queda visible. El hero nunca se anima. */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .65s ease, transform .65s ease;
}

.js .reveal.in-view {
  opacity: 1;
  transform: none;
}


/* 17. Responsive ----------------------------------------------------------- */

/* Menú: pasa a hamburguesa cuando ya no cabe en una línea */
@media (max-width: 1100px) {
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    border: 0;
    background: none;
    color: #fff;
    font-size: 1.375rem;
  }

  .main-nav {
    position: absolute;
    top: 100%;
    left: var(--gutter);
    right: var(--gutter);
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    max-height: calc(100vh - var(--header-h) - 16px);
    max-height: calc(100dvh - var(--header-h) - 16px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 12px;
    border: 1px solid rgba(140, 160, 220, .16);
    border-radius: 14px;
    background: #0F1530;
    box-shadow: 0 25px 50px rgba(0, 0, 0, .25);
    font-size: var(--fs-md);
  }

  .main-nav.open {
    display: flex;
  }

  .nav-link {
    padding: 12px;
    border-radius: 8px;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link.active {
    background: rgba(47, 139, 255, .14);
  }

  .nav-cta {
    justify-content: center;
    margin-top: 6px;
    padding: 12px 18px;
  }

  /* Sin JS el botón no funciona: se muestra el menú completo */
  html:not(.js) .nav-toggle {
    display: none;
  }

  html:not(.js) .site-header {
    position: relative;
  }

  html:not(.js) .hero {
    padding-top: 0;
  }

  html:not(.js) .nav-wrap {
    flex-wrap: wrap;
    padding-block: 12px;
  }

  html:not(.js) .main-nav {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    max-height: none;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  :root {
    --gutter: 18px;
    --header-h: 70px;
    --section-y: 72px;
  }

  .br-lg {
    display: none;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 24px;
    padding-block: 36px 48px;
  }

  .hero-visual {
    justify-self: center;
    max-width: 560px;
  }

  .section-heading.split,
  .why-inner {
    grid-template-columns: 1fr;
  }

  .section-heading.split {
    gap: 16px;
  }

  .section-heading p {
    justify-self: start;
  }

  .why-inner {
    gap: 40px;
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about {
    grid-template-columns: 1fr;
  }

  .about-image {
    min-height: 280px;
  }

  .about-content {
    padding-block: 56px;
  }

  .about-cards {
    grid-template-columns: 1fr;
  }

  .about-card {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 12px;
    padding: 18px 0;
    border-left: 0;
    border-top: 1px solid var(--line-dark);
  }

  .about-card:first-child {
    border-top: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-copy {
    padding-top: 0;
  }

  .contact-details {
    grid-template-columns: 1fr 1fr;
  }

  .contact-detail {
    width: 100%;
  }

  .footer-nav {
    order: 3;
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  :root {
    --section-y: 60px;
  }

  .brand-logo {
    height: 38px;
  }

  .brand-name {
    font-size: 1rem;
  }

  .hero-lead {
    font-size: var(--fs-md);
  }

  .hero-side-label {
    display: none;
  }

  .pillars {
    grid-template-columns: 1fr;
  }

  .pillar {
    padding: 28px 0 8px;
  }

  .why-item {
    min-height: 0;
    padding: 18px 14px 22px;
  }

  .portfolio-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters {
    justify-content: flex-start;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  .project-media {
    height: 225px;
  }

  .contact-details,
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-form-wrap {
    padding: 20px 16px;
  }

  .form-submit {
    width: 100%;
  }

  .whatsapp-float {
    right: 16px;
    width: 52px;
    height: 52px;
    font-size: 1.625rem;
  }
}

@media (max-width: 359px) {
  .why-grid {
    grid-template-columns: 1fr;
  }
}


/* 18. Movimiento reducido e impresión -------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn,
  .btn:hover,
  .whatsapp-float,
  .whatsapp-float:hover,
  .card-link,
  .service-item h4 {
    transition: none;
    transform: none;
  }
}

@media print {
  .site-header,
  .whatsapp-float,
  .video-dialog,
  .hero-visual,
  .contact-form-wrap {
    display: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}


/* 19. Páginas simples: gracias, aviso de privacidad y errores del formulario */

.page-simple,
.page-legal {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-simple {
  background:
    radial-gradient(circle at 80% 0%, rgba(91, 69, 238, .26), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(47, 139, 255, .14), transparent 40%),
    var(--noche);
}

.page-header {
  padding-block: 18px;
  border-bottom: 1px solid rgba(140, 160, 220, .1);
  background: var(--navy-950);
}

.page-header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 8px;
  color: #E3E7F5;
  font-size: var(--fs-sm);
}

.back-link:hover {
  color: #fff;
}

.status-card {
  width: min(640px, 100% - 2 * var(--gutter));
  margin: auto;
  padding: 56px 0;
  text-align: center;
}

.status-icon {
  margin-inline: auto;
  color: var(--brand-400);
  font-size: 3rem;
}

.status-card h1 {
  margin: 18px 0 14px;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.status-card p {
  color: var(--muted-on-dark);
  font-size: var(--fs-lg);
  line-height: 1.6;
}

.status-card p + p {
  margin-top: 10px;
}

.status-card a:not(.btn) {
  color: var(--brand-400);
  text-decoration: underline;
}

.status-errors {
  margin: 20px auto;
  padding-left: 1.2em;
  max-width: 480px;
  color: #ffc9d0;
  text-align: left;
  line-height: 1.6;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 32px;
}

/* Regreso automático al inicio desde "gracias" (los 6 s deben coincidir con el meta refresh de gracias.php) */
.status-card .redirect-note {
  margin-top: 36px;
  font-size: var(--fs-sm);
}

.redirect-bar {
  width: min(260px, 100%);
  height: 4px;
  margin: 12px auto 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(140, 160, 220, .16);
}

.redirect-bar span {
  display: block;
  height: 100%;
  background: var(--grad-marca);
  transform: scaleX(0);
  transform-origin: left;
  animation: redirect-progress 6s linear forwards;
}

@keyframes redirect-progress {
  to {
    transform: scaleX(1);
  }
}

.page-footer {
  padding-block: 22px;
  border-top: 1px solid rgba(140, 160, 220, .12);
  background: var(--navy-950);
  color: #7F88A5;
  font-size: var(--fs-xs);
}

.page-footer a {
  color: #AAB2CC;
  text-decoration: underline;
}

.legal {
  flex: 1;
  padding-block: 56px 80px;
  background: var(--light-bg);
  color: var(--text-on-light);
}

.legal-content {
  width: min(780px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

.legal h1 {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -.04em;
}

.legal h2 {
  margin: 40px 0 12px;
  font-size: 1.25rem;
  letter-spacing: -.01em;
}

.legal p,
.legal li {
  color: #2E3550;
  line-height: 1.7;
}

.legal p + p,
.legal ul + p,
.legal p + ul {
  margin-top: 12px;
}

.legal ul {
  margin-block: 0;
  padding-left: 1.25rem;
}

.legal a {
  color: var(--brand-600);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal .updated {
  margin: 8px 0 24px;
  color: var(--muted-on-light);
  font-size: var(--fs-sm);
}

.pending-note {
  margin-bottom: 32px;
  padding: 14px 18px;
  border-left: 4px solid #c2410c;
  border-radius: 8px;
  background: #fff4ec;
  color: #7c2d12;
}

.legal .pending-note {
  color: #7c2d12;
}


/* 20. Acentos de la paleta de marca -----------------------------------------
   Títulos con el degradado del logo y los 4 colores asignados en el mismo orden
   que el cubo: Cian (Desarrollo), Azul (Infraestructura), Índigo (Marketing)
   y Violeta (Diseño). */

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .hero h1 .grad,
  .why-copy h2 span,
  .about h2 span,
  .contact-copy h2 span,
  .section-light h2 span {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
  }
}

.pillar-desarrollo .pillar-icon { color: var(--cian); }
.pillar-infraestructura .pillar-icon { color: var(--azul); }
.pillar-marketing .pillar-icon { color: var(--indigo-300); }
.pillar-diseno .pillar-icon { color: var(--violeta); }

.why-item:nth-child(4n+1) .why-icon,
.about-card:nth-child(4n+1) .about-icon,
.hero-side-label span:nth-child(4n+1) {
  color: var(--cian);
}

.why-item:nth-child(4n+2) .why-icon,
.about-card:nth-child(4n+2) .about-icon,
.hero-side-label span:nth-child(4n+2) {
  color: var(--azul);
}

.why-item:nth-child(4n+3) .why-icon,
.about-card:nth-child(4n+3) .about-icon,
.hero-side-label span:nth-child(4n+3) {
  color: var(--indigo-300);
}

.why-item:nth-child(4n+4) .why-icon,
.about-card:nth-child(4n+4) .about-icon,
.hero-side-label span:nth-child(4n+4) {
  color: var(--violeta);
}

.btn-primary:hover {
  background: linear-gradient(90deg, var(--indigo), var(--indigo-700));
}

/* Modo de alto contraste e impresión: el texto con degradado vuelve a ser sólido */
@media (forced-colors: active) {
  .hero h1 .grad,
  .why-copy h2 span,
  .about h2 span,
  .contact-copy h2 span,
  .section-light h2 span {
    background: none;
    -webkit-text-fill-color: currentColor;
  }
}

@media print {
  .hero h1 .grad,
  .why-copy h2 span,
  .about h2 span,
  .contact-copy h2 span,
  .section-light h2 span {
    background: none;
    color: #000;
    -webkit-text-fill-color: currentColor;
  }
}


/* 21. Chatbot del botón de WhatsApp ----------------------------------------
   Panel que abre el botón flotante (lo construye script.js, sección 10).
   En celular ocupa casi toda la pantalla, como una hoja que sube desde abajo. */

.chat {
  --chat-line: #E1E4EE;
  --chat-bg: #F4F6FB;
  --chat-verde: #167A41;      /* verde WhatsApp oscurecido: 5.4:1 con texto blanco */

  position: fixed;
  right: 20px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  z-index: 300;               /* encima del header fijo y del botón flotante */
  width: min(380px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 120px));
  height: min(580px, calc(100dvh - 120px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(140, 160, 220, .28);
  border-radius: var(--radius-lg);
  background: var(--chat-bg);
  color: var(--field-text);
  box-shadow: 0 24px 70px rgba(5, 8, 18, .45);
  animation: chat-in .22s ease-out;
}

@keyframes chat-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.chat :focus-visible {
  outline-color: var(--indigo-700);
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px 12px 16px;
  background: var(--noche);
  color: var(--text-on-dark);
}

.chat-header :focus-visible {
  outline-color: var(--brand-400);
}

.chat-logo {
  flex: none;
  width: 30px;
  height: 34px;
}

.chat-heading {
  flex: 1;
  min-width: 0;
}

.chat-heading h2 {
  color: #fff;
  font-size: .9375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.chat-heading p {
  margin-top: 2px;
  color: var(--muted-on-dark);
  font-size: var(--fs-2xs);
  line-height: 1.35;
}

.chat-close {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted-on-dark);
  font-size: 1.125rem;
  cursor: pointer;
}

.chat-close:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.chat-log {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 14px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.chat-msg {
  max-width: 86%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: .9375rem;
  line-height: 1.45;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.chat-msg.bot {
  align-self: flex-start;
  border: 1px solid var(--chat-line);
  border-bottom-left-radius: 6px;
  background: var(--white);
}

.chat-msg.user {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--azul-600);
  color: #fff;
}

/* Un poco más de aire cada vez que cambia quien habla */
.chat-msg.bot + .chat-msg.user,
.chat-msg.user + .chat-msg.bot {
  margin-top: 6px;
}

.chat-msg a {
  color: var(--indigo-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.chat-msg.is-typing {
  display: flex;
  gap: 4px;
  padding: 14px;
}

.chat-msg.is-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9AA1B8;
  animation: chat-dot 1s ease-in-out infinite;
}

.chat-msg.is-typing span:nth-child(2) {
  animation-delay: .15s;
}

.chat-msg.is-typing span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes chat-dot {
  0%, 80%, 100% {
    opacity: .35;
    transform: none;
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

/* Resumen antes de enviar: la "orden de trabajo" con la franja del cubo */
.chat-msg:has(.chat-ticket) {
  max-width: 94%;
  width: 94%;
}

.chat-ticket {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  margin-top: 10px;
  padding: 12px 12px 12px 16px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--chat-bg);
  white-space: normal;
}

.chat-ticket::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--cian), var(--azul), var(--indigo), var(--violeta));
}

.chat-ticket dt {
  padding-top: 1px;
  color: var(--muted-on-light);
  font-size: var(--fs-2xs);
}

.chat-ticket dd {
  color: var(--field-text);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.4;
}

.chat-choices {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 2px 14px 12px;
}

.chat-chip {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid rgba(75, 63, 224, .45);
  border-radius: var(--radius-pill);
  background: var(--white);
  color: var(--indigo-700);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
}

.chat-chip:hover {
  border-color: var(--indigo-700);
  background: #EEECFD;
}

.chat-chip.is-primary {
  border-color: var(--chat-verde);
  background: var(--chat-verde);
  color: #fff;
}

.chat-chip.is-primary:hover {
  border-color: #116434;
  background: #116434;
}

.chat-chip .icon {
  font-size: 1.05em;
}

.chat-form {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--chat-line);
  background: var(--white);
}

/* 16px: con menos, el iPhone hace zoom al escribir */
.chat-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 120px;
  padding: 11px 15px;
  border: 1px solid var(--field-border);
  border-radius: 22px;
  background: var(--field-bg);
  color: var(--field-text);
  font: inherit;
  font-size: var(--fs-md);
  line-height: 1.35;
  resize: none;
}

.chat-input::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.chat-input:focus {
  border-color: var(--indigo-700);
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px rgba(91, 69, 238, .22);
}

.chat-send {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--grad-boton);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.chat-direct {
  padding: 0 14px 12px;
  background: var(--white);
  color: var(--muted-on-light);
  font-size: var(--fs-2xs);
  text-align: center;
}

.chat-form[hidden] + .chat-direct {
  padding-top: 12px;
  border-top: 1px solid var(--chat-line);
}

.chat-direct a {
  color: var(--indigo-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 520px) {
  .chat {
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    height: calc(100vh - 32px);
    height: calc(100dvh - 32px);
    border-width: 1px 0 0;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--chat-bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .chat,
  .chat-msg.is-typing span {
    animation: none;
  }
}

@media print {
  .chat {
    display: none;
  }
}
