/* Dragos Studio: el lenguaje propio de la página, encima del sistema (system.css y layout.css).
   Orden: tipografía y superficies del navegador · portada de cine · proyectos (reels 9:16). */

/* ------------------------------------------------------------ tipografía con más carácter */
:root {
  --display-weight: 500;
  --t-h1-film: clamp(44px, 6.3vw, 96px);
  --t-h2-film: clamp(34px, 3.9vw, 56px);
  --ease-film: cubic-bezier(.16, 1, .3, 1);          /* salida exponencial: rápida al empezar, suave al llegar */
  --rec: #ff3b30;
}
main h2 { font-size: var(--t-h2-film); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
main h2 .muted { color: var(--p-muted); }

/* superficies del navegador con la paleta: selección, cursor de texto, barra de scroll */
::selection { background: var(--p-accent); color: var(--p-accent-ink); }
:is(input, textarea) { caret-color: var(--p-accent); }
html { scrollbar-color: #3a3a36 var(--p-bg); }
.field ::placeholder { color: var(--p-muted); opacity: 1; }

/* ------------------------------------------------------------ portada: un plano de cine */
.hero--film { isolation: isolate; }
.hero--film h1 {
  font-size: var(--t-h1-film); font-weight: 500; line-height: .94; letter-spacing: -0.04em;
  max-width: 13ch; margin: 0;
}
.hero--film h1 .line { display: block; }
.hero__accent { font-style: normal; color: var(--p-accent); }
.hero--film .hero__lead { max-width: 44ch; margin-top: var(--s-6); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.5; color: rgb(255 255 255 / .86); }
.hero--film .btn-row { margin-top: var(--s-7); }

/* el texto se apoya abajo, como un título de película; tu cara a la derecha; los logos al pie */
@media (min-width: 1024px) {
  .hero--film > .wrap > .hero-text {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
    grid-template-rows: minmax(0, 1fr) auto; align-items: end;
  }
  .hero--film .hero__text { grid-column: 1 / span 8; width: auto; padding-bottom: var(--s-8); }
  .hero--film .hero__me { grid-column: 10 / span 3; justify-self: end; padding-bottom: var(--s-8); }
  .hero--film .hero__strip { grid-column: 1 / -1; }
}

/* el visor: cuatro esquinas, REC y el código de tiempo */
.viewfinder { position: absolute; inset: calc(var(--nav) + var(--s-5)) var(--s-5) var(--s-5); z-index: 1; pointer-events: none; }
.vf { position: absolute; width: 28px; height: 28px; border: 0 solid rgb(255 255 255 / .55); }
.vf--tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; }
.vf--tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; }
.vf--bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.vf--br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; }
.rec {
  position: absolute; top: var(--s-4); left: var(--s-6); display: inline-flex; align-items: center; gap: var(--s-2);
  font: 500 13px/1 var(--font-text); letter-spacing: .04em; color: rgb(255 255 255 / .8); font-variant-numeric: tabular-nums;
}
.rec__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rec); }
.rec__tc { min-width: 11ch; }
.hero__slot { position: absolute; top: var(--s-4); right: var(--s-6); margin: 0; font-size: 13px; color: rgb(255 255 255 / .7); }

