/* ==========================================================================
   Ramallo Digital — estilos del sitio (v2: más movimiento, formas redondeadas)
   Tokens arriba; después base, componentes, ilustraciones y secciones.
   Las animaciones de scroll viven en assets/js/main.js (GSAP).
   ========================================================================== */

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

:root {
  /* Colores de marca */
  --red: #E4002B;
  --red-dark: #B80023;
  --black: #000000;
  --ink: #1D1D1B;
  --white: #FFFFFF;

  /* Neutros derivados */
  --gray-50: #F4F4F2;
  --gray-100: #EBEBE8;
  --gray-200: #DEDEDA;
  --gray-400: #A3A39E;
  --gray-600: #5C5C59;          /* texto secundario sobre blanco (6.7:1) */
  --on-dark: #FFFFFF;
  --on-dark-muted: #B9B9B5;     /* texto secundario sobre negro (10:1) */
  --line-dark: #2C2C2A;

  /* Tipografía */
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-mega: clamp(2.75rem, 0.9rem + 7.4vw, 8.25rem);
  --fs-display: clamp(2.5rem, 1.2rem + 5vw, 5.5rem);
  --fs-h1: clamp(2.25rem, 1.3rem + 3.6vw, 4.5rem);
  --fs-h2: clamp(1.875rem, 1.2rem + 2.4vw, 3.5rem);
  --fs-h3: clamp(1.125rem, 1rem + 0.45vw, 1.375rem);
  --fs-lead: clamp(1.125rem, 1rem + 0.5vw, 1.375rem);
  --fs-body: 1.0625rem;
  --fs-small: 0.9375rem;

  /* Espaciado y layout */
  --gutter: clamp(20px, 5vw, 56px);
  --inset: clamp(8px, 1.1vw, 16px);   /* margen de los paneles flotantes */
  --wrap: 1240px;
  --section-y: clamp(80px, 4rem + 7vw, 176px);
  --header-h: 84px;

  /* Radios */
  --r-sm: 10px;
  --r-md: 20px;
  --r-lg: clamp(20px, 2.4vw, 36px);
  --r-full: 999px;

  /* Movimiento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 180ms;
  --t-med: 380ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 24px);
  scrollbar-color: var(--ink) var(--gray-50);
  accent-color: var(--red);
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  font-weight: 450;
  line-height: 1.65;
  color: var(--black);
  background: var(--white);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
video,
svg { display: block; max-width: 100%; }
img, video { height: auto; }

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.015em; font-weight: 700; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: 1em; }
.lead + p { margin-top: 20px; }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

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

a, button, input, textarea, label {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgb(228 0 43 / 0.12);
}

::selection { background: var(--red); color: var(--white); }

:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible,
.band-red :focus-visible,
.hero :focus-visible { outline-color: var(--white); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  top: 12px; left: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  border-radius: var(--r-full);
  transform: translateY(-200%);
  transition: transform var(--t-fast) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--flush-top { padding-top: 0; }
.panel-gap { margin-top: var(--inset); }

/* Paneles flotantes: secciones con fondo propio, separadas del borde y redondeadas */
.panel {
  margin-inline: var(--inset);
  border-radius: var(--r-lg);
  overflow: clip; /* clip (no hidden) para no romper position: sticky */
  isolation: isolate;
}
.panel + .panel { margin-top: var(--inset); }

.on-dark { background: var(--black); color: var(--on-dark); }
.on-ink { background: var(--ink); color: var(--on-dark); }
.on-gray { background: var(--gray-50); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  font-weight: 500;
  max-width: 34em;
}
.muted { color: var(--gray-600); }
.on-dark .muted,
.on-ink .muted { color: var(--on-dark-muted); }

.measure { max-width: 38em; }

.section-head { max-width: 50rem; margin-bottom: clamp(40px, 5vw, 80px); }
.section-head h2 + p { margin-top: 20px; }

.head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 24px 48px;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.head-row > div { max-width: 44rem; }
.head-row p { margin-top: 20px; }

/* Revelado de líneas (SplitText): cada línea se recorta en su propia máscara */
.line-mask { overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }

/* Mientras carga JS, lo que va a animarse queda oculto (con salida de emergencia a los 3 s) */
.js [data-split],
.js [data-hero-in] {
  visibility: hidden;
  animation: show-fallback 0s 3s forwards;
}
.js.motion-ready [data-split],
.js.motion-ready [data-hero-in] { animation: none; }
@keyframes show-fallback { to { visibility: visible; } }

/* ---------- Íconos ---------- */
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--brand { fill: currentColor; stroke: none; }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--red);
  --btn-fg: var(--white);
  --btn-border: var(--red);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 28px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-decoration: none;
  color: var(--btn-fg);
  background: var(--btn-bg);
  border: 2px solid var(--btn-border);
  border-radius: var(--r-full);
  cursor: pointer;
  overflow: hidden;
  transition:
    background-color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    box-shadow var(--t-med) var(--ease-out);
}
.btn:hover { --btn-bg: var(--red-dark); --btn-border: var(--red-dark); box-shadow: 0 14px 30px -14px rgb(228 0 43 / 0.7); }
.btn:active { scale: 0.97; }
.btn .icon { width: 20px; height: 20px; }

/* Texto que "rueda" al pasar el mouse (el span lo agrega main.js) */
.btn__roll {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1.25;
}
.btn__roll > span {
  display: inline-block;
  transition: transform 520ms var(--ease-out);
}
.btn__roll > span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
}
.btn:hover .btn__roll > span { transform: translateY(-100%); }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: currentColor;
  --btn-border: currentColor;
}
.btn--outline:hover { --btn-bg: var(--black); --btn-fg: var(--white); --btn-border: var(--black); box-shadow: none; }
.on-dark .btn--outline:hover,
.on-ink .btn--outline:hover,
.hero .btn--outline:hover,
.video-close .btn--outline:hover { --btn-bg: var(--white); --btn-fg: var(--black); --btn-border: var(--white); }

.btn--light { --btn-bg: var(--white); --btn-fg: var(--black); --btn-border: var(--white); }
.btn--light:hover { --btn-bg: var(--black); --btn-fg: var(--white); --btn-border: var(--black); box-shadow: none; }

/* Sobre la banda roja, el botón principal se invierte */
.band-red .btn { --btn-bg: var(--white); --btn-fg: var(--black); --btn-border: var(--white); }
.band-red .btn:hover { --btn-bg: var(--black); --btn-fg: var(--white); --btn-border: var(--black); box-shadow: none; }
.band-red .btn--outline { --btn-bg: transparent; --btn-fg: var(--white); --btn-border: var(--white); }
.band-red .btn--outline:hover { --btn-bg: var(--white); --btn-fg: var(--black); --btn-border: var(--white); }

