/* ==========================================================================
   LEVI / DIGIMAX — Portafolio v4
   Oscuro · denso · video primero
   ========================================================================== */

:root {
  --bg: #0c0c0d;
  --surface: #151517;
  --surface-2: #1d1d20;
  --text: #f2f1ec;
  --muted: rgba(242, 241, 236, .56);
  --line: rgba(242, 241, 236, .1);

  --accent: #1614fc;
  --accent-bright: #5b59ff;
  --spark: #ffcc00;
  --wa: #25d366;

  --pad: clamp(14px, 2.4vw, 36px);
  --gap: clamp(6px, .7vw, 10px);
  --radius: 14px;
  --radius-lg: 24px;

  --font: "Geist", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { list-style: none; padding: 0; }
sup { font-size: .32em; vertical-align: top; position: relative; top: .45em; color: var(--muted); font-weight: 400; letter-spacing: 0; font-family: var(--mono); }
em { font-style: normal; color: var(--accent-bright); }
:focus-visible { outline: 2px solid var(--spark); outline-offset: 3px; border-radius: 6px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; transition: top .3s var(--ease); }
.skip-link:focus { top: 16px; }

/* Grano sutil para romper lo plano */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------- Buttons */
.btn {
  --h: 50px;
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: var(--h); padding: 0 6px 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap;
  transition: background-color .35s var(--ease), color .35s var(--ease), transform .2s var(--ease), border-color .35s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn__icon {
  width: calc(var(--h) - 12px); height: calc(var(--h) - 12px);
  display: grid; place-items: center; border-radius: 50%;
  transition: transform .45s var(--ease);
}
.btn__icon svg { width: 18px; height: 18px; }
.btn:hover .btn__icon { transform: rotate(45deg); }
.btn--lg { --h: 58px; font-size: 16px; padding-left: 26px; }
.btn--sm { --h: 42px; font-size: 14px; padding-left: 18px; }
.btn--block { width: 100%; justify-content: space-between; }
.btn--accent { background: var(--accent); color: #fff; }
.btn--accent .btn__icon { background: #fff; color: var(--accent); }
.btn--accent:hover { background: var(--accent-bright); }
.btn--light { background: var(--text); color: var(--bg); }
.btn--light .btn__icon { background: var(--accent); color: #fff; }
.btn--light:hover { background: var(--spark); }
.btn--ghost { padding: 0 24px 0 8px; border: 1px solid rgba(242, 241, 236, .28); color: var(--text); }
.btn--ghost:hover { border-color: var(--text); background: rgba(242, 241, 236, .08); }
.btn__play { width: calc(var(--h) - 16px); height: calc(var(--h) - 16px); display: grid; place-items: center; border-radius: 50%; background: var(--text); color: var(--bg); }
.btn__play svg { width: 18px; height: 18px; }

.btn--shine::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .32) 50%, transparent 70%);
  transform: translateX(-120%); animation: shine 4.5s var(--ease) infinite;
}
.btn--light.btn--shine::before { background: linear-gradient(110deg, transparent 30%, rgba(22, 20, 252, .18) 50%, transparent 70%); }
@keyframes shine { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }

.circle-btn {
  width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(242, 241, 236, .24);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), transform .2s var(--ease);
}
.circle-btn svg { width: 20px; height: 20px; }
.circle-btn--light { background: var(--text); color: var(--bg); border-color: var(--text); }
.circle-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.circle-btn:active { transform: scale(.94); }

.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--spark); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 204, 0, .6); } 70%, 100% { box-shadow: 0 0 0 10px rgba(255, 204, 0, 0); } }

