/* ═════════════════════════════════════════════════════════════
   Comnic · home v2
   Mundo: campo violeta de marca + papel lila + tinta violeta.
   Animación guiada por scroll (assets/js/v2.js escribe las
   variables --p, --hp, etc.). Sin JS todo queda visible y estático.
   ═════════════════════════════════════════════════════════════ */

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

:root {
  /* Paleta original de Comnic (assets/css/styles.css) */
  --ink:      #130a2e;
  --night:    #130a2e;
  --violet:   #3b2ccc;
  --violet-2: #5540e8;
  --violet-3: #3b2ccc;
  --purple:   #7b35c8;
  --purple-mid: #9b44d4;
  --lilac:    #c87fff;
  --paper:    #ffffff;
  --paper-2:  #f5f3ff;
  --gray-light: #ece8f8;
  --orange:   #ffab2d;
  --text:     #0e0a2e;
  --muted:    #5a4e80;
  --on-dark-2: rgba(255, 255, 255, .8);
  --line-d:   rgba(255, 255, 255, .2);
  --line-l:   rgba(14, 10, 46, .12);
  --screen:   #e6e8f3;

  --grad-hero:
    linear-gradient(135deg, rgba(15, 24, 102, .82) 0%, rgba(30, 53, 200, .75) 38%, rgba(123, 53, 200, .72) 72%, rgba(200, 127, 255, .68) 100%),
    url('../../img/fondos/natural-textured-surface (3).jpg') center / cover no-repeat;
  --grad-section: linear-gradient(135deg, #3b2ccc 0%, #9b44d4 100%);
  --grad-text: linear-gradient(90deg, #5540e8, #c87fff);
  --light-bg:
    linear-gradient(rgba(255, 255, 255, .86), rgba(255, 255, 255, .88)),
    url('../../img/fondos/natural-textured-surface (1).jpg') center / cover fixed;
  --radius: 1.2rem;
  --radius-lg: 2rem;

  --f-display: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --f-mono:    'Inter', 'Segoe UI', system-ui, sans-serif;
  --f-pixel:   'VT323', ui-monospace, monospace;

  --pad:   clamp(1rem, 3.4vw, 2.75rem);
  --nav-h: 4.5rem;
  --ease:  cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--violet-2) var(--ink);
  scroll-padding-top: var(--nav-h);
}
body {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--ink);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: var(--orange); color: var(--ink); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 2px; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--violet-2); border: 2px solid var(--ink); border-radius: 10px; }

.mono {
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
}
/* Palabra destacada en degradé (como .text-gradient del sitio) */
.tg, .tg .wd > span, .scrub em .sw {
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.tg-light, .tg-light .wd > span { color: var(--lilac); }
.tg-orange, .tg-orange .wd > span { color: var(--orange); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 200;
  background: var(--orange); color: var(--ink); padding: .6rem 1rem; font-weight: 600;
  transition: top .2s;
}
.skip:focus { top: 1rem; }

.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── Marcador de sección (columna izquierda) ─────────────── */
.marker {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .8rem; letter-spacing: .18em;
  color: #ffb74c;
}
.marker i { display: none; }
.marker::before { content: '/'; color: var(--orange); font-size: 1.1rem; letter-spacing: 0; }

/* ── Botones y links (píldoras originales) ───────────── */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.2rem; padding: 0 2rem;
  font-family: var(--f-display); font-size: 1rem; font-weight: 700;
  border-radius: 50px; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background-color .3s, border-color .3s, color .3s;
}
.btn .ico { font-size: 1.05rem; stroke-width: 2.5; transition: transform .3s var(--ease); }
.btn:hover .ico { transform: translateX(3px); }
.btn--sm { min-height: 2.5rem; padding: 0 1.4rem; font-size: .9rem; }

