/* =========================================================
   AKLIA — estilos base
   Estructura inspirada en landonorris.com
   Lima → cian Aklia · Oliva oscuro → azul marino
   ========================================================= */

:root {
  --navy: #0a1b3f;
  --navy-2: #12295a;
  --ink: #050f26;
  --cyan: #38c6f4;
  --cyan-2: #8be0ff;
  --ice: #eef3f8;
  --mist: #d9e3ee;
  --text: #0a1b3f;
  --muted: #5b6b86;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Mona Sans", Arial, sans-serif;

  --gutter: clamp(16px, 3vw, 40px);
  --radius: 22px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--ice);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }

img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure, blockquote { margin: 0; }

.serif { font-family: var(--serif); font-weight: 400; text-transform: none; }
.sans { font-family: var(--sans); font-weight: 800; letter-spacing: -.02em; }
.accent { color: var(--cyan); }

.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--light { color: var(--cyan-2); }

/* ---------- Placeholders de imagen / vídeo ---------- */
.media {
  position: relative;
  width: 100%; height: 100%;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(56,198,244,.55), transparent 60%),
    linear-gradient(160deg, var(--navy-2), var(--ink));
}
.media::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 28px 28px;
}
.media::after {
  content: attr(data-id);
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  padding: 6px 10px; border-radius: 999px;
  font: 600 11px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  color: #fff; background: rgba(5,15,38,.55); border: 1px solid rgba(139,224,255,.35);
}
/* Cuando metas una <img> o <video> dentro, la etiqueta desaparece */
.media:has(img, video)::before, .media:has(img, video)::after { display: none; }
.media > img, .media > video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: 12px 18px; border-radius: 10px;
  font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  transition: transform .4s var(--ease), background .3s;
}
.btn--accent { background: var(--cyan); color: var(--ink); }
.btn--accent:hover { background: var(--cyan-2); transform: translateY(-2px); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--navy);
}
.preloader__mark { width: min(180px, 40vw); animation: pulse 1.6s var(--ease) infinite; }
.preloader__name {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  color: var(--cyan-2); font-size: 11px; font-weight: 700; letter-spacing: .3em;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.92); opacity: .7; } }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
  mix-blend-mode: normal;
  pointer-events: none;
}
.header > * { pointer-events: auto; }
.wordmark { display: flex; align-items: center; gap: 10px; color: var(--navy); transition: color .3s; }
.wordmark__mark { height: 40px; width: auto; }
.wordmark__mark--white { display: none; }
.wordmark__text { display: flex; flex-direction: column; line-height: .82; }
.wordmark__serif { font-family: var(--serif); font-size: 38px; line-height: .8; }
.wordmark__sans { margin-top: 6px; font-weight: 800; font-size: 9px; letter-spacing: .28em; }
.header.is-dark .wordmark { color: #fff; }
.header.is-dark .wordmark__mark--color { display: none; }
.header.is-dark .wordmark__mark--white { display: block; }

.header__actions { display: flex; gap: 10px; align-items: center; }
.menu-btn {
  width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--mist);
  background: #fff; cursor: pointer; display: grid; place-content: center; gap: 6px;
}
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--navy); transition: transform .4s var(--ease); }
.menu-btn[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; justify-content: center;
  /* Espacio arriba para el logo y abajo para las redes; si no cabe, se puede desplazar */
  padding: 130px var(--gutter) 90px; overflow-y: auto;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease);
}
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu__list { list-style: none; margin: 0; padding: 0; }
.menu__list a {
  display: inline-block; font-family: var(--serif); font-size: clamp(34px, min(12vw, 10vh), 120px); line-height: 1.04;
  transition: color .3s, transform .4s var(--ease);
}
.menu__list a:hover { color: var(--cyan); transform: translateX(12px); }
.menu__foot { position: absolute; bottom: 30px; display: flex; gap: 24px; font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Patrón de circuito ---------- */
.circuit {
  position: absolute; inset: 0; width: 100%; height: 100%;
  color: rgba(10,27,63,.08); pointer-events: none; z-index: 0;
}
.circuit--dark { color: rgba(139,224,255,.08); }

/* ---------- 1. HERO ---------- */
.hero {
  position: relative; min-height: 100svh; overflow: hidden;
  display: grid; place-items: center;
  padding: 90px var(--gutter) 40px;
}
.hero__title {
  position: absolute; top: 50%; left: 0; right: 0; transform: translateY(-58%);
  text-align: center; z-index: 1; pointer-events: none;
}
.hero__line--serif {
  display: block; font-family: var(--serif); font-weight: 400;
  font-size: clamp(90px, 22vw, 360px); line-height: .8; letter-spacing: -.03em;
  color: var(--navy);
}
.hero__visual {
  position: relative; z-index: 2;
  width: min(640px, 80vw); aspect-ratio: 1 / 1; max-height: 74svh;
}
.hero__visual canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.hero__visual canvas:active { cursor: grabbing; }
.hero__sub {
  position: relative; z-index: 3; margin-top: 24px;
  font-weight: 800; font-size: 13px; letter-spacing: .2em; text-transform: uppercase;
}
.badge {
  position: absolute; left: var(--gutter); bottom: 32px; z-index: 3;
  width: 110px; padding: 12px; border: 1px solid var(--mist); border-radius: 14px;
  background: rgba(255,255,255,.7); backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 6px;
}
.badge__label { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.badge__value { font-size: 22px; line-height: 1; font-weight: 900; }
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 0 var(--cyan); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(56,198,244,0); } 100% { box-shadow: 0 0 0 0 rgba(56,198,244,0); } }
.scroll-hint {
  position: absolute; right: var(--gutter); bottom: 32px; z-index: 3;
  font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; writing-mode: vertical-rl;
}

/* ---------- 2. MANIFIESTO ---------- */
.manifesto {
  position: relative; background: var(--ink); color: #fff; overflow: hidden;
  padding: 140px var(--gutter) 150px;
}
/* A. Frase que se "enciende" palabra por palabra (main.js baja la opacidad inicial) */
.manifesto__text {
  max-width: 17ch; margin: 28px 0 0;
  font-family: var(--serif); font-size: clamp(42px, 7vw, 116px); line-height: 1.04; letter-spacing: -.01em;
}
.manifesto__text em { color: var(--cyan); }
.manifesto__text .w { display: inline-block; }