/* tu cara: un fotograma vertical con tu nombre */
.hero__me { margin: 0; width: min(100%, 220px); display: grid; gap: var(--s-3); }
.hero__me-photo { position: relative; aspect-ratio: 3 / 4; overflow: clip; border-radius: var(--r-md); background: var(--p-surface); outline: 1px solid rgb(255 255 255 / .14); outline-offset: -1px; }
.hero__me-photo > img { width: 100%; height: 100%; object-fit: cover; }
.hero__me figcaption { display: grid; gap: 2px; font-size: var(--t-small); line-height: 1.35; }
.hero__me-name { font-weight: 500; color: #fff; }
.hero__me-role { color: rgb(255 255 255 / .72); }

/* WhatsApp: el icono dentro del botón principal */
.btn--wa { gap: var(--s-2); }
.wa-icon { width: 20px; height: 20px; flex: none; }

/* ------------------------------------------------------------ proyectos: reels de verdad, en 9:16 */
#proyectos .tile--portrait { --tile-ratio: 9 / 16; }
#proyectos .tile__media { border-radius: var(--r-md); }
#proyectos .tile__media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#proyectos .tile__head { display: grid; gap: var(--s-1); }
#proyectos .tile__head > * { margin: 0; }

/* ============================================================ MOVIMIENTO DE CINE
   Curvas: --ease-film (salida fuerte, entradas) y --ease-gate (in-out fuerte, cosas que se abren en pantalla).
   Todo se ve sin JavaScript; con movimiento reducido no hay desplazamientos, solo opacidad. */
:root { --ease-gate: cubic-bezier(.77, 0, .175, 1); }

/* --- 1. La portada se abre como una compuerta de cine (una sola vez, al cargar) ---------------
   Línea de tiempo: bandas 0-900ms · titular línea 1 120ms, línea 2 220ms · tu foto 300ms ·
   texto 420ms · botones 500ms · esquinas y logos 640ms (solo opacidad) · REC empieza a 900ms. */
.hero--film > .wrap { position: relative; z-index: 2; }
.hero--film::before, .hero--film::after {
  content: ""; position: absolute; left: 0; right: 0; z-index: 1; height: 16%; background: #000; pointer-events: none;
  transform: scaleY(0);
}
.hero--film::before { top: 0; transform-origin: top; }
.hero--film::after { bottom: 0; transform-origin: bottom; }
.hero--film h1 .line { display: block; overflow: clip; padding-bottom: .08em; margin-bottom: -.08em; }
.hero--film h1 .line > span { display: inline-block; }

@media (prefers-reduced-motion: no-preference) {
  .hero--film::before, .hero--film::after { animation: gate-open 900ms var(--ease-gate) both; }
  .hero--film h1 .line > span { animation: line-rise 800ms var(--ease-film) both; }
  .hero--film h1 .line:nth-child(1) > span { animation-delay: 120ms; }
  .hero--film h1 .line:nth-child(2) > span { animation-delay: 220ms; }
  .hero--film .hero__lead { animation: rise-in 600ms var(--ease-film) 420ms both; --rise: 10px; }
  .hero--film .btn-row { animation: rise-in 500ms var(--ease-film) 500ms both; --rise: 6px; }
  .hero--film .hero__me-photo { animation: wipe-up 800ms var(--ease-gate) 300ms both; }
  .hero--film .hero__me figcaption { animation: fade-in 400ms ease 700ms both; }
  .hero--film :is(.vf, .rec, .hero__slot, .hero__strip) { animation: fade-in 500ms ease 640ms both; }
  .rec__dot { animation: rec-blink 1s steps(1, end) 900ms infinite; }
}
@keyframes gate-open { from { transform: scaleY(1); } to { transform: scaleY(0); } }
@keyframes line-rise { from { transform: translateY(105%); } to { transform: translateY(0); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(var(--rise, 12px)); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes wipe-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rec-blink { 0% { opacity: 1; } 50% { opacity: .2; } }

/* --- 2. Secciones al hacer scroll: una vez, con un gesto distinto según lo que entra ----------
   site.js pone html.has-reveal y marca .is-in al entrar en pantalla. Cada elemento lleva
   data-reveal (rise, frame, wipe, line, fade) y --d (su retardo en ms, no uniforme). */
.has-reveal [data-reveal] {
  transition-property: opacity, transform, clip-path;
  transition-timing-function: var(--ease-film);
  transition-duration: 700ms;
  transition-delay: calc(var(--d, 0) * 1ms);
}
.has-reveal [data-reveal="rise"]:not(.is-in) { opacity: 0; transform: translateY(24px); }
.has-reveal [data-reveal="frame"] { transition-duration: 900ms; transition-timing-function: var(--ease-gate); }
.has-reveal [data-reveal="frame"]:not(.is-in) { clip-path: inset(100% 0 0 0); }
.has-reveal [data-reveal="wipe"] { transition-duration: 1000ms; transition-timing-function: var(--ease-gate); }
.has-reveal [data-reveal="wipe"]:not(.is-in) { clip-path: inset(0 100% 0 0); }
.has-reveal [data-reveal="line"] { transition-duration: 1100ms; transition-timing-function: var(--ease-gate); transform-origin: left; }
.has-reveal [data-reveal="line"]:not(.is-in) { transform: scaleX(0); }
.has-reveal [data-reveal="fade"] { transition-duration: 500ms; transition-timing-function: ease; }
.has-reveal [data-reveal="fade"]:not(.is-in) { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .has-reveal [data-reveal] { transition-property: opacity; transition-duration: 200ms; transition-delay: 0ms; }
  .has-reveal [data-reveal]:not(.is-in) { transform: none; clip-path: none; }
}

/* --- 3. Proyectos: el reel responde al puntero ------------------------------------------------
   El fotograma se acerca dentro de su marco, el botón de play se llena de amarillo y "Ver reel"
   sube; si hay vídeo, se reproduce mientras el puntero está encima (site.js). */
.reel__play, .reel__cta { position: absolute; z-index: 2; pointer-events: none; }
.reel__play {
  left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgb(0 0 0 / .35);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .5);
  transition: transform 200ms var(--ease-film), background-color 200ms ease, color 200ms ease;
}
.reel__play svg { width: 20px; height: 20px; margin-left: 3px; }
.reel__cta {
  left: var(--s-4); bottom: var(--s-4); font-size: var(--t-label); font-weight: 500; color: #fff;
  opacity: 0; transform: translateY(6px); transition: opacity 200ms ease, transform 200ms var(--ease-film);
}
#proyectos .tile__media > :is(.slot, video, img) { transition: transform 600ms var(--ease-film); }
@media (hover: hover) and (pointer: fine) {
  #proyectos a.tile:hover .tile__media > :is(.slot, video, img) { transform: scale(1.04); }
  #proyectos a.tile:hover .reel__play { transform: scale(1.08); background: var(--p-accent); color: var(--p-accent-ink); box-shadow: none; }
  #proyectos a.tile:hover .reel__cta { opacity: 1; transform: none; }
}
#proyectos a.tile:focus-visible .reel__play { background: var(--p-accent); color: var(--p-accent-ink); box-shadow: none; }
#proyectos a.tile:focus-visible .reel__cta { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  #proyectos a.tile:hover .tile__media > :is(.slot, video, img) { transform: none; }
}

/* ============================================================ LAYOUT
   Las secciones miden lo que su contenido (ya no una pantalla fija); el ritmo sale del espacio:
   mucho aire entre secciones, poco dentro de cada grupo. */
main > section.section { height: auto; padding-block: clamp(96px, 11vw, 168px); }
main > section.section + section.section { padding-top: clamp(48px, 6vw, 96px); }

main h2 { margin: 0; max-width: 18ch; }

/* huecos de material (slots): un marco oscuro con su etiqueta entre corchetes */
.slot {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: var(--s-3);
  padding: var(--s-5); text-align: center; color: var(--p-muted); font-size: var(--t-small);
  background: var(--p-surface);
}
.slot svg { width: 28px; height: 28px; color: var(--p-accent); }

/* cabecera en fila: el título a la izquierda, una línea a la derecha, alineados por abajo */
.section-head--row { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-4) var(--s-8); margin-bottom: var(--s-8); }
.section-head--row p { margin: 0; max-width: 38ch; color: var(--p-muted); font-size: var(--t-lead); line-height: 1.45; }

/* proyectos: cuatro reels en fila */
.reels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }

/* servicios: una lista editorial grande y un fotograma panorámico */
.services { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-7); align-items: start; }
.services__intro { grid-column: 1 / span 5; position: sticky; top: calc(var(--nav) + var(--s-7)); }
.services__intro p { margin: var(--s-5) 0 0; max-width: 34ch; font-size: var(--t-lead); line-height: 1.45; color: var(--p-muted); }
.services__list { grid-column: 7 / -1; list-style: none; margin: 0; padding: 0; }
.services__list li { display: grid; gap: var(--s-2); padding-block: var(--s-6); border-top: 1px solid var(--line); }
.services__list li:last-child { border-bottom: 1px solid var(--line); }
.services__list h3 { margin: 0; font: 500 clamp(24px, 2.2vw, 32px)/1.1 var(--font-display); letter-spacing: -0.025em; }
.services__list p { margin: 0; color: var(--p-muted); max-width: 46ch; }
.scope { position: relative; margin: clamp(64px, 8vw, 120px) 0 0; aspect-ratio: 2.39 / 1; overflow: clip; border-radius: var(--r-md); background: var(--p-surface); }
.scope > :is(img, video) { width: 100%; height: 100%; object-fit: cover; }

/* cómo trabajo: una línea de tiempo con cuatro marcas */
#proceso h2 { margin-bottom: var(--s-8); }
.timeline { position: relative; list-style: none; margin: 0; padding: 40px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.timeline__rail { position: absolute; top: 9px; left: 0; right: 0; height: 1px; background: var(--line-strong); }
.timeline__step { position: relative; display: grid; gap: var(--s-3); align-content: start; }
.timeline__step::before { content: ""; position: absolute; top: -36px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--p-accent); box-shadow: 0 0 0 4px var(--p-bg); }
.timeline__tc { font-size: var(--t-label); font-weight: 500; color: var(--p-accent); font-variant-numeric: tabular-nums; }
.timeline__step h3 { margin: 0; font: 500 var(--t-card)/1.25 var(--font-display); letter-spacing: -0.015em; }
.timeline__step p { margin: 0; color: var(--p-muted); max-width: 32ch; }

