/* Yosber Urtado · propuesta "Cine" · paleta 1, Sala de edición
   La página se ve completa sin JavaScript. Con JavaScript, GSAP añade el movimiento
   (clases .js y .motion en <html>). Con movimiento reducido todo queda quieto. */

:root {
  /* Paleta 1: Sala de edición */
  --bg: #0B1430;          /* azul de sala */
  --bg-2: #142050;        /* consola */
  --bg-deep: #070E24;     /* secciones de proyección */
  --mesa: #18265C;        /* mesa de luz */
  --brand: #2E6BFF;       /* azul eléctrico */
  --brand-soft: #8DB0FF;  /* azul claro, solo en degradados */
  --amber: #FFB23E;       /* ámbar timecode */
  --on-amber: #0B1430;
  --text: #EEF2FB;
  --muted: #8C99BC;
  --line: #24305C;
  --line-2: #33427A;
  --ink-white: #FFFFFF;
  --shadow: 0 24px 60px -20px rgb(3 7 20 / 0.7), 0 2px 6px rgb(3 7 20 / 0.35);
  --img-line: rgb(255 255 255 / 0.08);
  /* Oscurece el video donde va el texto: arriba (menú), a la izquierda y abajo (titular) */
  --scrim: linear-gradient(180deg, rgb(7 14 36 / 0.75) 0%, rgb(7 14 36 / 0) 22%),
    linear-gradient(90deg, rgb(7 14 36 / 0.9) 0%, rgb(7 14 36 / 0.7) 38%, rgb(7 14 36 / 0.2) 70%, rgb(7 14 36 / 0.1) 100%),
    linear-gradient(180deg, rgb(7 14 36 / 0) 45%, rgb(7 14 36 / 0.85) 100%);
  --backdrop: rgb(7 14 36 / 0.94);

  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Geist", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --container: 1400px;
  --nav-h: 72px;
  --radius: 14px;
  --radius-lg: 28px;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-emph: cubic-bezier(0.05, 0.7, 0.1, 1);
  --sec-pad: clamp(96px, 14vh, 160px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Algunos temas y plugins de WordPress ponen "overflow-x: hidden" en html y body, y eso desactiva
   position: sticky (el giro del hero y las webs apiladas). Con !important esta regla gana siempre. */
html, body { overflow-x: clip !important; overflow-y: visible !important; width: auto !important; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto; }
body { background: var(--bg); color: var(--text); font: 400 17px/1.55 var(--body); }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; letter-spacing: -0.035em; line-height: 0.95; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
p { text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -100px; z-index: 1000; padding: 10px 16px; background: var(--amber); color: var(--on-amber); border-radius: var(--radius); font-weight: 600; }
.skip:focus-visible { top: 16px; }

.sec-title { font-size: clamp(40px, 6.4vw, 104px); max-width: 14ch; }

/* ---------- Botones ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 26px; border-radius: 99px; font-weight: 600; font-size: 16px; transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.btn:active { transform: scale(0.96); }
.btn--amber { background: var(--amber); color: var(--on-amber); }
.btn--amber:hover { background: var(--ink-white); }
.btn--line { box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--text); backdrop-filter: blur(8px); }
.btn--line:hover { box-shadow: inset 0 0 0 1.5px var(--brand); background: var(--brand); color: var(--ink-white); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 15px; }

/* ---------- Navegación ---------- */
.nav { position: absolute; inset: 0 0 auto; z-index: 50; height: var(--nav-h); display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter); transition: transform 360ms var(--ease-out), background-color 260ms var(--ease-out); }
.js .nav { position: fixed; }
/* Sobre el video, el menú lleva su propia sombra para leerse siempre */
.nav::before { content: ""; position: absolute; inset: 0 0 -24px; z-index: -1; background: linear-gradient(180deg, rgb(7 14 36 / 0.85), rgb(7 14 36 / 0)); pointer-events: none; transition: opacity 260ms var(--ease-out); }
.nav.is-solid::before { opacity: 0; }
.nav.is-solid { background: rgb(11 20 48 / 0.86); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav.is-hidden { transform: translateY(-100%); }
.nav__mark { font: 800 20px/1 var(--display); letter-spacing: -0.03em; margin-right: auto; }
.nav__mark span { color: var(--brand); }
.nav__links { display: flex; gap: 28px; font-size: 15px; font-weight: 500; color: var(--text); }
.nav__links a { transition: color 160ms var(--ease-out); }
.nav__links a:hover { color: var(--amber); }
.nav__cta { padding: 10px 18px; border-radius: 99px; background: var(--brand); color: var(--ink-white); font-weight: 600; font-size: 15px; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.nav__cta:hover { background: var(--amber); color: var(--on-amber); }
.nav__bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--amber); transform-origin: left; transform: scaleX(0); }

/* ---------- Cuenta regresiva ---------- */
.leader { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; background: var(--bg-deep); }
.leader[hidden] { display: none; }
/* La clase .intro la pone el <head> antes de pintar: la cuenta sale primero que la web */
html.intro .leader { display: grid; }
html.intro { overflow: hidden; }
.leader__n { grid-area: 1 / 1; font: 800 clamp(120px, 22vw, 260px)/1 var(--display); color: var(--text); font-variant-numeric: tabular-nums; }
.leader__ring { grid-area: 1 / 1; width: min(60vw, 420px); height: auto; transform: rotate(-90deg); }
.leader__ring circle { fill: none; stroke: var(--amber); stroke-width: 1.5; stroke-dasharray: 289; stroke-dashoffset: 289; }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100svh; min-height: 640px; }
.js.motion .hero { height: 175svh; }
.hero__pin { position: relative; height: 100svh; min-height: 640px; overflow: hidden; }
.js.motion .hero__pin { position: sticky; top: 0; }
.hero__media { position: absolute; inset: 0; clip-path: inset(0% 0% 0% 0% round 0px); background: var(--bg-deep); will-change: clip-path; }
.hero__video { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.8); }
.hero__scrim { position: absolute; inset: 0; background: var(--scrim); }
.hero__copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(40px, 9vh, 96px); max-width: var(--container); }
.hero h1 { text-shadow: 0 2px 24px rgb(7 14 36 / 0.5); font-size: clamp(48px, 5.8vw, 104px); max-width: 11ch; }
.hero__lead { margin: 20px 0 28px; max-width: 34ch; font-size: clamp(17px, 1.4vw, 21px); color: var(--text); }
.tc { position: absolute; top: calc(var(--nav-h) + 12px); right: var(--gutter); display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: rgb(7 14 36 / 0.6); backdrop-filter: blur(10px); font: 600 13px/1 var(--body); font-variant-numeric: tabular-nums; }
.tc__rec { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); animation: rec 1.2s steps(2, jump-none) infinite; }
@keyframes rec { 50% { opacity: 0.2; } }
.tc__track { width: 120px; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.tc__fill { display: block; height: 100%; background: var(--brand); transform-origin: left; transform: scaleX(0); }
html:not(.js) .tc, html:not(.js) .sound { display: none; }
.sound { position: absolute; right: var(--gutter); bottom: clamp(40px, 9vh, 96px); min-height: 44px; padding: 0 18px; border-radius: 99px; background: rgb(7 14 36 / 0.6); backdrop-filter: blur(10px); font-weight: 600; font-size: 14px; box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.sound:hover, .sound[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); }

/* ---------- Servicios: palabras gigantes ---------- */
.svc { background: var(--bg-deep); padding: clamp(40px, 6vh, 72px) var(--gutter) calc(var(--sec-pad) * 0.6); container-type: inline-size; }
.svc__title { font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -0.02em; color: var(--muted); margin-bottom: 24px; max-width: none; }
.word { padding-bottom: clamp(56px, 9vh, 112px); }
.word__big { position: relative; display: block; isolation: isolate; overflow: hidden; border-radius: var(--radius-lg); }
.word__media { position: absolute; inset: 0; z-index: -1; }
.word__media video, .word__media img { width: 100%; height: 130%; object-fit: cover; filter: brightness(1.2) saturate(1.1); transition: transform 700ms var(--ease-emph); }
.word__ink { display: block; padding: 0.04em 0.02em 0; background: var(--bg-deep); color: var(--ink-white); mix-blend-mode: darken; font: 800 40cqw/0.8 var(--display); letter-spacing: -0.055em; white-space: nowrap; }
.word:nth-of-type(2) .word__ink { font-size: 50cqw; }
.word__t { display: inline-block; }
.word:nth-of-type(3) .word__ink { font-size: 32cqw; }
.word--r .word__ink { text-align: right; }
.word__big:hover video, .word__big:hover img { transform: scale(1.06); }
/* DISEÑO: un degradado limpio de la paleta que se desplaza dentro de las letras */
.word__grad { display: block; width: 100%; height: 130%; background: linear-gradient(100deg, var(--brand) 0%, var(--brand-soft) 22%, var(--ink-white) 38%, var(--amber) 55%, var(--brand) 78%, var(--brand-soft) 100%); background-size: 300% 100%; animation: grad 12s ease-in-out infinite alternate; }
@keyframes grad { to { background-position: 100% 0; } }
.word__info { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 4fr) minmax(0, 5fr); gap: 16px 40px; align-items: start; margin-top: 24px; }
.word__info h3 { font-size: clamp(26px, 2.4vw, 36px); }
.word__info p { color: var(--muted); max-width: 36ch; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { padding: 8px 14px; border-radius: 99px; background: var(--bg-2); font-size: 15px; box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Reels: tira de película ---------- */
.reels { background: var(--bg-deep); }
.reels__pin { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(16px, 3vh, 32px); padding: clamp(24px, 5vh, 48px) 0 clamp(16px, 3vh, 32px); overflow: hidden; }
/* Al bajar, el menú se esconde: la sección fija aprovecha ese espacio de arriba */
.reels__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 0 var(--gutter); }
.reels__head h2 { font-size: clamp(36px, min(5vw, 8.5vh), 96px); max-width: 12ch; }
.reels__hint { color: var(--amber); font-weight: 600; white-space: nowrap; }
.reels__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 99px; font-weight: 600; font-size: 15px; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.chips button:hover { box-shadow: inset 0 0 0 1.5px var(--brand); }
.chips button[aria-pressed="true"] { background: var(--amber); color: var(--on-amber); box-shadow: none; }
.chips .n { font-size: 13px; opacity: 0.7; font-variant-numeric: tabular-nums; }
html:not(.js) .chips { display: none; }
/* Alto de cada video: lo que queda de pantalla tras el título y el pie, para que el video y su título se vean enteros */
.strip { --h: clamp(200px, calc(100svh - min(5vw, 8.5vh) * 2 - 170px), 600px); display: flex; align-items: center; gap: clamp(16px, 2vw, 32px); padding: 0 var(--gutter) 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.js.pin-ok .strip { overflow: visible; width: max-content; padding-right: 40vw; will-change: transform; }
.reel { flex: none; scroll-snap-align: center; }
.reel__card { display: block; }
.reel__media { position: relative; display: block; height: var(--h); aspect-ratio: 9 / 16; border-radius: 22px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); transition: transform 500ms var(--ease-emph), opacity 400ms var(--ease-out); }
.reel--h .reel__media { aspect-ratio: 16 / 9; }
.reel--s .reel__media { aspect-ratio: 1; }
.reel[hidden] { display: none; }
.reel__media img, .reel__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; outline: 1px solid var(--img-line); outline-offset: -1px; }
.reel__media video { opacity: 0; transition: opacity 300ms var(--ease-out); }
.reel__media video.is-ready { opacity: 1; }
.reel__media::after { content: ""; position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--amber) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%230B1430'/%3E%3C/svg%3E") center / 26px no-repeat; transition: transform 300ms var(--ease-emph), opacity 300ms var(--ease-out); }
.reel.is-on .reel__media::after { opacity: 0; transform: scale(0.6); }
.reel__card:hover .reel__media::after, .reel__card:focus-visible .reel__media::after { opacity: 1; transform: scale(1.08); }
.js .reel:not(.is-on) .reel__media { transform: scale(0.9); opacity: 0.55; }
.reel__cap { display: flex; gap: 10px; align-items: baseline; margin-top: 14px; }
.reel__cap b { font: 800 20px/1.1 var(--display); letter-spacing: -0.02em; }
.reel__cap span { color: var(--muted); font-size: 15px; }

