/* ==========================================================================
   Caeroli tech: estilos
   Orden: 1 Tokens · 2 Base · 3 Logo · 4 Encabezado · 5 Hero · 6 Simple · 6b ¿A quién ayudamos?
          7 Portafolio · 8 Por dentro (escena fija y maquetas) · 9 Licencias
          10 Contacto y pie · 11 Ventana de pedido · 12 Movimiento · 13 Móvil
   Los colores de marca se cambian en :root (sección 1).
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --navy-950: #07142A;
  --navy-900: #0B1B33;     /* fondo oscuro principal */
  --navy-800: #10294A;
  --navy: #16345A;         /* azul marino de la marca */
  --blue: #1B7CF8;         /* azul de la marca */
  --blue-btn: #1566D6;     /* azul con contraste suficiente para botones */
  --teal: #08B9B4;         /* turquesa de la marca */
  --teal-ink: #066F6B;     /* turquesa legible sobre fondo claro */
  --paper: #F3F7FB;
  --white: #FFFFFF;
  --ink: #0E2240;
  --muted: #4A5F7D;
  --line: #D8E2EE;
  --on-dark: #EAF2FF;
  --muted-dark: #9DB2D1;
  --line-dark: rgba(157, 178, 209, .24);

  /* colores del logotipo (los usan los SVG) */
  --ct-navy: #16345A;
  --ct-blue: #1B7CF8;
  --ct-teal: #08B9B4;

  --font: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --head-h: 68px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.6 var(--font); color: var(--ink); background: var(--white); overflow-x: hidden; }
body.modal-open, html.modal-open body { overflow: hidden; }
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -4rem; z-index: 100; background: var(--white); color: var(--ink); padding: .7rem 1rem; border-radius: 8px; transition: top .2s; }
.skip:focus { top: 1rem; }