.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: clamp(28px, 3vw, 40px); }
@media (max-width: 560px) {
  .actions .btn,
  .head-row .btn { width: 100%; }
}

/* Link de texto con subrayado que se dibuja */
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) left calc(100% - 8px) / 100% 2px no-repeat;
  transition: background-size var(--t-med) var(--ease-out), color var(--t-fast);
}
.link .icon { width: 18px; height: 18px; transition: transform var(--t-med) var(--ease-out); }
.link:hover { color: var(--red); background-size: 0% 2px; }
.link:hover .icon { transform: translate(3px, -3px); }
.on-dark .link:hover,
.on-ink .link:hover { color: var(--white); }

/* ---------- Header flotante ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 12px;
  pointer-events: none;
}
.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: calc(var(--header-h) - 20px);
  width: calc(100% - 2 * var(--inset));
  max-width: calc(var(--wrap) + 56px);
  margin-inline: auto;
  padding-inline: clamp(16px, 2.4vw, 28px) clamp(10px, 1vw, 12px);
  background: rgb(255 255 255 / 0.86);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border: 1px solid transparent;
  border-radius: var(--r-full);
  pointer-events: auto;
  transition: border-color var(--t-med), box-shadow var(--t-med), transform 500ms var(--ease-out);
}
.site-header.is-scrolled .header-bar {
  border-color: var(--gray-200);
  box-shadow: 0 12px 40px -18px rgb(0 0 0 / 0.28);
}
.site-header.is-hidden .header-bar { transform: translateY(calc(-100% - 20px)); }

.brand { display: inline-flex; align-items: center; min-height: 44px; }
.brand img { width: 158px; height: auto; }

.nav { display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); }
.nav__links { display: flex; gap: 4px; }
.nav__links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 0.96875rem;
  text-decoration: none;
  border-radius: var(--r-full);
  transition: background-color var(--t-fast), color var(--t-fast);
}
.nav__links a:hover { background: var(--gray-50); }
.nav__links a[aria-current="page"] { background: var(--black); color: var(--white); }
.nav .btn { min-height: 46px; padding: 0 20px; font-size: 0.9375rem; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  padding: 0;
  color: var(--white);
  background: var(--black);
  border: 0;
  border-radius: var(--r-full);
  cursor: pointer;
}
.menu-toggle .icon { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Sin JS, el menú en mobile se muestra como lista simple debajo del logo */
@media (max-width: 860px) {
  html:not(.js) .header-bar { flex-wrap: wrap; height: auto; padding-block: 12px; border-radius: var(--r-md); }
  html:not(.js) .nav { flex-wrap: wrap; }
}

@media (max-width: 860px) {
  .js .menu-toggle { display: inline-flex; }
  .js .nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 32px;
    padding: calc(var(--header-h) + 32px) var(--gutter) calc(32px + env(safe-area-inset-bottom));
    background: var(--white);
    clip-path: circle(0% at calc(100% - 44px) 44px);
    visibility: hidden;
    pointer-events: auto;
    transition: clip-path 700ms var(--ease-out), visibility 0s linear 700ms;
  }
  .js .nav.is-open {
    clip-path: circle(150% at calc(100% - 44px) 44px);
    visibility: visible;
    transition: clip-path 700ms var(--ease-out);
  }
  .js .nav__links { flex-direction: column; gap: 0; }
  .js .nav__links a {
    display: flex;
    min-height: 72px;
    padding: 0;
    font-size: clamp(2rem, 9vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    border-bottom: 1px solid var(--gray-200);
    border-radius: 0;
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 400ms var(--ease-out), transform 600ms var(--ease-out), color var(--t-fast);
  }
  .js .nav.is-open .nav__links a { opacity: 1; transform: none; }
  .js .nav.is-open .nav__links li:nth-child(1) a { transition-delay: 150ms; }
  .js .nav.is-open .nav__links li:nth-child(2) a { transition-delay: 220ms; }
  .js .nav.is-open .nav__links li:nth-child(3) a { transition-delay: 290ms; }
  .js .nav__links a:hover { background: none; color: var(--red); }
  .js .nav__links a[aria-current="page"] { background: none; color: var(--red); }
  .js .nav .btn { min-height: 58px; font-size: 1.0625rem; }
  body.menu-open { overflow: hidden; }
  .site-header.menu-is-open .header-bar { background: transparent; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ---------- Intro (solo Inicio, una vez por sesión) ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--white);
}
.intro[hidden] { display: none; }
.intro__logo {
  position: relative;
  width: min(80vw, 760px);
  aspect-ratio: 4.8957;
}
.intro__logo img { position: absolute; height: auto; }
.intro__digital { transform-origin: 20% 100%; }

/* ---------- Hero (con video) ---------- */
.hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: calc(100svh - 2 * var(--inset));
  margin-top: calc(var(--inset) - var(--header-h) + 8px);
  padding-top: calc(var(--header-h) + 40px);
  padding-bottom: clamp(48px, 7vw, 112px);
  color: var(--white);
  background: var(--ink);
}
.media-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
}
.media-bg video,
.media-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgb(0 0 0 / 0.78) 0%, rgb(0 0 0 / 0.5) 50%, rgb(0 0 0 / 0.15) 100%),
    linear-gradient(0deg, rgb(0 0 0 / 0.6) 0%, rgb(0 0 0 / 0) 55%);
}
.hero__content { max-width: 74rem; }
.hero h1 { font-size: var(--fs-mega); letter-spacing: -0.045em; line-height: 0.98; }
.hero h1 .accent { color: var(--red); }
.hero .lead { margin-top: clamp(20px, 2.4vw, 32px); color: rgb(255 255 255 / 0.9); }
.hero .btn--outline { --btn-fg: var(--white); --btn-border: rgb(255 255 255 / 0.85); }

.media-toggle {
  position: absolute;
  right: var(--gutter);
  bottom: clamp(20px, 3vw, 32px);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  padding: 0;
  color: var(--white);
  background: rgb(0 0 0 / 0.45);
  border: 1px solid rgb(255 255 255 / 0.5);
  border-radius: var(--r-full);
  cursor: pointer;
  transition: background-color var(--t-fast);
}
.media-toggle:hover { background: rgb(0 0 0 / 0.75); }
.media-toggle .icon { width: 18px; height: 18px; }
.media-toggle .icon-play { display: none; }
.media-toggle[aria-pressed="true"] .icon-pause { display: none; }
.media-toggle[aria-pressed="true"] .icon-play { display: block; }
.media-toggle--dark { color: var(--black); background: var(--white); border-color: var(--gray-200); }
.media-toggle--dark:hover { background: var(--gray-50); }