/* ---------- Webs: capturas apiladas ---------- */
.webs { padding: var(--sec-pad) var(--gutter); max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; }
.webs .sec-title { margin-bottom: clamp(40px, 6vh, 72px); }
.stack { display: grid; gap: 10vh; }
.sheet { position: sticky; top: calc(var(--nav-h) + 16px + var(--i) * 18px); display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 32px; align-items: end; padding: 20px; border-radius: 32px; background: var(--bg-2); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transform-origin: 50% 0; }
.sheet__shot { display: block; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg-deep); }
.sheet__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; outline: 1px solid var(--img-line); outline-offset: -1px; transition: transform 700ms var(--ease-emph); }
.sheet__shot:hover img { transform: scale(1.04); }
.sheet__info { padding: 8px 12px 12px 0; }
.sheet__info h3 { font-size: clamp(36px, 4.2vw, 68px); margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.tags li { padding: 6px 12px; border-radius: 99px; font-size: 14px; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line-2); }
.visit { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 99px; background: var(--brand); color: var(--ink-white); font-weight: 600; transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.visit:hover { background: var(--amber); color: var(--on-amber); }

/* Más webs: rejilla con todas las demás */
.mas-title { font-size: clamp(28px, 3.2vw, 48px); margin: clamp(80px, 12vh, 140px) 0 clamp(24px, 4vh, 40px); }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 40px 24px; }
.wcard__shot { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--bg-2); box-shadow: var(--shadow); }
.wcard__shot img { width: 100%; height: 100%; object-fit: cover; outline: 1px solid var(--img-line); outline-offset: -1px; transition: transform 700ms var(--ease-emph); }
.wcard__shot:hover img { transform: scale(1.05); }
.wcard__n { position: absolute; left: 12px; bottom: 12px; padding: 6px 12px; border-radius: 99px; background: rgb(7 14 36 / 0.75); backdrop-filter: blur(8px); font-size: 13px; font-weight: 600; }
.wcard__info { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 16px; }
.wcard__info h3 { width: 100%; font-size: clamp(24px, 2vw, 30px); }
.wcard .tags { margin: 0; }
.wcard .visit { min-height: 40px; padding: 0 16px; font-size: 14px; margin-left: auto; }