.btn--paper, .btn--solid { background: var(--orange); color: #fff; }
.btn--paper:hover, .btn--solid:hover { transform: translateY(-3px); box-shadow: 0 12px 35px rgba(244, 121, 32, .45); }

.btn--line { border: 2px solid rgba(255, 255, 255, .4); color: #fff; font-weight: 600; }
.btn--line:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }

.btn--box { border: 2px solid rgba(59, 44, 204, .25); color: var(--violet); min-height: 2.9rem; padding: 0 1.5rem; font-size: .95rem; }
.btn--box:hover { background: var(--violet); border-color: var(--violet); color: #fff; }

.arrow-link {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700;
  background: linear-gradient(currentColor, currentColor) left bottom / 100% 2px no-repeat;
  padding-bottom: .2rem;
  transition: background-size .5s var(--ease);
}
.arrow-link:hover { background-size: 0 2px; background-position: right bottom; }
.arrow-link .ico { stroke-width: 2.5; transition: transform .45s var(--ease); }
.arrow-link:hover .ico { transform: translate(2px, -2px); }

/* ═════════════════════════════════════════════════ NAV ═══ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 80;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 var(--pad);
  color: var(--paper);
  transition: transform .6s var(--ease), background-color .4s, color .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.is-solid { background: linear-gradient(135deg, rgba(19, 10, 46, .96) 0%, rgba(80, 30, 140, .94) 100%); box-shadow: 0 4px 30px rgba(80, 30, 140, .35); }
.nav.is-light:not(.is-solid) { color: var(--text); }
.nav.is-hidden { transform: translateY(-101%); }
.nav__logo { display: block; padding: .5rem 0; }
.logo {
  display: block; width: 8.5rem; aspect-ratio: 4 / 1;
  background-color: currentColor;
  -webkit-mask: url('../../img/lp/logo-comnic.webp') left center / contain no-repeat;
          mask: url('../../img/lp/logo-comnic.webp') left center / contain no-repeat;
}
.nav__now { display: none; align-items: center; gap: .45rem; opacity: .75; padding-left: 1rem; border-left: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 30%, transparent); }
.pulse { width: .4rem; height: .4rem; border-radius: 50%; background: var(--orange); }
.nav__right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.lang {
  display: none; position: relative; align-items: center; gap: 2px; padding: 3px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 50px;
}
.lang::before {
  content: ''; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 4px);
  border-radius: 50px; background: #fff; box-shadow: 0 2px 8px rgba(59, 44, 204, .25);
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}
.lang:has([data-lang="en"][aria-pressed="true"])::before { transform: translateX(calc(100% + 2px)); }
.lang button { position: relative; z-index: 1; padding: 4px 11px; border-radius: 50px; font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: rgba(255, 255, 255, .6); transition: color .25s; }
.lang button[aria-pressed="true"] { color: var(--violet); }
.lang button:not([aria-pressed="true"]):hover { color: #fff; }
.nav__cta { display: none; }
.nav__menu { display: inline-flex; align-items: center; gap: .65rem; font-size: .95rem; font-weight: 600; padding: .5rem 0 .5rem .5rem; }
.nav__menu i { position: relative; width: 1.35rem; height: 8px; }
.nav__menu i::before, .nav__menu i::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .5s var(--ease), top .5s var(--ease);
}
.nav__menu i::before { top: 0; }
.nav__menu i::after { top: 6.5px; }
.nav__menu[aria-expanded="true"] i::before { top: 3.25px; transform: rotate(45deg); }
.nav__menu[aria-expanded="true"] i::after { top: 3.25px; transform: rotate(-45deg); }

/* ── Menú a pantalla completa ─────────────────────────── */
.menu {
  position: fixed; inset: 0; z-index: 70;
  background: var(--grad-hero);
  color: #fff;
  padding: calc(var(--nav-h) + 2rem) var(--pad) 2rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease-io);
  overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu__links { display: flex; flex-direction: column; }
.menu__links a {
  display: flex; align-items: baseline; gap: 1rem;
  font-size: clamp(2.4rem, 8vw, 6rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05;
  border-bottom: 1px solid var(--line-d); padding: .25rem 0;
  opacity: 0; transform: translateY(30%);
  transition: opacity .6s var(--ease), transform .8s var(--ease), color .3s;
}
.menu__links a .mono { opacity: .6; }
.menu.is-open .menu__links a { opacity: 1; transform: none; }
.menu.is-open .menu__links a:nth-child(2) { transition-delay: .05s; }
.menu.is-open .menu__links a:nth-child(3) { transition-delay: .1s; }
.menu.is-open .menu__links a:nth-child(4) { transition-delay: .15s; }
.menu.is-open .menu__links a:nth-child(5) { transition-delay: .2s; }
.menu.is-open .menu__links a:nth-child(6) { transition-delay: .25s; }
.menu__links a:hover b { color: var(--orange); }
.menu__aside { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.menu__aside .arrow-link { font-size: clamp(1.25rem, 2.6vw, 1.75rem); }
body.menu-open { overflow: hidden; }

/* ════════════════════════════════════════════════ HERO ═══ */
.hero {
  --hp: 0;
  position: relative; isolation: isolate;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 1rem) var(--pad) 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  color: var(--paper);
  background:
    radial-gradient(32% 40% at 88% 8%, rgba(74, 107, 255, .45), rgba(74, 107, 255, 0) 70%),
    radial-gradient(30% 36% at 6% 96%, rgba(192, 64, 255, .4), rgba(192, 64, 255, 0) 70%),
    radial-gradient(22% 26% at 46% 64%, rgba(244, 121, 32, .3), rgba(244, 121, 32, 0) 70%),
    var(--grad-hero);
  overflow: hidden;
}
.hero__rings { position: absolute; z-index: -1; left: 50%; top: 27%; width: 0; height: 0; }
.hero__rings i {
  position: absolute; left: 50%; top: 50%; border-radius: 50%;
  border: 1px solid rgba(236, 232, 248, .14);
  transform: translate(-50%, -50%) scale(calc(1 + var(--hp) * .25));
}
.hero__rings i:nth-child(1) { width: 78vw; height: 78vw; }
.hero__rings i:nth-child(2) { width: 120vw; height: 120vw; border-style: dashed; border-color: rgba(236, 232, 248, .08); }
.hero__rings i:nth-child(3) { width: 165vw; height: 165vw; }

.hero__object {
  grid-row: 1; justify-self: center;
  position: relative;
  width: min(46vw, 12.5rem, 25svh);
  margin-top: 2rem;
  transform: translate3d(calc(var(--mx, 0) * 14px), calc(var(--hp) * -8vh + var(--my, 0) * 14px), 0);
}
.hero__float {
  animation: float 7s ease-in-out infinite;
}
.hero__float img {
  width: 100%;
  filter: drop-shadow(0 40px 50px rgba(10, 4, 50, .45));
  transform: rotate(calc(var(--hp) * 28deg + var(--mx, 0) * 6deg)) scale(calc(1 - var(--hp) * .18));
  opacity: 0;
  animation: object-in 1.6s var(--ease) .2s forwards;
}
@keyframes float { 50% { transform: translateY(-14px) rotate(-1.5deg); } }
@keyframes object-in {
  from { opacity: 0; translate: 0 40px; scale: .86; }
  to   { opacity: 1; translate: 0 0; scale: 1; }
}
.hero__tag {
  position: absolute; left: 50%; top: -1.75rem; translate: -50% 0; z-index: 1; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4rem 1rem; border-radius: 50px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25);
  letter-spacing: .06em;
}
.hero__tag i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--orange); }
.hero__coord { display: none; position: absolute; opacity: .55; }
.hero__coord b { font-weight: 400; }