/* sobre mí: el retrato a la izquierda, el texto a la derecha */
.about { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: start; }
.about__photo { grid-column: 1 / span 5; position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: clip; border-radius: var(--r-md); background: var(--p-surface); }
.about__photo > img { width: 100%; height: 100%; object-fit: cover; }
.about__text { grid-column: 7 / -1; }
.about__lead { margin: var(--s-5) 0 0; font-size: var(--t-lead); line-height: 1.5; max-width: 46ch; }
.about__reasons { list-style: none; margin: var(--s-8) 0 0; padding: 0; display: grid; gap: var(--s-6); }
.about__reasons h3 { margin: 0 0 var(--s-1); font: 500 var(--t-card)/1.25 var(--font-display); }
.about__reasons p { margin: 0; color: var(--p-muted); }

/* reseñas: una grande y dos a su lado */
#resenas h2 { margin-bottom: var(--s-8); }
.reviews { display: grid; grid-template-columns: 7fr 5fr; grid-template-rows: auto auto; gap: var(--gutter); }
.review { margin: 0; display: grid; gap: var(--s-6); align-content: space-between; padding: var(--s-6); border-radius: var(--r-md); background: var(--p-surface); }
.review--lead { grid-row: span 2; padding: var(--s-8); }
.review blockquote { margin: 0; font: 400 var(--t-card)/1.45 var(--font-display); letter-spacing: -0.01em; }
.review--lead blockquote { font-size: clamp(24px, 2.4vw, 34px); line-height: 1.25; letter-spacing: -0.02em; }
.review .person { display: flex; gap: var(--s-3); align-items: center; }
.review .person > span:last-child { display: grid; }
.person__role { color: var(--p-muted); }

/* contacto: WhatsApp primero, el formulario agrupado */
.contact { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-8); align-items: start; }
.contact__intro { grid-column: 1 / span 5; display: grid; gap: var(--s-5); justify-items: start; }
.contact__intro p { margin: 0; font-size: var(--t-lead); line-height: 1.45; max-width: 36ch; }
.btn--block { min-height: 56px; padding-inline: var(--s-6); font-size: 17px; }
.contact__promises { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: grid; gap: var(--s-2); color: var(--p-muted); }
.contact__promises li { display: flex; gap: var(--s-3); align-items: center; }
.contact__promises li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--p-accent); flex: none; }
.form-card { grid-column: 7 / -1; background: var(--p-surface); border-radius: var(--r-lg); padding: clamp(24px, 3vw, 40px); }
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); }
.form__group { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); }
.form__group > legend { padding: 0; margin-bottom: var(--s-4); font: 500 var(--t-card)/1.2 var(--font-display); letter-spacing: -0.01em; }
.form__group > .field--full, .form__group > .choices { grid-column: 1 / -1; }
.form .field { font-size: var(--t-label); }
.form .field textarea { min-height: 96px; }
.field__opt { font-weight: 400; color: var(--p-muted); }
.choices { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-1) var(--s-4); }
.choices legend { padding: 0; margin-bottom: var(--s-2); font-size: var(--t-label); font-weight: 500; }
.choices label { display: flex; align-items: center; gap: var(--s-3); min-height: 44px; font-size: var(--t-body); }
.choices input { width: 20px; height: 20px; accent-color: var(--p-accent); }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-5); }
.form__note { margin: 0; color: var(--p-muted); font-size: var(--t-small); }
.field__error { color: #ff8a80; font-size: var(--t-label); font-weight: 500; }
.field :is(input, select, textarea)[aria-invalid="true"] { border-color: #ff8a80; }
.form__status { padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); background: rgb(255 138 128 / .1); font-size: var(--t-small); }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__done h3 { font: 500 var(--t-h3)/1.2 var(--font-display); margin: 0 0 var(--s-3); }
.form__done h3:focus { outline: none; }
form[aria-busy="true"] button[type="submit"] { opacity: .7; cursor: progress; }
:is(h1, h2, h3, .t-card, blockquote) { overflow-wrap: break-word; hyphens: auto; }

/* pie: una despedida tranquila con tu cara, sin repetir el botón grande */
footer.closing { height: auto; min-height: 0; padding-block: clamp(72px, 8vw, 120px) var(--s-6); }
.signoff { display: flex; align-items: center; gap: var(--s-5); padding-bottom: clamp(48px, 6vw, 80px); }
.signoff__face { position: relative; flex: none; width: 64px; height: 64px; border-radius: 50%; overflow: clip; background: var(--p-surface); }
.signoff__face .slot { font-size: 11px; padding: 0; }
.signoff__face > img { width: 100%; height: 100%; object-fit: cover; }
.signoff__text { margin: 0; font: 500 clamp(24px, 2.6vw, 38px)/1.2 var(--font-display); letter-spacing: -0.025em; }
.signoff__text .link { white-space: nowrap; color: var(--p-accent); }
.footer__h { margin: 0 0 var(--s-3); font-size: var(--t-small); font-weight: 500; color: var(--p-muted); }
.hero__strip-label { margin: 0 0 var(--s-4); font-size: var(--t-small); color: rgb(255 255 255 / .72); }
@media (min-width: 1024px) { .nav__item--sheet { display: none; } }

/* ============================================================ ADAPT: tablet y móvil
   El móvil es por donde llega casi todo tu público (desde Instagram). Prioridades: el showreel
   detrás del texto también aquí, tu cara arriba, WhatsApp siempre al alcance del pulgar. */

/* portada: el vídeo cubre toda la pantalla también en tablet y móvil (el sistema lo ponía en una franja arriba) */
@media (max-width: 1023px) {
  .hero--film, .hero--film[data-tone] { background: #0b0b0a; color: #fff; --ink: #fff; --muted: rgb(255 255 255 / .72); --line: rgb(255 255 255 / .2); }
  .hero--film > .hero__bg { top: 0; height: 100%; }
  .hero--film > .wrap > .hero-text { display: flex; flex-direction: column; justify-content: flex-end; gap: var(--s-6); }
  .hero--film .hero__me { order: -1; width: auto; display: flex; align-items: center; gap: var(--s-4); }
  .hero--film .hero__me-photo { width: 64px; flex: none; border-radius: var(--r-sm); }
  .hero--film .hero__me-photo .slot { font-size: 11px; padding: var(--s-1); }
  .hero--film .btn-row { margin-top: var(--s-6); }
  .viewfinder { inset: calc(var(--nav) + var(--s-3)) var(--s-3) var(--s-3); }
  .hero__slot { display: none; }
  .hero__strip .logos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-2) var(--s-4); justify-items: start; }
}