.marquee { overflow: hidden; white-space: nowrap; }
.marquee__track { display: inline-flex; animation: marquee 30s linear infinite; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- 3. NOSOTROS (collage) ---------- */
.story {
  position: relative; padding: 140px var(--gutter) 120px;
  overflow: hidden;
}
.story__intro { position: relative; z-index: 2; max-width: 760px; margin: 0 auto 0; text-align: center; }
.story__title {
  margin-top: 16px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(32px, 4.2vw, 62px); line-height: 1.05;
}
.story__title em { color: var(--cyan); }

/* Los sitios reales, lado a lado */
.sites {
  position: relative; z-index: 1; max-width: 1240px; margin: clamp(40px, 5vw, 70px) auto 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
}
.site { display: grid; gap: 16px; }
/* Escenario con navegador y celular. Medidas en cqw = % del ancho de la tarjeta */
.site__stage {
  container-type: inline-size; position: relative; overflow: hidden; aspect-ratio: 16 / 11;
  border-radius: var(--radius);
  background: radial-gradient(90% 70% at 30% 0%, rgba(56,198,244,.3), transparent 65%), linear-gradient(160deg, var(--navy-2), var(--ink));
  box-shadow: 0 30px 60px -34px rgba(10,27,63,.55);
  transition: transform .6s var(--ease), box-shadow .6s var(--ease);
}
.site:hover .site__stage { transform: translateY(-6px); box-shadow: 0 40px 70px -30px rgba(10,27,63,.6); }
.site__browser {
  position: absolute; left: 6cqw; top: 7cqw; width: 76cqw; overflow: hidden;
  border-radius: 2cqw; background: #fff; box-shadow: 0 3cqw 8cqw -2cqw rgba(0,0,0,.6);
  transition: transform .8s var(--ease);
}
.site__bar { display: flex; align-items: center; gap: .9cqw; height: 4.4cqw; padding: 0 1.8cqw; background: #e9eef4; }
.site__bar i { width: 1.2cqw; height: 1.2cqw; border-radius: 50%; background: #c5cfdb; }
.site__bar i:first-child { background: #ff6b5f; }
.site__bar i:nth-child(2) { background: #ffbe3d; }
.site__bar i:nth-child(3) { background: #3fcf5c; }
.site__bar span { flex: 1; margin-left: 2cqw; padding: .5cqw 2cqw; border-radius: 9cqw; background: #fff; font-size: 1.7cqw; color: var(--muted); text-align: center; }
.site__browser .site__shot { aspect-ratio: 16 / 10; }
.site__phone {
  position: absolute; right: 5cqw; bottom: 5cqw; width: 18cqw; aspect-ratio: 9 / 19; padding: .9cqw;
  border-radius: 3.6cqw; background: #050b1c;
  box-shadow: 0 0 0 1px rgba(139,224,255,.3), 0 4cqw 8cqw -2cqw rgba(0,0,0,.7);
  transition: transform .8s var(--ease);
}
.site__phone .site__shot { height: 100%; border-radius: 2.8cqw; }
/* La captura completa hace scroll al pasar el mouse (y regresa rápido al salir) */
.site__shot {
  background-color: #fff; background-size: 100% auto; background-repeat: no-repeat; background-position: 50% 0%;
  transition: background-position 1.2s var(--ease);
}
.site:hover .site__shot { background-position: 50% 100%; transition: background-position 9s ease-in-out; }
.site:hover .site__browser { transform: translateY(-1.5cqw); }
.site:hover .site__phone { transform: translateY(-3cqw) rotate(-2deg); }

.site__info { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; padding: 0 4px; }
.site__info h3 { margin: 4px 0 0; font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.6vw, 40px); line-height: 1; }
.site__info p { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan); }
.site__tags { list-style: none; margin: 0; padding: 0 4px; display: flex; flex-wrap: wrap; gap: 8px; }
.site__tags li { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--mist); background: #fff; font-size: 13px; font-weight: 600; color: var(--muted); }
.site__btn { flex: none; font-size: 14px; font-weight: 800; color: var(--navy); border-bottom: 2px solid var(--cyan); padding-bottom: 2px; transition: color .3s; }
.site:hover .site__btn { color: var(--cyan); }

.stats {
  position: relative; z-index: 1; max-width: 1240px; margin: clamp(40px, 5vw, 64px) auto 0;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 16px clamp(40px, 8vw, 120px);
}
.stat { display: flex; align-items: center; gap: 14px; }
.stat strong { font-size: clamp(40px, 4.4vw, 70px); line-height: .9; font-weight: 900; letter-spacing: -.04em; color: var(--navy); }
.stat span { max-width: 14ch; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }

/* ---------- 3b. APPS (scroll horizontal) ---------- */
.apps { background: var(--ink); color: #fff; overflow: hidden; }
.apps__pin {
  min-height: 100svh; display: flex; align-items: center; gap: 6vw;
  padding: 100px var(--gutter);
}
.apps__intro {
  flex: 0 0 min(420px, 34vw); position: relative; z-index: 2; align-self: stretch;
  display: flex; flex-direction: column; justify-content: center;
  /* Fondo que tapa las tarjetas cuando pasan por detrás del texto */
}
.apps__intro::before {
  content: ""; position: absolute; z-index: -1;
  top: -100px; bottom: -100px; left: calc(var(--gutter) * -1); right: -2vw;
  background: var(--ink);
}
.apps__intro h2 { margin-top: 18px; line-height: .95; }
.apps__intro .serif { display: block; font-size: clamp(34px, 3.6vw, 58px); color: var(--cyan-2); }
.apps__intro .sans { display: block; margin-top: 10px; font-size: clamp(30px, 3.2vw, 52px); }
.apps__track { display: flex; gap: 22px; will-change: transform; }
.app-card {
  position: relative; flex: 0 0 clamp(260px, 26vw, 380px);
  display: flex; flex-direction: column; gap: 10px;
}
.app-card .media { aspect-ratio: 4 / 5; height: auto; border-radius: var(--radius); }
.app-card__num { position: absolute; top: 16px; left: 18px; font-size: 13px; font-weight: 800; color: var(--cyan); }
.app-card h3 { margin-top: 8px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.app-card p { color: var(--mist); max-width: 32ch; }
.app-card__num { z-index: 3; }

/* Pantallas de las apps (hechas en código). Medidas en cqw = % del ancho de la tarjeta */
.app-stage {
  container-type: inline-size; position: relative; overflow: hidden;
  aspect-ratio: 4 / 5; border-radius: var(--radius);
  background:
    radial-gradient(110% 70% at 50% 0%, rgba(56,198,244,.26), transparent 62%),
    linear-gradient(165deg, var(--navy-2), var(--ink) 78%);
  border: 1px solid rgba(139,224,255,.18);
}
.device {
  position: absolute; left: 50%; top: 9cqw; translate: -50% 0;
  width: 56cqw; height: 108cqw; padding: 1.6cqw;
  border-radius: 8cqw; background: #050b1c;
  box-shadow: 0 0 0 .5cqw rgba(139,224,255,.22), 0 6cqw 12cqw -4cqw rgba(0,0,0,.65);
}
.device::before {
  content: ""; position: absolute; z-index: 2; top: 3cqw; left: 50%; translate: -50% 0;
  width: 13cqw; height: 3.2cqw; border-radius: 9cqw; background: #050b1c;
}
.scr {
  height: 100%; overflow: hidden; border-radius: 6.6cqw;
  display: flex; flex-direction: column; gap: 2cqw;
  padding: 7.5cqw 3.6cqw 3.6cqw;
  background: #f4f7fb; color: var(--navy); font-size: 3cqw; line-height: 1.25;
}
.scr small { display: block; font-size: 2.5cqw; color: var(--muted); }
.scr b { font-weight: 800; }
.scr__title { font-family: var(--serif); font-weight: 400 !important; font-size: 5.6cqw; line-height: 1; }
.scr__row { display: flex; justify-content: space-between; align-items: center; }
.scr .mini-btn { margin-top: auto; padding: 2.2cqw; border-radius: 2.6cqw; font-size: 2.9cqw; }

.float-note {
  position: absolute; z-index: 2; display: flex; flex-direction: column; gap: .6cqw;
  padding: 2.8cqw 3.6cqw; border-radius: 3.6cqw;
  background: #fff; color: var(--navy); font-size: 3.3cqw; line-height: 1.25;
  box-shadow: 0 4cqw 10cqw -3cqw rgba(0,0,0,.6);
}
.float-note b { font-weight: 800; }
.float-note span { font-size: 2.8cqw; color: var(--muted); }
.float-note--ok { background: #d8f7e9; }
.float-note--warn { background: #fff4d6; }
.float-note--dark { background: var(--navy); color: #fff; border: 1px solid rgba(139,224,255,.35); }
.float-note--dark span { color: var(--cyan-2); }
.app-stage--1 .float-note { right: 4cqw; top: 76cqw; }
.app-stage--2 .float-note { left: 4cqw; bottom: 25cqw; }
.app-stage--3 .float-note--ticket { right: 5cqw; top: 8cqw; }
.app-stage--3 .float-note--warn { left: 5cqw; bottom: 8cqw; }
.app-stage--4 .float-note { left: 50%; translate: -50% 0; bottom: 4cqw; white-space: nowrap; }

/* 1. Reservas */
.cal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2cqw; }
.cal span { display: flex; flex-direction: column; align-items: center; padding: 1.4cqw 0; border-radius: 2.2cqw; background: #fff; font-size: 2.3cqw; color: var(--muted); }
.cal b { font-size: 3.8cqw; color: var(--navy); }
.cal .is-on { background: var(--navy); color: var(--cyan-2); }
.cal .is-on b { color: #fff; }
.people { display: flex; align-items: center; justify-content: space-between; padding: 1.4cqw 2.2cqw; background: #fff; border-radius: 2.6cqw; }
.people__ctrl { display: flex; align-items: center; gap: 2.4cqw; }
.people i { font-style: normal; width: 5.2cqw; height: 5.2cqw; display: grid; place-items: center; border-radius: 50%; background: var(--ice); font-weight: 800; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqw; }
.slots span { text-align: center; padding: 1.6cqw 0; border-radius: 2.2cqw; background: #fff; border: 1px solid var(--mist); font-size: 2.7cqw; font-weight: 700; }
.slots .is-off { color: #b6c2d3; background: transparent; text-decoration: line-through; }
.slots .is-on, .opts .is-on { background: var(--cyan); border-color: var(--cyan); color: var(--ink); animation: glow 2.4s ease-in-out infinite; }

/* 2. Pedidos / menú QR */
.qr {
  width: 9cqw; height: 9cqw; border-radius: 1.4cqw; border: .8cqw solid #fff; outline: 1px solid var(--mist);
  background: repeating-conic-gradient(var(--navy) 0 25%, #fff 0 50%) 0 0 / 2.5cqw 2.5cqw;
}
.tabs { display: flex; gap: 1.4cqw; }
.tabs span { padding: 1.2cqw 2.6cqw; border-radius: 9cqw; background: #fff; font-size: 2.6cqw; font-weight: 700; color: var(--muted); }
.tabs .is-on { background: var(--navy); color: #fff; }
.dish { display: flex; align-items: center; gap: 2cqw; padding: 1.6cqw; background: #fff; border-radius: 2.8cqw; }
.dish > div { flex: 1; min-width: 0; }
.dish em { font-style: normal; font-weight: 800; }
.dish__img { flex: none; width: 9cqw; height: 9cqw; border-radius: 2.2cqw; background: radial-gradient(circle at 40% 35%, #e9d3b4, #9a6a43); }
.dish__img--2 { background: radial-gradient(circle at 40% 35%, #f3e6d3, #7b4e2e); }
.dish__img--3 { background: radial-gradient(circle at 40% 35%, #f6cf86, #c07a2c); }
.dish__img--4 { background: radial-gradient(circle at 40% 35%, #9fd36a, #3f7d2c); }
.add { flex: none; width: 5.6cqw; height: 5.6cqw; display: grid; place-items: center; border-radius: 50%; background: var(--ice); font-weight: 800; }
.add.is-on { background: var(--cyan); color: var(--ink); }
.cart { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding: 2.4cqw 3cqw; border-radius: 2.8cqw; background: var(--navy); color: #fff; font-size: 2.9cqw; }
.cart b { color: var(--cyan-2); }

/* 3. Inventario y punto de venta (tablet) */
.device--tablet { top: 25cqw; width: 88cqw; height: 64cqw; border-radius: 5cqw; }
.device--tablet::before { display: none; }
.scr--pos { flex-direction: row; gap: 3cqw; padding: 3.6cqw; border-radius: 3.6cqw; font-size: 2.6cqw; }
.inv { flex: 1.3; display: flex; flex-direction: column; gap: .4cqw; }
.inv .scr__title { margin-bottom: 1.4cqw; }
.stock { display: grid; grid-template-columns: 1.1fr 1fr auto; align-items: center; gap: 1.6cqw; padding: 1.5cqw 0; border-bottom: 1px solid #e2e9f1; }
.stock i { height: 1.5cqw; border-radius: 9cqw; background: linear-gradient(90deg, var(--cyan) var(--w), #e2e9f1 0); }
.stock--low i { background: linear-gradient(90deg, #e5484d var(--w), #e2e9f1 0); }
.stock--low b { color: #e5484d; }
.sale { flex: 1; display: flex; flex-direction: column; gap: 1cqw; padding: 3cqw; border-radius: 3cqw; background: var(--navy); color: #fff; }
.sale small { color: var(--cyan-2); }
.sale__total { font-size: 7.4cqw; line-height: 1; letter-spacing: -.03em; }
.sale__up { font-size: 2.5cqw; font-weight: 700; color: #4fe0a3; }
.sale .mini-btn { background: var(--cyan); color: var(--ink); }

/* 4. Cotizador */
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4cqw; }
.opts--2 { grid-template-columns: repeat(2, 1fr); }
.opts span { text-align: center; padding: 1.6cqw 0; border-radius: 2.2cqw; background: #fff; border: 1px solid var(--mist); font-size: 2.7cqw; font-weight: 700; }
.toggle { position: relative; width: 8cqw !important; height: 4.6cqw !important; border-radius: 9cqw !important; background: #1aa36b !important; }
.toggle::after { content: ""; position: absolute; top: .6cqw; right: .6cqw; width: 3.4cqw; height: 3.4cqw; border-radius: 50%; background: #fff; }
.price { padding: 2.4cqw 3cqw; border-radius: 2.8cqw; background: var(--navy); color: #fff; }
.price small { color: var(--cyan-2); }
.price b { display: block; font-size: 7cqw; line-height: 1.05; letter-spacing: -.02em; }

/* 5. Lo que tu negocio necesite */
.idea__core, .idea__ring { position: absolute; left: 50%; top: 50%; translate: -50% -50%; border-radius: 50%; }
.idea__core {
  width: 26cqw; height: 26cqw; display: grid; place-items: center;
  background: var(--cyan); color: var(--ink); font-size: 16cqw; font-weight: 300; line-height: 1;
  box-shadow: 0 0 0 4cqw rgba(56,198,244,.12), 0 0 14cqw rgba(56,198,244,.45);
}
.idea__ring { width: 58cqw; height: 58cqw; border: 1px dashed rgba(139,224,255,.4); animation: spin 30s linear infinite; }
.idea {
  position: absolute; white-space: nowrap; padding: 2cqw 3.6cqw; border-radius: 9cqw;
  background: rgba(255,255,255,.08); border: 1px solid rgba(139,224,255,.3); color: #fff;
  font-size: 3.4cqw; font-weight: 700; animation: drift 5s ease-in-out infinite;
}
.idea--a { left: 6cqw; top: 14cqw; }
.idea--b { right: 6cqw; top: 30cqw; animation-delay: -1.2s; }
.idea--c { left: 5cqw; top: 80cqw; animation-delay: -2.4s; }
.idea--d { right: 5cqw; top: 93cqw; animation-delay: -3.6s; }
.idea--you { left: 50%; translate: -50% 0; bottom: 4cqw; background: var(--cyan); color: var(--ink); border-color: var(--cyan); animation-delay: -.6s; }

.app-stage .pop { animation: pop 7s var(--ease) infinite both; animation-delay: var(--d, 0s); }
@keyframes glow { 50% { box-shadow: 0 0 0 1.2cqw rgba(56,198,244,.25); } }
@keyframes drift { 50% { transform: translateY(-1.8cqw); } }
@keyframes spin { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) { .app-stage * { animation: none !important; } }

/* ---------- 4. SERVICIOS ---------- */
.services {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter);
  padding: 40px var(--gutter) 120px;
}
.service {
  position: relative; min-height: 78vh; border-radius: var(--radius); overflow: hidden;
  background: var(--navy); color: #fff; padding: 32px;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 14px;
  isolation: isolate;
}
.service__media { position: absolute; inset: 0; z-index: -1; transform: scale(1.08); transition: transform 1.2s var(--ease); }
.service__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 30%, rgba(5,15,38,.85)); }
.service:hover .service__media { transform: scale(1); }
.service__title { display: flex; flex-direction: column; line-height: .85; }
.service__title .serif { font-size: clamp(44px, 5.4vw, 88px); }
.service__title .sans  { font-size: clamp(64px, 8vw, 132px); color: var(--cyan); }
.service p { max-width: 380px; color: var(--mist); }
.service__arrow {
  position: absolute; top: 28px; right: 28px; width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center; background: var(--cyan); color: var(--ink); font-size: 22px;
  transform: rotate(-45deg); transition: transform .5s var(--ease);
}
.service:hover .service__arrow { transform: rotate(0); }

/* "Videos" de las tarjetas, hechos en código. cqw/cqh = % del ancho/alto de la tarjeta */
.svc {
  container-type: size;
  background: radial-gradient(90% 60% at 50% 18%, rgba(56,198,244,.28), transparent 70%), linear-gradient(170deg, var(--navy-2), var(--ink));
}
.svc-scroll {
  position: absolute; inset: 0; background-size: 100% auto; background-repeat: no-repeat;
  animation: svc-show 18s linear infinite, svc-scroll 18s ease-in-out infinite;
}
/* La segunda web va medio ciclo atrás: cuando una se ve, la otra espera oculta */
.svc-scroll--b { animation-delay: -9s; }
@keyframes svc-show { 0%, 47% { opacity: 1; } 50%, 97% { opacity: 0; } 100% { opacity: 1; } }
@keyframes svc-scroll {
  0%, 6% { background-position: 50% 0%; }
  46%, 50% { background-position: 50% 100%; }
  53%, 100% { background-position: 50% 0%; }
}

.svc-laptop { position: absolute; left: 50%; top: 7cqh; translate: -56% 0; width: min(72cqw, 90cqh); }
.svc-laptop__screen {
  position: relative; overflow: hidden; aspect-ratio: 16 / 10;
  border: 1.2cqw solid #050b1c; border-bottom-width: 2cqw; border-radius: 2cqw 2cqw 0 0; background: #fff;
  box-shadow: 0 0 0 1px rgba(139,224,255,.25);
}
.svc-laptop__base {
  height: 2.2cqw; margin: 0 -7%; border-radius: 0 0 3cqw 3cqw;
  background: linear-gradient(#2a3a5c, #0b1530); box-shadow: 0 3cqw 6cqw -2cqw rgba(0,0,0,.7);
}
.svc-phone {
  position: absolute; right: 7cqw; top: 18cqh; width: min(19cqw, 25cqh); aspect-ratio: 9 / 19;
  padding: 1cqw; border-radius: 4cqw; background: #050b1c;
  box-shadow: 0 0 0 1px rgba(139,224,255,.3), 0 4cqw 8cqw -2cqw rgba(0,0,0,.7);
}
.svc-phone__screen { position: relative; height: 100%; overflow: hidden; border-radius: 3.2cqw; background: #fff; }

/* Celular que pasa por varias apps (reutiliza .device y .scr de la sección Apps) */
.svc-apps {
  container-type: inline-size; position: absolute; left: 50%; top: 4cqh; translate: -50% 0;
  height: 58cqh; aspect-ratio: 4 / 5;
}
.svc-apps__scr { position: absolute; inset: 1.6cqw; height: auto; opacity: 0; animation: svc-app 13.5s linear infinite; }
/* Pantallas: hijos 1-3 del .device · Avisos: hijos 2-4 de .svc-apps (el 1 es el .device) */
.svc-apps__scr:nth-child(2), .svc-apps__note:nth-child(3) { animation-delay: -9s; }
.svc-apps__scr:nth-child(3), .svc-apps__note:nth-child(4) { animation-delay: -4.5s; }
.svc-apps__note { opacity: 0; animation: svc-note 13.5s var(--ease) infinite; white-space: nowrap; left: -24cqw; top: 62cqw; }
.svc-apps__note:nth-child(3) { left: auto; right: -24cqw; top: 30cqw; }
@keyframes svc-app { 0% { opacity: 0; } 3%, 31% { opacity: 1; } 34%, 100% { opacity: 0; } }
@keyframes svc-note {
  0%, 12% { opacity: 0; transform: translateY(3cqw) scale(.95); }
  16%, 30% { opacity: 1; transform: none; }
  34%, 100% { opacity: 0; transform: translateY(-2cqw); }
}
@media (prefers-reduced-motion: reduce) {
  .svc * { animation: none !important; }
  .svc-scroll--b { opacity: 0; }
  .svc-apps__scr:first-child { opacity: 1; }
}

/* ---------- 5. PROYECTOS ---------- */
.projects { background: var(--ink); color: #fff; padding: 120px var(--gutter); }
.projects__head { text-align: center; max-width: 620px; margin: 0 auto 64px; }
.projects__head h2 { display: flex; flex-direction: column; line-height: .9; margin-bottom: 20px; }
.projects__head .serif { font-size: clamp(48px, 7vw, 110px); }
.projects__head .sans  { font-size: clamp(40px, 6vw, 92px); color: var(--cyan); }
.projects__head p { color: var(--mist); }
.projects__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.projects__grid .card:nth-child(4n+2), .projects__grid .card:nth-child(4n+4) { margin-top: 60px; margin-bottom: -60px; }
.card {
  position: relative; aspect-ratio: 3 / 4;
  border: 1px solid rgba(139,224,255,.15);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 60% 100%, 54% 94%, 0 94%);
  background: #08163a;
  transition: border-color .4s;
}
.card .media { height: 94%; transition: transform .8s var(--ease); }
.card:hover .media { transform: scale(1.05); }
.card footer {
  position: absolute; right: 12px; bottom: 6px; display: flex; gap: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.card footer b { color: var(--cyan); }
.projects__more { margin-top: 120px; text-align: center; display: grid; justify-items: center; gap: 18px; color: var(--mist); }

/* ---------- 6. PLANES ---------- */
.plans {
  position: relative; display: grid; grid-template-columns: 1fr 1.1fr; gap: var(--gutter); align-items: center;
  padding: 140px var(--gutter); overflow: hidden;
}
.plans__text { position: relative; z-index: 1; max-width: 480px; display: grid; gap: 22px; justify-items: start; }
.plans__text h2 { display: flex; flex-direction: column; line-height: .85; }
.plans__text .sans  { font-size: clamp(56px, 7vw, 110px); }
.plans__text .serif { font-size: clamp(56px, 7vw, 110px); color: var(--cyan); font-style: italic; }
.plans__text p:not(.eyebrow) { color: var(--muted); }
.plans__media { position: relative; z-index: 1; aspect-ratio: 5 / 4; }
.plans__media > .media { border-radius: var(--radius); }
.plans__tag {
  position: absolute !important; top: -40px; right: -10px; width: 34% !important; height: auto !important; aspect-ratio: 1;
  border-radius: 14px; transform: rotate(6deg); box-shadow: 0 20px 40px -10px rgba(10,27,63,.45);
}

/* ---------- 7. PARTNERS ---------- */
.partners { padding: 40px 0 120px; }
.partners__head { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); align-items: end; padding: 0 var(--gutter) 50px; }
.partners__head h2 { display: flex; flex-direction: column; line-height: .85; }
.partners__head .sans  { font-size: clamp(44px, 6vw, 96px); }
.partners__head .serif { font-size: clamp(44px, 6vw, 96px); color: var(--cyan); }
.partners__head p { color: var(--muted); max-width: 420px; justify-self: end; }
.marquee--logos { border-block: 1px solid var(--mist); padding: 28px 0; }
.marquee--logos span, .marquee--footer span {
  padding: 0 40px; font-size: clamp(22px, 2.4vw, 34px); font-weight: 800; letter-spacing: -.02em; color: var(--navy); opacity: .75;
}
.marquee--logos .marquee__track { animation-duration: 40s; }

/* ---------- 8. AUTOMATIZACIONES (abanico) ---------- */
.automations { padding: 60px var(--gutter) 140px; text-align: center; overflow: hidden; }
.automations h2 { display: flex; flex-direction: column; line-height: .85; margin-bottom: 50px; }
.automations h2 .sans  { font-size: clamp(28px, 5.6vw, 92px); }
.automations h2 .serif { font-size: clamp(40px, 5.4vw, 88px); color: var(--cyan); }
.automations__cta { margin: 40px 0 18px; font-family: var(--serif); font-size: clamp(22px, 2.2vw, 30px); }

.fan { position: relative; height: clamp(420px, 40vw, 560px); max-width: 1300px; margin: 0 auto; }
.fan__card {
  position: absolute; left: 50%; top: 50%;
  width: clamp(190px, 15.5vw, 250px); aspect-ratio: 9 / 15;
  border-radius: 22px;
  box-shadow: 0 24px 50px -18px rgba(10,27,63,.55);
  transition: transform .8s var(--ease);
  --i: 0; --abs: 0; --lift: 0%;
  transform: translate(-50%, -50%) translateX(calc(var(--i) * 26%)) rotate(calc(var(--i) * 4deg)) translateY(calc(var(--abs) * 5% + var(--lift)));
}
.fan:hover .fan__card, .fan.is-open .fan__card {
  transform: translate(-50%, -50%) translateX(calc(var(--i) * 88%)) rotate(calc(var(--i) * 4deg)) translateY(calc(var(--abs) * 7% + var(--lift)));
}
.fan__card:hover { --lift: -6%; z-index: 10 !important; }
.fan__card:nth-child(1) { --i: -3; --abs: 3; z-index: 1; }
.fan__card:nth-child(2) { --i: -2; --abs: 2; z-index: 2; }
.fan__card:nth-child(3) { --i: -1; --abs: 1; z-index: 3; }
.fan__card:nth-child(4) { --i: 0;  --abs: 0; z-index: 4; }
.fan__card:nth-child(5) { --i: 1;  --abs: 1; z-index: 3; }
.fan__card:nth-child(6) { --i: 2;  --abs: 2; z-index: 2; }
.fan__card:nth-child(7) { --i: 3;  --abs: 3; z-index: 1; }

/* Tarjeta: todas las medidas en cqw para que escale con su ancho */
.auto {
  container-type: inline-size;
  /* padding y gap en px: en la propia tarjeta "cqw" se mediría contra la pantalla */
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; text-align: left; color: #fff;
  background: linear-gradient(165deg, var(--navy-2), var(--ink));
  border: 1px solid rgba(139,224,255,.18);
}
.auto--featured { background: linear-gradient(165deg, #0f3a78, var(--ink)); border-color: rgba(56,198,244,.5); }
.auto__head { display: flex; align-items: center; gap: 3cqw; font-size: 5.6cqw; line-height: 1.1; }
.auto__num { flex: none; font-size: 4.2cqw; font-weight: 800; color: var(--ink); background: var(--cyan); border-radius: 99px; padding: 1cqw 2.6cqw; }
.auto__desc { font-size: 4.4cqw; line-height: 1.35; color: var(--mist); }
.auto__screen {
  flex: 1; min-height: 0; overflow: hidden;
  display: flex; flex-direction: column; gap: 2.6cqw;
  padding: 4.5cqw; border-radius: 6cqw;
  background: #f4f7fb; color: var(--navy); font-size: 4.3cqw; line-height: 1.3;
}
.auto__screen small { display: block; font-size: 3.5cqw; color: var(--muted); }
.auto__screen b { font-weight: 800; }

/* 1. Chat */
.auto__screen--chat { background: #e8eef3; }
.chat__bar { display: flex; align-items: center; gap: 2.5cqw; padding-bottom: 2.5cqw; border-bottom: 1px solid #d3dde7; }
.chat__avatar { width: 9cqw; height: 9cqw; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 3.4cqw; font-weight: 800; }
.chat__bar small { color: #1aa36b; }
.bubble { max-width: 84%; padding: 2.2cqw 3.2cqw; border-radius: 3.5cqw; font-size: 3.9cqw; }
.bubble--in { align-self: flex-start; background: #fff; border-bottom-left-radius: 1cqw; }
.bubble--out { align-self: flex-end; background: #c9f0ff; border-bottom-right-radius: 1cqw; }

/* 2. Pantalla de bloqueo */
.auto__screen--lock { background: linear-gradient(170deg, #1b3b72, #0a1b3f); color: #fff; text-align: center; }
.lock__time { font-size: 15cqw; font-weight: 300; line-height: 1; margin-top: 2cqw; }
.lock__date { font-size: 3.8cqw; opacity: .8; margin-bottom: 2cqw; }
.notif { text-align: left; padding: 3cqw; border-radius: 4cqw; background: rgba(255,255,255,.92); color: var(--navy); display: flex; flex-direction: column; gap: .6cqw; }
.notif span { font-size: 3.7cqw; color: var(--muted); }
.notif--ok { background: #d8f7e9; }

/* 3. Carrito */
.mail__title { font-size: 6.5cqw; font-family: var(--serif); font-weight: 400 !important; }
.product { display: flex; align-items: center; gap: 3cqw; padding: 2.5cqw; background: #fff; border-radius: 3.5cqw; }
.product__img { flex: none; width: 13cqw; height: 13cqw; border-radius: 2.5cqw; background: radial-gradient(circle at 40% 35%, #4a3a33, #1e1714); }
.coupon { align-self: flex-start; padding: 1.6cqw 3cqw; border: 1px dashed #b4532a; border-radius: 2cqw; color: #b4532a; font-weight: 700; font-size: 3.6cqw; }
.mini-btn { align-self: stretch; text-align: center; padding: 2.6cqw; border-radius: 3cqw; background: var(--navy); color: #fff; font-weight: 700; font-size: 3.8cqw; }

/* 4. Reporte */
.report__total { font-size: 11cqw; line-height: 1; letter-spacing: -.03em; }
.report__up { font-size: 3.8cqw; color: #1aa36b; font-weight: 700; }
.bars { flex: 1; display: flex; align-items: flex-end; gap: 2cqw; min-height: 14cqw; }
.bars i { flex: 1; height: var(--h); border-radius: 1.4cqw 1.4cqw 0 0; background: linear-gradient(var(--cyan), #1f7fc4); transform-origin: bottom; }
.report__row { display: flex; justify-content: space-between; font-size: 3.6cqw; color: var(--muted); }
.report__row b { color: var(--navy); }

/* 5. Reseñas */
.rating { margin-top: auto; text-align: center; padding: 3cqw; background: #fff; border-radius: 4cqw; }
.rating > b { display: block; font-size: 11cqw; line-height: 1; }
.stars { display: block; color: #f5b301; font-size: 6cqw; letter-spacing: .1em; }

/* 6. Factura */
.invoice__top { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 2.5cqw; border-bottom: 2px solid var(--navy); }
.invoice__line { display: flex; justify-content: space-between; font-size: 3.9cqw; padding-bottom: 2cqw; border-bottom: 1px dashed #c9d4e0; }
.invoice__line--total { border: 0; font-size: 4.6cqw; }
.stamp { margin-top: auto; align-self: center; padding: 2cqw 4cqw; border: 2px solid #1aa36b; border-radius: 2cqw; color: #1aa36b; font-weight: 800; font-size: 3.9cqw; rotate: -4deg; }

/* 7. Dashboard */
.auto__screen--dash { background: #0d2350; color: #fff; }
.auto__screen--dash small { color: var(--cyan-2); }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5cqw; }
.kpis span { padding: 2.6cqw; border-radius: 3cqw; background: rgba(255,255,255,.07); }
.kpis b { display: block; font-size: 7cqw; line-height: 1.1; }
.kpis em { font-style: normal; font-size: 3.4cqw; color: #4fe0a3; }
.dash__chart { flex: 1; width: 100%; min-height: 16cqw; }
.dash__area { fill: rgba(56,198,244,.18); }
.dash__line { fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-dasharray: 100; }
.dash__legend { display: flex; justify-content: space-between; font-size: 3.2cqw; color: var(--cyan-2); }

/* Animaciones: arrancan cuando el abanico entra en pantalla (clase .is-in desde main.js) */
.fan.is-in .pop { animation: pop 7s var(--ease) infinite both; animation-delay: var(--d, 0s); }
.fan.is-in .bars i { animation: grow 1.1s var(--ease) both; animation-delay: var(--d); }
.fan.is-in .dash__line { animation: draw 2.2s var(--ease) .3s both; }
@keyframes pop {
  0% { opacity: 0; transform: translateY(10px) scale(.96); }
  7%, 86% { opacity: 1; transform: none; }
  94%, 100% { opacity: 0; transform: translateY(-4px); }
}
@keyframes grow { from { transform: scaleY(0); } }
@keyframes draw { from { stroke-dashoffset: 100; } }

/* ---------- 9. FOOTER ---------- */
.footer { padding: 0 var(--gutter) 18px; }
.footer__card {
  position: relative; overflow: hidden;
  min-height: 92vh; border-radius: 40px; background: var(--navy); color: #fff;
  display: grid; grid-template-columns: 1fr 1.4fr 1fr; grid-template-rows: auto 1fr auto auto;
  padding: 70px 40px 0; gap: 20px;
}
.footer__title {
  grid-column: 1 / -1; text-align: center; position: relative; z-index: 2;
  font-size: clamp(44px, 6.6vw, 110px); line-height: .9; font-weight: 400;
}
.footer__title .serif { color: var(--cyan-2); }
.footer__visual {
  grid-column: 2; grid-row: 2 / 4; align-self: end; position: relative; z-index: 1;
  justify-self: center; width: 100%; max-width: 360px; padding-bottom: 90px;
}
.footer__logo { width: 100%; height: auto; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
.footer__col { grid-row: 2; align-self: center; display: flex; flex-direction: column; gap: 4px; position: relative; z-index: 2; }
.footer__col--left { grid-column: 1; text-align: center; }
.footer__col--right { grid-column: 3; text-align: center; }
.footer__col a { font-weight: 800; font-size: 20px; text-transform: uppercase; letter-spacing: -.01em; transition: color .3s; }
.footer__col a:hover { color: var(--cyan); }
.footer__label { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--cyan-2); margin-bottom: 8px; }
.footer__cta { grid-column: 2; grid-row: 3; justify-self: center; align-self: end; margin-bottom: 20px; position: relative; z-index: 3; }
.marquee--footer { grid-column: 1 / -1; grid-row: 4; margin: 0 -40px; padding: 22px 0; border-top: 1px solid rgba(139,224,255,.15); position: relative; z-index: 3; background: var(--navy); }
.marquee--footer span { color: #fff; opacity: .6; font-size: 20px; }
.footer__legal { display: flex; justify-content: space-between; padding: 14px 6px 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.footer__legal a { margin-left: 18px; }

/* ---------- 8b. CONTACTO ---------- */
.contact {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(32px, 6vw, 90px); align-items: start;
  padding: 120px var(--gutter) 140px;
}
.contact > :not(.circuit) { position: relative; z-index: 1; }
.contact__intro { display: grid; gap: 20px; max-width: 460px; }
.contact__intro h1 { margin: 0; display: flex; flex-direction: column; line-height: .88; font-weight: inherit; }
.contact-page .contact { min-height: 100svh; padding-top: 140px; }
.contact__intro .sans  { font-size: clamp(36px, 4.2vw, 68px); }
.contact__intro .serif { font-size: clamp(44px, 5.4vw, 88px); color: var(--cyan); }
.contact__intro p:not(.eyebrow) { color: var(--muted); font-size: 17px; }
.contact__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-weight: 600; }
.contact__mail { margin-top: 22px; color: var(--muted); }
.contact__mail a { color: var(--navy); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.contact__perks li::before { content: "✓"; display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 10px; border-radius: 50%; background: var(--cyan); color: var(--ink); font-size: 12px; font-weight: 900; }

.contact__form {
  display: grid; gap: 18px; padding: clamp(22px, 3vw, 40px);
  background: #fff; border: 1px solid var(--mist); border-radius: var(--radius);
  box-shadow: 0 30px 60px -30px rgba(10,27,63,.25);
}
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field label, .field legend { padding: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); }
.field input, .field textarea {
  width: 100%; padding: 14px 16px; border: 1.5px solid var(--mist); border-radius: 12px;
  font: inherit; color: var(--text); background: var(--ice);
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cyan); background: #fff; box-shadow: 0 0 0 4px rgba(56,198,244,.18); }
.field .is-invalid, .field input.is-invalid, .field textarea.is-invalid { border-color: #e0475b; }
.field--chips { display: flex; flex-wrap: wrap; gap: 8px; }
.field--chips legend { width: 100%; margin-bottom: 8px; }
.field .chip { position: relative; cursor: pointer; text-transform: none; letter-spacing: 0; font-size: inherit; font-weight: 600; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-block; padding: 9px 14px; border: 1.5px solid var(--mist); border-radius: 999px;
  font-size: 14px; font-weight: 600; transition: background .2s, border-color .2s, color .2s;
}
.chip:hover span { border-color: var(--cyan); }
.chip input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(56,198,244,.3); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); cursor: pointer; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.consent a { color: var(--navy); text-decoration: underline; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fdecee; color: #b3253a; font-size: 14px; font-weight: 600; }
.btn--wa { border: 0; cursor: pointer; font-family: inherit; justify-content: center; padding: 16px 20px; font-size: 14px; background: #25d366; color: #06301a; }
.btn--wa:hover { background: #4be08a; }
.btn--wa svg { width: 20px; height: 20px; }
.btn--wa.btn--mail { background: var(--navy); color: #fff; }
.btn--wa.btn--mail:hover { background: var(--navy-2); }
.btn--wa:disabled { opacity: .6; cursor: wait; }
.form-ok { margin: 0; padding: 10px 14px; border-radius: 10px; background: #d8f7e9; color: #0f6b45; font-size: 14px; font-weight: 600; }
.form-error a { color: inherit; text-decoration: underline; }

/* Selector WhatsApp / correo */
.via { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.via__opt { position: relative; cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; font-size: 15px !important; }
.via__opt input { position: absolute; opacity: 0; pointer-events: none; }
.via__opt span {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 14px;
  border: 1.5px solid var(--mist); border-radius: 14px; background: var(--ice); color: var(--navy); font-weight: 700;
  transition: border-color .2s, background .2s, color .2s;
}
.via__opt svg { width: 20px; height: 20px; }
.via__opt:hover span { border-color: var(--cyan); }
.via__opt input:checked + span { background: var(--navy); border-color: var(--navy); color: #fff; }
.via__opt input[value="whatsapp"]:checked + span svg { color: #25d366; }
.via__opt input:focus-visible + span { box-shadow: 0 0 0 4px rgba(56,198,244,.3); }

/* Bloque corto de contacto en el inicio */
.cta-band {
  position: relative; overflow: hidden; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 18px;
  padding: 110px var(--gutter) 130px;
}
.cta-band > :not(.circuit) { position: relative; z-index: 1; }
.cta-band h2 { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0 .3em; line-height: .95; }
.cta-band .sans { font-size: clamp(34px, 5vw, 80px); }
.cta-band .serif { font-size: clamp(42px, 6vw, 96px); color: var(--cyan); }
.cta-band > p:not(.eyebrow) { max-width: 44ch; color: var(--muted); font-size: 17px; }
.cta-band__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; }
.cta-band .btn--wa { padding: 12px 20px; }

/* Botón flotante de WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 45;
  display: flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 16px; border-radius: 999px;
  background: #25d366; color: #fff;
  box-shadow: 0 14px 30px -8px rgba(18,140,70,.55);
  transition: transform .4s var(--ease), opacity .4s;
}
.wa-float svg { width: 28px; height: 28px; flex: none; }
.wa-float__label { max-width: 0; overflow: hidden; white-space: nowrap; font-weight: 800; font-size: 14px; transition: max-width .5s var(--ease); }
.wa-float:hover { transform: translateY(-3px); }
.wa-float:hover .wa-float__label { max-width: 120px; }
.wa-float::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1;
  animation: wa-ping 2.6s infinite; background: #25d366;
}
@keyframes wa-ping { 0% { transform: scale(1); opacity: .5; } 70%, 100% { transform: scale(1.35); opacity: 0; } }
body.is-loading .wa-float, .menu.is-open ~ .wa-float { opacity: 0; pointer-events: none; }

/* ---------- Páginas legales ---------- */
.legal-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px var(--gutter); border-bottom: 1px solid var(--mist); }
.legal { max-width: 760px; margin: 0 auto; padding: 50px var(--gutter) 90px; }
.legal h1 { margin: 10px 0 6px; font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 6vw, 64px); line-height: 1; }
.legal h2 { margin: 40px 0 12px; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.legal p, .legal li { color: #2b3a55; font-size: 16px; line-height: 1.7; }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--cyan); text-underline-offset: 3px; }
.legal mark { background: #fff3a8; padding: 0 4px; border-radius: 4px; }
.legal__date { color: var(--muted) !important; font-size: 14px !important; }
.legal__draft { margin-bottom: 34px !important; padding: 14px 18px; border-radius: 12px; background: #fff7d6; border: 1px solid #f1d572; color: #6b5200 !important; }
.legal-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 20px var(--gutter); border-top: 1px solid var(--mist); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 560px) { .legal-header .btn { padding: 10px 12px; font-size: 11px; } .legal-header .wordmark__sans { display: none; } }

/* ---------- Animaciones de entrada ---------- */
.reveal { opacity: 0; transform: translateY(40px); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .manifesto { padding: 110px var(--gutter) 100px; }
  .services { grid-template-columns: 1fr; }
  .service { min-height: 66vh; }
  .svc-apps { height: 50cqh; }
  .svc-apps__note, .svc-apps__note:nth-child(3) { left: 50%; right: auto; top: 50cqw; translate: -50% 0; }
  .projects__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans, .partners__head { grid-template-columns: 1fr; }
  .partners__head p { justify-self: start; }
  .plans__media { order: -1; }

  /* Webs: una debajo de la otra */
  .story > .circuit { display: none; }
  .story { padding: 110px var(--gutter) 80px; }
  .sites { grid-template-columns: 1fr; }

  /* Apps: deslizar con el dedo en lugar de scroll horizontal fijado */
  .apps__pin { flex-direction: column; align-items: stretch; gap: 36px; }
  .apps__intro { flex: none; }
  .apps__intro::before { display: none; }
  .apps__track { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 10px; }
  .app-card { flex-basis: 72vw; scroll-snap-align: start; }

  /* Automatizaciones: el abanico pasa a ser una fila que se desliza con el dedo */
  .fan {
    height: auto; display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter); margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter) 24px;
  }
  .fan__card, .fan:hover .fan__card, .fan.is-open .fan__card {
    position: relative; left: auto; top: auto; transform: none; flex: 0 0 min(72vw, 280px); scroll-snap-align: start;
  }

  .footer__card { grid-template-columns: 1fr 1fr; padding: 50px 20px 0; border-radius: 28px; }
  .footer__visual { grid-column: 1 / -1; grid-row: 3; max-width: 220px; padding: 10px 0 20px; }
  .contact { grid-template-columns: 1fr; padding: 90px var(--gutter) 110px; }
  .footer__col--left { grid-column: 1; }
  .footer__col--right { grid-column: 2; }
  .footer__cta { grid-column: 1 / -1; grid-row: 4; }
  .marquee--footer { grid-row: 5; margin: 0 -20px; }
}
@media (max-width: 560px) {
  .header .btn { display: none; }
  .hero { display: flex; flex-direction: column; justify-content: center; }
  .hero__visual { width: 86vw; max-height: 52svh; margin-top: -4vw; }
  .hero__title { position: relative; top: auto; transform: none; z-index: 3; margin-bottom: -.32em; }
  .hero__line--serif { font-size: 28vw; }
  .badge {
    position: relative; left: auto; bottom: auto; margin-top: 18px;
    width: auto; flex-direction: row; align-items: center; gap: 10px; padding: 8px 14px;
  }
  .badge__value { font-size: 14px; }
  .badge__value br { display: none; }
  .scroll-hint { display: none; }
  .projects__grid .card:nth-child(n) { margin: 0; }
  .footer__legal { flex-direction: column; gap: 8px; }
  .footer__legal a { margin: 0 14px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track, .preloader__mark, .badge__dot { animation: none; }
  .reveal { opacity: 1; transform: none; }
}