.hero__title {
  grid-row: 2; align-self: end;
  font-size: clamp(2.3rem, 9.6vw, 7rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.035em;
  padding-bottom: 1.5rem;
  transform: translate3d(0, calc(var(--hp) * -10vh), 0);
}
.line { display: block; overflow: hidden; padding-bottom: .09em; margin-bottom: -.09em; }
.line__in { display: inline-block; transform: translateY(108%); animation: rise 1.25s var(--ease) forwards; }
.line--2 .line__in { animation-delay: .1s; }
.line--3 .line__in { animation-delay: .2s; color: var(--orange); }
@keyframes rise { to { transform: none; } }

.hero__side {
  grid-row: 3;
  display: flex; flex-direction: column; gap: 1.5rem;
  padding-bottom: 2rem;
  opacity: 0; animation: fade-up 1.2s var(--ease) .55s forwards;
}
.hero__side p { max-width: 34rem; color: rgba(255, 255, 255, .82); font-size: 1.05rem; line-height: 1.6; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .6rem; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero__foot {
  grid-row: 4;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  border-top: 1px solid var(--line-d);
  padding: 1rem 0 1.15rem;
  opacity: .7;
}
.hero__foot > span:first-child { display: none; }
.hero__scroll { display: inline-flex; align-items: center; gap: .6rem; }
.hero__scroll i { position: relative; width: 1px; height: 1.6rem; background: var(--line-d); overflow: hidden; }
.hero__scroll i::after { content: ''; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--paper); animation: drip 2s var(--ease-io) infinite; }
@keyframes drip { to { top: 100%; } }

/* ══════════════════════════════════════════════ ESTUDIO ═══ */
.studio {
  background: var(--light-bg);
  color: var(--text);
  padding: clamp(5rem, 16vh, 11rem) var(--pad);
  display: grid; gap: 2.5rem;
}
.studio .marker { opacity: 1; }
.studio__grid { display: grid; gap: 3rem; }
.scrub {
  font-size: clamp(1.7rem, 3.4vw, 3.1rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
  text-wrap: pretty;
  max-width: 21em;
}
.scrub em { font-style: normal; }
.js .scrub .sw { opacity: calc(.16 + var(--w, 0) * .84); transition: opacity .25s linear; }

.facts {
  margin-top: clamp(2.5rem, 6vh, 4rem);
  display: grid; gap: 1.25rem 2rem;
  max-width: 44rem;
}
.facts > div { border-top: 2px solid var(--violet-2); padding-top: .75rem; }
.facts dt { color: var(--muted); margin-bottom: .35rem; }
.facts dd { font-size: 1.05rem; font-weight: 700; }
.studio__btns { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: .5rem; }

.slices {
  position: relative; align-self: start;
  aspect-ratio: 1200 / 1490;
  width: 100%; max-width: 30rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(91, 64, 232, .18);
  background: var(--gray-light);
}
.slices img { width: 100%; height: 100%; object-fit: cover; }
.slices.is-sliced img { visibility: hidden; }
.slice {
  position: absolute; top: 0; height: 100%;
  background-repeat: no-repeat;
  transform: translate3d(0, calc((1 - var(--p, 0)) * var(--o, 0) * 1%), 0);
  will-change: transform;
}
.slice::after {
  content: ''; position: absolute; inset: 0;
  background: var(--violet);
  mix-blend-mode: color;
  opacity: calc((1 - var(--p, 0)) * .95);
}
.slices figcaption {
  position: absolute; left: .75rem; bottom: .75rem; z-index: 2;
  color: #fff; background: rgba(19, 10, 46, .6); padding: .25rem .7rem; border-radius: 50px;
}

/* ════════════════════════════════════════════ SERVICIOS ═══ */
.services {
  position: relative; isolation: isolate;
  background: var(--grad-section);
  color: #fff;
  padding: clamp(5rem, 15vh, 10rem) var(--pad) clamp(4rem, 12vh, 8rem);
}
.services__title {
  margin-top: 2rem;
  font-size: clamp(2rem, 4.6vw, 4.2rem);
  font-weight: 800; line-height: 1.08; letter-spacing: -.03em;
  max-width: 17em;
  text-wrap: balance;
}
.svc { margin-top: clamp(3rem, 9vh, 6rem); border-bottom: 1px solid var(--line-d); }
.svc__row { border-top: 1px solid var(--line-d); }
.svc__link {
  position: relative; isolation: isolate;
  display: grid; gap: 1rem;
  padding: 1.75rem 0 2rem;
}
.svc__link::before {
  content: ''; position: absolute; z-index: -1;
  inset: 0 calc(var(--pad) * -1);
  background: rgba(19, 10, 46, .28);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .7s var(--ease);
}
.svc__name {
  font-size: clamp(3rem, 11.5vw, 7.75rem);
  font-weight: 900; line-height: .95; letter-spacing: -.04em;
  transition: transform .7s var(--ease);
}
.svc__name small {
  display: block; margin-top: .55rem;
  font-size: max(1.05rem, .24em); font-weight: 600; letter-spacing: -.01em; line-height: 1.15;
  color: #ffd08a;
}
.svc__desc { color: var(--on-dark-2); max-width: 32rem; }
.svc__tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.svc__tags li { border: 1px solid rgba(255, 255, 255, .35); padding: .35rem .85rem; border-radius: 50px; text-transform: none; letter-spacing: .01em; font-weight: 600; font-size: .78rem; }
.svc__go {
  position: absolute; right: 0; top: 1.75rem;
  width: 2.75rem; height: 2.75rem; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 50%;
  font-size: 1.1rem;
  transition: transform .6s var(--ease), background-color .4s, color .4s;
}
@media (hover: hover) {
  .svc__link:hover::before { transform: scaleY(1); }
  .svc__link:hover .svc__name { transform: translateX(1.25rem); }
  .svc__link:hover .svc__go { background: var(--orange); color: var(--ink); border-color: var(--orange); transform: rotate(45deg); }
  .svc__link:hover .svc__tags li { border-color: rgba(236, 232, 248, .35); }
}
.svc__notes {
  margin-top: clamp(3rem, 8vh, 5rem);
  display: grid; gap: 1.5rem 3rem; align-items: start;
  color: var(--on-dark-2);
}
.svc__notes b { color: #fff; font-weight: 700; }
.svc__notes .arrow-link { color: #fff; justify-self: start; }

/* ══════════════════════════════════════════════ PROCESO ═══ */
.process {
  --p: 0;
  position: relative;
  height: 520vh;
  background: var(--ink);
  color: var(--paper);
}
.process__sticky {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  overflow: hidden;
}
.process .marker { position: absolute; left: var(--pad); top: calc(var(--nav-h) + 1.25rem); z-index: 3; }
.process__index {
  position: absolute; right: var(--pad); top: calc(var(--nav-h) + 1.25rem); z-index: 3;
  display: none; text-align: right;
}
.process__index li { opacity: .35; transition: opacity .4s, color .4s; display: flex; justify-content: flex-end; align-items: center; gap: .6rem; }
.process__index li::after { content: ''; width: 1.6rem; height: 1px; background: currentColor; transform: scaleX(.4); transform-origin: right; transition: transform .5s var(--ease), background-color .4s; }
.process__index li.is-on { opacity: 1; }
.process__index li.is-on::after { transform: none; background: var(--orange); }

.process__word {
  position: absolute; z-index: 1;
  font-size: clamp(3.2rem, 14vw, 11rem);
  font-weight: 900; letter-spacing: -.04em; line-height: .95;
  white-space: nowrap;
  transition: color .6s var(--ease);
  will-change: transform, opacity;
}
.process__word--a {
  left: var(--pad); top: calc(var(--nav-h) + 3.25rem);
  color: #fff;
}
.process__word--b {
  right: var(--pad); top: 58%;
  color: var(--purple-mid);
  z-index: 4;
}
.process__word.is-dim { color: rgba(255, 255, 255, .28); }
.process__word--b.is-lit { color: var(--lilac); }

.process__steps {
  position: absolute; z-index: 5;
  left: var(--pad); right: var(--pad); bottom: 1.75rem;
  height: 7.5rem;
}
.pstep {
  position: absolute; inset: 0;
  opacity: 0; transform: translateY(-10px);
  transition: opacity .2s linear, transform .3s var(--ease);
}
.pstep.is-on { opacity: 1; transform: none; transition: opacity .6s var(--ease) .18s, transform .9s var(--ease) .18s; }
.pstep:not(.is-on) { transform: translateY(-10px); }
.pstep__k { display: flex; align-items: center; gap: .5rem; color: var(--lilac); margin-bottom: .6rem; }
.pstep__k i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--orange); }
.pstep__p { font-size: clamp(1.05rem, 1.5vw, 1.3rem); line-height: 1.45; max-width: 26rem; font-weight: 500; }

.crt {
  position: absolute; z-index: 2;
  left: 50%; top: 47%;
  height: min(46svh, 132vw);
  aspect-ratio: 900 / 1214;
  translate: -50% -50%;
  container-type: inline-size;
  transform-origin: 50.2% 32.6%;
  will-change: transform;
}
.crt img { width: 100%; height: 100%; filter: drop-shadow(0 50px 60px rgba(0, 0, 0, .55)); }
.crt__screen {
  position: absolute;
  left: 13.1%; top: 11.7%; width: 74%; height: 41.8%;
  border-radius: 6% / 8.5%;
  overflow: hidden;
  background: var(--screen);
  box-shadow: inset 0 0 6cqw rgba(30, 20, 80, .35);
  color: #2b2163;
  font-family: var(--f-pixel);
  font-size: 5.6cqw;
  line-height: 1.15;
  transition: background-color .5s;
}
.crt__screen::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(to bottom, rgba(40, 30, 100, .07) 0 1px, transparent 1px 3px);
  opacity: calc(1 - var(--z, 0));
}
.crt.is-zooming .crt__screen { background: #f4f2fb; box-shadow: none; }
.scr {
  position: absolute; inset: 7% 8%;
  display: flex; flex-direction: column;
  opacity: 0; transition: opacity .35s;
}
.scr.is-on { opacity: 1; }
.scr__bar {
  display: flex; justify-content: center;
  font-size: .78em; margin-bottom: .6em;
  background: repeating-linear-gradient(to bottom, currentColor 0 1px, transparent 1px 3px) center / 100% 62% no-repeat;
}
.scr__bar span { background: var(--screen); padding: 0 .45em; line-height: 1.1; }
.scr__h { font-size: 1.25em; margin-bottom: .35em; }
.scr__list li { opacity: 0; transition: opacity .1s; }
.scr.is-on .scr__list li { opacity: 1; }
.scr.is-on .scr__list li:nth-child(1) { transition-delay: .25s; }
.scr.is-on .scr__list li:nth-child(2) { transition-delay: .55s; }
.scr.is-on .scr__list li:nth-child(3) { transition-delay: .85s; }
.caret { display: inline-block; width: .5em; height: 1em; background: currentColor; vertical-align: -.15em; margin-left: .15em; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.wf { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: .18fr 1fr .8fr; gap: 5%; }
.wf i { border: 1px solid currentColor; transform: scale(.6); opacity: 0; transition: transform .6s var(--ease), opacity .3s; }
.scr.is-on .wf i { transform: none; opacity: 1; }
.wf__nav { grid-column: 1 / -1; }
.wf__hero { grid-column: 1 / -1; background: repeating-linear-gradient(135deg, rgba(43, 33, 99, .35) 0 1px, transparent 1px 7px); }
.scr.is-on .wf__hero { transition-delay: .12s; }
.scr.is-on .wf__a { transition-delay: .22s; }
.scr.is-on .wf__b { transition-delay: .3s; }
.scr.is-on .wf__c { transition-delay: .38s; }
.scr__code { font: inherit; white-space: pre; }
.scr__code span { display: inline-block; overflow: hidden; vertical-align: top; max-width: 0; white-space: nowrap; }
.scr__code .dim { opacity: .55; }
.scr.is-on .scr__code span { max-width: 20em; transition: max-width 1.1s steps(22); }
.scr.is-on .scr__code span:nth-child(2) { transition-delay: .5s; }
.scr.is-on .scr__code span:nth-child(3) { transition-delay: 1s; }
.scr.is-on .scr__code span:nth-child(4) { transition-delay: 1.5s; }
.bars { flex: 1; display: flex; align-items: flex-end; gap: 5%; padding: 0 2% 0; border-bottom: 1px solid currentColor; }
.bars i { flex: 1; height: calc(var(--h) * 100%); background: currentColor; transform: scaleY(0); transform-origin: bottom; transition: transform .9s var(--ease); }
.bars i:last-child { background: var(--violet-2); }
.scr.is-on .bars i { transform: scaleY(1); }
.scr.is-on .bars i:nth-child(2) { transition-delay: .06s; }
.scr.is-on .bars i:nth-child(3) { transition-delay: .12s; }
.scr.is-on .bars i:nth-child(4) { transition-delay: .18s; }
.scr.is-on .bars i:nth-child(5) { transition-delay: .24s; }
.scr.is-on .bars i:nth-child(6) { transition-delay: .3s; }
.scr.is-on .bars i:nth-child(7) { transition-delay: .36s; }
.scr__note { font-size: .6em; opacity: .6; margin-top: .3em; text-align: right; }

/* ════════════════════════════════════════════════ CASOS ═══ */
.work { background: var(--light-bg); color: var(--text); }
.work__head {
  padding: clamp(5rem, 14vh, 9rem) var(--pad) clamp(2.5rem, 6vh, 4rem);
  display: grid; gap: 1.5rem; align-items: end;
}
.work__title {
  font-size: clamp(3.2rem, 11.5vw, 10rem);
  font-weight: 900; line-height: .95; letter-spacing: -.04em;
}
.work__title .ch { transition: color .35s; }
.work__title .ch.is-on { color: color-mix(in srgb, var(--violet-2) calc((1 - var(--k, 0)) * 100%), var(--lilac)); }
.work__intro { color: var(--muted); max-width: 26rem; font-size: .98rem; }

.work__stack { --n: 5; position: relative; height: calc(var(--n) * 100svh + 40svh); }
.work__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--ink); color: var(--paper); }
.work__hud {
  position: absolute; z-index: 20; left: var(--pad); right: var(--pad); top: calc(var(--nav-h) + 1rem);
  display: flex; align-items: flex-start; gap: 2rem; pointer-events: none;
}
.work__count { font-family: var(--f-display); font-size: .8rem; }
.work__count b { font-size: 2.6rem; font-weight: 900; letter-spacing: -.03em; line-height: 1; margin-right: .2rem; }
.work__nav { display: none; }
.work__nav li { display: flex; align-items: center; gap: .6rem; opacity: .45; transition: opacity .4s; }
.work__nav li::before { content: ''; width: 1.4rem; height: 1px; background: currentColor; transform: scaleX(.35); transform-origin: left; transition: transform .5s var(--ease), background-color .4s; }
.work__nav li.is-on { opacity: 1; }
.work__nav li.is-on::before { transform: none; background: var(--orange); }

.case {
  --clip: 100; --s: 1.15; --veil: 1; --t: 1;
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 1rem;
  padding: calc(var(--nav-h) + 5.5rem) var(--pad) 3rem;
  clip-path: inset(calc(var(--clip) * 1%) 0 0 0);
  will-change: clip-path;
}
.case:first-of-type { --clip: 0; }
.case__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--night); }
.case__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--s)); will-change: transform; }
.case__veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(19, 10, 46, .92) 0%, rgba(19, 10, 46, .45) 42%, rgba(19, 10, 46, .15) 100%);
}
.case__veil::before {
  content: ''; position: absolute; inset: 0;
  background: var(--violet);
  mix-blend-mode: color;
  opacity: var(--veil);
}
.case--screen .case__media {
  background: var(--grad-hero);
}
.case--screen .case__bg { filter: brightness(.5) saturate(.85); }
.case--screen .case__shot {
  position: absolute; left: var(--pad); right: var(--pad); top: calc(var(--nav-h) + 8.75rem);
  width: auto; height: auto; max-height: 38svh; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left;
  border-radius: var(--radius);
  box-shadow: 0 30px 70px rgba(19, 10, 46, .5);
  margin: 0 auto;
}
.case--screen .case__veil { background: linear-gradient(to top, rgba(19, 10, 46, .85) 0%, rgba(19, 10, 46, 0) 45%); }
.case__cat { margin-bottom: auto; opacity: .85; }
.case__name {
  font-size: clamp(2.9rem, 12.5vw, 9.25rem);
  font-weight: 900; line-height: .95; letter-spacing: -.04em;
  transform: translateY(calc((1 - var(--t)) * 30%));
  opacity: calc(.2 + var(--t) * .8);
}
.case__info { max-width: 30rem; display: grid; gap: .6rem; color: var(--on-dark-2); font-size: .98rem; }
.case__lead { color: #fff; font-size: 1.1rem; line-height: 1.4; font-weight: 700; }
.case__meta { display: flex; gap: 2.5rem; border-top: 1px solid var(--line-d); padding-top: .7rem; margin-top: .3rem; }
.case__meta dt { opacity: .7; }
.case__meta dd { color: #fff; font-weight: 700; font-size: .92rem; }
.work__progress {
  position: absolute; z-index: 20; left: var(--pad); right: var(--pad); bottom: 1rem;
  display: grid; grid-template-columns: repeat(var(--n), 1fr); gap: .4rem;
}
.work__progress i { height: 2px; background: var(--line-d); position: relative; overflow: hidden; }
.work__progress i::after { content: ''; position: absolute; inset: 0; background: var(--orange); transform: scaleX(var(--f, 0)); transform-origin: left; }

/* ═════════════════════════════════════════════ CLIENTES ═══ */
.clients { background: var(--light-bg); color: var(--text); padding: clamp(5rem, 14vh, 9rem) 0 clamp(3rem, 8vh, 5rem); overflow: hidden; }
.clients__head { padding: 0 var(--pad); display: grid; gap: 1rem; margin-bottom: clamp(2rem, 6vh, 3.5rem); align-items: end; }
.clients__title { font-size: clamp(2rem, 4.8vw, 4.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -.03em; max-width: 12em; }
.clients__head p { color: var(--muted); max-width: 22rem; }
.marquee {
  overflow: hidden;
  padding: clamp(1.1rem, 2.6vw, 1.75rem) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.marquee + .marquee { border-top: 1px solid var(--line-l); }
.marquee__track { display: flex; align-items: center; width: max-content; will-change: transform; }
/* Cada logo ya viene recortado a su contenido; --h es su alto óptico (misma superficie visual) */
.marquee__track li { flex: none; display: flex; align-items: center; height: 4.25rem; padding: 0 clamp(1.6rem, 3vw, 2.75rem); }
.marquee__track img {
  width: auto; max-width: none;
  height: calc(var(--h) * .72px);
  /* los originales son negros: se normalizó su opacidad en el archivo */
  opacity: .72;
  transition: opacity .4s;
}
.marquee__track li:hover img { opacity: 1; }
@media (min-width: 760px) { .marquee__track img { height: calc(var(--h) * 1px); } }

/* ═══════════════════════════════════════════ IMPULSAMOS ═══ */
.outro { --p: 0; background: var(--light-bg); color: var(--text); padding: clamp(3rem, 10vh, 7rem) var(--pad) clamp(4rem, 10vh, 6rem); overflow: hidden; }
.outro__word {
  font-size: min(17.6vw, calc((100vw - 2 * var(--pad)) / 6.6), 19rem);
  font-weight: 900; line-height: .95; letter-spacing: -.04em;
  white-space: nowrap;
  padding-bottom: .1em;
  overflow: hidden;
}
.outro__word .ch { display: inline-block; transform: translateY(calc(var(--y, 0) * 1%)); will-change: transform; }
.outro__word .ch:last-child { color: var(--orange); }
.outro__foot {
  margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--line-l);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 1rem 2rem;
}
.outro__p { font-size: clamp(1.1rem, 1.8vw, 1.45rem); font-weight: 700; letter-spacing: -.01em; }
.outro__foot .arrow-link { color: var(--violet); }

/* ═══════════════════════════════════════════════ EQUIPO ═══ */
.team { background: radial-gradient(50% 60% at 90% 10%, rgba(123, 53, 200, .45), rgba(123, 53, 200, 0) 70%), var(--night); color: #fff; padding: clamp(5rem, 15vh, 10rem) var(--pad); }
.team__title { margin-top: 2rem; font-size: clamp(2.2rem, 5.4vw, 5rem); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; max-width: 11em; text-wrap: balance; }
.team__grid { margin-top: clamp(3rem, 9vh, 6rem); display: grid; gap: 3rem 4rem; }
.person { border-top: 1px solid var(--line-d); padding-top: 1.25rem; }
.person__role { color: var(--orange); }
.person__name { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; margin: .5rem 0 1rem; }
.person p:last-child { color: var(--on-dark-2); max-width: 34rem; }
.team__note { margin-top: clamp(3rem, 8vh, 5rem); color: var(--lilac); max-width: 40rem; font-size: 1.1rem; }

/* ══════════════════════════════════════════════════ FAQ ═══ */
.faq { background: var(--light-bg); color: var(--text); padding: clamp(5rem, 14vh, 9rem) var(--pad); display: grid; gap: 2.5rem; }
.faq__title { font-size: clamp(2rem, 4.6vw, 4rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.08; }
.faq__list { border-top: 2px solid var(--violet-2); }
.faq__item { border-bottom: 1px solid var(--line-l); interpolate-size: allow-keywords; }
.faq__item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 1.5rem;
  padding: 1.35rem 0;
  font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 700; letter-spacing: -.01em; line-height: 1.3;
  transition: color .3s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--violet); }
.faq__item summary i { position: relative; flex: none; width: 1rem; height: 1rem; }
.faq__item summary i::before, .faq__item summary i::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.faq__item summary i::after { transform: rotate(90deg); }
.faq__item[open] summary i::after { transform: rotate(0); }
.faq__item p { color: var(--muted); max-width: 62ch; padding: 0 0 1.5rem; }
.faq__item::details-content { block-size: 0; overflow: hidden; transition: block-size .6s var(--ease), content-visibility .6s allow-discrete; }
.faq__item[open]::details-content { block-size: auto; }

/* ═════════════════════════════════════════════ CONTACTO ═══ */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  color: var(--paper);
  padding: calc(var(--nav-h) + 1rem) var(--pad) 1.25rem;
  background: var(--grad-hero);
}
.contact__top { display: flex; justify-content: space-between; align-items: center; opacity: .85; }
.marker--inline { opacity: 1; }
.contact__title { margin-top: clamp(2.5rem, 8vh, 5rem); font-size: clamp(2.6rem, 7.6vw, 7rem); font-weight: 900; line-height: 1.02; letter-spacing: -.035em; max-width: 10em; }
.contact__p { margin-top: 1.5rem; color: var(--on-dark-2); max-width: 32rem; font-size: 1.1rem; }
.contact__grid {
  margin-top: clamp(3rem, 8vh, 5rem); padding-top: 1.5rem; border-top: 1px solid var(--line-d);
  display: grid; gap: 2.5rem;
}
.contact__main { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.contact__nav { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; font-size: 1.3rem; font-weight: 600; }
.contact__nav a { transition: color .3s, transform .4s var(--ease); }
.contact__nav a:hover { color: var(--orange); transform: translateX(.35rem); }
.contact__meta { display: grid; gap: 1.25rem; align-content: start; opacity: .9; }
.contact__social { display: grid; gap: .25rem; }
.contact__social a:hover { color: var(--orange); }
.contact__bottom { margin-top: clamp(3rem, 10vh, 6rem); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.hola { font-size: clamp(5rem, 24vw, 21rem); font-weight: 900; line-height: .78; letter-spacing: -.045em; color: var(--orange); padding-bottom: .04em; overflow: hidden; }
.hola span { display: inline-block; transition: transform .7s var(--ease), opacity .4s; }
.hola.is-out span { transform: translateY(-105%); opacity: 0; }
.hola.is-in span { transform: translateY(105%); opacity: 0; transition: none; }
.contact__legal { display: grid; gap: .3rem; opacity: .85; padding-bottom: 4.5rem; }
.contact__legal a:hover { color: var(--orange); }

/* ═══════════════════════════════════════ REVEALS (con JS) ═══ */
.js [data-reveal] { opacity: 0; transform: translateY(1.75rem); transition: opacity .9s var(--ease) var(--d, 0s), transform 1.2s var(--ease) var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .svc__row[data-reveal] { transform: none; opacity: 1; }
.js .svc__row .svc__name > span { display: inline-block; clip-path: inset(0 0 100% 0); transform: translateY(40%); transition: clip-path 1.1s var(--ease), transform 1.2s var(--ease); }
.js .svc__row.in .svc__name > span { clip-path: inset(0 0 -10% 0); transform: none; }
.js .svc__row .svc__name small, .js .svc__row .svc__desc, .js .svc__row .svc__tags, .js .svc__row .svc__go { opacity: 0; transform: translateY(1rem); transition: opacity .8s var(--ease) .25s, transform 1s var(--ease) .25s; }
.js .svc__row.in .svc__name small, .js .svc__row.in .svc__desc, .js .svc__row.in .svc__tags, .js .svc__row.in .svc__go { opacity: 1; transform: none; }

.wd { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.wd > span { display: inline-block; }
.js [data-lines] .wd > span { transform: translateY(105%); transition: transform 1.1s var(--ease) calc(var(--i, 0) * .045s); }
.js [data-lines].in .wd > span { transform: none; }

/* ══════════════════════════════════════════ ≥ 760px ══ */
@media (min-width: 760px) {
  .nav__now { display: inline-flex; }
  .lang { display: flex; }
  .nav__cta { display: inline-flex; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .svc__notes { grid-template-columns: 1fr 1fr; }
  .svc__notes .arrow-link { grid-column: 1 / -1; }
  .team__grid { grid-template-columns: 1fr 1fr; }
  .contact__grid { grid-template-columns: 1.3fr 1fr 1fr; }
  .hero__foot > span:first-child { display: inline; }
  .work__head { grid-template-columns: 1fr auto; }
  .clients__head { grid-template-columns: 1fr auto; }
  .work__nav { display: grid; gap: .25rem; margin-left: 18vw; }
  .contact__legal { text-align: right; padding: 0 5rem .4rem 0; }
}

/* ══════════════════════════════════════════ ≥ 1000px ══ */
@media (min-width: 1000px) {
  :root { --nav-h: 4.5rem; }

  .hero {
    grid-template-columns: 1fr minmax(20rem, 27rem);
    grid-template-rows: 1fr auto auto;
    column-gap: 4vw;
  }
  .hero { --obj: min(27vw, 30rem, 50vh); }
  .hero__tag { left: 0; translate: none; top: -.25rem; }
  .hero__object {
    position: absolute; right: 9vw; top: calc(var(--nav-h) + 3vh);
    width: var(--obj);
    margin: 0;
  }
  .hero__rings { left: auto; right: calc(9vw + var(--obj) / 2); top: calc(var(--nav-h) + 3vh + var(--obj) / 2); }
  .hero__rings i:nth-child(1) { width: 46vw; height: 46vw; }
  .hero__rings i:nth-child(2) { width: 74vw; height: 74vw; }
  .hero__rings i:nth-child(3) { width: 112vw; height: 112vw; }
  .hero__coord { display: block; }
  .hero__coord--y { left: 47vw; top: 46vh; }
  .hero__coord--x { right: var(--pad); top: 46vh; }
  .hero__title { grid-column: 1; grid-row: 1 / 3; font-size: clamp(3rem, 5.3vw, 6.4rem); padding-bottom: 2.25rem; }
  .line--2 { padding-left: .9em; }
  .hero__side { grid-column: 2; grid-row: 2; padding-bottom: 2.4rem; }
  .hero__foot { grid-column: 1 / -1; grid-row: 3; padding-right: 5rem; }

  .studio { grid-template-columns: minmax(9rem, 1fr) 6fr; }
  .studio .marker { align-self: start; margin-top: 14vh; }
  .studio__grid { grid-template-columns: 1.65fr 1fr; gap: 6vw; align-items: start; }
  .slices { max-width: none; }

  .services { display: grid; grid-template-columns: minmax(9rem, 1fr) 6fr; column-gap: 0; }
  .services .marker { grid-column: 1; align-self: start; margin-top: 2.6rem; }
  .services__title { grid-column: 2; margin-top: 0; }
  .svc, .svc__notes { grid-column: 1 / -1; }
  .svc__link { grid-template-columns: 1.15fr .85fr 3rem; grid-template-rows: auto 1fr; column-gap: 4vw; padding: 2.4rem 0 2.6rem; }
  .svc__name { grid-row: 1 / 3; }
  .svc__desc { grid-column: 2; align-self: start; }
  .svc__tags { grid-column: 2; align-self: start; }
  .svc__go { position: static; grid-column: 3; grid-row: 1; }
  .svc__notes { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .svc__notes .arrow-link { grid-column: auto; }

  .process__index { display: grid; gap: .3rem; }
  .process__word { font-size: clamp(4.5rem, 7.6vw, 10rem); }
  .process__word--a { left: var(--pad); top: calc(var(--nav-h) + 9vh); }
  .process__word--b { right: var(--pad); top: auto; bottom: 7vh; }
  .crt { height: min(68vh, 50vw); top: 49%; left: 60%; }
  .process__steps { left: var(--pad); right: auto; bottom: auto; top: calc(var(--nav-h) + 9vh + 9.6vw); width: min(25rem, 30vw); height: 10rem; }

  .case { display: grid; grid-template-columns: 1fr minmax(20rem, 29rem); grid-template-rows: auto 1fr auto; column-gap: 4vw; padding-bottom: 3.5rem; }
  .case__cat { grid-column: 2; grid-row: 1; text-align: right; margin: 0; }
  .case__name { grid-column: 1; grid-row: 3; align-self: end; }
  .case__info { grid-column: 2; grid-row: 3; align-self: end; }
  .case--screen .case__shot { left: auto; right: var(--pad); top: calc(var(--nav-h) + 7.5rem); width: min(50vw, 60rem); max-height: calc(100svh - var(--nav-h) - 7.5rem - 15.5rem); }

  .team { display: grid; grid-template-columns: minmax(9rem, 1fr) 6fr; }
  .team .marker { grid-column: 1; align-self: start; margin-top: 1.4rem; }
  .team__title, .team__grid, .team__note { grid-column: 2; }
  .team__title { margin-top: 0; }

  .faq { grid-template-columns: minmax(9rem, 1fr) 2.2fr 3.8fr; column-gap: 4vw; }
  .faq__title { grid-column: 2; align-self: start; position: sticky; top: calc(var(--nav-h) + 2rem); }
  .faq__list { grid-column: 3; }
}

@media (min-width: 1000px) and (max-height: 760px) {
  .process__steps { top: 50vh; }
  .crt { height: 64vh; }
}

/* ══════════════════════════════════ Movimiento reducido ══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .line__in { transform: none; }
  .hero__float img { opacity: 1; }
  .hero__side { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════
   WIDGET DE DIAGNÓSTICO (burbuja + panel con el chat)
   Copia de styles.css adaptada a los tokens de esta página.
   ═══════════════════════════════════════════════════════════ */
.diagw { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 10050; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; font-family: var(--f-display); }
.diagw-invite { position: relative; max-width: 18rem; background: #fff; color: var(--text); border-radius: 1.1rem 1.1rem .3rem 1.1rem; box-shadow: 0 18px 45px rgba(19,10,46,.28); padding: .8rem 2.2rem .9rem .95rem; cursor: pointer; transform-origin: bottom right; animation: diagw-slide-in .45s cubic-bezier(.2,.9,.3,1); }
.diagw-invite[hidden] { display: none; }
.diagw-invite:hover { box-shadow: 0 22px 55px rgba(19,10,46,.34); }
.diagw-invite-head { display: flex; align-items: center; gap: .45rem; margin-bottom: .4rem; }
.diagw-invite-ava { width: 1.4rem; height: 1.4rem; border-radius: .45rem; flex: none; background: var(--grad-section); color: #fff; display: flex; align-items: center; justify-content: center; }
.diagw-invite-ava svg { width: .85rem; height: .85rem; }
.diagw-invite-name { font-size: .78rem; font-weight: 800; letter-spacing: -.01em; }
.diagw-invite-name b { color: var(--violet-2); }
.diagw-invite-time { font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: auto; }
.diagw-invite-text { font-size: .86rem; line-height: 1.45; margin: 0; }
.diagw-invite-text strong { font-weight: 800; }
.diagw-invite-close { position: absolute; top: .4rem; right: .45rem; width: 1.5rem; height: 1.5rem; border: none; background: transparent; color: var(--muted); font-size: 1.15rem; line-height: 1; border-radius: 50%; cursor: pointer; transition: background .18s, color .18s; }
.diagw-invite-close:hover { background: var(--paper); color: var(--text); }
.diagw-fab { width: 3.75rem; height: 3.75rem; border: none; border-radius: 50%; cursor: pointer; background: var(--grad-section); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 32px rgba(91,64,232,.4); transition: transform .22s cubic-bezier(.2,.8,.3,1), box-shadow .22s; position: relative; }
.diagw-fab:hover { transform: translateY(-3px) scale(1.05); box-shadow: 0 16px 40px rgba(40,20,140,.55); }
.diagw-fab:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }
.diagw-fab svg { width: 1.7rem; height: 1.7rem; }
.diagw-fab .diagw-ico-close { display: none; }
.diagw.is-open .diagw-fab .diagw-ico-chat { display: none; }
.diagw.is-open .diagw-fab .diagw-ico-close { display: block; }
.diagw-dot { position: absolute; top: .1rem; right: .1rem; width: .85rem; height: .85rem; border-radius: 50%; background: var(--orange); border: 2px solid #fff; animation: diagw-breathe 1.7s ease-in-out infinite; }
.diagw-dot::after { content: ''; position: absolute; inset: -2px; border-radius: 50%; background: var(--orange); opacity: .55; animation: diagw-ping 1.7s ease-out infinite; }
.diagw.is-open .diagw-dot, .diagw.is-engaged .diagw-dot { display: none; }
.diagw-badge { position: absolute; top: -.15rem; right: -.15rem; min-width: 1.35rem; height: 1.35rem; padding: 0 .32rem; border-radius: 99px; background: #ff4d4f; color: #fff; font-size: .74rem; font-weight: 800; line-height: 1; display: none; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(255,77,79,.5); }
.diagw.is-calling .diagw-badge { display: flex; }
.diagw.is-calling .diagw-dot { display: none; }
.diagw.is-calling .diagw-fab { animation: diagw-wiggle 1.15s ease-in-out 2; }
.diagw.is-calling .diagw-fab:hover { animation: none; }
.diagw-panel { position: fixed; right: 1.25rem; bottom: 6rem; width: min(24.5rem, calc(100vw - 2.5rem)); height: min(38rem, calc(100vh - 8rem)); background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(19,10,46,.35); overflow: hidden; display: flex; flex-direction: column; z-index: 10050; transform-origin: bottom right; animation: diagw-pop .3s cubic-bezier(.2,.8,.3,1); }
.diagw-panel[hidden] { display: none; }
.diagw-panel-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; background: var(--grad-section); color: #fff; }
.diagw-panel-title { font-size: .95rem; font-weight: 800; letter-spacing: -.01em; line-height: 1.2; }
.diagw-panel-sub { font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; opacity: .8; margin-top: .1rem; }
.diagw-panel-actions { display: flex; align-items: center; gap: .3rem; flex: none; }
.diagw-icon-btn { width: 2rem; height: 2rem; border: none; border-radius: .55rem; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .18s; }
.diagw-icon-btn:hover { background: rgba(255,255,255,.28); }
.diagw-icon-btn svg { width: 1rem; height: 1rem; }
.diagw-frame { flex: 1; width: 100%; border: none; display: block; background: #fff; }
.diagw-panel.is-informe { right: 0; bottom: 0; top: 0; left: 0; width: 100%; height: 100%; border-radius: 0; z-index: 10060; }
body.diagw-lock { overflow: hidden; }
@keyframes diagw-pop { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes diagw-ping { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(2.1); opacity: 0; } }
@keyframes diagw-breathe { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(255,171,45,.55); } 50% { transform: scale(1.18); box-shadow: 0 0 10px 2px rgba(255,171,45,.65); } }
@keyframes diagw-slide-in { from { opacity: 0; transform: translateX(1.5rem) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes diagw-wiggle { 0%, 100% { transform: none; } 12% { transform: rotate(-13deg) scale(1.07); } 26% { transform: rotate(11deg) scale(1.07); } 40% { transform: rotate(-9deg) scale(1.05); } 54% { transform: rotate(7deg) scale(1.03); } 68% { transform: rotate(-4deg); } 82% { transform: rotate(2deg); } }
@media (max-width: 640px) {
  .diagw { right: 1rem; bottom: 1rem; }
  .diagw-panel { inset: 0; width: 100%; height: 100%; border-radius: 0; }
  .diagw-invite { max-width: min(16rem, calc(100vw - 6rem)); }
}
@media (prefers-reduced-motion: reduce) {
  .diagw-panel, .diagw-invite { animation: none; }
  .diagw-dot::after { animation: none; opacity: 0; }
  .diagw.is-calling .diagw-fab { animation: none; }
}
@media print { .diagw, .diagw-panel, .nav { display: none !important; } }