/* ------------------------------------------------------------------ Nav */
.nav {
  position: fixed; z-index: 50; top: 10px; left: 50%; translate: -50% 0;
  width: min(calc(100% - 20px), 1180px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 6px 6px 6px 18px; border-radius: 999px;
  background: rgba(12, 12, 13, .62); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.brand { display: inline-flex; align-items: center; }
.brand img { height: 30px; width: auto; }
.nav__links { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
.nav__links a { transition: color .25s var(--ease); }
.nav__links a:hover { color: var(--text); }

/* ----------------------------------------------------------------- Hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--pad);
  min-height: min(100svh, 1000px); padding: 0 0 0 var(--pad);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: auto auto -20% -10%; width: 70vw; height: 70vw; pointer-events: none;
  background: radial-gradient(closest-side, rgba(22, 20, 252, .35), transparent 70%);
}
.hero__copy {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(18px, 2.4vh, 28px);
  padding: 96px 0 40px;
}
.hero__services { display: flex; flex-wrap: wrap; gap: 6px; }
.hero__services li {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 500; background: rgba(242, 241, 236, .06); border: 1px solid var(--line);
}
.hero__sub strong { color: var(--text); font-weight: 600; }

/* Palabra que rota: Videos → Diseños → Webs (la 4.ª repite la 1.ª para un bucle sin salto) */
.rotator { display: inline-block; vertical-align: top; height: 1em; margin-bottom: -.14em; overflow: hidden; }
.rotator__track { display: block; animation: rotate-words 7.5s var(--ease) infinite; }
.rotator__track > span { display: block; height: 1em; line-height: 1em; }
@keyframes rotate-words {
  0%, 26% { transform: translateY(0); }
  33%, 59% { transform: translateY(-1em); }
  66%, 92% { transform: translateY(-2em); }
  100% { transform: translateY(-3em); }
}

/* Foto de Levi entre el texto y el muro */
.hero { --me-w: clamp(280px, 29vw, 460px); --me-left: 39%; }
.hero__me {
  position: absolute; z-index: 3; bottom: 0; left: var(--me-left);
  width: var(--me-w); aspect-ratio: 548 / 760; pointer-events: none;
}
.hero__me::before {
  content: ""; position: absolute; z-index: -1; left: 50%; top: 18%; width: 120%; aspect-ratio: 1; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(91, 89, 255, .75), rgba(22, 20, 252, .35) 45%, transparent 72%);
}
.hero__tag {
  position: absolute; z-index: 5; left: calc(var(--me-left) - var(--me-w) * .06); bottom: calc(var(--me-w) * .19);
  display: flex; flex-direction: column; padding: 10px 16px; border-radius: 14px;
  background: rgba(12, 12, 13, .7); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 13px; color: var(--muted); rotate: -4deg;
}
.hero__tag strong { color: var(--text); font-size: 15px; }
.js .hero__me, .js .hero__tag { opacity: 0; }
.is-loaded .hero__me, .is-loaded .hero__tag { opacity: 1; transition: opacity 1s var(--ease) .4s; }

/* Personaje animado: en el hero ocupa el hueco de .hero__me; al bajar viaja al botón de WhatsApp */
.me {
  position: absolute; z-index: 4; top: 0; left: 0;
  width: clamp(280px, 29vw, 460px); aspect-ratio: 548 / 760;
  transform-origin: 0 0; pointer-events: none; will-change: transform;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .55));
  transition: opacity .45s var(--ease);
}
.me.is-fixed { position: fixed; z-index: 44; }
.me.is-docked { pointer-events: auto; cursor: pointer; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .6)); }
.me__media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.me video.me__media { opacity: 0; transition: opacity .3s linear; }
.me.has-video video.me__media { opacity: 1; }
.me.has-video img.me__media { opacity: 0; }
.js .me { opacity: 0; }
.is-loaded .me { opacity: 1; transition: opacity 1s var(--ease) .25s; }
.is-contact-visible .me.is-docked, .is-contact-visible .me-bubble { opacity: 0; pointer-events: none; }