/* ---------- Diseño: mesa de luz ---------- */
.mesa-sec { padding: var(--sec-pad) var(--gutter); background: var(--bg-deep); }
.mesa-sec__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 40px; max-width: var(--container); margin: 0 auto clamp(32px, 5vh, 56px); }
.mesa-sec__hint { color: var(--muted); }
.only-fine { display: none; }
.mesa { position: relative; max-width: var(--container); margin: 0 auto; height: clamp(640px, 96svh, 920px); border-radius: 36px; background: radial-gradient(120% 90% at 50% 40%, var(--mesa) 0%, var(--bg) 75%); box-shadow: inset 0 0 0 1px var(--line); }
.piece { position: absolute; left: var(--x); top: var(--y); width: 21%; z-index: 1; touch-action: pan-y; }
.piece--wide { width: 27%; }
.piece img { width: 100%; height: auto; border-radius: 10px; background: var(--bg-2); transform: rotate(var(--r)); box-shadow: var(--shadow); outline: 1px solid var(--img-line); outline-offset: -1px; transition: transform 400ms var(--ease-emph); }
.piece:hover, .piece:focus-visible { z-index: 5; }
.piece:hover img, .piece:focus-visible img { transform: rotate(0deg) scale(1.04); }
.piece.is-dragging img { transform: rotate(0deg) scale(1.08); }