/* ---------- Cinta de servicios (marquee) ---------- */
.ticker {
  position: relative;
  padding-block: clamp(20px, 2.4vw, 32px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.ticker__group { display: flex; align-items: center; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 40px);
  padding-right: clamp(20px, 2.4vw, 40px);
  font-size: clamp(1.75rem, 1rem + 3vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.1;
  white-space: nowrap;
}
.ticker__item:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--black);
}
.ticker__item::after {
  content: "";
  width: 0.32em; height: 0.32em;
  background: var(--red);
  border-radius: 50%;
}
@keyframes marquee { to { transform: translateX(-50%); } }
.is-paused .ticker__track,
.is-paused .marquee__track { animation-play-state: paused; }

/* ---------- Manifiesto (palabras que se encienden al hacer scroll) ---------- */
.manifesto__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.manifesto h2 {
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0;
  color: var(--red-dark);
}
.manifesto__text {
  margin-top: 24px;
  max-width: 24em;
  font-size: clamp(1.375rem, 1rem + 1.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--black);
}
/* Frase resaltada en rojo (sin JS o con movimiento reducido ya se ve resaltada) */
.hl {
  padding: 0.02em 0.14em;
  color: var(--white);
  background: var(--red);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hl.is-anim { padding: 0; color: inherit; background: none; }
.hl-word { padding: 0.02em 0.1em; box-shadow: 0.32em 0 0 0 rgb(228 0 43 / 0); }
.manifesto__media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}
.manifesto__media img { width: 100%; }
@media (max-width: 860px) {
  .manifesto__grid { grid-template-columns: 1fr; }
  .manifesto__media { max-width: 420px; }
}