.me-bubble {
  position: fixed; z-index: 46; right: 140px; bottom: 120px;
  padding: 10px 14px; border-radius: 16px 16px 4px 16px;
  background: var(--text); color: var(--bg); font-size: 14px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .6);
  opacity: 0; transform: translateY(8px) scale(.9); transform-origin: 100% 100%; pointer-events: none;
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
.me-bubble.is-on { opacity: 1; transform: none; }
.hero__title {
  font-size: clamp(64px, 8.4vw, 150px); font-weight: 550; line-height: .86; letter-spacing: -.06em;
  margin-left: -.04em;
}
.hero__line { display: block; overflow: hidden; padding-bottom: .06em; white-space: nowrap; }
.hero__line > span { display: inline-block; }
.hero__sub { font-size: clamp(17px, 1.45vw, 21px); color: var(--muted); max-width: 38ch; text-wrap: balance; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* Credencial: editor oficial de Gipsy Kings */
.hero__cred {
  display: flex; align-items: center; gap: 14px; width: fit-content; max-width: 100%;
  padding: 8px 10px 8px 8px; border-radius: 18px;
  background: linear-gradient(100deg, rgba(212, 167, 64, .16), rgba(212, 167, 64, .04));
  border: 1px solid rgba(212, 167, 64, .38);
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.hero__cred:hover { border-color: rgba(232, 190, 90, .8); transform: translateY(-2px); }
.hero__cred img { width: 84px; height: 54px; object-fit: cover; border-radius: 11px; flex: none; }
.hero__cred > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.15; }
.hero__cred small { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #e3c27a; }
.hero__cred strong { font-size: clamp(17px, 1.4vw, 21px); font-weight: 600; letter-spacing: -.025em; }
.hero__cred-play { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #e3c27a; color: #1a1205; margin-left: 4px; }
.hero__cred-play svg { width: 16px; height: 16px; margin-left: 2px; }

/* Muro de piezas en bucle vertical */
.hero__wall {
  position: relative; height: min(100svh, 1000px); min-height: 640px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  rotate: 4deg; scale: 1.12; transform-origin: 30% 50%;
}
.wall__col { display: flex; flex-direction: column; gap: var(--gap); animation: wall-up 70s linear infinite; will-change: transform; }
.wall__col[data-col="1"] { animation-name: wall-down; animation-duration: 85s; }
.wall__col[data-col="2"] { animation-duration: 60s; }
.hero__wall:hover .wall__col { animation-play-state: paused; }
@keyframes wall-up { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes wall-down { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.wall__tile {
  position: relative; flex: none; aspect-ratio: var(--ratio, 9/16); overflow: hidden;
  border-radius: var(--radius); background: var(--surface-2);
}
.wall__tile img, .wall__tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wall__tile video { opacity: 0; transition: opacity .5s var(--ease); }
.wall__tile.has-video video { opacity: 1; }

/* Entrada */
.js .hero__line > span { transform: translateY(105%); }
.js .hero__services, .js .hero__sub, .js .hero__actions, .js .hero__cred { opacity: 0; transform: translateY(16px); }
.js .hero__wall { opacity: 0; }
.is-loaded .hero__line > span { transform: none; transition: transform 1s var(--ease); }
.is-loaded .hero__line:nth-child(2) > span { transition-delay: .08s; }
.is-loaded .hero__services, .is-loaded .hero__sub, .is-loaded .hero__actions, .is-loaded .hero__cred { opacity: 1; transform: none; transition: opacity .8s var(--ease), transform .8s var(--ease); }
.is-loaded .hero__sub { transition-delay: .2s; }
.is-loaded .hero__actions { transition-delay: .3s; }
.is-loaded .hero__cred { transition-delay: .4s; }
.is-loaded .hero__wall { opacity: 1; transition: opacity 1.2s var(--ease) .1s; }

/* --------------------------------------------------------------- Ticker */
.ticker { overflow: hidden; background: var(--accent); color: #fff; padding: 14px 0; }
.ticker__track {
  display: flex; align-items: center; gap: 28px; width: max-content;
  font-size: clamp(22px, 2.6vw, 38px); font-weight: 550; letter-spacing: -.04em; line-height: 1;
  animation: ticker 32s linear infinite;
}
.ticker__track i { font-style: normal; font-size: .55em; color: var(--spark); }
.ticker__track span:nth-of-type(even) { color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .85); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* --------------------------------------------------------------- Marcas */
.brands { padding: clamp(22px, 3vw, 36px) 0 0; }
.brands__title {
  padding: 0 var(--pad) 14px; font-family: var(--mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.brands__rail {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}
.brands__track { display: flex; width: max-content; animation: ticker 50s linear infinite; }
.brands__rail:hover .brands__track { animation-play-state: paused; }
.brands__track li { flex: none; margin-right: var(--gap); }
.brands__track img {
  height: clamp(64px, 6.4vw, 92px); width: auto; border-radius: 16px;
  border: 1px solid var(--line); filter: saturate(.92);
  transition: filter .3s var(--ease), transform .3s var(--ease);
}
.brands__track li:hover img { filter: none; transform: translateY(-3px); }

/* ------------------------------------------------------- Section heads */
.motion, .formats, .web, .tools-sec { padding: clamp(40px, 6vw, 80px) var(--pad) 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: clamp(16px, 2vw, 24px); }
.head__title { font-size: clamp(38px, 5.4vw, 84px); font-weight: 550; line-height: .92; letter-spacing: -.055em; }
.head__hint { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.head__nav { display: flex; gap: 8px; }

/* ------------------------------------------------------ Motion: masonry */
/* Rejilla exacta: celdas 9:16; los spans los calcula js/main.js para cerrar filas sin huecos */
.motion__grid {
  --cols: 6;
  container-type: inline-size;
  display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: var(--gap);
  grid-auto-flow: dense;
  grid-auto-rows: calc((100cqw - (var(--cols) - 1) * var(--gap)) / var(--cols) * 16 / 9);
}
.motion__grid .tile { aspect-ratio: auto; margin: 0; }
@media (max-width: 1279px) { .motion__grid { --cols: 5; } }
.tile {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: var(--ratio, 9/16); border-radius: var(--radius); background: var(--surface-2);
  break-inside: avoid; margin-bottom: var(--gap);
  transform: translateZ(0);
}
.tile img, .tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease), opacity .5s var(--ease); }
.tile video { opacity: 0; }
.tile.has-video video { opacity: 1; }
.tile:hover img, .tile:hover video { transform: scale(1.04); }
.tile__info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 36px 12px 12px; font-size: 12px; font-weight: 600;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent);
}
.tile__info span:last-child { font-family: var(--mono); font-weight: 400; opacity: .8; }
.tile__play {
  position: absolute; z-index: 2; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px;
  display: grid; place-items: center; border-radius: 50%; background: var(--text); color: var(--bg);
  opacity: 0; scale: .6; transition: opacity .35s var(--ease), scale .45s var(--ease);
}
.tile__play svg { width: 22px; height: 22px; margin-left: 2px; }
.tile:hover .tile__play, .tile:focus-visible .tile__play { opacity: 1; scale: 1; }
.js .motion__grid .tile { opacity: 0; transform: translateY(24px); }
.js .motion__grid .tile.is-in { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }

.cta-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: clamp(18px, 2.4vw, 28px) clamp(18px, 2.4vw, 32px);
  border-radius: var(--radius-lg); background: var(--accent); color: #fff;
}
.cta-strip p { font-size: clamp(24px, 3vw, 44px); font-weight: 550; letter-spacing: -.045em; line-height: 1; }

/* ------------------------------------------- Formatos: filas por categoría */
.fmt + .fmt { margin-top: clamp(22px, 3vw, 36px); }
.fmt__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.fmt__title { font-size: clamp(24px, 2.6vw, 38px); font-weight: 550; letter-spacing: -.045em; line-height: 1; }
.fmt__desc { margin-top: 6px; font-size: 14px; color: var(--muted); }
.fmt .circle-btn { width: 40px; height: 40px; }
.fmt--static .head__nav { visibility: hidden; }
.formats__noscript { color: var(--muted); }
.rail {
  --h: clamp(280px, 26vw, 400px);
  display: flex; gap: var(--gap); overflow-x: auto;
  margin-inline: calc(-1 * var(--pad)); padding-inline: var(--pad);
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail .tile { flex: none; height: var(--h); margin: 0; }

/* ---------------------------------------------------- Webs y software */
.web__grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--gap); }
.web__mock {
  position: relative; margin: 0; display: flex; flex-direction: column; overflow: hidden;
  border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
}
.web__bar { display: flex; align-items: center; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.web__bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.web__bar i:nth-child(2) { background: #febc2e; }
.web__bar i:nth-child(3) { background: #28c840; }
.web__bar span { margin-inline: auto; padding: 4px 14px; border-radius: 999px; background: var(--surface-2); font-family: var(--mono); font-size: 11px; color: var(--muted); }
/* La captura es la página completa: se recorre sola dentro del marco */
.web__mock img { width: 100%; flex: 1; min-height: 0; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0%; animation: web-scroll 28s ease-in-out infinite alternate; }
@keyframes web-scroll { 10% { object-position: 50% 0%; } 90%, 100% { object-position: 50% 100%; } }
.web__mock figcaption {
  position: absolute; left: 14px; bottom: 14px; padding: 8px 14px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: 13px; font-weight: 600;
}
.web__body {
  display: flex; flex-direction: column; gap: 18px;
  padding: clamp(20px, 2.4vw, 32px); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line);
}
.web__list li { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); }
.web__list li:first-child { border-top: 0; padding-top: 0; }
.web__list span { font-family: var(--mono); font-size: 12px; color: var(--accent-bright); padding-top: 6px; }
.web__list h3 { font-size: clamp(20px, 1.8vw, 26px); font-weight: 550; letter-spacing: -.035em; line-height: 1.1; }
.web__list p { color: var(--muted); font-size: 15px; margin-top: 2px; }
.stack { display: flex; flex-wrap: wrap; gap: 6px; }
.stack li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.stack img { width: 16px; height: 16px; flex: none; }
.web__body .btn { margin-top: auto; }

/* Galería de estilos web: cintas en bucle, cada página se recorre dentro de su marco */
.sites { margin: clamp(18px, 2.4vw, 28px) calc(-1 * var(--pad)) 0; }
.sites__title {
  padding: 0 var(--pad) 12px; font-family: var(--mono); font-size: 12px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.sites__rows {
  display: flex; flex-direction: column; gap: var(--gap); overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent);
}
.sites__track { display: flex; width: max-content; animation: ticker 80s linear infinite; }
.sites__row--rev .sites__track { animation-direction: reverse; animation-duration: 70s; }
.sites__rows:hover .sites__track { animation-play-state: paused; }
.site {
  position: relative; flex: none; width: clamp(210px, 18vw, 290px); margin-right: var(--gap);
  border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line);
}
.site__bar { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 10px; background: var(--surface-2); }
.site__bar i { width: 7px; height: 7px; border-radius: 50%; background: #ff5f57; }
.site__bar i:nth-child(2) { background: #febc2e; }
.site__bar i:nth-child(3) { background: #28c840; }
.site img {
  display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 0%;
  animation: site-scroll var(--t, 16s) ease-in-out var(--d, 0s) infinite alternate;
}
@keyframes site-scroll { 0%, 8% { object-position: 50% 0%; } 92%, 100% { object-position: 50% 100%; } }
.site__tag {
  position: absolute; left: 10px; bottom: 10px; padding: 5px 11px; border-radius: 999px;
  background: rgba(12, 12, 13, .78); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  font-size: 12px; font-weight: 600;
}

/* ------------------------------------------------------- Herramientas */
.logos {
  display: flex; flex-direction: column; gap: var(--gap); overflow: hidden;
  margin-inline: calc(-1 * var(--pad));
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.logos__track { display: flex; width: max-content; animation: ticker 46s linear infinite; }
.logos__row--rev .logos__track { animation-direction: reverse; animation-duration: 40s; }
.logos:hover .logos__track { animation-play-state: paused; }
.logos__dup { display: contents; }
.logos__item {
  display: flex; align-items: center; gap: 14px; margin-right: var(--gap);
  padding: 10px 26px 10px 10px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  font-size: clamp(18px, 1.7vw, 26px); font-weight: 550; letter-spacing: -.035em; white-space: nowrap;
}
.logo { width: clamp(48px, 4.4vw, 62px); height: auto; aspect-ratio: 1; flex: none; object-fit: contain; }

/* ------------------------------------------------------------ Contact */
.contact {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: end;
  margin: clamp(40px, 6vw, 80px) var(--pad) 0; padding: clamp(28px, 4vw, 56px);
  border-radius: var(--radius-lg); background: var(--accent); color: #fff;
  position: relative; overflow: hidden; isolation: isolate;
}
.contact::before {
  content: ""; position: absolute; z-index: -1; width: 60%; aspect-ratio: 1; right: -10%; top: -30%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent 70%);
  animation: orb 14s ease-in-out infinite alternate;
}
@keyframes orb { to { translate: -40% 40%; } }
.contact__copy { display: flex; flex-direction: column; gap: 24px; }
.contact__title { font-size: clamp(46px, 6.4vw, 110px); font-weight: 550; line-height: .88; letter-spacing: -.06em; text-wrap: balance; }
.contact__title em { color: var(--spark); }
.contact__me { display: flex; align-items: center; gap: 14px; max-width: 46ch; color: rgba(255, 255, 255, .82); }
.contact__me img { width: 64px; height: 64px; flex: none; border-radius: 18px; object-fit: cover; background: rgba(255, 255, 255, .15); }
.tools { display: flex; flex-wrap: wrap; gap: 6px; }
.tools li { padding: 5px 10px; border-radius: 999px; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; border: 1px solid rgba(255, 255, 255, .3); }

.lead-form {
  display: flex; flex-direction: column; gap: 12px;
  padding: clamp(18px, 2vw, 26px); border-radius: 20px;
  background: rgba(0, 0, 40, .28); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.lead-form__title { font-size: 20px; font-weight: 600; letter-spacing: -.02em; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: rgba(255, 255, 255, .7); }
.field input, .field select {
  height: 48px; padding: 0 14px; border-radius: 12px; width: 100%;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22); color: #fff;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='white' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.field select option { color: #111; }
.field input::placeholder { color: rgba(255, 255, 255, .5); }
.field input:focus, .field select:focus { outline: none; border-color: #fff; background-color: rgba(255, 255, 255, .16); }
.field.is-invalid input, .field.is-invalid select { border-color: var(--spark); }
.lead-form__note { font-size: 13px; color: rgba(255, 255, 255, .7); }

/* ------------------------------------------------------------- Footer */
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding: 28px var(--pad) 36px; font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.footer a:hover { color: var(--text); }
.footer__logo { height: 34px; width: auto; }

/* ----------------------------------------------------------- Lightbox */
.lightbox {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  margin: 0; padding: clamp(16px, 3vw, 40px); border: 0;
  background: rgba(8, 8, 10, .95); color: #fff;
  flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
.lightbox[open] { display: flex; animation: fade-in .35s var(--ease); }
.lightbox::backdrop { background: transparent; }
@keyframes fade-in { from { opacity: 0; } }
.lightbox__frame { max-width: min(100%, 1400px); max-height: calc(100% - 90px); aspect-ratio: var(--ratio, 9/16); border-radius: 16px; overflow: hidden; background: #000; }
.lightbox__frame.is-vertical { height: calc(100% - 90px); }
.lightbox__frame.is-horizontal { width: min(100%, 1400px); }
.lightbox__video { width: 100%; height: 100%; object-fit: contain; }
.lightbox__bar { display: flex; align-items: center; gap: 16px; width: min(100%, 760px); }
.lightbox__bar > div { flex: 1; min-width: 0; }
.lightbox__title { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.lightbox__meta { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .6; }

/* ------------------------------------------------------- WhatsApp float */
.wa-float {
  position: fixed; z-index: 45; right: clamp(14px, 2vw, 26px); bottom: clamp(14px, 2vw, 26px);
  width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
  background: var(--wa); color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .55);
  transition: transform .45s var(--ease), opacity .45s var(--ease);
}
.wa-float svg { width: 28px; height: 28px; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--wa); animation: ring 2.4s var(--ease) infinite; }
@keyframes ring { from { transform: scale(1); opacity: .8; } to { transform: scale(1.7); opacity: 0; } }
.wa-float:hover { transform: scale(1.06); }
.is-contact-visible .wa-float { transform: translateY(140%); opacity: 0; }

/* ---------------------------------------------------------- Responsive */
@media (max-width: 1024px) {
  .nav__links { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); padding: 0; min-height: 0; }
  .hero__copy { padding: 92px var(--pad) 8px; }
  .hero__wall { height: clamp(380px, 62vw, 560px); min-height: 0; rotate: 0deg; scale: 1; margin: 0 var(--pad); }
  .contact { grid-template-columns: 1fr; align-items: stretch; }
  .web__grid { grid-template-columns: 1fr; }
  .hero { --me-w: clamp(200px, 44vw, 360px); --me-left: calc(100% - var(--me-w) - var(--pad) + 10px); }
  .hero__tag { left: var(--pad); bottom: 28px; }
  .motion__grid { --cols: 3; }
}
@media (max-width: 600px) {
  .hero__title { font-size: clamp(48px, 16.5vw, 96px); }
  .hero__actions .btn { flex: 1 1 auto; justify-content: space-between; }
  .hero__actions .btn--ghost { flex: 0 0 auto; }
  .motion__grid { --cols: 2; }
  .rail { --h: 300px; }
  .fmt .head__nav { display: none; }
  .head__hint { display: none; }
  .cta-strip .btn { width: 100%; justify-content: space-between; }
  .contact { margin-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