/* Archivo de diseño: todas las piezas en columnas */
.archivo { max-width: var(--container); margin: 0 auto; }
.arch { columns: 4 240px; column-gap: 16px; }
.arch__item { position: relative; display: block; margin-bottom: 16px; break-inside: avoid; border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.arch__item img { width: 100%; height: auto; outline: 1px solid var(--img-line); outline-offset: -1px; transition: transform 600ms var(--ease-emph), opacity 300ms var(--ease-out); }
.arch__item:hover img { transform: scale(1.04); }
.arch__doc { position: absolute; left: 10px; bottom: 10px; padding: 6px 12px; border-radius: 99px; background: var(--amber); color: var(--on-amber); font-size: 13px; font-weight: 600; }

/* ---------- Proceso ---------- */
.proceso { padding: var(--sec-pad) var(--gutter); max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; }
.proceso__wrap { position: relative; margin-top: clamp(40px, 7vh, 80px); }
.proceso__line { display: block; width: 100%; height: clamp(60px, 9vw, 120px); overflow: visible; }
.proceso__line path { fill: none; stroke: var(--amber); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.pasos { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.pasos b { display: block; font: 800 clamp(24px, 2.4vw, 38px)/1 var(--display); letter-spacing: -0.03em; margin-bottom: 10px; }
.pasos span { color: var(--muted); }

/* ---------- Manifiesto ---------- */
.manifest { position: relative; display: grid; place-items: center; min-height: 110svh; padding: var(--sec-pad) var(--gutter); overflow: hidden; }
.manifest__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.manifest::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(80% 70% at 50% 50%, rgb(11 20 48 / 0.4), var(--bg) 92%); }
.manifest__big { position: relative; z-index: 2; max-width: 16ch; text-align: center; font-size: clamp(44px, 7.6vw, 132px); }
/* Palabras partidas por JavaScript: cada una sube dentro de su propia máscara */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.w__i { display: inline-block; }

/* ---------- Testimonios (cintas) ---------- */
.clientes { padding: var(--sec-pad) 0; }
.clientes__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px 64px; align-items: end; padding: 0 var(--gutter); max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto clamp(48px, 7vh, 80px); }
.lead-quote blockquote p { font: 600 clamp(22px, 2.2vw, 32px)/1.25 var(--display); letter-spacing: -0.02em; }
.lead-quote figcaption { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.lead-quote img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.lead-quote b, .tq b { display: block; color: var(--text); font-weight: 600; }
.lead-quote figcaption span, .tq figcaption span { color: var(--muted); font-size: 15px; line-height: 1.35; }
.cinta { overflow-x: auto; padding: 8px 0; }
.cinta + .cinta { margin-top: 8px; }
.cinta.is-moving { overflow: hidden; mask-image: linear-gradient(90deg, transparent, var(--bg) 8%, var(--bg) 92%, transparent); }
.cinta__track { display: flex; gap: 16px; width: max-content; padding: 0 var(--gutter); }
.cinta.is-moving .cinta__track { padding: 0; animation: cinta var(--cinta-dur, 60s) linear infinite; }
.cinta--rev.is-moving .cinta__track { animation-direction: reverse; }
.cinta.is-moving:hover .cinta__track, .cinta.is-paused .cinta__track { animation-play-state: paused; }
@keyframes cinta { to { transform: translateX(-50%); } }
.tq { width: 380px; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: 24px; border-radius: 22px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.tq blockquote { font-size: 17px; line-height: 1.45; }
.tq figcaption { display: flex; align-items: center; gap: 12px; }
.tq i, .tq img { flex: none; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.tq i { display: grid; place-items: center; background: var(--brand); color: var(--ink-white); font: 600 14px/1 var(--body); font-style: normal; }
.cinta-ctrl { display: flex; justify-content: center; margin-top: 28px; }
html:not(.js) .cinta-ctrl { display: none; }

/* ---------- Cierre ---------- */
.cierre { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 48px; padding: var(--sec-pad) var(--gutter); max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; border-top: 1px solid var(--line); }
.cierre__big { font-size: clamp(80px, 17vw, 280px); line-height: 0.85; letter-spacing: -0.06em; }
.cierre__lead { grid-column: 1; display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: clamp(18px, 1.6vw, 22px); }
.cierre__lead p { max-width: 32ch; }
.cierre__lead img { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--amber); }
.magnet { grid-column: 2; grid-row: 1 / span 2; display: grid; place-items: center; width: clamp(180px, 17vw, 240px); aspect-ratio: 1; border-radius: 50%; background: var(--amber); color: var(--on-amber); text-align: center; font: 800 20px/1.1 var(--display); letter-spacing: -0.02em; padding: 28px; transition: background-color 200ms var(--ease-out); }
.magnet span { display: block; pointer-events: none; }
.magnet:hover { background: var(--ink-white); }

/* ---------- Pie ---------- */
.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding: 40px var(--gutter) 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; }
.footer__mark { font: 800 20px/1 var(--display); color: var(--text); margin-right: auto; }
.footer__mark span { color: var(--brand); }
.footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.footer nav a:hover { color: var(--text); }

/* ---------- Cursor propio ---------- */
.cursor { display: none; }
@media (pointer: fine) {
  .js.motion .cursor { position: fixed; left: 0; top: 0; z-index: 800; display: grid; place-items: center; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--amber); color: var(--on-amber); pointer-events: none; transition: width 260ms var(--ease-emph), height 260ms var(--ease-emph), margin 260ms var(--ease-emph), opacity 200ms; }
  .cursor.is-big { width: 88px; height: 88px; margin: -44px 0 0 -44px; }
  .cursor.is-off { opacity: 0; }
  .cursor__label { font: 600 14px/1 var(--body); opacity: 0; transition: opacity 160ms; }
  .cursor.is-big .cursor__label { opacity: 1; }
  .only-fine { display: inline; }
}

/* ---------- Visor ---------- */
.viewer { --pad-x: clamp(16px, 7vw, 112px); --pad-y: clamp(16px, 4vh, 40px); --cap: 72px; position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: var(--pad-y) var(--pad-x); border: 0; background: var(--backdrop); color: var(--text); overflow: hidden; }
.viewer[open] { display: flex; align-items: center; justify-content: center; animation: fade 220ms var(--ease-out); }
.viewer[open] .viewer__figure { animation: viewer-in 380ms var(--ease-emph); }
@keyframes fade { from { opacity: 0; } }
@keyframes viewer-in { from { opacity: 0; transform: translateY(18px) scale(0.96); } }
.viewer::backdrop { background: var(--backdrop); }
.viewer__figure { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 1100px; }
.viewer__stage { display: flex; justify-content: center; width: 100%; }
.viewer__stage img, .viewer__stage video { width: auto; height: auto; max-width: 100%; max-height: min(calc(100dvh - 2 * var(--pad-y) - var(--cap)), 80dvh); object-fit: contain; border-radius: 18px; background: var(--bg-2); box-shadow: var(--shadow); }
.viewer__stage { --max-h: min(calc(100dvh - 2 * var(--pad-y) - var(--cap)), 80dvh); touch-action: pan-y; }
/* Marco con el tamaño exacto de la imagen: se ve el skeleton mientras carga y la imagen aparece con un fundido */
.viewer__ph { position: relative; display: block; max-width: 100%; border-radius: 18px; overflow: hidden; background-color: var(--bg-2); box-shadow: var(--shadow); }
.viewer__stage .viewer__ph img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; box-shadow: none; background: none; }