.wrap { width: min(1180px, 90vw); margin-inline: auto; }
.sec-title { font-size: clamp(2rem, 4.6vw, 3.6rem); line-height: 1.04; letter-spacing: -.03em; font-weight: 700; max-width: 17ch; }
.sec-lead { max-width: 38em; color: var(--muted); font-size: 1.15rem; margin-top: 1.1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent; font-weight: 600; font-size: 1rem; line-height: 1; cursor: pointer; text-decoration: none; transition: transform .2s var(--ease), background .2s, border-color .2s, color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn--small { min-height: 40px; padding: .55rem 1.1rem; font-size: .92rem; }
.btn--primary { background: var(--blue-btn); color: #fff; }
.btn--primary:hover { background: #125CC4; }
.btn--ghost { border-color: rgba(234, 242, 255, .5); color: var(--on-dark); background: transparent; }
.btn--ghost:hover { border-color: var(--on-dark); background: rgba(234, 242, 255, .08); }
.btn--ghost-dark { border-color: var(--line); color: var(--ink); background: #fff; }
.btn--ghost-dark:hover { border-color: var(--blue); }
.btn--text { background: none; color: var(--muted); text-decoration: underline; text-underline-offset: .2em; min-height: 40px; }

/* ---------- 3. Logo (SVG en línea y sprite) ---------- */
.c-navy { fill: var(--ct-navy); }
.c-blue { fill: var(--ct-blue); }
.c-teal { fill: var(--ct-teal); }
.reg-mark, .reg-text { display: none; }
.registrada .reg-mark { display: inline; }
.registrada .reg-text { display: inline; }

/* ---------- 4. Encabezado ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--blue)); transform-origin: left; transform: scaleX(var(--p, 0)); }

.top { position: fixed; inset: 0 0 auto 0; height: calc(var(--head-h) + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); z-index: 60; display: flex; align-items: center; gap: 1.6rem; padding: 0 clamp(1rem, 4vw, 3rem); color: var(--hd-fg); transition: background .3s, box-shadow .3s; }
.top[data-theme="dark"] { --hd-fg: var(--on-dark); --ct-navy: #EAF2FF; }
.top[data-theme="light"] { --hd-fg: var(--ink); }
.top.is-solid[data-theme="dark"] { background: rgba(7, 20, 42, .84); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line-dark); }
.top.is-solid[data-theme="light"] { background: rgba(255, 255, 255, .88); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; }
.brand__mark { height: 34px; width: auto; }
.brand__name { height: 25px; width: auto; }
.nav { display: flex; gap: 1.7rem; margin-left: auto; }
.nav a { color: var(--hd-fg); text-decoration: none; font-weight: 500; font-size: .95rem; opacity: .85; transition: opacity .2s; }
.nav a:hover { opacity: 1; }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; color: var(--hd-fg); }
.burger span { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .3s var(--ease), top .3s var(--ease); }
.burger span:first-child { top: 17px; }
.burger span:last-child { top: 25px; }
.top.is-open .burger span:first-child { top: 21px; transform: rotate(45deg); }
.top.is-open .burger span:last-child { top: 21px; transform: rotate(-45deg); }

/* ---------- 5. Hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--head-h) + 2rem) 0 5rem; background: var(--navy-900); color: var(--on-dark); overflow: hidden; }
.hero__grid { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero__inner { position: relative; width: min(1280px, 92vw); margin-inline: auto; display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero__title { font-size: clamp(3rem, 7.4vw, 6.4rem); line-height: .96; letter-spacing: -.04em; font-weight: 700; margin-bottom: 1.6rem; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .09em; margin-bottom: -.09em; }
.hero__title .line > span { display: block; animation: rise 1s var(--ease) backwards; }
.hero__title .line:nth-child(2) > span { animation-delay: .1s; }
.hero__title .line:nth-child(3) > span { animation-delay: .2s; }
.hero__lead { max-width: 32em; font-size: clamp(1.05rem, 1.4vw, 1.25rem); color: var(--muted-dark); }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero__hint { margin-top: 2.2rem; font-size: .92rem; color: var(--muted-dark); display: flex; align-items: center; gap: .65rem; transition: opacity .5s; }
.hero__hint::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); animation: ping 2.2s var(--ease) infinite; }
.hero__hint.is-gone { opacity: 0; }

.hero__stage { position: relative; aspect-ratio: 1 / .92; display: grid; place-items: center; perspective: 1200px; }
.hero__tilt { width: 82%; transform-style: preserve-3d; will-change: transform; }
.mark { width: 100%; height: auto; overflow: visible; --ct-navy: #EAF2FF; }
.mark path { transform-box: fill-box; }
#m-c { animation: mark-l 1s var(--ease) .15s backwards; }
#m-t { animation: mark-t 1s var(--ease) .3s backwards; }
#m-cursor { animation: mark-c .9s var(--ease) .8s backwards, nudge 5.5s ease-in-out 2.2s infinite; }
.mark .ray { transform-origin: center; animation: ray-in .5s var(--ease) 1.25s backwards; }
.mark.is-live #m-cursor { animation: none; }
.mark.pulse .ray { animation: ray-pulse .65s var(--ease); }
.mark.pulse #m-ray2 { animation-delay: .05s; }
.mark.pulse #m-ray3 { animation-delay: .1s; }

.chips { position: absolute; inset: 0; pointer-events: none; }
.chip { position: absolute; display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .95rem; border-radius: 10px; background: rgba(16, 41, 74, .85); border: 1px solid var(--line-dark); color: var(--on-dark); font-size: .88rem; font-weight: 500; backdrop-filter: blur(6px); transform: translate(var(--px, 0), var(--py, 0)); animation: chip-in .8s var(--ease) 1.5s backwards; }
.chip svg { width: 16px; height: 16px; fill: none; stroke: var(--teal); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.chip--a { top: 6%; left: 0; }
.chip--b { top: 40%; right: -2%; animation-delay: 1.65s; }
.chip--c { bottom: 6%; left: 8%; animation-delay: 1.8s; }
.hero__scroll { position: absolute; bottom: 1.2rem; left: 50%; translate: -50% 0; width: 44px; height: 44px; display: grid; place-items: center; color: var(--muted-dark); }
.hero__scroll svg { width: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; animation: bob 2.2s ease-in-out infinite; }

/* ---------- 6. Simple ---------- */
.simple { background: var(--paper); color: var(--ink); padding: clamp(4.5rem, 10vw, 8rem) 0 0; overflow-x: clip; }
.simple__rows { margin-top: clamp(3rem, 7vw, 6rem); border-top: 1px solid var(--line); }
.srow { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: end; gap: 2rem; padding: clamp(1.6rem, 4vw, 3rem) max(5vw, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); transform: translateX(var(--sx, 0)); opacity: var(--so, 1); will-change: transform; }
.srow--r { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
.srow--r .srow__word { order: 2; text-align: right; }
.srow__word { font-size: clamp(2.6rem, 7.2vw, 6.8rem); white-space: nowrap; line-height: .95; letter-spacing: -.05em; font-weight: 700; padding-bottom: .06em; }
.srow:nth-child(1) .srow__word { color: var(--navy); }
.srow:nth-child(2) .srow__word { color: var(--blue-btn); }
.srow:nth-child(3) .srow__word { color: var(--teal-ink); }
.srow__text { max-width: 26em; color: var(--muted); font-size: 1.1rem; padding-bottom: .6rem; }

/* ---------- 6b. ¿A quién ayudamos? ---------- */
@property --ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

.who { --aq-1: #C4F1EB; --aq-2: #3DBDB5; --dp-1: #0E8E97; --dp-2: #076E8A; --dp-3: #05506E; --ring: #0FB5AE;
  position: relative; isolation: isolate; overflow: clip; padding: clamp(4.5rem, 10vw, 8rem) 0 clamp(4.5rem, 9vw, 7rem);
  background: linear-gradient(180deg, var(--paper) 0%, #E3F6F3 34%, #D9F0F1 68%, #FFFFFF 100%); }

/* Fondo: manchas de luz que derivan, puntos que se encienden cerca del puntero */
.who__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 80%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 12%, #000 80%, transparent 100%); }
.who__bg::before, .who__bg::after { content: ""; position: absolute; inset: 0; background-size: 28px 28px; }
.who__bg::before { background-image: radial-gradient(rgba(6, 111, 107, .2) 1.1px, transparent 1.7px); -webkit-mask-image: linear-gradient(180deg, transparent, #000 16%, #000 80%, transparent); mask-image: linear-gradient(180deg, transparent, #000 16%, #000 80%, transparent); }
.who__bg::after { background-image: radial-gradient(rgba(8, 185, 180, .95) 1.5px, transparent 2.1px); -webkit-mask-image: radial-gradient(230px circle at var(--px, -400px) var(--py, -400px), #000, transparent 72%); mask-image: radial-gradient(230px circle at var(--px, -400px) var(--py, -400px), #000, transparent 72%); }
.who__bg i { position: absolute; border-radius: 50%; will-change: transform; }
.who__bg i:nth-child(1) { width: min(64vw, 760px); aspect-ratio: 1; right: -16%; top: -14%; background: radial-gradient(closest-side, rgba(8, 185, 180, .36), rgba(8, 185, 180, 0)); translate: 0 calc(var(--wy, 0) * -70px); animation: deriva-a 17s ease-in-out infinite alternate; }
.who__bg i:nth-child(2) { width: min(52vw, 620px); aspect-ratio: 1; left: -18%; top: 30%; background: radial-gradient(closest-side, rgba(27, 124, 248, .2), rgba(27, 124, 248, 0)); translate: 0 calc(var(--wy, 0) * 55px); animation: deriva-b 21s ease-in-out infinite alternate; }
.who__bg i:nth-child(3) { width: min(58vw, 680px); aspect-ratio: 1; right: 8%; bottom: -26%; background: radial-gradient(closest-side, rgba(8, 185, 180, .28), rgba(8, 185, 180, 0)); translate: 0 calc(var(--wy, 0) * -40px); animation: deriva-a 19s ease-in-out -6s infinite alternate-reverse; }

/* Título: sube desde una máscara, como el del inicio */
.who__title { max-width: none; }
.who__title .line { display: block; overflow: hidden; padding-bottom: .16em; margin-bottom: -.16em; }
.who__title .line > span { display: block; transition: transform 1.05s var(--ease); }
.js.armed .who__title:not(.is-in) .line > span { transform: translateY(112%); }

/* Franja con la frase principal */
.who__banner { position: relative; margin-top: clamp(1.6rem, 3.2vw, 2.6rem); padding: clamp(1.7rem, 3vw, 2.5rem) clamp(1.4rem, 3.6vw, 3.2rem); border-radius: 28px; color: #fff; overflow: hidden;
  background: linear-gradient(100deg, #05506E 0%, #0A7F95 36%, #0FA8A9 70%, #16C4B5 100%); background-size: 240% 100%;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .38), inset 0 -22px 40px -26px rgba(2, 40, 60, .55), 0 26px 50px -22px rgba(5, 80, 110, .75), 0 60px 100px -46px rgba(8, 185, 180, .8);
  animation: aurora 13s ease-in-out infinite alternate; transform-origin: left center; transition: opacity .8s var(--ease), transform 1.1s var(--ease); }
.js.armed .who__banner:not(.is-in) { opacity: 0; transform: translateY(30px) scaleX(.55); }
.who__banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .32) 50%, transparent 62%); transform: translateX(-130%); animation: barrido 6.5s ease-in-out 1.2s infinite; pointer-events: none; }
.who__banner p { position: relative; z-index: 1; max-width: 36em; font-size: clamp(1.15rem, 2.1vw, 1.6rem); font-weight: 600; line-height: 1.32; letter-spacing: -.012em; text-shadow: 0 2px 14px rgba(2, 40, 60, .3); }
.who__banner .w { display: inline-block; transition: opacity .7s var(--ease) calc(.55s + var(--w, 0) * 55ms), transform .8s var(--ease) calc(.55s + var(--w, 0) * 55ms), filter .7s var(--ease) calc(.55s + var(--w, 0) * 55ms); }
.js.armed .who__banner:not(.is-in) .w { opacity: 0; transform: translateY(.7em); filter: blur(5px); }
.who__rule { position: absolute; z-index: 1; left: 3%; right: 3%; top: 15px; height: 1.5px; border-radius: 2px; background: rgba(255, 255, 255, .85); transform-origin: left; transition: transform 1.2s var(--ease) .15s; overflow: hidden; }
.js.armed .who__banner:not(.is-in) .who__rule { transform: scaleX(0); }
.who__rule::after { content: ""; position: absolute; top: 0; bottom: 0; width: 90px; left: -90px; background: linear-gradient(90deg, transparent, #fff, transparent); animation: destello 5s ease-in-out 1.6s infinite; }
.who__sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.who__sparks i { position: absolute; left: var(--x); bottom: -14px; width: var(--s); aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .7); box-shadow: 0 0 14px 3px rgba(255, 255, 255, .55); opacity: 0; animation: sube var(--t) linear var(--dl) infinite; }

/* Tarjetas */
.who__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(.9rem, 1.7vw, 1.5rem); margin-top: clamp(2.2rem, 4.4vw, 3.6rem); }
.who__item { position: relative; transition: opacity .9s var(--ease) var(--d, 0ms), transform 1.05s var(--ease) var(--d, 0ms), filter .9s var(--ease) var(--d, 0ms); }
.js.armed .who__item:not(.is-in) { opacity: 0; transform: translateY(64px) scale(.9); filter: blur(8px); }
.who__card { --rx: 0deg; --ry: 0deg; --ly: 0px; --glare: rgba(8, 185, 180, .26);
  position: relative; height: 100%; min-height: 25.5rem; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 1.5rem 1.1rem 1.55rem; border-radius: 24px; color: var(--ink);
  transform: perspective(1100px) translateY(var(--ly)) rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d;
  box-shadow: 0 1px 2px rgba(7, 70, 90, .1), 0 14px 26px -14px rgba(7, 95, 124, .35), 0 34px 60px -28px rgba(8, 185, 180, .5);
  transition: transform .7s var(--ease), box-shadow .5s var(--ease); }
.who__card[data-tone="fill"] { --glare: rgba(255, 255, 255, .5); color: #fff; box-shadow: 0 2px 3px rgba(2, 50, 70, .18), 0 22px 36px -16px rgba(5, 80, 110, .6), 0 48px 80px -30px rgba(8, 185, 180, .6); }
.who__card.is-tilting { transition: transform .14s linear, box-shadow .5s var(--ease); }
.who__item:hover .who__card, .who__item.is-lit .who__card { --ly: -12px; box-shadow: 0 2px 3px rgba(7, 70, 90, .12), 0 30px 44px -18px rgba(7, 95, 124, .45), 0 64px 90px -30px rgba(8, 185, 180, .7); }
.who__item:hover .who__card[data-tone="fill"], .who__item.is-lit .who__card[data-tone="fill"] { box-shadow: 0 3px 4px rgba(2, 50, 70, .22), 0 34px 50px -18px rgba(5, 80, 110, .75), 0 72px 100px -32px rgba(8, 185, 180, .8); }
.who__face { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; border: 1.5px solid var(--ring); background: linear-gradient(165deg, rgba(255, 255, 255, .98), rgba(238, 251, 249, .94)); }
.who__card[data-tone="fill"] .who__face { border-color: transparent; background: linear-gradient(168deg, var(--aq-1) 0%, var(--aq-2) 26%, var(--dp-1) 50%, var(--dp-2) 76%, var(--dp-3) 100%); background-size: 100% 150%; animation: marea 9s ease-in-out infinite alternate; }
.who__glare { position: absolute; inset: 0; background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 18%), var(--glare), rgba(255, 255, 255, 0) 62%); opacity: 0; transition: opacity .45s; }
.who__item:hover .who__glare, .who__item.is-lit .who__glare { opacity: 1; }
/* Borde de luz que gira alrededor de la tarjeta */
.who__card::before { content: ""; position: absolute; inset: -2.5px; border-radius: 26px; padding: 2.5px; pointer-events: none; opacity: 0; transition: opacity .5s;
  background: conic-gradient(from var(--ang), rgba(8, 185, 180, 0) 0deg, #08B9B4 70deg, #1B7CF8 140deg, rgba(27, 124, 248, 0) 210deg, rgba(8, 185, 180, 0) 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
  animation: gira 3.4s linear infinite; }
.who__item:hover .who__card::before, .who__item.is-lit .who__card::before { opacity: 1; }

.who__name { position: relative; min-height: 2.5em; display: grid; place-items: center; font-size: 1.12rem; line-height: 1.22; font-weight: 600; letter-spacing: -.012em; color: var(--ink); transform: translateZ(34px); }
.who__line { position: relative; align-self: stretch; height: 1.5px; margin-top: .7rem; background: linear-gradient(90deg, transparent, var(--ring) 20%, var(--ring) 80%, transparent); transform-origin: center; transition: transform 1s var(--ease) calc(var(--d, 0ms) + .45s), opacity .6s calc(var(--d, 0ms) + .45s); transform: translateZ(18px); }
.who__card[data-tone="fill"] .who__line { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9) 20%, rgba(255, 255, 255, .9) 80%, transparent); }
.js.armed .who__item:not(.is-in) .who__line { transform: translateZ(18px) scaleX(0); opacity: 0; }
.who__art { position: relative; flex: 1; width: 100%; display: grid; place-items: center; margin: .5rem 0 .3rem; transform: translateZ(62px); transition: scale .6s var(--ease), rotate .6s var(--ease); }
.who__item:hover .who__art, .who__item.is-lit .who__art { scale: 1.09; rotate: -2deg; }
.who__art svg { position: relative; z-index: 1; width: clamp(5.6rem, 9.6vw, 8.2rem); height: auto; overflow: visible; fill: none; stroke: currentColor; stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; color: var(--navy-900);
  filter: drop-shadow(0 8px 10px rgba(8, 185, 180, .3)); animation: flota 5.4s ease-in-out calc(var(--i) * -1.15s) infinite; }
.who__card[data-tone="fill"] .who__art svg { color: #fff; filter: drop-shadow(0 6px 10px rgba(2, 50, 70, .5)); }
.who__art svg * { transform-box: view-box; }
.who__halo { position: absolute; width: 10.4rem; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(8, 185, 180, .3), rgba(8, 185, 180, 0)); animation: halo 4.2s ease-in-out calc(var(--i) * -.8s) infinite; }
.who__card[data-tone="fill"] .who__halo { background: radial-gradient(closest-side, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0)); }
.who__halo::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 1.5px solid rgba(8, 185, 180, .45); animation: onda 3.6s ease-out calc(var(--i) * -.7s) infinite; }
.who__card[data-tone="fill"] .who__halo::after { border-color: rgba(255, 255, 255, .6); }
.who__shadow { position: absolute; bottom: 1%; width: 46%; height: 11px; border-radius: 50%; background: radial-gradient(closest-side, rgba(7, 50, 70, .34), rgba(7, 50, 70, 0)); animation: sombra 5.4s ease-in-out calc(var(--i) * -1.15s) infinite; }
.who__card[data-tone="fill"] .who__shadow { background: radial-gradient(closest-side, rgba(1, 25, 40, .55), rgba(1, 25, 40, 0)); }
.who__text { position: relative; max-width: 15em; font-size: .97rem; line-height: 1.42; font-weight: 500; color: var(--muted); transform: translateZ(24px); }
.who__card[data-tone="fill"] .who__text { color: #fff; font-weight: 600; text-shadow: 0 1px 10px rgba(2, 40, 60, .4); }
.js.armed .who__item:not(.is-in) .who__name, .js.armed .who__item:not(.is-in) .who__text { opacity: 0; }
.who__name, .who__text { transition: opacity .8s var(--ease) calc(var(--d, 0ms) + .3s); }

/* Los íconos se dibujan trazo a trazo al aparecer (el script prepara las longitudes) */
.who[data-draw] .who__art svg :is(path, rect, circle) { stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.5s var(--ease) calc(var(--d, 0ms) + .4s + var(--n, 0) * 90ms); }
.js.armed .who[data-draw] .who__item:not(.is-in) .who__art svg :is(path, rect, circle) { stroke-dashoffset: 1; }

/* Cada ícono tiene su propio movimiento; solo corre mientras la sección está en pantalla */
.who:not(.is-live) :is(.who__bg i, .who__banner, .who__sparks i, .who__face, .who__halo, .who__shadow, .who__art svg, .who__art svg *, .who__btn) { animation-play-state: paused; }
.who:not(.is-live) :is(.who__banner, .who__rule, .who__card, .who__halo, .who__btn)::before, .who:not(.is-live) :is(.who__banner, .who__rule, .who__card, .who__halo, .who__btn)::after { animation-play-state: paused; }
.i-toldo { transform-origin: 48px 18px; animation: toldo 3.8s ease-in-out infinite; }
.i-puerta { transform-origin: 28px 78px; animation: puerta 5.2s ease-in-out infinite; }
.i-letrero { animation: parpadeo 2.6s ease-in-out infinite; }
.i-gorro { transform-origin: 48px 48px; animation: gorro 4.2s ease-in-out infinite; }
.i-borla { transform-origin: 84px 43px; animation: borla 2.7s ease-in-out infinite; }
.i-llave { transform-origin: 48px 48px; animation: llave 3.6s ease-in-out infinite; }
.i-martillo { transform-origin: 48px 48px; animation: martillo 3.6s ease-in-out -.5s infinite; }
.i-asa { transform-origin: 48px 32px; animation: asa 3.4s ease-in-out infinite; }
.i-cierre { transform-origin: 48px 54px; animation: cierre 3.4s ease-in-out infinite; }
.i-casa { animation: casa 4.8s ease-in-out infinite; }
.i-ventana { animation: ventana 3.4s ease-in-out infinite; }
.i-mano { animation: mano 4.8s ease-in-out infinite; }

/* Cierre de la sección */
.who__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem 1.6rem; margin-top: clamp(2.4rem, 5vw, 3.8rem); text-align: center; transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js.armed .who__cta:not(.is-in) { opacity: 0; transform: translateY(24px); }
.who__cta p { font-size: 1.12rem; font-weight: 500; color: var(--ink); max-width: 30em; }
.who__btn { position: relative; overflow: hidden; box-shadow: 0 10px 22px -8px rgba(21, 102, 214, .65), 0 0 0 0 rgba(21, 102, 214, .4); animation: latido 3.2s ease-out infinite; }
.who__btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-130%); animation: barrido 4.6s ease-in-out 1s infinite; }
.who__btn:hover { box-shadow: 0 16px 30px -8px rgba(21, 102, 214, .75); }

@keyframes deriva-a { to { transform: translate(-7%, 9%) scale(1.12); } }
@keyframes deriva-b { to { transform: translate(10%, -8%) scale(.92); } }
@keyframes aurora { to { background-position: 100% 0; } }
@keyframes barrido { 0%, 55% { transform: translateX(-130%); } 100% { transform: translateX(130%); } }
@keyframes destello { 0% { left: -90px; } 55%, 100% { left: 100%; } }
@keyframes sube { 0% { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: .9; } 100% { transform: translateY(-14rem) scale(1.1); opacity: 0; } }
@keyframes marea { to { background-position: 0 100%; } }
@keyframes gira { to { --ang: 360deg; } }
@keyframes flota { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes sombra { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.7); opacity: .55; } }
@keyframes halo { 0%, 100% { transform: scale(.92); opacity: .75; } 50% { transform: scale(1.12); opacity: 1; } }
@keyframes onda { 0% { transform: scale(.7); opacity: .85; } 100% { transform: scale(1.45); opacity: 0; } }
@keyframes toldo { 0%, 100% { transform: scaleY(1) skewX(0); } 50% { transform: scaleY(1.09) skewX(-2.5deg); } }
@keyframes puerta { 0%, 55%, 100% { transform: scaleX(1); } 70%, 88% { transform: scaleX(.42); } }
@keyframes parpadeo { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@keyframes gorro { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-4px) rotate(-2.2deg); } }
@keyframes borla { 0%, 100% { transform: rotate(9deg); } 50% { transform: rotate(-9deg); } }
@keyframes llave { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(14deg); } }
@keyframes martillo { 0%, 100% { transform: rotate(0); } 40% { transform: rotate(-16deg); } 55% { transform: rotate(5deg); } }
@keyframes asa { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes cierre { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes casa { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes ventana { 0%, 100% { fill: rgba(8, 185, 180, 0); } 50% { fill: rgba(8, 185, 180, .75); } }
@keyframes mano { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(2px); } }
@keyframes latido { 0% { box-shadow: 0 10px 22px -8px rgba(21, 102, 214, .65), 0 0 0 0 rgba(21, 102, 214, .45); } 70%, 100% { box-shadow: 0 10px 22px -8px rgba(21, 102, 214, .65), 0 0 0 16px rgba(21, 102, 214, 0); } }

/* ---------- 7. Portafolio ---------- */
.work { background: var(--white); padding: clamp(4.5rem, 9vw, 7.5rem) 0; overflow-x: clip; }
.work__grid { display: grid; grid-template-columns: 1.25fr 1fr .9fr; gap: clamp(1rem, 2.6vw, 2.4rem); margin-top: clamp(2.5rem, 5vw, 4rem); align-items: start; }
.proj { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
.work__grid > .proj:nth-child(3n+2) { margin-top: 3.5rem; }
.work__grid > .proj:nth-child(3n) { margin-top: 1.2rem; }
.thumb { width: 100%; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: 0 22px 44px -26px rgba(22, 52, 90, .55); transition: transform .5s var(--ease); }
.proj:hover .thumb { transform: translateY(-4px); }
.thumb__bar { display: flex; gap: .3rem; padding: .55rem .7rem; background: #E9EFF7; }
.thumb__bar i { width: 8px; height: 8px; border-radius: 50%; background: #BFCBDC; }
.thumb__screen { aspect-ratio: 16 / 10; padding: 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.thumb__screen--cx { background: #C5D7F1; }
.thumb__screen--dm { background: var(--navy); }
.t-h { font-size: 1rem; line-height: 1.1; font-weight: 700; max-width: 11em; color: var(--navy); letter-spacing: -.01em; }
.thumb__screen--dm .t-h { color: #fff; }
.t-row { display: flex; gap: .9rem; flex: 1; min-height: 0; }
.t-canvas { flex: 1; background: linear-gradient(135deg, #F7B267, #F25C54 55%, #7A5C99); border: 7px solid #fff; border-radius: 3px; box-shadow: 0 6px 12px rgba(22, 52, 90, .25); }
.t-col { width: 34%; display: flex; flex-direction: column; gap: .5rem; padding-top: .3rem; }
.t-col i { height: 10px; background: #fff; border-radius: 6px; }
.t-col i.t-btn { background: var(--navy); height: 18px; width: 62%; }
.t-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; flex: 1; }
.t-cards span { position: relative; border-radius: 6px; background: linear-gradient(160deg, #2C6BB5, #0B2A52); }
.t-cards span::after { content: ""; position: absolute; left: 10%; right: 32%; bottom: 12%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .75); }
.thumb__screen--gen { background: linear-gradient(150deg, #1B4F8F, var(--navy-900)); }
.thumb__screen--gen .t-h { color: #fff; }
.t-gen { display: grid; gap: .5rem; margin-top: auto; }
.t-gen i { height: 9px; border-radius: 5px; background: rgba(255, 255, 255, .7); }
.t-gen i:nth-child(2) { width: 72%; }
.t-gen i:nth-child(3) { width: 46%; background: var(--teal); }
.thumb__shot { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; background: #E9EFF7; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.thumb--dash { aspect-ratio: 16 / 10.8; display: grid; place-items: center; border: 2px dashed var(--blue); background: #F3F8FF; box-shadow: none; color: var(--blue-btn); font-weight: 600; font-size: 1.15rem; }
.proj__name { font-size: 1.5rem; line-height: 1.15; font-weight: 600; letter-spacing: -.02em; margin-top: .3rem; }
.proj__text { color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tags li { padding: .2rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; color: var(--muted); }
.proj__link { font-weight: 600; color: var(--blue-btn); text-decoration: underline; text-underline-offset: .22em; }
.proj__link--btn { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.proj__soon { color: var(--muted); font-size: .92rem; }

/* Entradas por los lados: en reposo todo se ve; tras el primer scroll, lo que aún no
   llegó a la pantalla espera fuera de lugar y entra desde su lado. */
.js [data-reveal] { transition: opacity .8s var(--ease) var(--d, 0ms), transform .9s var(--ease) var(--d, 0ms); }
.js [data-reveal="right"] { --rx: 64px; }
.js.armed [data-reveal]:not(.is-in) { opacity: 0; transform: translateX(var(--rx, -64px)); }

/* ---------- 8. Por dentro ---------- */
.dive { position: relative; height: calc(100svh + var(--steps) * 78svh); background: var(--navy-900); color: var(--on-dark); }
.dive__sticky { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; padding-top: var(--head-h); overflow: hidden; }
.dive__grid { width: min(1280px, 92vw); display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.32fr); gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.dive__title { font-size: clamp(1.9rem, 3.3vw, 2.7rem); line-height: 1.05; letter-spacing: -.03em; font-weight: 700; }
.dive__sub { color: var(--muted-dark); font-size: .98rem; margin-top: .7rem; max-width: 30em; }
.dive__steps { display: grid; margin: 1.8rem 0 1.4rem; }
.dive__step { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .4s, transform .6s var(--ease); }
.dive__step.is-active { opacity: 1; transform: none; pointer-events: auto; }
.dive__step h3 { font-size: 1.7rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: .4rem; }
.dive__step > p { color: var(--muted-dark); max-width: 28em; }
.notes { display: grid; gap: .8rem; margin-top: 1.3rem; }
.notes li { display: flex; gap: .8rem; align-items: flex-start; font-size: .98rem; cursor: default; }
.notes li::before { content: attr(data-n); flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--teal); color: var(--navy-900); font-weight: 700; font-size: .85rem; display: grid; place-items: center; margin-top: .05rem; }
.rail { display: flex; flex-wrap: wrap; gap: .5rem; }
.rail__item { background: transparent; border: 1px solid var(--line-dark); color: var(--muted-dark); padding: .5rem 1rem; min-height: 40px; border-radius: 999px; font-weight: 500; font-size: .9rem; cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
.rail__item:hover { border-color: var(--on-dark); color: var(--on-dark); }
.rail__item.is-active { background: var(--on-dark); border-color: var(--on-dark); color: var(--navy-900); }

.dive__stage { min-width: 0; }
.stagebox { position: relative; width: min(100%, calc((100svh - var(--head-h) - 6rem) * 1.57)); aspect-ratio: 64 / 40.6; margin-inline: auto; }
.view { position: absolute; inset: 0; opacity: 0; transform: translateX(5%) scale(.985); pointer-events: none; transition: opacity .5s, transform .8s var(--ease); }
.view.is-before { transform: translateX(-5%) scale(.985); }
.view.is-active { opacity: 1; transform: none; }
.frame { container-type: inline-size; width: 100%; border-radius: 10px; overflow: hidden; background: #fff; border: 1px solid rgba(157, 178, 209, .3); box-shadow: 0 50px 90px -34px rgba(0, 0, 0, .75); }
.frame__bar { display: flex; align-items: center; gap: .45em; height: calc(100cqw / 64 * 2.6); padding: 0 calc(100cqw / 64 * 1.1); background: #E7EDF6; font-size: calc(100cqw / 64); }
.frame__bar i { width: .9em; height: .9em; border-radius: 50%; background: #BCC9DB; flex: none; }
.frame__url { margin: 0 auto; transform: translateX(-1.2em); min-width: 22%; text-align: center; padding: .25em 1.2em; border-radius: 2em; background: #fff; color: #5A6E8C; font-size: .95em; white-space: nowrap; }
.frame--editor .frame__bar { background: #0B1B33; }
.frame--editor .frame__bar i { background: #3A5173; }
.frame--editor .frame__url { background: transparent; color: #9DB2D1; font-family: var(--mono); }
.frame__screen { position: relative; aspect-ratio: 64 / 38; font-size: calc(100cqw / 64); overflow: hidden; background: #fff; }
.page { position: absolute; inset: 0; line-height: 1.3; font-family: var(--font); color: var(--navy); }
.page p, .page small, .page b { margin: 0; }
.page small { font-size: .85em; }

/* marcas numeradas de cada pantalla */
.pin { position: absolute; z-index: 3; width: 2.2em; height: 2.2em; margin: -1.1em 0 0 -1.1em; border-radius: 50%; background: var(--teal); color: var(--navy-900); font: 700 1.05em/2.2em var(--font); text-align: center; box-shadow: 0 0 0 .35em rgba(8, 185, 180, .3); transition: transform .25s var(--ease), box-shadow .25s; }
.view.is-active .pin { animation: pin-in .55s var(--ease) backwards; animation-delay: calc(.55s + var(--i, 0) * .14s); }
.pin[data-n="2"] { --i: 1; }
.pin[data-n="3"] { --i: 2; }
.pin.is-hot { transform: scale(1.18); box-shadow: 0 0 0 .6em rgba(8, 185, 180, .45); }

/* maqueta: sitio (Cuadros Xpress) */
.cx { background: #C5D7F1; display: flex; flex-direction: column; }
.cx__nav { display: flex; align-items: center; gap: 1.7em; padding: 1.3em 2.6em; font-size: .95em; }
.cx__nav b { margin-right: auto; font-size: 1.3em; }
.cx__body { flex: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 3.4em; padding: .8em 2.6em 2em; align-items: center; }
.cx__h { font-size: 3.2em; font-weight: 700; line-height: 1.02; letter-spacing: -.025em; margin-bottom: .45em !important; }
.cx__p { font-size: 1.25em; margin-bottom: 1.3em !important; }
.mock-btn { display: inline-block; padding: .8em 1.5em; border-radius: 2em; background: var(--navy); color: #fff; font-weight: 600; font-size: 1em; white-space: nowrap; }
.mock-btn--ghost { background: transparent; color: var(--navy); border: .14em solid var(--navy); margin-left: .6em; padding: .66em 1.3em; }
.cx__config { background: #fff; border-radius: 1.4em; padding: 1.3em; display: grid; gap: .85em; box-shadow: 0 1.2em 2.2em -1.2em rgba(22, 52, 90, .45); }
.cx__canvas { background: #EEF3FA; border-radius: .8em; padding: 1em; display: grid; place-items: center; }
.cx__photo { width: 31%; aspect-ratio: 3 / 4; background: linear-gradient(135deg, #F7B267, #F25C54 55%, #7A5C99); border: .5em solid #fff; box-shadow: .2em .4em .9em rgba(0, 0, 0, .3); }
.cx__drop { border: .14em dashed #9DB6DA; border-radius: .8em; text-align: center; padding: .7em; color: var(--navy); font-weight: 500; font-size: .95em; }
.cx__sizes { display: flex; gap: .6em; }
.cx__sizes span { flex: 1; text-align: center; padding: .5em 0; border-radius: .6em; border: .12em solid #D4DFEE; font-size: .92em; }
.cx__sizes .on { background: var(--navy); color: #fff; border-color: var(--navy); }
.cx__buy { display: flex; align-items: center; justify-content: space-between; font-size: .98em; }
.cx__buy b { font-size: 1.3em; margin-left: .3em; }

/* maqueta: panel (CRM) */
.crm { display: grid; grid-template-columns: 11.5em 1fr; background: var(--paper); }
.crm__side { background: var(--navy); color: #C9D8EE; padding: 1.6em 1.1em; display: grid; align-content: start; gap: .35em; font-size: .98em; }
.crm__side b { color: #fff; font-size: 1.25em; margin-bottom: .9em; }
.crm__side span { padding: .55em .8em; border-radius: .6em; }
.crm__side .on { background: rgba(8, 185, 180, .22); color: #fff; font-weight: 600; }
.crm__main { padding: 1.5em 1.9em; display: grid; grid-template-rows: auto auto 1fr; gap: 1.2em; min-width: 0; }
.crm__top { display: flex; justify-content: space-between; align-items: center; }
.crm__h { font-size: 1.7em; font-weight: 700; letter-spacing: -.02em; }
.crm__search { background: #fff; border: .1em solid var(--line); border-radius: 2em; padding: .5em 1.3em; color: #7288A6; font-size: .92em; }
.crm__kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1em; }
.crm__kpis div { background: #fff; border: .1em solid var(--line); border-radius: .9em; padding: .9em 1em; display: grid; gap: .1em; }
.crm__kpis small { color: #5A6E8C; }
.crm__kpis b { font-size: 2.1em; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.crm__cols { display: grid; grid-template-columns: 1.8fr 1fr; gap: 1em; min-height: 0; }
.crm__table { background: #fff; border: .1em solid var(--line); border-radius: .9em; overflow: hidden; font-size: .95em; }
.crm__row { display: grid; grid-template-columns: 1fr 1.4fr 1.5fr .8fr; align-items: center; padding: .62em 1em; border-top: .1em solid #E8EEF6; }
.crm__row--head { border-top: 0; background: #EEF3FA; color: #5A6E8C; font-weight: 500; font-size: .92em; }
.st { font-style: normal; font-size: .88em; padding: .22em .8em; border-radius: 2em; white-space: nowrap; }
.st--new { background: #DCEBFF; color: #1566D6; }
.st--prod { background: #D3F2F0; color: #066F6B; }
.st--done { background: #E4EAF2; color: #4A5F7D; }
.crm__chart { background: #fff; border: .1em solid var(--line); border-radius: .9em; padding: 1em; display: grid; grid-template-rows: auto 1fr; gap: .6em; }
.bars { display: flex; align-items: flex-end; gap: .55em; }
.bars i { flex: 1; height: var(--h); background: var(--blue); border-radius: .3em .3em 0 0; transform-origin: bottom; }
.bars i:last-child { background: var(--teal); }
.view.is-active .bars i { animation: grow .8s var(--ease) backwards; animation-delay: calc(.3s + var(--n, 0) * 70ms); }
.bars i:nth-child(2) { --n: 1; } .bars i:nth-child(3) { --n: 2; } .bars i:nth-child(4) { --n: 3; } .bars i:nth-child(5) { --n: 4; } .bars i:nth-child(6) { --n: 5; }

/* maqueta: código */
.ed { background: #0F2037; color: #DCE8F7; }
.ed__tabs { display: flex; background: #0B1B33; font: 400 .9em var(--mono); color: #7F99BD; }
.ed__tabs span { padding: 1em 1.6em; }
.ed__tabs .on { background: #0F2037; color: #fff; box-shadow: inset 0 .2em 0 var(--teal); }
.ed__code { margin: 0; padding: 1.3em 1.5em; font: 400 .92em/1.4 var(--mono); counter-reset: ln; overflow: hidden; }
.ed__code code { font: inherit; }
.ln { display: block; min-height: 1.4em; white-space: pre; counter-increment: ln; opacity: 0; }
.ln::before { content: counter(ln); display: inline-block; width: 2.6em; margin-right: 1.3em; text-align: right; color: #55709A; }
.view.is-active .ln { animation: ln-in .5s var(--ease) both; animation-delay: calc(.2s + var(--l) * 55ms); }
.t-c { color: #8AA3C6; }
.t-d { color: var(--teal); }
.t-k { color: #78B0FF; }
.t-f { color: #fff; font-weight: 500; }
.t-s { color: #7DE3DC; }
.t-p { color: #BBD6FF; }

/* maqueta: documentación */
.dc { display: grid; grid-template-columns: 14em 1fr 10.5em; background: #fff; }
.dc__side { background: var(--paper); border-right: .1em solid var(--line); padding: 1.5em 1em; display: grid; align-content: start; gap: .15em; font-size: .95em; color: #4A5F7D; }
.dc__brand { font-weight: 700; color: var(--navy); font-size: 1.15em; margin-bottom: .9em !important; }
.dc__side span { padding: .42em .7em; border-radius: .5em; }
.dc__side .grp { font-weight: 600; color: var(--navy); margin-top: .5em; }
.dc__side .sub { margin-left: 1.1em; font-family: var(--mono); font-size: .88em; }
.dc__side .on { background: #DCEBFF; color: #1566D6; font-weight: 500; }
.dc__main { padding: 1.7em 2.2em; min-width: 0; }
.dc__crumb { font-size: .88em; color: #5A6E8C; margin-bottom: .6em !important; }
.dc__h { font: 500 2.2em/1.1 var(--mono); color: var(--navy); letter-spacing: -.03em; margin-bottom: .55em !important; }
.dc__p { color: #4A5F7D; font-size: 1.02em; margin-bottom: 1.2em !important; }
.dc__table { border: .1em solid var(--line); border-radius: .8em; overflow: hidden; font-size: .93em; }
.dc__tr { display: grid; grid-template-columns: 1.3fr .7fr 2fr; padding: .6em 1em; border-top: .1em solid #E8EEF6; }
.dc__tr--head { border-top: 0; background: #EEF3FA; color: #5A6E8C; font-weight: 500; }
.dc__tr span:first-child { font-family: var(--mono); color: var(--navy); }
.dc__where { margin-top: 1.1em !important; padding: .75em 1em; background: #E7F7F6; border-left: .25em solid var(--teal); border-radius: 0 .5em .5em 0; font-size: .95em; color: #064C49; }
.dc__where code { font-family: var(--mono); font-weight: 500; }
.dc__sub { margin: 1.1em 0 .5em !important; font-weight: 600; color: var(--navy); font-size: 1.05em; }
.dc__ex { margin: 0; padding: .8em 1em; background: #0F2542; color: #CFE0F7; border-radius: .6em; font: 400 .88em/1.5 var(--mono); white-space: pre; overflow: hidden; }
.dc__toc { padding: 1.7em 1em; display: grid; align-content: start; gap: .5em; font-size: .9em; color: #5A6E8C; border-left: .1em solid #EEF3FA; }
.dc__toc small { color: var(--navy); font-weight: 600; margin-bottom: .4em !important; }

/* ---------- 9. Licencias ---------- */
.lic { background: var(--paper); padding: clamp(4.5rem, 9vw, 7.5rem) 0; overflow-x: clip; }
.lic__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.ticket { margin-top: 2.6rem; max-width: 33rem; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--navy); color: var(--on-dark); border-radius: 14px; filter: drop-shadow(0 22px 26px rgba(22, 52, 90, .28)); }
.ticket__main { display: flex; align-items: center; gap: 1rem; padding: 1.6rem; }
.ticket__mark { width: 3.6rem; height: auto; flex: none; --ct-navy: #EAF2FF; }
.ticket__kind { font-size: .82rem; color: var(--muted-dark); }
.ticket__name { font-size: 1.4rem; font-weight: 600; line-height: 1.15; letter-spacing: -.02em; }
.ticket__meta { font-size: .92rem; color: var(--muted-dark); }
.ticket__stub { position: relative; padding: 1.5rem 1.4rem; border-left: 2px dashed rgba(157, 178, 209, .4); display: grid; align-content: center; gap: .3rem; }
.ticket__stub::before, .ticket__stub::after { content: ""; position: absolute; left: -1px; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--paper); transform: translateX(-50%); }
.ticket__stub::before { top: -.8rem; }
.ticket__stub::after { bottom: -.8rem; }
.ticket__label { font-size: .82rem; color: var(--muted-dark); }
.ticket__serial { font: 500 .92rem/1.3 var(--mono); letter-spacing: .04em; color: #7DE3DC; white-space: nowrap; }
.prods { display: grid; gap: 1rem; }
.prod { display: grid; grid-template-columns: auto 1fr auto; gap: 1.1rem; align-items: center; padding: 1.1rem 1.2rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; transition: border-color .25s, transform .3s var(--ease); }
.prod:hover { border-color: var(--blue); transform: translateX(-4px); }
.prod__icon { width: 2.9rem; height: 2.9rem; border-radius: .8rem; background: #E3EEFF; color: var(--blue-btn); display: grid; place-items: center; }
.prod__icon svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.prod__name { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
.prod__text { color: var(--muted); font-size: .95rem; line-height: 1.4; }
.prod__price { color: var(--teal-ink); font-weight: 600; font-size: .9rem; margin-top: .2rem; }
.flow { margin-top: 2.2rem; counter-reset: f; }
.flow li { position: relative; counter-increment: f; padding: .95rem 0 .95rem 3.2rem; border-top: 1px solid var(--line); }
.flow li::before { content: counter(f); position: absolute; left: 0; top: .85rem; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: .92rem; }
.flow b { font-weight: 600; }
.flow span { color: var(--muted); }

/* ---------- 10. Contacto y pie ---------- */
.contact { position: relative; background: var(--navy-900); color: var(--on-dark); padding: clamp(5rem, 12vw, 9rem) 0; overflow: hidden; }
.contact__mark { position: absolute; right: -6%; bottom: -14%; width: min(46vw, 560px); height: auto; opacity: .07; --ct-navy: #fff; --ct-blue: #fff; --ct-teal: #fff; pointer-events: none; }
.contact__inner { position: relative; }
.contact__title { font-size: clamp(2.5rem, 6.4vw, 5.4rem); line-height: .98; letter-spacing: -.04em; font-weight: 700; max-width: 11ch; }
.contact__lead { max-width: 32em; color: var(--muted-dark); font-size: 1.2rem; margin-top: 1.4rem; }
.contact__actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.foot { background: var(--navy-950); color: var(--muted-dark); padding: 2.6rem 0 2.2rem; --ct-navy: #EAF2FF; }
.foot__inner { display: grid; grid-template-columns: auto 1fr auto; gap: 1.2rem 2.5rem; align-items: center; }
.foot__tag { font-size: .98rem; }
.foot__nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.foot__nav a { text-decoration: none; font-size: .95rem; }
.foot__nav a:hover { color: #fff; }
.foot__legal { grid-column: 1 / -1; font-size: .85rem; padding-top: 1.2rem; border-top: 1px solid var(--line-dark); }

/* ---------- 11. Ventana de pedido ---------- */
.modal { border: 0; padding: 0; border-radius: 18px; width: min(560px, 94vw); max-height: 92svh; overflow: auto; background: #fff; color: var(--ink); box-shadow: 0 40px 90px -20px rgba(7, 20, 42, .65); }
.modal::backdrop { background: rgba(7, 20, 42, .74); backdrop-filter: blur(4px); }
.modal[open] { animation: modal-in .45s var(--ease); }
.modal__view { padding: clamp(1.4rem, 4vw, 2.2rem); }
.modal__x { position: absolute; top: .8rem; right: .8rem; width: 42px; height: 42px; border: 0; border-radius: 50%; background: #EEF3FA; cursor: pointer; display: grid; place-items: center; }
.modal__x:hover { background: #E1EAF6; }
.modal__x svg { width: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.modal__title { font-size: 1.7rem; line-height: 1.15; letter-spacing: -.02em; font-weight: 600; margin: 0 2.4rem .4rem 0; }
.modal__lead { color: var(--muted); margin-bottom: 1.3rem; }
.form { display: grid; gap: .95rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: .95rem; }
.field { display: grid; gap: .35rem; font-weight: 500; font-size: .92rem; }
.field input, .field select, .field textarea { font: 400 1rem var(--font); padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); min-height: 46px; width: 100%; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(27, 124, 248, .2); }
.form__price { font-weight: 600; color: var(--teal-ink); }
.form__error { color: #B3261E; font-weight: 500; }
.form__note { color: var(--muted); font-size: .85rem; }
.form .btn { margin-top: .3rem; }
.sum { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 1.2rem; }
.sum div { display: grid; grid-template-columns: 7rem 1fr; gap: .8rem; padding: .6rem .95rem; border-top: 1px solid var(--line); }
.sum div:first-child { border-top: 0; }
.sum dt { color: var(--muted); font-size: .92rem; }
.sum dd { font-weight: 500; overflow-wrap: anywhere; }
.serial { background: var(--navy); color: var(--on-dark); border-radius: 12px; padding: 1.1rem 1.2rem; margin-bottom: 1.2rem; }
.serial__label { font-size: .85rem; color: var(--muted-dark); }
.serial__code { font: 500 1.35rem/1.3 var(--mono); letter-spacing: .07em; color: #7DE3DC; margin: .3rem 0 .9rem; overflow-wrap: anywhere; }
.serial__row { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; }
.serial__note { font-size: .82rem; color: var(--muted-dark); flex: 1 1 14rem; }
.modal__actions { display: grid; gap: .6rem; }

/* ---------- 12. Movimiento ---------- */
@keyframes rise { from { transform: translateY(105%); } }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(8, 185, 180, .6); } 70%, 100% { box-shadow: 0 0 0 12px rgba(8, 185, 180, 0); } }
@keyframes mark-l { from { transform: translateX(-16%); opacity: 0; } }
@keyframes mark-t { from { transform: translateY(-14%); opacity: 0; } }
@keyframes mark-c { from { transform: translate(40%, 46%) scale(.7); opacity: 0; } }
@keyframes nudge { 0%, 100% { transform: translate(0, 0); } 45% { transform: translate(-3.2%, 2.4%); } 52% { transform: translate(-3.2%, 2.4%) scale(.94); } 60% { transform: translate(-3.2%, 2.4%); } }
@keyframes ray-in { from { transform: scale(.2); opacity: 0; } }
@keyframes ray-pulse { 0% { transform: scale(.35); opacity: .2; } 55% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1); } }
@keyframes chip-in { from { opacity: 0; translate: 0 14px; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes pin-in { from { opacity: 0; transform: scale(.3); } }
@keyframes ln-in { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* ---------- 13. Móvil y tablet ---------- */
@media (max-width: 960px) {
  .burger { display: block; margin-left: auto; }
  .nav { position: absolute; top: var(--head-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: .5rem clamp(1rem, 4vw, 3rem) 1rem; background: var(--navy-900); display: none; border-bottom: 1px solid var(--line-dark); margin-left: 0; }
  .top.is-open .nav { display: flex; }
  .top.is-open { --hd-fg: var(--on-dark); --ct-navy: #EAF2FF; }
  .nav a { color: var(--on-dark); padding: .85rem 0; font-size: 1.05rem; border-top: 1px solid var(--line-dark); }
  .top__buy { margin-left: auto; }
  .burger { margin-left: 0; }

  .hero { padding-bottom: 4rem; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__stage { max-width: 520px; width: 100%; margin-inline: auto; }
  .chip--a { left: -2%; }
  .chip--b { right: -1%; }

  .who__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .who__item { grid-column: span 2; }
  .who__item:nth-child(n+4) { grid-column: span 3; }
  .who__card { min-height: 23rem; }

  .srow, .srow--r { grid-template-columns: 1fr; gap: .6rem; }
  .srow__word { font-size: clamp(2.6rem, 13vw, 5rem); }
  .srow--r .srow__word { order: 0; text-align: right; }
  .srow--r .srow__text { margin-left: auto; text-align: right; }

  .work__grid { grid-template-columns: 1fr; }
  .work__grid > .proj:nth-child(n) { margin-top: 0; }

  .dive__grid { grid-template-columns: 1fr; gap: 1rem; align-content: center; }
  .dive__stage { order: -1; }
  .dive__title, .dive__sub { display: none; }
  .dive__steps { margin: 0 0 1rem; }
  .dive__step h3 { font-size: 1.35rem; }
  .dive__step > p { font-size: .98rem; }
  .notes { margin-top: .8rem; gap: .5rem; }
  .notes li { font-size: .92rem; }
  .stagebox { width: min(100%, calc((100svh - var(--head-h) - 21rem) * 1.57)); min-width: 280px; }
  .pin { font-size: 1.25em; }

  .lic__grid { grid-template-columns: 1fr; }
  .foot__inner { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .who__banner { border-radius: 22px; }
  .who__grid { grid-template-columns: 1fr; gap: 1rem; }
  .who__item, .who__item:nth-child(n+4) { grid-column: auto; }
  .who__card { min-height: 0; display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); grid-template-areas: "art name" "art line" "art text"; align-items: center; column-gap: 1rem; text-align: left; padding: 1.2rem 1.1rem; transform: translateY(var(--ly)); transform-style: flat; }
  .who__name { grid-area: name; min-height: 0; place-items: start; text-align: left; transform: none; }
  .who__line { grid-area: line; margin-top: .45rem; transform: none; background: linear-gradient(90deg, var(--ring), transparent); }
  .who__card[data-tone="fill"] .who__line { background: linear-gradient(90deg, rgba(255, 255, 255, .9), transparent); }
  .js.armed .who__item:not(.is-in) .who__line { transform: scaleX(0); transform-origin: left; }
  .who__art { grid-area: art; margin: 0; transform: none; }
  .who__art svg { width: 4.9rem; }
  .who__halo { width: 6.4rem; }
  .who__text { grid-area: text; margin-top: .45rem; max-width: none; transform: none; font-size: .95rem; }
  .who__card[data-tone="fill"] .who__name { color: var(--ink); }
  .top__buy { display: none; }
  .burger { margin-left: auto; }
  .form__row { grid-template-columns: 1fr; }
  .sum div { grid-template-columns: 5.5rem 1fr; }
  .ticket { grid-template-columns: 1fr; }
  .ticket__stub { border-left: 0; border-top: 2px dashed rgba(157, 178, 209, .4); }
  .ticket__stub::before, .ticket__stub::after { top: -.8rem; bottom: auto; transform: none; left: auto; }
  .ticket__stub::before { left: -.8rem; }
  .ticket__stub::after { right: -.8rem; }
}
@media (max-height: 640px) and (min-width: 961px) {
  .dive__steps { margin: 1rem 0; }
  .notes { display: none; }
}