/* tablet */
@media (min-width: 640px) and (max-width: 1023px) {
  .reels { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-7); }
  .services__intro, .services__list { grid-column: 1 / -1; position: static; }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-8); }
  .timeline__rail { display: none; }
  .about__photo { grid-column: 1 / span 5; }
  .about__text { grid-column: 6 / -1; padding-left: var(--s-5); }
  .reviews { grid-template-columns: 1fr 1fr; }
  .review--lead { grid-column: 1 / -1; grid-row: auto; }
  .contact__intro, .form-card { grid-column: 1 / -1; }
}

/* móvil */
@media (max-width: 639px) {
  header.nav:not(.is-open) .nav__bar > .nav__actions { display: none; }   /* WhatsApp vive en la barra de abajo */
  .hero--film { height: auto; min-height: 100svh; padding-bottom: var(--s-8); }
  .hero--film { padding-top: calc(var(--nav) + 104px); }
  .hero--film > .wrap > .hero-text { height: auto; min-height: 0; }
  .hero--film h1 { font-size: clamp(38px, 10.6vw, 48px); }
  .hero--film .btn-row { display: grid; gap: var(--s-3); }
  .hero--film .btn-row .btn { width: 100%; }
  .hero--film .hero__strip { margin-top: var(--s-2); }

  /* proyectos: una fila que se desliza con el dedo, un reel casi a pantalla completa */
  .section-head--row { margin-bottom: var(--s-6); }
  .reels {
    display: grid; grid-auto-flow: column; grid-auto-columns: 72%; grid-template-columns: none; gap: var(--s-3);
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); scroll-padding-inline: var(--gut);
  }
  .reels::-webkit-scrollbar { display: none; }
  .reels > .tile { scroll-snap-align: start; }

  .services { row-gap: var(--s-5); }
  .services__intro, .services__list { grid-column: 1 / -1; position: static; }
  .scope { aspect-ratio: 4 / 3; margin-top: var(--s-8); }

  /* la línea de tiempo pasa a vertical */
  .timeline { grid-template-columns: minmax(0, 1fr); padding: 0 0 0 var(--s-7); row-gap: var(--s-7); }
  .timeline__rail { top: 6px; bottom: 6px; left: 5px; right: auto; width: 1px; height: auto; transform-origin: top; }
  .has-reveal .timeline__rail[data-reveal="line"]:not(.is-in) { transform: scaleY(0); }
  .timeline__step::before { top: 4px; left: calc(-1 * var(--s-7)); }

  .about { row-gap: var(--s-7); }
  .about__photo, .about__text { grid-column: 1 / -1; }
  .about__reasons { margin-top: var(--s-7); }

  .reviews { grid-template-columns: minmax(0, 1fr); }
  .review--lead { grid-row: auto; padding: var(--s-6); }

  .contact__intro, .form-card { grid-column: 1 / -1; }
  .btn--block { width: 100%; }
  .form__group, .choices { grid-template-columns: minmax(0, 1fr); }
  .form__foot .btn { width: 100%; }

  .signoff { align-items: flex-start; }

  /* la barra de WhatsApp: aparece cuando el botón de la portada ya no se ve (nunca dos a la vez) */
  .actionbar { transition: transform 300ms var(--ease-film); }
  .actionbar.is-hidden { transform: translateY(110%); }
  footer.closing { padding-bottom: calc(var(--s-6) + var(--bar)); }
}
@media (max-width: 639px) and (prefers-reduced-motion: reduce) { .actionbar { transition: none; } }

/* las secciones miden su contenido en todos los tamaños (el sistema las fijaba a una pantalla) */
main > section.section:not(.hero), footer.closing { height: auto !important; min-height: 0 !important; }
@media (min-width: 640px) and (max-width: 1279px) { main > section.section:not(.hero), footer.closing { display: block; } }
@media (max-width: 1023px) {
  header.nav .nav__bar { display: flex; align-items: center; justify-content: space-between; }
  header.nav .nav__toggle { margin-left: auto; }
}
@media (max-width: 639px) {
  main > .hero.hero--film { height: auto; min-height: 100svh; }
}

/* ============================================================ POLISH */
/* casillas con la paleta (la del navegador era un cuadrado blanco sobre fondo oscuro) */
.choices input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 22px; height: 22px; border-radius: 6px;
  border: 1.5px solid var(--line-strong); background: var(--p-bg); display: grid; place-items: center; cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.choices input[type="checkbox"]::after {
  content: ""; width: 10px; height: 6px; margin-top: -2px; border: solid var(--p-accent-ink); border-width: 0 0 2px 2px;
  transform: rotate(-45deg) scale(.6); opacity: 0; transition: transform 150ms var(--ease-film), opacity 150ms ease;
}
.choices input[type="checkbox"]:checked { background: var(--p-accent); border-color: var(--p-accent); }
.choices input[type="checkbox"]:checked::after { opacity: 1; transform: rotate(-45deg) scale(1); }
.choices label { cursor: pointer; }
.field select { cursor: pointer; }
/* los textos de ayuda del formulario no compiten con la etiqueta */
.field > span:first-child { display: block; }
/* enlaces del pie con el subrayado de la página */
.footer__col a { text-underline-offset: .2em; }

/* ============================================================ MATERIAL REAL (noviembre 2026)
   Portada: en ordenador, tu showreel en un monitor vertical junto a tu foto; en tablet y móvil,
   el showreel de fondo. Cifras, casos de éxito, YouTube, rodajes e Instagram. */

/* logo de la marca */
.nav__logo--img { display: inline-flex; align-items: center; }
.nav__logo--img img { display: block; height: 24px; width: auto; }
.closing .nav__logo--img img { height: 28px; }

/* --- portada ----------------------------------------------------------------------------------- */
.hero__kicker { margin: 0 0 var(--s-5); font-size: var(--t-label); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: rgb(255 255 255 / .72); }
.hero--film h1 { font-size: clamp(44px, 5vw, 76px); max-width: none; }
.hero__reel { position: relative; overflow: clip; background: #000; }
.hero__reel > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__reel .viewfinder { inset: var(--s-4); }
.hero__reel .rec { top: 12px; left: 40px; font-size: 12px; }
.loop-pause {
  position: absolute; right: var(--s-4); bottom: var(--s-4); z-index: 3; width: 36px; height: 36px; border: 0; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgb(0 0 0 / .45); cursor: pointer;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .35); transition: background-color 150ms ease, transform 150ms var(--ease-film);
}
.loop-pause svg { width: 14px; height: 14px; fill: currentColor; }
.loop-pause:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .loop-pause:hover { background: rgb(0 0 0 / .7); } }
.hero__me-photo > img { object-position: 46% 40%; }