/* ---------- Tarjetas de servicios apiladas (Inicio) ---------- */
.stack { display: grid; gap: clamp(16px, 2vw, 24px); }
.stack-card {
  --card-bg: var(--ink);
  --card-fg: var(--white);
  --card-muted: var(--on-dark-muted);
  --viz-bg: #2A2A28;
  --viz-surface: #343432;
  --viz-line: #4A4A47;
  --viz-ink: var(--white);
  position: sticky;
  top: calc(var(--header-h) + 16px + var(--i, 0) * 14px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  min-height: min(620px, calc(100svh - var(--header-h) - 60px));
  padding: clamp(28px, 4.5vw, 72px);
  color: var(--card-fg);
  background: var(--card-bg);
  border-radius: var(--r-lg);
  transform-origin: 50% 0;
  will-change: transform;
}
.stack-card--red {
  --card-bg: var(--red);
  --card-muted: rgb(255 255 255 / 0.88);
  --viz-bg: #C90026;
  --viz-surface: #F0F0EE;
  --viz-line: #D3D3CF;
  --viz-ink: var(--black);
}
.stack-card--light {
  --card-bg: var(--gray-100);
  --card-fg: var(--black);
  --card-muted: var(--gray-600);
  --viz-bg: var(--white);
  --viz-surface: var(--gray-50);
  --viz-line: var(--gray-200);
  --viz-ink: var(--black);
}
.stack-card--black { --card-bg: var(--black); }
.stack-card .icon-lg { width: 40px; height: 40px; color: var(--red); }
.stack-card--red .icon-lg { color: var(--white); }
.stack-card h3 {
  margin-top: 28px;
  font-size: clamp(1.75rem, 1.1rem + 2.4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.035em;
}
.stack-card p { margin-top: 20px; max-width: 30em; color: var(--card-muted); font-size: 1.0625rem; }
.stack-card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags li {
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid currentColor;
  border-radius: var(--r-full);
  opacity: 0.85;
}
.stack-card .link { margin-top: 24px; }
.stack-card--red .link:hover { color: var(--black); }
@media (max-width: 860px) {
  .stack-card {
    position: relative;
    top: auto;
    grid-template-columns: 1fr;
    min-height: 0;
  }
}

/* ---------- Ilustraciones animadas (viz): interfaces realistas ----------
   El estado final es el estado por defecto (sin JS o con movimiento reducido se ve completo).
   La secuencia animada la arma main.js con GSAP cuando la ilustración entra en pantalla. */
.viz {
  position: relative;
  width: 100%;
  max-width: 560px;
  aspect-ratio: 5 / 4;
  margin-inline: auto;
  container-type: inline-size;
  color: #111;
  background: var(--viz-bg);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: 2.2cqi;
  line-height: 1.3;
}
.viz .icon { width: 1.4em; height: 1.4em; }
.viz-shadow,
.ig-phone, .srch, .ad-card, .ad-metric, .fig, .brw, .mob, .ig-toast, .web-chip, .biz-card {
  box-shadow: 0 3cqi 7cqi -2cqi rgb(0 0 0 / 0.45);
}

/* Redes: perfil tipo Instagram */
.ig-phone {
  position: absolute;
  left: 50%; top: 5%;
  width: 54cqi; height: 112%;
  translate: -50% 0;
  padding: 3cqi 2.8cqi;
  background: #fff;
  border: 1.6cqi solid #111;
  border-bottom: 0;
  border-radius: 7cqi 7cqi 0 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 2.3cqi;
}
.ig-top { display: flex; justify-content: space-between; align-items: center; font-size: 3cqi; }
.ig-top__icons { display: flex; gap: 2cqi; }
.ig-top__icons .icon { width: 3.6cqi; height: 3.6cqi; }
.ig-stories { display: flex; gap: 1.6cqi; margin: 2.4cqi 0 2cqi; }
.ig-story {
  width: 8.6cqi; aspect-ratio: 1; flex: none;
  padding: 0.5cqi;
  border-radius: 50%;
  background: conic-gradient(from 200deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75);
}
.ig-story img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 0.5cqi solid #fff; background: #000; }
.ig-post__head { display: flex; align-items: center; gap: 1.4cqi; margin-bottom: 1.4cqi; }
.ig-post__head small { color: #737373; font-size: 1.9cqi; }
.ig-avatar { width: 5cqi; aspect-ratio: 1; flex: none; border-radius: 50%; background: var(--red) radial-gradient(circle at 35% 35%, rgb(255 255 255 / 0.5), transparent 45%); }
.ig-avatar--sm { width: 4cqi; }
.ig-post__img { position: relative; margin: 0 -2.8cqi; aspect-ratio: 16 / 11; overflow: hidden; background: #eee; }
.ig-post__img img { width: 100%; height: 100%; object-fit: cover; }
.ig-burst {
  position: absolute; left: 50%; top: 50%;
  width: 18cqi; translate: -50% -50%;
  fill: #fff; stroke: none;
  opacity: 0;
  filter: drop-shadow(0 1cqi 2cqi rgb(0 0 0 / 0.35));
}
.ig-post__actions { display: flex; gap: 2.2cqi; padding: 1.8cqi 0 1cqi; }
.ig-post__actions .icon { width: 3.8cqi; height: 3.8cqi; }
.ig-like.is-liked { fill: #ff3040; stroke: #ff3040; }
.ig-save { margin-left: auto; }
.ig-likes, .ig-caption { margin: 0.4cqi 0 0; }
.ig-float { position: absolute; right: 12%; bottom: 20%; width: 6cqi; height: 6cqi; }
.ig-float svg { position: absolute; inset: 0; fill: #ff3040; opacity: 0; }
.ig-float svg:nth-child(2) { fill: #fa7e1e; left: -3cqi; }
.ig-float svg:nth-child(3) { fill: #d62976; left: 2cqi; }
.ig-float svg:nth-child(4) { fill: #ff3040; left: -1cqi; }
.ig-toast {
  position: absolute;
  display: flex; align-items: center; gap: 1.2cqi;
  max-width: 44cqi;
  padding: 1.4cqi 2cqi;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 2cqi;
  color: #111;
  background: #fff;
  border-radius: 2.4cqi;
}
.ig-toast .icon { color: var(--red); flex: none; }
.ig-toast--1 { left: 3%; top: 56%; }
.ig-toast--2 { right: 3%; top: 76%; }

/* Publicidad: búsqueda con resultado patrocinado + anuncio en redes */
.srch {
  position: absolute; left: 5%; top: 7%; bottom: -4%;
  width: 63%;
  padding: 3cqi;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 2cqi;
  color: #4d5156;
  background: #fff;
  border-radius: 3cqi;
}
.srch__bar {
  display: flex; align-items: center; gap: 1.6cqi;
  padding: 1.7cqi 2.6cqi;
  font-size: 2.5cqi;
  color: #202124;
  border: 1px solid #dfe1e5;
  border-radius: 999px;
  box-shadow: 0 1px 6px rgb(32 33 36 / 0.28);
}
.srch__bar .icon { color: #9aa0a6; width: 3cqi; height: 3cqi; }
.srch__caret { width: 0.25cqi; height: 3cqi; background: #1a73e8; opacity: 0; }
.srch__tabs { display: flex; gap: 3cqi; margin: 2cqi 0 2.4cqi; padding-bottom: 1cqi; font-size: 1.9cqi; color: #5f6368; border-bottom: 1px solid #ebebeb; }
.srch__tabs .is-on { color: #1a73e8; box-shadow: 0 1.1cqi 0 -0.5cqi #1a73e8; }
.srch__res { margin-bottom: 2.6cqi; }
.srch__res small { font-size: 1.9cqi; color: #202124; }
.srch__site { display: flex; gap: 1.2cqi; align-items: center; margin: 0.8cqi 0; font-size: 1.9cqi; color: #202124; line-height: 1.2; }
.srch__site em { font-style: normal; color: #4d5156; font-size: 1.7cqi; }
.srch__fav { display: grid; place-items: center; width: 4cqi; aspect-ratio: 1; border-radius: 50%; background: var(--red); color: #fff; font-size: 1.5cqi; font-weight: 800; }
.srch p { margin: 0; line-height: 1.45; }
.srch .srch__title { margin: 0.4cqi 0; font-size: 2.7cqi; font-weight: 400; line-height: 1.25; color: #1a0dab; }
.srch .sk { display: block; height: 1.3cqi; margin-bottom: 1cqi; border-radius: 99px; background: #eceff1; }
.srch .sk-blue { height: 1.8cqi; background: #c9d7f8; }
.srch .w45 { width: 45%; } .srch .w60 { width: 60%; } .srch .w70 { width: 70%; } .srch .w80 { width: 80%; } .srch .w90 { width: 90%; }
.ad-card {
  position: absolute; right: 4%; top: 14%;
  width: 31%;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.8cqi;
  color: #050505;
  background: #fff;
  border-radius: 2.4cqi;
  overflow: hidden;
}
.ad-card__head { display: flex; gap: 1cqi; align-items: center; padding: 1.5cqi; line-height: 1.15; }
.ad-card__head small { display: block; color: #65676b; font-size: 1.5cqi; }
.ad-card__img { aspect-ratio: 1; overflow: hidden; }
.ad-card__img img { width: 100%; height: 100%; object-fit: cover; }
.ad-card__cta { display: flex; justify-content: space-between; align-items: center; gap: 1cqi; padding: 1.5cqi; font-size: 1.6cqi; background: #f0f2f5; }
.ad-card__cta b { padding: 0.8cqi 1.2cqi; color: #fff; background: #0866ff; border-radius: 1cqi; white-space: nowrap; }
.ad-metric {
  position: absolute; right: 4%; bottom: 7%;
  width: 31%;
  padding: 1.8cqi;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1.7cqi;
  font-weight: 600;
  color: #1c2b33;
  background: #fff;
  border-radius: 2.2cqi;
}
.ad-metric i { display: block; height: 1.5cqi; margin-top: 1.2cqi; background: #e4e6eb; border-radius: 99px; overflow: hidden; }
.ad-metric b { display: block; width: 78%; height: 100%; background: linear-gradient(90deg, #0866ff, #00c2ff); border-radius: 99px; }

/* Identidad: herramienta de diseño + tarjeta aplicada */
.fig {
  position: absolute; inset: 6% 6% 16% 6%;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #2c2c2c;
  border-radius: 2.6cqi;
  overflow: hidden;
}
.fig__bar { display: flex; align-items: center; gap: 1cqi; height: 6cqi; padding: 0 2cqi; font-size: 1.8cqi; color: #b3b3b3; background: #1e1e1e; }
.fig__bar i { width: 1.4cqi; height: 1.4cqi; border-radius: 50%; background: #ff5f57; }
.fig__bar i:nth-child(2) { background: #febc2e; }
.fig__bar i:nth-child(3) { background: #28c840; }
.fig__bar span { margin-left: 2cqi; }
.fig__tools { position: absolute; left: 0; top: 6cqi; bottom: 0; display: flex; flex-direction: column; gap: 1.6cqi; width: 6cqi; padding: 2cqi 1.5cqi; background: #1e1e1e; }
.fig__tools span { height: 3cqi; border-radius: 0.8cqi; background: #3a3a3a; }
.fig__tools span:first-child { background: #0d99ff; }
.fig__canvas { position: absolute; left: 6cqi; right: 0; top: 6cqi; bottom: 0; }
.fig__board {
  position: absolute; left: 7%; top: 10%;
  display: grid; justify-items: center; align-content: center; gap: 2cqi;
  width: 60%; aspect-ratio: 4 / 3;
  background: #F4EDE1;
  border-radius: 1.2cqi;
  outline: 0.3cqi solid #0d99ff;
  outline-offset: 0.6cqi;
}
.logo-mark { position: relative; width: 13cqi; aspect-ratio: 1; }
.logo-mark span { position: absolute; display: block; }
.lm-a { inset: 0; border-radius: 50%; background: #0F5257; }
.lm-b { right: -10%; bottom: -10%; width: 48%; height: 48%; border-radius: 1.4cqi; background: #E8A33D; rotate: 45deg; }
.lm-c { left: 22%; top: 22%; width: 30%; height: 30%; border-radius: 50%; background: #F4EDE1; }
.logo-word { text-align: center; color: #1B1B1B; }
.logo-word span { display: block; font-family: var(--font); font-size: 4.6cqi; font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.logo-word small { display: block; margin-top: 0.8cqi; font-size: 1.4cqi; font-weight: 700; letter-spacing: 0.22em; color: #0F5257; }
.fig__swatches { position: absolute; right: 6%; top: 10%; display: grid; gap: 1.4cqi; }
.fig__swatches span { width: 10cqi; height: 6cqi; border-radius: 1.2cqi; background: var(--c); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18); }
.fig__cursor { position: absolute; left: 56%; top: 60%; display: flex; align-items: flex-start; gap: 0.4cqi; }
.fig__cursor svg { width: 3.4cqi; fill: #F24E1E; stroke: #fff; stroke-width: 1.5; }
.fig__cursor span { margin-top: 2.6cqi; padding: 0.4cqi 1cqi; font-size: 1.6cqi; font-weight: 700; color: #fff; background: #F24E1E; border-radius: 0.6cqi; }
.biz-card {
  position: absolute; right: 5%; bottom: 5%;
  display: flex; align-items: center; gap: 1.8cqi;
  width: 38%; aspect-ratio: 1.75;
  padding: 0 3cqi;
  font-family: var(--font);
  font-size: 3cqi;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #F4EDE1;
  background: #0F5257;
  border-radius: 1.6cqi;
  rotate: -6deg;
}
.logo-mark--sm { width: 7cqi; }
.biz-card .lm-a { background: #F4EDE1; }
.biz-card .lm-c { background: #0F5257; }

/* Web: sitio que se arma + versión mobile */
.brw {
  position: absolute; left: 4%; top: 7%; bottom: 8%;
  width: 71%;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #fff;
  border-radius: 2.4cqi;
  overflow: hidden;
}
.brw__bar { display: flex; align-items: center; gap: 1cqi; padding: 1.6cqi 2cqi; background: #f1f3f4; border-bottom: 1px solid #e3e3e3; }
.brw__bar i { width: 1.4cqi; height: 1.4cqi; border-radius: 50%; background: #ff5f57; }
.brw__bar i:nth-child(2) { background: #febc2e; }
.brw__bar i:nth-child(3) { background: #28c840; }
.brw__url { display: flex; align-items: center; gap: 1cqi; flex: 1; margin-left: 1.6cqi; padding: 0.9cqi 2cqi; font-size: 1.9cqi; color: #3c4043; background: #fff; border-radius: 99px; }
.brw__url .icon { width: 2.2cqi; height: 2.2cqi; color: #5f6368; }
.brw__page { padding: 2cqi; font-size: 2cqi; }
.site-nav { display: flex; align-items: center; gap: 2cqi; margin-bottom: 2cqi; }
.site-nav b { margin-right: auto; font-family: var(--font); font-size: 2.6cqi; font-weight: 800; letter-spacing: -0.03em; color: #111; }
.site-nav span { width: 6cqi; height: 1.2cqi; background: #e6e6e6; border-radius: 99px; }
.site-nav em { padding: 0.8cqi 1.6cqi; font-size: 1.7cqi; font-style: normal; font-weight: 700; color: #fff; background: #111; border-radius: 99px; }
.site-hero { position: relative; height: 26cqi; border-radius: 1.6cqi; overflow: hidden; }
.site-hero img { width: 100%; height: 100%; object-fit: cover; }
.site-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgb(0 0 0 / 0.7), rgb(0 0 0 / 0.05)); }
.site-hero__copy { position: absolute; left: 3cqi; bottom: 3cqi; z-index: 1; max-width: 60%; color: #fff; }
.site-hero__copy strong { display: block; font-family: var(--font); font-size: 3.4cqi; font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.site-btn { display: inline-block; margin-top: 1.4cqi; padding: 0.9cqi 1.8cqi; font-size: 1.7cqi; font-weight: 700; color: #fff; background: var(--red); border-radius: 99px; }
.site-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqi; margin-top: 2cqi; }
.site-cards span { height: 10cqi; border-radius: 1.2cqi; background: #DDEBF7; }
.site-cards span:nth-child(2) { background: #FDE7C8; }
.site-cards span:nth-child(3) { background: #E3F4E8; }
.brw__cursor { position: absolute; left: 24%; top: 66%; width: 3.6cqi; }
.brw__cursor svg { fill: #111; stroke: #fff; stroke-width: 1.5; }
.mob {
  position: absolute; right: 4%; bottom: 5%;
  width: 24%; aspect-ratio: 9 / 18;
  padding: 4.4cqi 1.6cqi 2cqi;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: #fff;
  border: 1.1cqi solid #111;
  border-radius: 4cqi;
  overflow: hidden;
}
.mob__notch { position: absolute; top: 0.8cqi; left: 50%; width: 7cqi; height: 1.8cqi; translate: -50% 0; background: #111; border-radius: 99px; }
.mob__img { height: 15cqi; margin-bottom: 1.6cqi; border-radius: 1.2cqi; overflow: hidden; }
.mob__img img { width: 100%; height: 100%; object-fit: cover; }
.mob strong { display: block; font-family: var(--font); font-size: 2.3cqi; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: #111; }
.mob .site-btn { font-size: 1.5cqi; }
.web-chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 1cqi;
  padding: 1.2cqi 2cqi;
  font-size: 2cqi;
  font-weight: 700;
  color: #fff;
  background: #111;
  border-radius: 99px;
}
.web-chip .icon { width: 2.4cqi; height: 2.4cqi; color: #ff4d6d; }
.web-chip--1 { left: 50%; top: 3%; }
.web-chip--2 { left: 7%; bottom: 2%; }

/* ---------- Dos ideas (Inicio) ---------- */
.ideas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 80px);
}
.idea__media {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
  margin-bottom: 28px;
}
.idea__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: scale 900ms var(--ease-out);
}
.idea:hover .idea__media img { scale: 1.04; }
.idea:nth-child(2) { margin-top: clamp(0px, 8vw, 120px); }
.idea h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.375rem); font-weight: 800; letter-spacing: -0.03em; }
.idea p { margin-top: 16px; max-width: 32em; color: var(--gray-600); }
@media (max-width: 760px) {
  .ideas { grid-template-columns: 1fr; }
  .idea:nth-child(2) { margin-top: 0; }
}

/* ---------- Números ---------- */
.numbers {
  position: relative;
  color: var(--white);
  background: var(--ink);
  isolation: isolate;
  overflow: hidden;
}
.numbers::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgb(15 15 14 / 0.8);
}
.numbers h2 { font-size: var(--fs-small); font-weight: 700; letter-spacing: 0; color: var(--on-dark-muted); }
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  margin-top: clamp(40px, 5vw, 72px);
}
.stat { padding-top: 24px; border-top: 1px solid rgb(255 255 255 / 0.25); }
.stat strong {
  display: block;
  font-size: clamp(2.75rem, 1.4rem + 3.6vw, 4.75rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stat strong em { font-style: normal; color: var(--red); }
.stat > span { display: block; margin-top: 12px; font-weight: 600; color: var(--on-dark-muted); }
.numbers__text {
  margin-top: clamp(40px, 5vw, 64px);
  max-width: 34em;
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--on-dark-muted);
}
@media (max-width: 900px) {
  .numbers__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Logos: carrusel infinito (Inicio) ---------- */
.marquee {
  display: grid;
  gap: clamp(12px, 1.5vw, 20px);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
  will-change: transform;
}
.marquee__row--reverse .marquee__track { animation-direction: reverse; animation-duration: 54s; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; gap: clamp(12px, 1.5vw, 20px); padding-right: clamp(12px, 1.5vw, 20px); }
.logo-tile {
  position: relative;
  display: block;
  width: clamp(150px, 16vw, 220px);
  aspect-ratio: 4 / 3;
  background: #0E0E0D;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-md);
  overflow: hidden;
  transition: border-color var(--t-med), background-color var(--t-med);
}
.logo-tile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.72;
  transition: opacity var(--t-med), scale 600ms var(--ease-out);
}
.logo-tile:hover { border-color: #4A4A47; background: #161615; }
.logo-tile:hover img { opacity: 1; scale: 1.06; }
.clients-panel { position: relative; }
.clients-panel .media-toggle { bottom: clamp(20px, 3vw, 32px); }

/* ---------- Logos: grilla (Clientes) ---------- */
.logo-grid {
  --x: 50%;
  --y: 50%;
  --glow: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  background:
    radial-gradient(420px circle at var(--x) var(--y), rgb(228 0 43 / calc(var(--glow) * 0.9)), transparent 65%),
    var(--line-dark);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.logo-grid li { background: var(--black); }
.logo-grid li:first-child { border-top-left-radius: calc(var(--r-lg) - 1px); }
.logo-grid a {
  position: relative;
  display: block;
  height: 100%;
  overflow: hidden;
}
.logo-grid a::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(260px circle at var(--x) var(--y), rgb(255 255 255 / calc(var(--glow) * 0.06)), transparent 70%);
  pointer-events: none;
}
.logo-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  opacity: 0.78;
  transition: opacity 500ms var(--ease-out), scale 700ms var(--ease-out), filter 500ms var(--ease-out);
}
.logo-grid:hover img { opacity: 0.4; }
.logo-grid a:hover img,
.logo-grid a:focus-visible img { opacity: 1; scale: 1.06; }
@media (max-width: 1000px) {
  .logo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .logo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Banda roja de cierre ---------- */
.band-red {
  position: relative;
  color: var(--white);
  background: var(--red);
  overflow: hidden;
}
.band-red h2 { font-size: var(--fs-mega); line-height: 0.95; letter-spacing: -0.05em; max-width: 11em; }
.band-red .lead { margin-top: 28px; }
.band-red::after {
  content: "";
  position: absolute;
  right: -12vw;
  bottom: -30vw;
  z-index: -1;
  width: 60vw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / 0.18), transparent 60%);
}

/* ---------- Hero de página (sin video) ---------- */
.page-hero { padding-block: clamp(48px, 3rem + 5vw, 128px) clamp(48px, 2rem + 4vw, 96px); }
.page-hero h1 { font-size: var(--fs-display); letter-spacing: -0.045em; line-height: 1; }
.page-hero .lead { margin-top: 28px; }
.page-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: center;
}
.page-hero__media {
  border-radius: var(--r-lg);
  overflow: hidden;
}
.page-hero__media img { width: 100%; }
@media (max-width: 860px) {
  .page-hero__grid { grid-template-columns: 1fr; }
}

/* ---------- Split (texto + imagen) ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 7vw, 120px);
  align-items: center;
}
.split__media { border-radius: var(--r-lg); overflow: hidden; }
.split__media img { width: 100%; }
.split--media-first .split__media { order: -1; }
.split__media--crop img { aspect-ratio: 16 / 10; object-fit: cover; transform: scale(1.35); }
.split h2 + p,
.split h2 + .lead { margin-top: 24px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split__media { order: 2; max-width: 520px; }
  .split--media-first .split__media { order: 2; }
}

/* ---------- Servicios: 4 áreas con escenario fijo ---------- */
.areas__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 120px);
  align-items: start;
}
.areas__stage {
  --viz-bg: #161615;
  --viz-surface: #262624;
  --viz-line: #403F3C;
  --viz-ink: var(--white);
  position: sticky;
  top: calc(50svh - min(22vw, 260px));
  display: grid;
}
.areas__stage .viz {
  grid-area: 1 / 1;
  max-width: none;
  opacity: 0;
  scale: 0.96;
  transition: opacity 600ms var(--ease-out), scale 800ms var(--ease-out);
}
.areas__stage .viz.is-active { opacity: 1; scale: 1; }
.area {
  padding-block: clamp(40px, 7vh, 72px);
  border-top: 1px solid var(--line-dark);
  opacity: 0.35;
  transition: opacity 500ms var(--ease-out);
}
.area:last-child { border-bottom: 1px solid var(--line-dark); }
.area.is-current { opacity: 1; }
.area__icon {
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 24px;
  color: var(--white);
  background: var(--red);
  border-radius: 18px;
  transition: rotate 700ms var(--ease-spring);
}
.area.is-current .area__icon { rotate: -8deg; }
.area__icon .icon { width: 26px; height: 26px; }
.area h3 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08; }
.area p { margin-top: 16px; color: var(--on-dark-muted); max-width: 36em; }
.area .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; color: var(--on-dark-muted); }
@media (max-width: 860px) {
  .areas__grid { grid-template-columns: 1fr; }
  .areas__stage { display: none; }
  .area { opacity: 1; }
}

/* ---------- Servicios: modalidades ---------- */
.modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.4vw, 32px);
}
.mode {
  display: flex;
  flex-direction: column;
  padding: 12px 12px 28px;
  background: var(--white);
  border-radius: var(--r-lg);
  transition: translate var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.mode:hover { translate: 0 -6px; box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.35); }
.mode__media {
  border-radius: calc(var(--r-lg) - 8px);
  overflow: hidden;
  margin-bottom: 24px;
}
.mode__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: scale 900ms var(--ease-out);
}
.mode:hover .mode__media img { scale: 1.06; }
.mode h3,
.mode p { padding-inline: clamp(8px, 1.4vw, 16px); }
.mode h3 { font-size: clamp(1.25rem, 1rem + 0.7vw, 1.625rem); font-weight: 800; letter-spacing: -0.02em; }
.mode p { margin-top: 12px; color: var(--gray-600); }
@media (max-width: 860px) {
  .modes { grid-template-columns: 1fr; }
}

/* ---------- Clientes / cierres con video ---------- */
.video-close {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(88svh, 820px);
  padding-block: var(--section-y);
  color: var(--white);
  background: var(--ink);
}
.video-close::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.82) 0%, rgb(0 0 0 / 0.45) 60%, rgb(0 0 0 / 0.25) 100%);
}
.video-close h2 { font-size: var(--fs-mega); line-height: 0.95; letter-spacing: -0.05em; max-width: 10em; }
.video-close .lead { margin-top: 28px; color: rgb(255 255 255 / 0.9); }
.video-close .btn--outline { --btn-fg: var(--white); --btn-border: rgb(255 255 255 / 0.85); }

/* ---------- Contacto ---------- */
.contact-hero__media {
  border-radius: var(--r-lg);
  overflow: hidden;
}
.contact-hero__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 40% 50%;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: start;
}
.contact-grid > div { padding-top: clamp(24px, 4vw, 48px); }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.form h2,
.h-panel { font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.5rem); }

.contact-list { margin-top: 32px; }
.contact-list li { border-top: 1px solid var(--gray-200); }
.contact-list li:last-child { border-bottom: 1px solid var(--gray-200); }
.contact-list a,
.contact-list div {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding-block: 12px;
  text-decoration: none;
}
.contact-list .icon-wrap {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  flex: none;
  color: var(--red);
  background: var(--white);
  border-radius: var(--r-full);
  transition: background-color var(--t-fast), color var(--t-fast), rotate 500ms var(--ease-spring);
}
.contact-list a:hover .icon-wrap { color: var(--white); background: var(--red); rotate: -12deg; }
.contact-list .icon { width: 20px; height: 20px; }
.contact-list small {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--gray-600);
}
.contact-list strong { display: block; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.contact-list a:hover strong { color: var(--red); }

.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  color: var(--black);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-full);
  transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast), translate var(--t-med) var(--ease-spring);
}
.socials a:hover { color: var(--white); background: var(--black); border-color: var(--black); translate: 0 -3px; }
.socials .icon { width: 20px; height: 20px; }
.contact-socials { margin-top: 32px; }
.contact-socials h3 { font-size: var(--fs-small); font-weight: 700; letter-spacing: 0; margin-bottom: 14px; }

/* Formulario */
.form {
  padding: clamp(24px, 4vw, 52px);
  background: var(--white);
  border-radius: var(--r-lg);
}
.form > p { margin-top: 12px; }
.form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: var(--fs-small); font-weight: 700; }
.field label span { font-weight: 500; color: var(--gray-600); }
.field input,
.field textarea {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  font: inherit;
  font-size: 1rem;
  color: var(--black);
  background: var(--gray-50);
  border: 1.5px solid #9A9A96;
  border-radius: var(--r-sm);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), background-color var(--t-fast);
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:hover,
.field textarea:hover { border-color: var(--black); }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: none;
  background: var(--white);
  border-color: var(--black);
  box-shadow: 0 0 0 4px rgb(228 0 43 / 0.3);
}
.field [aria-invalid="true"] { border-color: var(--red); }
.field__error {
  display: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--red-dark);
}
.field__error.is-visible { display: block; }
.form__honeypot { display: none; }
.form .btn { margin-top: 28px; width: 100%; }
.form .btn[disabled] { opacity: 0.6; cursor: progress; }
.form__status {
  margin-top: 20px;
  padding: 16px 20px;
  font-weight: 600;
  border-radius: var(--r-sm);
}
.form__status:empty { display: none; }
.form__status.is-success { color: var(--white); background: var(--black); }
.form__status.is-error { color: var(--red-dark); background: #FDE8EC; }
@media (max-width: 560px) {
  .form__grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer {
  padding-block: clamp(56px, 6vw, 96px) 32px;
  background: var(--white);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.footer__brand img { width: 192px; height: auto; }
.footer__brand p { margin-top: 20px; max-width: 22em; color: var(--gray-600); font-size: var(--fs-small); }
.site-footer h2 {
  margin-bottom: 14px;
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0;
}
.footer__links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: var(--fs-small);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.footer__links a:hover { color: var(--red); text-decoration: underline; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 56px;
  padding-top: 24px;
  font-size: 0.875rem;
  color: var(--gray-600);
  border-top: 1px solid var(--gray-200);
}
.footer__bottom p { margin: 0; }
.footer__bottom a { color: inherit; }
@media (max-width: 900px) {
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: calc(clamp(16px, 3vw, 28px) + env(safe-area-inset-bottom));
  z-index: 40;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 22px 0 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--white);
  background: var(--ink);
  border-radius: var(--r-full);
  box-shadow: 0 10px 30px -8px rgb(0 0 0 / 0.45);
  transition: background-color var(--t-fast), transform var(--t-med) var(--ease-spring), opacity var(--t-med) var(--ease-out), visibility 0s;
}
.wa-float .icon { width: 22px; height: 22px; }
.wa-float:hover { background: var(--red); transform: translateY(-3px); }
.wa-float.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.9);
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
}
body.menu-open .wa-float { display: none; }

/* ---------- 404 ---------- */
.not-found { min-height: 60svh; display: grid; align-items: center; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .ticker__track,
  .marquee__track { animation: none !important; transform: none !important; }
  .marquee__track { flex-wrap: wrap; width: auto; justify-content: center; }
  .marquee__group[aria-hidden="true"],
  .ticker__group[aria-hidden="true"] { display: none; }
  .marquee__group { flex-wrap: wrap; justify-content: center; }
  .js [data-split],
  .js [data-hero-in] { visibility: visible; }
}

/* En celulares, el botón de pausa del hero no se superpone con los botones */
@media (max-width: 560px) {
  .hero { padding-bottom: 88px; }
}

/* ---------- Manifiesto: herramientas alrededor del celular ---------- */
.tools { position: relative; padding: clamp(24px, 4vw, 56px) 0; }
.tools__media {
  width: min(72%, 380px);
  margin-inline: auto;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
}
.tools__media img { width: 100%; }
.tools__cloud li {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 10px 12px;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--r-full);
  box-shadow: 0 16px 36px -16px rgb(0 0 0 / 0.35);
}
.tools__cloud .icon { width: 18px; height: 18px; color: var(--red); }
.tools__cloud li:nth-child(1)  { left: 2%;   top: 10%; }
.tools__cloud li:nth-child(2)  { right: 0;   top: 4%; }
.tools__cloud li:nth-child(3)  { left: -2%;  top: 30%; }
.tools__cloud li:nth-child(4)  { right: -2%; top: 24%; }
.tools__cloud li:nth-child(5)  { left: 4%;   top: 50%; }
.tools__cloud li:nth-child(6)  { right: 2%;  top: 45%; }
.tools__cloud li:nth-child(7)  { left: -1%;  top: 70%; }
.tools__cloud li:nth-child(8)  { right: -1%; top: 66%; }
.tools__cloud li:nth-child(9)  { left: 12%;  bottom: 4%; }
.tools__cloud li:nth-child(10) { right: 10%; bottom: 8%; }
.tools__cloud li:nth-child(11) { left: 38%;  top: 0; }
.tools__cloud li:nth-child(12) { left: 40%;  bottom: -2%; }
.tools__cloud li { transition: background-color 300ms var(--ease-out), color 300ms var(--ease-out), border-color 300ms var(--ease-out), box-shadow 300ms var(--ease-out); cursor: default; }
.tools__cloud li.is-near,
.tools__cloud li:hover { color: var(--white); background: var(--black); border-color: var(--black); box-shadow: 0 20px 40px -14px rgb(228 0 43 / 0.55); }
.tools__cloud li.is-near .icon,
.tools__cloud li:hover .icon { color: var(--white); }
@media (max-width: 860px) {
  .tools { padding: 0; }
  .tools__cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
  .tools__cloud li { position: static; }
}

/* ---------- Dos ideas: escenario fijo con imágenes que se transforman ---------- */
.duo__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 72px);
  align-items: center;
}
.duo__text h3 { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.375rem); font-weight: 800; letter-spacing: -0.03em; }
.duo__text p { margin-top: 16px; color: var(--gray-600); }
.duo__text .link { margin-top: 16px; }
.duo__text[data-duo-text="0"] { text-align: right; }
.duo__stage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--gray-50);
}
.duo__stage img { width: 100%; aspect-ratio: 1; object-fit: cover; mix-blend-mode: multiply; }
.duo__progress { display: none; }

/* Modo fijo (escritorio con movimiento): las dos imágenes ocupan el mismo lugar */
.duo.is-pinned .duo__pin { display: grid; align-items: center; min-height: calc(100svh - var(--header-h)); }
.duo.is-pinned .duo__stage { display: block; aspect-ratio: 1; }
.duo.is-pinned .duo__stage img { position: absolute; inset: 0; height: 100%; will-change: clip-path, transform; }
.duo.is-pinned .duo__text { transition: opacity 500ms var(--ease-out), translate 700ms var(--ease-out); }
.duo.is-pinned .duo__text:not(.is-on) { opacity: 0.22; translate: 0 12px; }
.duo.is-pinned .duo__progress {
  display: block;
  position: absolute;
  left: 28px; right: 28px; bottom: 22px;
  height: 3px;
  background: rgb(0 0 0 / 0.08);
  border-radius: var(--r-full);
  overflow: hidden;
}
.duo__progress span { display: block; height: 100%; background: var(--red); transform-origin: left; transform: scaleX(0); }
@media (max-width: 860px) {
  .duo__grid { grid-template-columns: 1fr; }
  .duo__text[data-duo-text="0"] { text-align: left; }
}

/* ---------- Carrusel grande (Clientes) ---------- */
.marquee--lg .logo-tile { width: clamp(160px, 17vw, 240px); }
.marquee--lg .marquee__row:nth-child(3) .marquee__track { animation-duration: 62s; }
.clients-panel .marquee { margin-top: clamp(8px, 2vw, 24px); }

/* ---------- Equipo: carrusel de personas ---------- */
.team .head-row { margin-bottom: clamp(32px, 4vw, 56px); }
.team__marquee .marquee__track { animation-duration: 42s; }
.team__marquee .marquee__group { gap: clamp(14px, 1.6vw, 22px); padding-right: clamp(14px, 1.6vw, 22px); }
.team-card {
  position: relative;
  flex: none;
  width: clamp(220px, 22vw, 300px);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--ink);
  border-radius: var(--r-lg);
}
.team-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
  transition: scale 900ms var(--ease-out);
}
.team-card:hover img { scale: 1.05; }
.team-card__mono {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgb(255 255 255 / 0.22);
  background: linear-gradient(160deg, #2C2C2A, #0E0E0D);
}
.team-card__info {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 56px 20px 20px;
  color: var(--white);
  background: linear-gradient(rgb(0 0 0 / 0), rgb(0 0 0 / 0.82));
}
.team-card__info strong { display: block; font-size: 1.125rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.02em; }
.team-card__info small { display: block; margin-top: 6px; font-size: 0.875rem; font-weight: 600; color: rgb(255 255 255 / 0.82); }
.team-card__info small::before {
  content: "";
  display: inline-block;
  width: 14px; height: 2px;
  margin-right: 8px;
  vertical-align: middle;
  background: var(--red);
}
.team__controls { display: flex; justify-content: flex-end; margin-top: 20px; }
.team .media-toggle { position: static; }

/* Herramientas alrededor de una imagen horizontal (hero de Servicios) */
.tools--wide { padding: clamp(40px, 5vw, 72px) 0; }
.tools--wide .tools__media { width: 86%; max-width: none; }
.tools--wide .tools__cloud li { left: auto; right: auto; top: auto; bottom: auto; }
.tools--wide .tools__cloud li:nth-child(1)  { left: -2%;  top: 2%; }
.tools--wide .tools__cloud li:nth-child(2)  { left: 22%;  top: -1%; }
.tools--wide .tools__cloud li:nth-child(3)  { right: 2%;  top: 1%; }
.tools--wide .tools__cloud li:nth-child(4)  { right: -3%; top: 24%; }
.tools--wide .tools__cloud li:nth-child(5)  { left: -4%;  top: 28%; }
.tools--wide .tools__cloud li:nth-child(6)  { right: -4%; top: 46%; }
.tools--wide .tools__cloud li:nth-child(7)  { left: -5%;  top: 54%; }
.tools--wide .tools__cloud li:nth-child(8)  { right: -2%; top: 68%; }
.tools--wide .tools__cloud li:nth-child(9)  { left: 0;    bottom: 4%; }
.tools--wide .tools__cloud li:nth-child(10) { left: 34%;  bottom: -1%; }
.tools--wide .tools__cloud li:nth-child(11) { right: 24%; bottom: 1%; }
.tools--wide .tools__cloud li:nth-child(12) { left: 47%;  top: 1%; }
@media (max-width: 860px) {
  .tools--wide { padding: 0; }
  .tools--wide .tools__media { width: 100%; }
}