/* ---------- Carga de imágenes: skeleton con brillo y fundido al llegar ---------- */
.sk { background-image: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.07) 50%, transparent 70%); background-size: 220% 100%; animation: sk 1.3s linear infinite; }
@keyframes sk { from { background-position: 160% 0; } to { background-position: -60% 0; } }
.js img.ld { opacity: 0; filter: blur(14px); transition: opacity 550ms var(--ease-out), filter 750ms var(--ease-out), transform 700ms var(--ease-emph); }
.js img.ld.is-loaded { opacity: 1; filter: none; }
.viewer__caption { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 14px; min-height: 40px; text-align: center; }
.viewer__caption b { font: 800 20px/1.2 var(--display); letter-spacing: -0.02em; }
.viewer__caption span { color: var(--muted); font-size: 15px; font-variant-numeric: tabular-nums; }
/* Botón para ir a la web publicada, visible en el visor de cada caso */
.viewer__visit { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-left: 6px; padding: 0 20px; border-radius: 99px; background: var(--amber); color: var(--on-amber); font-size: 15px; font-weight: 600; transition: background-color 160ms var(--ease-out), transform 160ms var(--ease-out); }
.viewer__visit:hover { background: var(--ink-white); }
.viewer__visit:active { transform: scale(0.96); }
.viewer__caption { align-items: center; }
.vbtn { position: fixed; z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: rgb(20 32 80 / 0.8); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text); transition: background-color 160ms var(--ease-out), color 160ms var(--ease-out); }
.vbtn:hover { background: var(--amber); color: var(--on-amber); }
.vbtn:disabled { visibility: hidden; }
.viewer__close { top: var(--pad-y); right: clamp(16px, 2vw, 32px); }
.viewer__side { top: 50%; margin-top: -24px; }
.viewer__side--prev { left: clamp(16px, 2vw, 32px); }
.viewer__side--next { right: clamp(16px, 2vw, 32px); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .word__info { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .word__info .pills { grid-column: 1 / -1; }
  .sheet { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sheet__info { padding: 0 4px 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
  .sheet__info h3 { width: 100%; margin: 0; }
  .tags { margin: 0; }
}
@media (max-width: 760px) {
  :root { --nav-h: 64px; }
  .nav { gap: 12px; }
  .nav__links { display: none; }
  .hero h1 { font-size: clamp(42px, 12vw, 64px); }
  /* En el móvil el texto ocupa todo el ancho: el video se oscurece parejo */
  .hero__scrim { background: linear-gradient(180deg, rgb(7 14 36 / 0.75) 0%, rgb(7 14 36 / 0.6) 40%, rgb(7 14 36 / 0.92) 100%); }
  .hero__copy { bottom: 96px; }
  .sound { bottom: 28px; left: var(--gutter); right: auto; }
  .tc { display: none; }
  .word__info { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .reels__head { flex-direction: column; align-items: start; gap: 8px; }
  .strip { --h: min(62svh, 520px); }
  .reel--h .reel__media { height: auto; width: min(82vw, 520px); }
  .stack { gap: 6vh; }
  .sheet { padding: 12px; border-radius: 24px; top: calc(var(--nav-h) + 8px + var(--i) * 10px); }
  .mesa { height: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; padding: 28px 16px; border-radius: 24px; }
  .piece, .piece--wide { position: relative; left: auto; top: auto; width: auto; }
  .piece--wide { grid-column: 1 / -1; }
  .pasos { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: 0; }
  .pasos li { padding: 18px 0 18px 20px; border-left: 2px solid var(--line-2); }
  .proceso__line { display: none; }
  .clientes__head { grid-template-columns: minmax(0, 1fr); }
  .tq { width: 300px; }
  .arch { columns: 2; column-gap: 10px; }
  .arch__item { margin-bottom: 10px; }
  .wcard .visit { margin-left: 0; }
  .cierre { grid-template-columns: minmax(0, 1fr); }
  .magnet { grid-column: 1; grid-row: auto; width: auto; aspect-ratio: auto; border-radius: 99px; min-height: 60px; padding: 0 28px; font-size: 18px; justify-self: start; }
  .viewer { --pad-x: 16px; --pad-y: 72px; --cap: 64px; }
  .viewer__side { top: auto; bottom: 16px; margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .js .reel:not(.is-on) .reel__media { transform: none; opacity: 1; }
  .word__grad { animation: none; }
  .js img.ld { filter: none; }
}