@media (min-width: 1024px) {
  .hero--film { background: radial-gradient(120% 90% at 85% 40%, #1d1d1a 0%, var(--p-bg) 60%); }
  .hero--film > .wrap { z-index: auto; }
  .hero--film > .wrap > .hero-text { grid-template-rows: minmax(0, 1fr) auto; }
  .hero--film .hero__text { grid-column: 1 / span 7; grid-row: 1; align-self: end; }
  .hero--film .hero__me { grid-column: 8 / span 2; grid-row: 1; align-self: end; justify-self: stretch; width: auto; padding-bottom: var(--s-8); }
  .hero--film .hero__reel {
    grid-column: 10 / span 3; grid-row: 1; align-self: end; margin-bottom: var(--s-8);
    aspect-ratio: 9 / 16; max-height: calc(100svh - var(--nav) - 220px); justify-self: end; width: 100%;
    border-radius: var(--r-md); outline: 1px solid rgb(255 255 255 / .14); outline-offset: -1px;
  }
  .hero--film .hero__strip { grid-row: 2; }
}

/* tablet y móvil: el showreel pasa a ser el fondo de toda la portada */
@media (max-width: 1023px) {
  .hero--film > .wrap, .hero--film > .wrap > .hero-text { position: static; z-index: auto; }
  .hero--film .hero__reel { position: absolute; inset: 0; z-index: -1; }
  .hero--film .hero__reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / .55) 0%, rgb(0 0 0 / .35) 35%, rgb(0 0 0 / .82) 75%, rgb(0 0 0 / .92) 100%); }
  .hero--film .hero__reel .viewfinder { inset: calc(var(--nav) + var(--s-3)) var(--s-3) var(--s-3); z-index: 1; }
  .hero--film .hero__reel .rec { left: var(--s-5); }
  .hero--film .hero__reel .loop-pause { top: calc(var(--nav) + var(--s-6)); right: var(--s-6); bottom: auto; }
  .hero--film .hero__me-photo { aspect-ratio: 1; border-radius: 50%; }
}

/* logos de clientes: todos en blanco, del mismo peso */
.hero__strip .logos { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5) var(--s-7); }
.hero__strip .logos li { display: flex; align-items: center; justify-content: center; }
.hero__strip .logos img { display: block; height: 42px; width: auto; max-width: 128px; object-fit: contain; filter: brightness(0) invert(1); opacity: .72; transition: opacity 200ms ease; }
.hero__strip .logos img.logo--wide { height: 26px; }
@media (hover: hover) and (pointer: fine) { .hero__strip .logos img:hover { opacity: 1; } }
@media (max-width: 1023px) {
  .hero__strip .logos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-5) var(--s-4); }
  .hero__strip .logos img { height: 34px; max-width: 100%; }
  .hero__strip .logos img.logo--wide { height: 20px; }
}

/* --- cifras ------------------------------------------------------------------------------------ */
.stats { padding-block: clamp(56px, 7vw, 104px); border-bottom: 1px solid var(--line); }
.stats__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gutter); }
.stats__list li { display: grid; gap: var(--s-3); align-content: start; padding-top: var(--s-5); border-top: 1px solid var(--line-strong); }
.stats__num { font: 500 clamp(64px, 9vw, 144px)/.9 var(--font-display); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; color: var(--p-ink); }
.stats__plus { color: var(--p-accent); margin-right: .04em; }
.stats__label { max-width: 24ch; color: var(--p-muted); font-size: var(--t-lead); line-height: 1.35; }
@media (max-width: 639px) {
  .stats__list { grid-template-columns: minmax(0, 1fr); gap: var(--s-6); }
  .stats__list li { grid-template-columns: auto 1fr; align-items: end; gap: var(--s-5); }
  .stats__num { font-size: 64px; min-width: 3.2ch; }
}

/* --- proyectos: seis reels y el hueco para el siguiente ---------------------------------------- */
#proyectos .tile__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reels__next {
  grid-column: span 2; display: grid; align-content: end; justify-items: start; gap: var(--s-6);
  padding: clamp(24px, 3vw, 40px); border-radius: var(--r-md); background: var(--p-surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.reels__next-title { margin: 0; font: 500 clamp(32px, 3.4vw, 52px)/1.02 var(--font-display); letter-spacing: -0.035em; }
.reels__next-title span { display: block; color: var(--p-accent); }
@media (min-width: 640px) and (max-width: 1023px) { .reels__next { min-height: 280px; } }
@media (max-width: 639px) { .reels__next { grid-column: auto; scroll-snap-align: start; } }

/* --- casos de éxito ---------------------------------------------------------------------------- */
.case { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: center; padding-block: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line); }
.case:last-child { padding-bottom: 0; }
.case__media { grid-column: 1 / span 4; position: relative; display: block; aspect-ratio: 9 / 16; max-height: 640px; overflow: clip; border-radius: var(--r-md); background: var(--p-surface); }
.case__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-film); }
.case__body { grid-column: 6 / -1; display: grid; gap: var(--s-6); justify-items: start; }
.case--flip .case__media { grid-column: 9 / span 4; order: 2; }
.case--flip .case__body { grid-column: 1 / span 7; }
.case__client { margin: 0; font-weight: 500; font-size: var(--t-lead); }
.case__client span { display: block; font-weight: 400; font-size: var(--t-small); color: var(--p-muted); margin-top: 2px; }
.case__figure { margin: 0; max-width: 16ch; font: 500 clamp(40px, 4.6vw, 72px)/1 var(--font-display); letter-spacing: -0.04em; }
.case__num { display: block; color: var(--p-accent); font-size: 1.55em; line-height: .95; letter-spacing: -0.05em; }
.case__story { margin: 0; display: grid; gap: var(--s-4); max-width: 56ch; }
.case__story > div { display: grid; grid-template-columns: 9.5em 1fr; gap: var(--s-4); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.case__story dt { font-size: var(--t-small); font-weight: 500; color: var(--p-muted); text-transform: uppercase; letter-spacing: .08em; padding-top: .2em; }
.case__story dd { margin: 0; line-height: 1.5; }
.case__ig, .contact__ig { display: inline-flex; align-items: center; gap: var(--s-2); }
.case__ig svg, .contact__ig svg { width: 18px; height: 18px; flex: none; }
@media (hover: hover) and (pointer: fine) {
  .case__media:hover > img { transform: scale(1.03); }
  .case__media:hover .reel__play { transform: scale(1.08); background: var(--p-accent); color: var(--p-accent-ink); box-shadow: none; }
}
.case__media:focus-visible .reel__play { background: var(--p-accent); color: var(--p-accent-ink); }
@media (min-width: 640px) and (max-width: 1023px) {
  .case__media, .case--flip .case__media { grid-column: 1 / span 5; order: 0; }
  .case__body, .case--flip .case__body { grid-column: 6 / -1; padding-left: var(--s-4); }
  .case__story > div { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
}
@media (max-width: 639px) {
  .case { row-gap: var(--s-6); }
  .case__media, .case--flip .case__media { grid-column: 1 / -1; order: 0; width: 72%; max-height: none; }
  .case__body, .case--flip .case__body { grid-column: 1 / -1; }
  .case__story > div { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); }
}

/* --- también edito para YouTube: bloque pequeño, en horizontal --------------------------------- */
main > section.section--small { padding-block: clamp(56px, 7vw, 104px); }
.yt { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-6); align-items: start; }
.yt__intro { grid-column: 1 / span 4; }
.yt__intro h2 { font-size: var(--t-h3, clamp(28px, 2.6vw, 40px)); max-width: 12ch; }
.yt__intro p { margin: var(--s-4) 0 0; color: var(--p-muted); max-width: 30ch; }
.yt__tile { grid-column: span 4; }
.yt__tile .tile__media { aspect-ratio: 16 / 9; border-radius: var(--r-md); position: relative; overflow: clip; }
.yt__tile .tile__media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-film); }
.yt__tile .tile__head { display: grid; gap: var(--s-1); margin-top: var(--s-3); }
.yt__tile .tile__head > * { margin: 0; }
@media (hover: hover) and (pointer: fine) {
  .yt__tile:hover .tile__media > img { transform: scale(1.03); }
  .yt__tile:hover .reel__play { transform: scale(1.08); background: var(--p-accent); color: var(--p-accent-ink); box-shadow: none; }
  .yt__tile:hover .reel__cta { opacity: 1; transform: none; }
}
@media (max-width: 1023px) { .yt__intro { grid-column: 1 / -1; } .yt__tile { grid-column: span 6; } }
@media (max-width: 639px) { .yt__tile { grid-column: 1 / -1; } }

/* --- servicios: dónde trabajo y etiquetas -------------------------------------------------------- */
.services__where { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--t-body) !important; color: var(--p-ink) !important; }
.services__where svg { width: 20px; height: 20px; flex: none; color: var(--p-accent); margin-top: 2px; }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-2) 0 0 !important; }
.tags span { padding: 4px 10px; border-radius: 999px; font-size: var(--t-label); color: var(--p-ink); box-shadow: inset 0 0 0 1px var(--line-strong); }

/* --- cómo trabajo: el rodaje en cuatro fotos ----------------------------------------------------- */
.bts { display: grid; grid-template-columns: 3fr 4fr 3fr 4fr; gap: var(--gutter); margin-top: clamp(56px, 7vw, 104px); }
.bts figure { position: relative; margin: 0; aspect-ratio: 3 / 4; overflow: clip; border-radius: var(--r-md); background: var(--p-surface); }
.bts figure:nth-child(even) { aspect-ratio: auto; }
.bts img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .bts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bts figure:nth-child(even) { aspect-ratio: 3 / 4; } }

/* --- quién soy: tu historia e Instagram -------------------------------------------------------- */
.about__photo > img { position: absolute; inset: 0; object-position: 50% 30%; }
.about__sub { margin: var(--s-4) 0 0; color: var(--p-muted); max-width: 52ch; }
.about__ig { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); margin-top: var(--s-8); }
.ig-card { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4); border-radius: var(--r-md); background: var(--p-surface); color: inherit; text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 200ms ease, transform 200ms var(--ease-film); }
.ig-card > svg:first-child { width: 28px; height: 28px; flex: none; color: var(--p-accent); }
.ig-card > span { display: grid; flex: 1; min-width: 0; }
.ig-card__handle { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.ig-card__what { font-size: var(--t-small); color: var(--p-muted); }
.ig-card__go { width: 18px; height: 18px; flex: none; color: var(--p-muted); transition: transform 200ms var(--ease-film), color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .ig-card:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px var(--line-strong); }
  .ig-card:hover .ig-card__go { transform: translate(2px, -2px); color: var(--p-accent); }
}
.ig-card:active { transform: scale(.98); }
@media (max-width: 639px) { .about__ig { grid-template-columns: minmax(0, 1fr); } }

/* --- pie: tu cara --------------------------------------------------------------------------------- */
.signoff__face > img { object-position: 50% 35%; }

/* --- reproductor --------------------------------------------------------------------------------- */
dialog.player { padding: 0; margin: auto; border: 0; background: transparent; max-width: none; max-height: none; overflow: visible; color: #fff; }
dialog.player::backdrop { background: rgb(0 0 0 / .88); }
.player__frame { width: min(92vw, calc(88svh * 9 / 16)); aspect-ratio: 9 / 16; border-radius: var(--r-md); overflow: clip; background: #000; }
.player__frame--wide { width: min(92vw, 1200px, calc(84svh * 16 / 9)); aspect-ratio: 16 / 9; }
.player__frame > :is(iframe, video) { display: block; width: 100%; height: 100%; border: 0; object-fit: contain; }
.player__close {
  position: fixed; top: max(16px, env(safe-area-inset-top)); right: 16px; width: 48px; height: 48px; border: 0; border-radius: 50%;
  display: grid; place-items: center; color: #fff; background: rgb(255 255 255 / .12); cursor: pointer;
  transition: background-color 150ms ease, transform 150ms var(--ease-film);
}
.player__close svg { width: 22px; height: 22px; }
.player__close:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) { .player__close:hover { background: rgb(255 255 255 / .22); } }
@media (prefers-reduced-motion: no-preference) {
  dialog.player[open] .player__frame { animation: rise-in 300ms var(--ease-film) both; --rise: 12px; }
  dialog.player[open]::backdrop { animation: fade-in 200ms ease both; }
}
html.is-playing { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .hero--film .hero__reel { animation: wipe-up 900ms var(--ease-gate) 180ms both; }
  .stats__list li { transition: none; }
}
/* Bai CrossFit Gernika lleva texto dentro de un bloque negro: en gris, para que se lea */
.hero__strip .logos img.logo--color { filter: grayscale(1) brightness(1.7) contrast(1.1); }
main > section.stats { height: auto !important; min-height: 0 !important; display: block; }
/* el sistema pone .wrap en columna (flex); estas secciones son rejillas de 12 columnas */
main > section > .wrap:is(.yt, .about, .contact) { display: grid !important; }
@media (max-width: 1023px) {
  main > .hero--film > .wrap, main > .hero--film > .wrap > .hero-text { position: static !important; z-index: auto !important; }
}
@media (max-width: 639px) {
  main > .hero.hero--film { padding-top: calc(var(--nav) + 56px); }
  .hero--film .hero__kicker { margin-bottom: var(--s-3); font-size: 11px; }
}
/* tablet: la portada mide su contenido (mínimo una pantalla), sin que nada se salga */
@media (min-width: 640px) and (max-width: 1023px) {
  main > .hero.hero--film { height: auto; min-height: 100svh; padding-top: calc(var(--nav) + 96px); padding-bottom: var(--s-8); }
  main > .hero--film > .wrap { height: auto; }
  .hero--film > .wrap > .hero-text { height: auto; min-height: calc(100svh - var(--nav) - 96px - var(--s-8)); }
}
@media (min-width: 640px) and (max-width: 1023px) { main > .hero--film > .wrap > .hero-text { justify-content: flex-end !important; } }

/* ============================================================ RONDA 3 (noviembre 2026): sin visor, más corta */
/* servicios: cuatro columnas en una fila, sin columna lateral ni foto panorámica */
#servicios .services { display: block; }
#servicios .services__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
#servicios .services__list li { align-content: start; padding-block: var(--s-5) 0; border-top: 1px solid var(--line-strong); border-bottom: 0; }
#servicios .services__list h3 { font-size: clamp(22px, 1.8vw, 28px); }
.where { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-5); margin: clamp(40px, 5vw, 64px) 0 0; padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--p-ink); }
.where svg { width: 20px; height: 20px; flex: none; color: var(--p-accent); }
.where span + span::before { content: "·"; margin-right: var(--s-5); color: var(--p-muted); }
@media (max-width: 1023px) { #servicios .services__list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--s-7); } }
@media (max-width: 639px) {
  #servicios .services__list { grid-template-columns: minmax(0, 1fr); row-gap: var(--s-6); }
  .where { display: grid; grid-template-columns: auto 1fr; gap: var(--s-2) var(--s-3); }
  .where span { grid-column: 2; }
  .where span + span::before { content: none; }
}

/* cómo trabajo: dos fotos de rodaje, panorámicas */
.bts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bts figure, .bts figure:nth-child(even) { aspect-ratio: 16 / 10; }
@media (max-width: 639px) { .bts { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); } }

/* proyectos: los reels con música van como vista previa en bucle, sin sonido */
.tile--loop .tile__media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile__badge { position: absolute; left: var(--s-3); top: var(--s-3); z-index: 2; padding: 4px 10px; border-radius: 999px; font-size: var(--t-label); font-weight: 500; color: #fff; background: rgb(0 0 0 / .55); }
@media (min-width: 640px) and (max-width: 1023px) { .reels { grid-template-columns: repeat(3, minmax(0, 1fr)); } .reels__next { grid-column: span 3; min-height: 0; } }

/* reseñas: se adaptan a 1 o 2 reseñas reales */
.reviews[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.reviews[data-count="2"] { grid-template-columns: 1fr 1fr; }
.reviews[data-count="2"] .review--lead { grid-row: auto; }

/* formulario: lo imprescindible a la vista, el resto plegado */
.form__more { border-top: 1px solid var(--line); padding-top: var(--s-5); }
.form__more summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; align-items: center; gap: var(--s-2); min-height: 44px; }
.form__more summary::-webkit-details-marker { display: none; }
.form__more summary::before { content: "+"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--p-accent-ink); background: var(--p-accent); font-weight: 600; transition: transform 200ms var(--ease-film); }
.form__more[open] summary::before { transform: rotate(45deg); }
.form__more > .form__group { margin-top: var(--s-5); }
.choices > .field__error { grid-column: 1 / -1; }

/* menú: entre 1024 y 1180 px los enlaces no tocan el logo */
@media (min-width: 1024px) and (max-width: 1180px) { .nav__link { font-size: 14px; padding-inline: 8px; } }

/* móvil: la portada respira, con los logos en una sola fila deslizable */
@media (max-width: 639px) {
  .hero__strip .logos { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: var(--s-6); overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gut)); padding-inline: var(--gut); }
  .hero__strip .logos::-webkit-scrollbar { display: none; }
  .hero__strip .logos li { flex: none; }
  .hero__strip .logos img { height: 30px; max-width: 110px; }
  .hero__strip .logos img.logo--wide { height: 18px; }
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tile--loop { cursor: default; }
.form__done .btn { margin-top: var(--s-5); }
@media (hover: none) { #proyectos a.tile .reel__cta { opacity: 1; transform: none; } }

/* ============================================================ RONDA 4: logos en bucle, vídeos que se mueven solos */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.hero__strip .logos.is-marquee {
  display: flex !important; flex-wrap: nowrap; width: max-content; justify-content: flex-start; gap: 0 !important;
  margin: 0; padding: 0; overflow: visible; animation: marquee 38s linear infinite;
}
.hero__strip .logos.is-marquee li { flex: none; padding-right: clamp(40px, 5vw, 72px); }
.marquee:hover .logos.is-marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 639px) { .hero__strip .logos.is-marquee { animation-duration: 28s; } .hero__strip .logos.is-marquee li { padding-right: 36px; } }

/* proyectos: todos los reels en bucle; al pulsar, el vídeo completo con sonido en la propia web */
#proyectos .tile__media > video, .case__media > video, .yt__tile .tile__media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-film); }
.case__media .reel__play, #proyectos a.tile .reel__play, .yt__tile .reel__play { width: 44px; height: 44px; margin: 0; left: auto; top: auto; right: var(--s-3); bottom: var(--s-3); background: rgb(0 0 0 / .5); }
.reel__play svg { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) {
  #proyectos a.tile:hover .tile__media > video, .case__media:hover > video, .yt__tile:hover .tile__media > video { transform: scale(1.03); }
}
/* móvil: rejilla de dos columnas, sin deslizar de lado */
@media (max-width: 639px) {
  .reels { display: grid !important; grid-auto-flow: row !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-auto-columns: auto !important;
    overflow: visible !important; margin-inline: 0 !important; padding-inline: 0 !important; gap: var(--s-5) var(--s-3) !important; scroll-snap-type: none !important; }
  .reels .tile__head .t-card { font-size: 15px; }
  .reels .tile__head .t-small { font-size: 12px; }
  .reels .reel__cta { display: none; }
  .reels .tile__badge { font-size: 11px; padding: 3px 8px; left: 8px; top: 8px; }
  .reels__next { grid-column: 1 / -1 !important; }
  .case__media, .case--flip .case__media { width: 62%; }
}

/* servicios: tarjetas con icono, número y brillo amarillo al pasar */
#servicios .services__list li {
  position: relative; display: grid; gap: var(--s-3); align-content: start; padding: clamp(24px, 2.4vw, 32px) !important;
  border: 0 !important; border-radius: var(--r-lg); background: var(--p-surface); box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden; isolation: isolate; transition: transform 300ms var(--ease-film), box-shadow 300ms ease;
}
#servicios .services__list li::before {   /* el brillo: un foco amarillo que se enciende desde la esquina */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 400ms ease;
  background: radial-gradient(120% 80% at 0% 0%, rgb(252 242 0 / .16), transparent 60%);
}
.svc__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; color: var(--p-accent-ink); background: var(--p-accent); margin-bottom: var(--s-3); transition: transform 300ms var(--ease-film); }
.svc__icon svg { width: 26px; height: 26px; }
.svc__n { position: absolute; top: clamp(24px, 2.4vw, 32px); right: clamp(24px, 2.4vw, 32px); font-size: var(--t-label); font-weight: 500; color: var(--p-muted); font-variant-numeric: tabular-nums; }
#servicios .services__list h3 { transition: color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  #servicios .services__list li:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px rgb(252 242 0 / .55), 0 18px 40px -20px rgb(252 242 0 / .35); }
  #servicios .services__list li:hover::before { opacity: 1; }
  #servicios .services__list li:hover h3 { color: var(--p-accent); }
  #servicios .services__list li:hover .svc__icon { transform: rotate(-6deg) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) { #servicios .services__list li, .svc__icon { transition: none; } }

/* cómo trabajo: el rodaje en vídeo, en un mosaico */
.bts { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: repeat(2, clamp(180px, 17vw, 260px)); gap: var(--gutter); }
.bts figure, .bts figure:nth-child(even) { aspect-ratio: auto; position: relative; margin: 0; overflow: clip; border-radius: var(--r-md); background: var(--p-surface); }
.bts video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 800ms var(--ease-film); }
.bts__a { grid-column: 1; grid-row: 1 / span 2; }
.bts__b { grid-column: 2 / span 2; grid-row: 1; }
.bts__c { grid-column: 2; grid-row: 2; }
.bts__d { grid-column: 3; grid-row: 2; }
@media (hover: hover) and (pointer: fine) { .bts figure:hover video { transform: scale(1.04); } }
@media (max-width: 639px) {
  .bts { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(2, 150px) 180px; gap: var(--s-3); }
  .bts__a { grid-column: 1; grid-row: 1 / span 2; }
  .bts__b { grid-column: 2; grid-row: 1; }
  .bts__c { grid-column: 2; grid-row: 2; }
  .bts__d { grid-column: 1 / -1; grid-row: 3; }
}
.footer__legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-3) var(--s-6); }
.footer__legal-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.footer__legal-links a, .footer__legal-links .link-btn { font-size: var(--t-small); color: var(--p-muted); text-underline-offset: .2em; }
.footer__legal-links .link-btn { font: inherit; font-size: var(--t-small); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.footer__legal-links :is(a, .link-btn):hover { color: var(--p-accent); }
.form__note a { color: inherit; }
/* rodaje: en el plano panorámico de arriba se ve la cara de Dragos (camiseta azul), arriba a la derecha del encuadre */
.bts__b video { object-position: 50% 50%; }
/* los cuatro clips de rodaje son verticales: cuatro en fila, enteros (9:16), sin recortar a nadie */
.bts { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; grid-template-rows: none !important; }
.bts > figure { grid-column: auto !important; grid-row: auto !important; aspect-ratio: 9 / 16 !important; }
@media (max-width: 639px) { .bts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* ============================================================ RONDA 5: portada más grande, ritmo y control del movimiento */
/* portada en ordenador: el showreel ocupa casi toda la altura; tu foto pasa a avatar sobre el titular */
.hero__ambient { display: none; }
@media (min-width: 1024px) {
  .hero__ambient {
    display: block; position: absolute; inset: -10%; z-index: 0; pointer-events: none;
    background: url("video/showreel-poster.jpg") 70% 40% / cover no-repeat; filter: blur(70px) saturate(1.2); opacity: .32;
  }
  .hero--film > .wrap { position: relative; z-index: 1; }
  .hero--film > .wrap > .hero-text { grid-template-rows: auto minmax(0, 1fr) auto; row-gap: 0; }
  .hero--film .hero__me { grid-column: 1 / span 7; grid-row: 1; align-self: end; justify-self: start; display: flex; align-items: center; gap: var(--s-4); width: auto; padding: 0 0 var(--s-6); }
  .hero--film .hero__me-photo { width: 64px; aspect-ratio: 1; border-radius: 50%; flex: none; }
  .hero--film .hero__text { grid-column: 1 / span 7; grid-row: 2; align-self: start; padding-bottom: var(--s-8); }
  .hero--film .hero__reel {
    grid-column: 8 / -1; grid-row: 1 / span 2; align-self: stretch; justify-self: end;
    height: 100%; width: auto; max-height: calc(100svh - var(--nav) - 200px); aspect-ratio: 9 / 16; margin-bottom: var(--s-8);
  }
  .hero--film .hero__strip { grid-row: 3; }
  .hero--film > .wrap > .hero-text { align-content: center; }
}

/* llamada a la acción justo después de los casos */
.cases__cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-5) var(--s-7); margin-top: clamp(48px, 6vw, 80px); padding: clamp(28px, 3.4vw, 48px); border-radius: var(--r-lg); background: var(--p-accent); color: var(--p-accent-ink); }
.cases__cta-title { margin: 0; max-width: 20ch; font: 500 clamp(28px, 3vw, 44px)/1.05 var(--font-display); letter-spacing: -0.03em; }
.cases__cta .btn--primary { background: var(--p-accent-ink); color: var(--p-accent); }
.cases__cta .btn--secondary { color: var(--p-accent-ink); box-shadow: inset 0 0 0 1.5px var(--p-accent-ink); background: transparent; }
@media (max-width: 639px) { .cases__cta .btn-row { display: grid; width: 100%; } .cases__cta .btn { width: 100%; } }

/* cifras de los casos: que no ocupen cuatro líneas */
.case__figure { max-width: 18ch; font-size: clamp(34px, 3.8vw, 60px); }
.case__num { font-size: 1.4em; }

/* cómo trabajo, dentro de servicios */
.process { margin-top: clamp(72px, 9vw, 128px); scroll-margin-top: calc(var(--nav) + 24px); }
.process__h { margin: 0 0 var(--s-8); font: 500 clamp(30px, 3.2vw, 46px)/1.08 var(--font-display); letter-spacing: -0.03em; }

/* "Próximo rodaje": un plano de rodaje detrás, para que no parezca un hueco */
.reels__next { position: relative; overflow: hidden; isolation: isolate; }
.reels__next-bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.reels__next::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(14 14 13 / .92) 0%, rgb(14 14 13 / .7) 55%, rgb(14 14 13 / .35) 100%); }

/* pausar el movimiento: logos, bucles y showreel */
.marquee:focus-within .logos.is-marquee, .motion-off .logos.is-marquee { animation-play-state: paused; }
.footer__legal-links [data-motion-toggle][aria-pressed="true"] { color: var(--p-accent); }
@media (min-width: 1024px) { main > .hero--film { overflow: clip; } }
@media (min-width: 1024px) and (max-width: 1279px) { .nav__item--wide { display: none; } }
/* logos: el sistema fijaba la franja a 28px y recortaba los logos altos (Muga, Karan, Olavide, Bluebird) */
.hero__strip .logos.is-marquee { height: auto !important; min-height: 48px; align-items: center; }
.hero__strip .logos.is-marquee li { height: auto !important; }
.marquee { padding-block: 4px; }
