/* ==========================================================================
   beloga portfolio
   Tamaños de pantalla (los mismos que tenía Framer):
   - Móvil:         hasta 809px
   - Tablet:        810px a 1439px
   - Escritorio:    1440px a 1919px
   - Grande:        1920px o más (textos pequeños pasan de 13px a 16px)
   La web nunca pasa de 1920px de ancho: en pantallas mayores se centra.

   Las mejoras añadidas respecto a Framer están marcadas con [MEJORA]
   para poder encontrarlas y quitarlas fácilmente.
   ========================================================================== */

/* ---------- Fuentes ---------- */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/assets/fonts/inter-display-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/assets/fonts/inter-display-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter Display"; src: url("/assets/fonts/inter-display-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Variables ---------- */
:root {
  --black: #0f0f0f;
  --ink: #090909;
  --grey: #a6a6a6;
  --grey-text: #7f7f80;
  --accent: #2828e0;
  --white: #fff;
  --pad: 20px;
  --radius: 12px;        /* [MEJORA] esquinas suavemente redondeadas en imágenes y vídeos (pon 0 para quitarlo) */
  --small: 13px;          /* texto pequeño: fichas, subtítulos, tags (16px en pantallas de 1920+) */
  --font: "Inter", "Inter Placeholder", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter Display", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (min-width: 1920px) { :root { --small: 16px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--white); }
body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; font-weight: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; }

/* La web se centra y no pasa de 1920px (como en Framer) */
.page { position: relative; max-width: 1920px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; background: var(--white); }
.page main { flex: 1 0 auto; }
.page--dark { background: #000; }

/* [MEJORA] Selección de texto con el azul de la marca */
::selection { background: var(--accent); color: var(--white); }
/* [MEJORA] Contorno azul visible al navegar con teclado (accesibilidad) */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Estilos de texto reutilizados */
.t-label {            /* menú, enlaces pequeños, "Info", "Tags" */
  font-size: 15px; font-weight: 500; line-height: 18px; letter-spacing: -0.04em;
  text-transform: uppercase;
}
.t-h2 {               /* "My work", "More projects", "Let's talk!" */
  font-size: 40px; font-weight: 500; line-height: 1; letter-spacing: -0.08em;
  text-transform: uppercase;
}
.t-h1 {               /* títulos: "All works" y nombres de proyecto */
  font-size: 64px; font-weight: 600; line-height: 1; letter-spacing: -0.08em;
  text-transform: uppercase;
}
.hover-grey { transition: color .25s ease; }
.hover-grey:hover { color: var(--grey); }

/* ---------- Menú ---------- */
/* [MEJORA] Menú fijo: arriba se ve igual que en Framer; al hacer scroll se compacta
   con fondo difuminado, se esconde al bajar y vuelve al subir. */
.nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; color: var(--black);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), background-color .3s ease, box-shadow .3s ease; }
.nav__inner {
  max-width: 1920px; margin: 0 auto; height: 167px; padding: 39px calc(4.5% + 20px) 0;
  display: flex; align-items: center; justify-content: space-between;
  transition: height .4s cubic-bezier(.2, .7, .2, 1), padding .4s cubic-bezier(.2, .7, .2, 1);
}
.nav__logo { display: block; width: 254px; height: 88px; flex-shrink: 0; transform-origin: left center; transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
.nav__logo img { width: 100%; height: 100%; object-fit: contain; }
.nav__links { display: flex; gap: 24px; }
.nav--light { color: var(--white); }
.nav.is-scrolled { background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.nav--light.is-scrolled { background: rgba(0, 0, 0, .7); box-shadow: 0 1px 0 rgba(255, 255, 255, .08); }
.nav.is-scrolled .nav__inner { height: 72px; padding-top: 0; }
.nav.is-scrolled .nav__logo { transform: scale(.55); }
/* [MEJORA] el logo crece un poco al pasar el ratón */
.nav.is-scrolled .nav__logo:hover { transform: scale(.58); }
.nav.is-hidden { transform: translateY(-100%); }
/* Página actual marcada con el subrayado azul */
.link-line.is-active::after { transform: scaleX(1); }
.nav--light .link-line::after { background: var(--white); }
.nav--light .link-line:hover { color: var(--white); }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: var(--white); padding: 16px var(--pad) 28px; border-top: 1px solid var(--white); }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
/* [MEJORA] Footer pequeño (About): enlaces, email y copyright en una sola línea */
.footer--inline { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 28px; padding-top: 14px; padding-bottom: 18px; }
.footer--inline .footer__cta { justify-self: center; padding: 0; }
.footer__right { display: flex; align-items: center; justify-content: flex-end; gap: 24px; flex-wrap: wrap; }
.footer__sep { margin: 0 4px; opacity: .6; }
.footer__row--bottom { margin-top: 24px; }
.footer__cta { display: inline-block; padding: 6px 0 2px; color: var(--grey); }
/* [MEJORA] "Let's talk!": las letras hacen una pequeña ola y se iluminan al pasar el ratón */
.footer__cta .wl { display: inline-block; transition: color .3s ease; }
.footer__cta:hover .wl { color: var(--white); animation: wl-wave .7s cubic-bezier(.3, .7, .3, 1) both; animation-delay: calc(var(--i) * 28ms); }
.mark:hover [data-wave] .wl { animation: wl-wave .7s cubic-bezier(.3, .7, .3, 1) both; animation-delay: calc(var(--i) * 28ms); }
@keyframes wl-wave { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }
.footer__links { display: flex; flex-wrap: wrap; column-gap: 36px; row-gap: 12px; }
.footer__links a { gap: 8px; }
.ficon { width: 15px; height: 15px; display: inline-grid; place-items: center; opacity: .75; }
.ficon svg { width: 15px; height: 15px; fill: currentColor; }
.footer__meta { display: flex; align-items: center; gap: 28px; color: #6f6f6f; font-size: 13px; }
.footer .link-line::after { background: var(--white); }
.footer .link-line:hover { color: var(--white); }
.footer__mail {
  display: inline-flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--grey); font-family: var(--font-display); font-size: 15px; font-weight: 500; transition: color .25s ease;
}
.footer__mail:hover { color: var(--white); }
.footer__mail-hint {
  font-family: var(--font); font-size: 11px; font-weight: 500; text-transform: uppercase;
  padding: 4px 9px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); color: var(--grey);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
.footer__mail:hover .footer__mail-hint, .footer__mail.is-done .footer__mail-hint { background: var(--accent); border-color: var(--accent); color: var(--white); }

/* ---------- Home ---------- */
.home { padding: 222px var(--pad) 91px; }
.home__intro {
  max-width: 715px; margin: 0 auto;
  font-family: var(--font-display); font-size: 20px; font-weight: 600;
  line-height: 24px; letter-spacing: -0.005em; text-align: center; color: var(--ink);
}
.home__intro a { color: var(--accent); }
.home__intro { font-feature-settings: "cv11" 1; }   /* [MEJORA] "a" de un solo piso, más redondita */

/* [MEJORA] 'beloga' del Home: al pasar el ratón las letras hacen la ola, se ponen azules y una línea fina azul entra por la izquierda y se va con opacidad */
.wl { display: inline-block; }
.mark { position: relative; display: inline-block; transition: color .3s ease; }
.mark:hover { color: var(--accent) !important; }
.mark [data-wave] { position: relative; display: inline-block; }
.mark [data-wave]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--accent); pointer-events: none;
  opacity: 0; clip-path: inset(0 100% 0 0); transition: opacity .4s ease, clip-path 0s .4s;
}
.mark:hover [data-wave]::after { opacity: 1; clip-path: inset(0 0 0 0); transition: opacity .15s ease, clip-path .5s cubic-bezier(.65, 0, .35, 1); }
.section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.home .section-head { margin-top: 90px; }
.see-all { display: inline-flex; align-items: center; gap: 10px; }
.see-all__icon {
  width: 28px; height: 28px; border-radius: 999px; background: var(--accent);
  display: grid; place-items: center; color: var(--white);
  transform: rotate(-90deg); transition: transform .3s ease;
}
.see-all__icon svg { width: 20px; height: 20px; }
.see-all:hover .see-all__icon { transform: rotate(-45deg); }   /* [MEJORA] la flecha gira al pasar el ratón */
.home .see-all--bottom { display: none; }

.home-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 16px; row-gap: 32px; margin-top: 35px;
}
.home-card { display: block; }
.home-card__media { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: #f2f2f2; border-radius: var(--radius); transform: translateZ(0); isolation: isolate; will-change: transform; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.home-card__media img, .home-card__media video {
  width: 100%; height: 100%; object-fit: cover;
  transform: translateZ(0) scale(var(--zoom, 1));
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
/* Vídeos: el zoom se aplica a una caja que los contiene, no al vídeo,
   y la caja va en su propia capa. Así no tiembla al pasar el ratón. */
.vwrap { width: 100%; height: 100%; transform: translate3d(0, 0, 0) scale(var(--zoom, 1)); backface-visibility: hidden; }
.home-card__media .vwrap video, .work-card .vwrap video { transform: none !important; transition: none; }

/* [MEJORA] Hover de las tarjetas: la tarjeta entera (caja con sus esquinas) crece un poco, en vez de escalar el vídeo
   por dentro. La caja va en su propia capa (will-change), así se escala como una textura y no se repinta cada fotograma
   (eso era lo que hacía temblar el vídeo). Los textos pasan a azul al estar sobre la tarjeta. */
.home-card:hover .home-card__media { transform: translateZ(0) scale(1.012); }
/* El título se pone azul y "en negrita" (trazo fino que se anima, sin cambiar el ancho); el subtítulo sigue gris. Al quitar el ratón vuelve suave. */
.home-card__title { transition: color .45s ease; }
.home-card:hover .home-card__title { color: var(--accent); }
.home-card__title {
  margin-top: 20px; font-size: 15px; font-weight: 500; line-height: 15px;
  letter-spacing: -0.08em; text-transform: uppercase;
}
.home-card__sub {
  margin-top: 4px; font-size: var(--small); font-weight: 500; line-height: 1.2;
  letter-spacing: -0.04em; color: var(--grey); text-transform: lowercase;
}

/* ---------- Tarjetas de trabajos (Works y "More projects") ---------- */
.work-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
}
.work-card { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; background: #111; border-radius: var(--radius); transform: translateZ(0); isolation: isolate; will-change: transform; transition: transform .7s cubic-bezier(.2, .7, .2, 1); }
.work-card:hover { transform: translateZ(0) scale(1.012); }
.work-card img, .work-card video { width: 100%; height: 100%; object-fit: cover; transform: translateZ(0) scale(var(--zoom, 1)); transition: transform .6s cubic-bezier(.2, .7, .2, 1); }

.work-card__overlay {
  position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; padding: 16px; color: var(--white);
  background: linear-gradient(to top, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, 0) 100%);
  opacity: 0; transition: opacity .35s ease;
}
.work-card:hover .work-card__overlay,
.work-card:focus-visible .work-card__overlay { opacity: 1; }
.work-card__title { font-size: 15px; font-weight: 500; line-height: 18px; letter-spacing: -0.04em; text-transform: uppercase; max-width: 47%; }
.work-card__tags { text-align: right; font-size: var(--small); font-weight: 500; line-height: 1.2; letter-spacing: -0.04em; }
@media (hover: none) { .work-card__overlay { opacity: 1; } }

/* ---------- Página Works ---------- */
.works-page { background: #000; color: var(--white); padding: 206px var(--pad) 60px; }
.works-page .work-grid { margin-top: 40px; }

/* ---------- Página de proyecto ---------- */
.project { padding: 266px var(--pad) 0; }
.project__title { padding-left: 69px; }

/* Ficha: Info a la izquierda; Tags y Year empiezan siempre en la mitad + 72px */
.details {
  display: grid; grid-template-columns: calc(50% + 72px) minmax(0, 1fr);
  margin-top: 80px;
}
.details__info { padding-left: 73px; padding-right: 40px; }
.details__info > * { max-width: 604px; }
.details__label { color: var(--grey); margin-bottom: 8px; }
.details__body {
  font-size: var(--small); font-weight: 500; line-height: 1.25; letter-spacing: -0.04em;
  text-align: justify;
}
.details__body p + p { margin-top: 20px; }
.details__body a { color: var(--accent); transition: color .25s ease; }
.details__body a:hover { color: rgba(40, 40, 224, .5); }
.details__body strong { font-weight: 700; }

/* [MEJORA] Media: enlaces en filas con línea fina, como en Contact */
.details__media { margin-top: 36px; }
.mlinks { border-top: 1px solid #ececec; }
.mrow {
  display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid #ececec; font-size: var(--small); font-weight: 500; letter-spacing: -0.03em;
}
.mrow__label { color: var(--grey); }
.mrow__url { color: var(--black); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color .25s ease, transform .35s cubic-bezier(.2, .7, .2, 1); }
.mrow__arr { color: var(--grey); transition: color .25s ease, transform .35s cubic-bezier(.2, .7, .2, 1); }
.mrow:hover .mrow__url { color: var(--accent); transform: translateX(4px); }
.mrow:hover .mrow__arr { color: var(--accent); transform: translate(3px, -3px); }

/* [MEJORA] Tags y Year como una pequeña ficha técnica; los tags en etiquetas redondeadas */
.details__meta { max-width: 520px; padding-top: 26px; }
.spec { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: start; gap: 12px; padding: 12px 0; border-top: 1px solid #ececec; }
.spec:last-child { border-bottom: 1px solid #ececec; }
.spec__label { font-size: 15px; font-weight: 500; line-height: 18px; letter-spacing: -0.04em; text-transform: uppercase; color: var(--grey); padding-top: 5px; }
.spec__value { font-size: var(--small); font-weight: 500; letter-spacing: -0.03em; padding-top: 3px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 4px 11px; border: 1px solid #dcdcdc; border-radius: 999px; font-size: calc(var(--small) - 1px); font-weight: 500; letter-spacing: -0.03em; }

/* Imágenes y vídeos del proyecto: fila de 1760px como máximo, centrada.
   Cada pieza mantiene su proporción (no se estiran a la altura de la otra). */
.media { max-width: 1760px; margin: 80px auto 0; display: grid; gap: 12px; align-items: start; }
.media > * { min-width: 0; }
.media img, .media video { width: 100%; height: auto; object-fit: cover; border-radius: var(--radius); }
.media--main-side { grid-template-columns: 1317fr 431fr; }        /* vídeo grande + pieza vertical */
.media--halves { grid-template-columns: 1fr 1fr; }                /* dos piezas iguales */
.media--halves-flush { grid-template-columns: 1fr 1fr; gap: 0; }  /* dos piezas iguales sin hueco */
.media--poster-square { grid-template-columns: minmax(0, 874px) 690px; }  /* CREDIT//0: póster + vídeo cuadrado fijo */
.media--single-wide { grid-template-columns: minmax(0, 1374px); }  /* Personal work: vídeo de 1374px */
.media .span-main { grid-column: 1; }
.media .row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.media .center-y { align-self: center; }
.media .w-416 { width: 96.5%; }                                   /* Tupper: la vertical mide 416px, no 431 */
.ar-16-9 { aspect-ratio: 16 / 9; }
.ar-1036-589 { aspect-ratio: 1317 / 741; }
.ar-337-480 { aspect-ratio: 431 / 613; }
.ar-9-16 { aspect-ratio: 9 / 16; }
.ar-1036-443 { aspect-ratio: 1317 / 564; }
.ar-337-477 { aspect-ratio: 431 / 610; }
.ar-1036-453 { aspect-ratio: 1317 / 576; }
.ar-1036-441 { aspect-ratio: 1317 / 561; }
.ar-1 { aspect-ratio: 1 / 1; }
.ar-692-979 { aspect-ratio: 880 / 1244; }
.ar-686-971 { aspect-ratio: 874 / 1236; }
.ar-686-1220 { aspect-ratio: 874 / 1554; }
.ar-1036-603 { aspect-ratio: 1317 / 767; }
.media video.contain { object-fit: contain; background: transparent; }
.only-mobile { display: none; }
.indent-10 { padding-left: 10px; }

/* YouTube: primero la miniatura, el reproductor se carga al hacer clic */
.yt { position: relative; overflow: hidden; background: #000; cursor: pointer; border-radius: var(--radius); }
.yt img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
/* [MEJORA] Play propio: círculo de cristal con el triángulo blanco; al pasar el ratón se llena del azul de la marca */
.yt__play {
  position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; display: grid; place-items: center;
  transform: translate(-50%, -50%); padding: 0; cursor: pointer; color: var(--white);
  border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; background: rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1), background .3s ease, border-color .3s ease;
}
.yt__play svg { width: 32px; height: 32px; transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.yt:hover .yt__play { transform: translate(-50%, -50%) scale(1.08); background: var(--accent); border-color: var(--accent); }
.yt:hover .yt__play svg { transform: scale(1.08); }
/* Personal work */
.pw-wrap { max-width: 1760px; margin: 0 auto; }
.pw-block { margin-top: 60px; }
.pw-wrap:first-of-type .pw-block:first-child { margin-top: 80px; }
.marquee + .pw-wrap .pw-block:first-child { margin-top: 57px; }
/* [MEJORA] Título a la izquierda y texto + enlace a la derecha, alineados con Tags y Year de los proyectos */
.pw-head { display: grid; grid-template-columns: calc(50% + 72px) minmax(0, 1fr); align-items: start; column-gap: 0; }
.pw-head h2 { font-size: 46px; font-weight: 700; line-height: 1.1; letter-spacing: -0.04em; padding-right: 20px; }
.pw-info { max-width: 460px; padding-top: 8px; }
.pw-info p { font-size: 16px; font-weight: 400; line-height: 1.45; color: #2b2b2b; }
.pw-info .link-line { margin-top: 14px; }
.pw-block .media { margin-top: 12px; }
.pw-covers-head { margin-bottom: 37px; }

.marquee { overflow: hidden; margin: 0 calc(var(--pad) * -1); }
.marquee__track { display: flex; gap: 15px; width: max-content; margin-left: -50px; animation: marquee 60s linear infinite; }
.marquee__track img { width: 300px; height: 300px; object-fit: cover; flex-shrink: 0; border-radius: var(--radius); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 7.5px)); } }

/* "More projects" */
.more { margin-top: 160px; padding-bottom: 80px; }
.more .section-head { align-items: flex-end; }
.more .work-grid { margin-top: 20px; }
.more .more__bottom { display: none; }

/* [MEJORA] "Home" y "See all works" separados, con subrayado azul animado
   (antes era un solo texto "< HOME // SEE ALL WORKS") */
.more__links { display: flex; align-items: center; gap: 22px; padding-bottom: 4px; }
.more__links .sep { width: 1px; height: 14px; background: #cfcfcf; }
.link-line { position: relative; display: inline-flex; align-items: center; gap: 6px; padding-bottom: 3px; transition: color .25s ease; }
.link-line::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform .35s cubic-bezier(.2, .7, .2, 1);
}
.link-line:hover { color: var(--accent); }
.link-line:hover::after { transform: scaleX(1); transform-origin: left; }
.link-line .arr { display: inline-block; transition: transform .3s ease; }
.link-line:hover .arr-l { transform: translateX(-3px); }
.link-line:hover .arr-r { transform: translateX(3px); }

/* ---------- About ---------- */
/* Escritorio (1440 a 1919): el diseño de 1440 centrado */
.about {
  position: relative; max-width: 1440px; margin: 0 auto; min-height: 963px;
  padding: 160px 28px 60px 40px;
  display: grid; grid-template-columns: minmax(0, 1fr) 520px; align-items: start;
}
.about__text { position: relative; align-self: center; padding-top: 100px; }
.about__title {
  font-family: var(--font-display); font-size: 70px; font-weight: 600; line-height: 1;
  letter-spacing: -3px; color: #1e1e1e; margin-bottom: 50px;
}
.about__title .accent { color: var(--accent); }
.about__body {
  max-width: 476px; margin-left: 10px;
  font-family: var(--font-display); font-size: 16px; font-weight: 500; line-height: 23px;
  letter-spacing: -0.2px; color: var(--grey-text); text-align: justify;
}
.about__body p + p { margin-top: 23px; }
.about__body strong { font-weight: 700; }
/* [MEJORA] la frase clave se subraya con un marcador azul suave al llegar a ella (en varias líneas también) */
.about__body .hl { background: linear-gradient(rgba(40, 40, 224, .13), rgba(40, 40, 224, .13)) no-repeat left 88% / 0% 48%;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size 1.1s cubic-bezier(.65, 0, .35, 1) .5s; }
.about__body .hl.is-in { background-size: 100% 48%; }
.about__bar { position: absolute; left: 669px; top: 212px; width: 5px; height: 112px; background: var(--accent); }
/* [MEJORA] la foto lleva un zoom pequeño dentro de su marco para quitar los bordes claros del archivo */
.about__photo-wrap { width: 100%; aspect-ratio: 582 / 707; overflow: hidden; border-radius: var(--radius); }
.about__photo { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); }
.about__body a { border-bottom: 1px solid rgba(40, 40, 224, .45); transition: color .25s ease, border-color .25s ease; }
.about__body a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- Contact ---------- */
.contact {
  padding: 160px 60px 245px 20px;
  display: grid; grid-template-columns: 700px minmax(0, 1fr);
}
.contact__info { padding: 60px 40px 0 40px; max-width: 590px; }
.contact__title {
  font-family: var(--font-display); font-size: 71px; font-weight: 600; line-height: 72px;
  letter-spacing: -3px; color: #1e1e1e;
}
.contact__lead {
  margin-top: 30px; font-family: var(--font-display); font-size: 16px; font-weight: 500;
  line-height: 24px; letter-spacing: -0.1px; color: var(--grey-text);
}
.contact__list { margin-top: 36px; border-top: 1px solid #ececec; }
/* [MEJORA] filas de contacto: al pasar el ratón el valor se pone azul y la flecha avanza */
.crow {
  display: grid; grid-template-columns: 23px 92px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 15px 0; border-bottom: 1px solid #ececec; font-family: var(--font-display); font-size: 16px; font-weight: 500;
  color: #29292b; transition: color .25s ease;
}
.crow__label { font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: -0.02em; text-transform: uppercase; color: var(--grey); }
.crow__value { transition: transform .35s cubic-bezier(.2, .7, .2, 1); }
.crow__arr { color: var(--grey); transition: transform .35s cubic-bezier(.2, .7, .2, 1), color .25s ease; }
.crow:hover { color: var(--accent); }
.crow:hover .crow__value { transform: translateX(6px); }
.crow:hover .crow__arr { color: var(--accent); transform: translate(3px, -3px); }
.contact__icon {
  width: 23px; height: 23px; border-radius: 50px; background: rgba(40, 40, 224, .14);
  display: grid; place-items: center; color: var(--accent); transition: background .25s ease, color .25s ease;
}
.crow:hover .contact__icon { background: var(--accent); color: var(--white); }
.contact__icon svg { width: 13px; height: 13px; fill: currentColor; }

.form { display: flex; flex-direction: column; gap: 16px; padding-top: 74px; }
.form input, .form textarea {
  width: 100%; border: 0; outline: 0; border-radius: 0;
  background: #f5f4f3; box-shadow: inset 0 0 2px rgba(0, 0, 0, .05);
  padding: 0 24px; height: 67px;
  font-family: var(--font-display); font-size: 16px; font-weight: 500; color: var(--black);
}
.form textarea { height: 150px; padding-top: 22px; padding-bottom: 18px; resize: none; overflow-y: auto; }   /* sin tirador; solo hace scroll si el mensaje es muy largo */
.form ::placeholder { color: #999; }
.form input:focus, .form textarea:focus { box-shadow: inset 0 0 0 1px var(--accent); }
.form__submit { position: relative; }
/* El muñeco (Kilroy) se asoma por encima del botón */
.form__doodle { position: absolute; z-index: 2; right: 28%; top: -40px; width: 174px; height: 87px; pointer-events: none;
  transform: translateX(var(--kx, 0px)); transition: transform 1.1s cubic-bezier(.22, .61, .36, 1); }
.form__eyes .pupil { transform-box: fill-box; transform-origin: center; }
.form__eyes .pupil.is-blink { scale: 1 .08; }
.form__doodle img { width: 100%; height: 100%; display: block; }
.form__eyes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.form__eyes .pupil { transition: transform .1s ease-out, scale .07s ease-out; }
/* [MEJORA] Contact en ordenador: la página no se desplaza (solo si la ventana es muy baja) */
@media (min-width: 810px) and (min-height: 720px) {
  html:has(.contact), body:has(.contact) { overflow: hidden; height: 100%; }
  .contact { padding-bottom: 60px; }
}
/* [MEJORA] el Kilroy se desliza por el borde del botón siguiendo un poco al ratón */
.form button {
  position: relative; width: 100%; height: 72px; border: 0; border-radius: 10px;
  background: #1e1e1e; color: var(--white); cursor: pointer;
  font-family: var(--font-display); font-size: 18px; font-weight: 500; line-height: 26px;
  transition: background .25s ease;
}
.form button:hover { background: #000; }
/* [MEJORA] Enviando: puntos que laten y una línea azul fina que recorre el borde inferior del botón */
.form button { overflow: hidden; }
.form button.is-sending { cursor: progress; }
.form button.is-sending::after { content: ""; position: absolute; left: 0; bottom: 0; width: 35%; height: 2px; background: var(--accent); animation: send-bar 1.2s cubic-bezier(.65, 0, .35, 1) infinite; }
.form .dots i { font-style: normal; animation: send-dot 1.2s ease-in-out infinite; opacity: .25; }
.form .dots i:nth-child(2) { animation-delay: .15s; }
.form .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes send-dot { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }
@keyframes send-bar { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
.form__status { min-height: 20px; font-family: var(--font-display); font-size: 14px; color: var(--grey-text); }
.hp { position: absolute; left: -9999px; }

/* ---------- 404 ---------- */
.notfound { min-height: 80vh; display: grid; place-items: center; text-align: center; padding: 200px 20px 80px; }
.notfound img { width: 189px; margin: 0 auto 24px; }   /* [MEJORA] el Kilroy también aparece en la 404 */
.notfound a { color: var(--accent); }

/* ---------- [MEJORA] Transición entre páginas por capas, con desenfoque ----------
   La página anterior se queda detrás y se difumina; la nueva sube por encima
   y se enfoca al llegar. Chrome, Edge y Safari; en Firefox, entrada simple. */
@view-transition { navigation: auto; }
::view-transition-group(root) { animation-duration: .9s; }
::view-transition-old(root) { animation: vt-back .9s cubic-bezier(.65, 0, .35, 1) both; }
::view-transition-new(root) { animation: vt-up .9s cubic-bezier(.65, 0, .35, 1) both; }
@keyframes vt-back { to { transform: translateY(-8%); filter: blur(14px); opacity: .35; } }
@keyframes vt-up { from { transform: translateY(100%); filter: blur(8px); } 60% { filter: blur(2px); } to { transform: none; filter: blur(0); } }

/* ---------- [MEJORA] Intro de la primera visita: el logo aparece desenfocado y se enfoca, con una barra de carga fina y centrada debajo (del mismo ancho que el logo); luego todo se desvanece suave ---------- */
.intro { position: fixed; inset: 0; z-index: 100; background: var(--white); overflow: hidden; pointer-events: none; display: grid; place-items: center;
  animation: intro-out .7s cubic-bezier(.65, 0, .35, 1) 1.7s both; }
.intro-done .intro { display: none; }
.ld { display: grid; justify-items: center; gap: 18px; width: 220px; }
.ld__logo { width: 220px; height: auto; display: block; opacity: 0; filter: blur(10px); transform: translateY(8px); animation: ld-logo 1s cubic-bezier(.2, .7, .2, 1) .1s both; }
.ld__track { width: 100%; height: 2px; border-radius: 2px; background: #ececec; overflow: hidden; opacity: 0; animation: ld-fade .5s ease .5s both; }
.ld__fill { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; animation: ld-fill 1.1s cubic-bezier(.65, 0, .35, 1) .6s both; }
@keyframes ld-logo { to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes ld-fade { to { opacity: 1; } }
@keyframes ld-fill { to { transform: scaleX(1); } }
@keyframes intro-out { to { opacity: 0; filter: blur(8px); } }

@keyframes page-in { from { opacity: 0; transform: translateY(60px); } to { opacity: 1; transform: none; } }
.js.no-vt .page { animation: page-in .7s cubic-bezier(.16, 1, .3, 1) both; }

/* ---------- Animaciones de texto (solo si hay JavaScript) ---------- */
.js [data-reveal] .rv {
  display: inline-block; opacity: 0;
  transform: translateY(10px) scale(.95);
  transition: opacity .35s ease, transform .4s cubic-bezier(.2, .7, .2, 1), filter .35s ease;
  transition-delay: var(--d, 0s);
}
.js [data-reveal="words"] .rv { filter: blur(6px); }
.js [data-reveal].is-in .rv { opacity: 1; transform: none; filter: none; }
.rw { white-space: nowrap; }
.js .fade-up { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.js .fade-up.is-in { opacity: 1; transform: none; }

/* [MEJORA] Los pósters (clase tilt) solo se levantan un poco al pasar el ratón; la inclinación y el brillo
   están en el visor de imágenes, ya con la imagen ampliada. */
@media (hover: hover) and (pointer: fine) {
  img.tilt { transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease; }
  img.tilt:hover { transform: translateY(-5px); box-shadow: 0 16px 30px -18px rgba(20, 20, 50, .3); }
}

/* Inclinación y brillo de la imagen ampliada */
.lightbox__stage { position: relative; transform-origin: center; border-radius: var(--radius); }
.lightbox__stage.is-tilting { transition: transform .12s ease-out; }
.lightbox__stage:not(.is-tilting) { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.lightbox__glare { position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none; opacity: 0; mix-blend-mode: soft-light;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 55%);
  transition: opacity .4s ease; }
.lightbox__stage.is-tilting .lightbox__glare { opacity: 1; }

/* [MEJORA] Botón flotante para volver arriba: aparece al bajar */
.to-top {
  position: fixed; right: 24px; bottom: calc(24px + var(--tt-lift, 0px)); z-index: 40; width: 44px; height: 44px; border-radius: 999px;
  display: grid; place-items: center; background: var(--accent); color: var(--white);
  box-shadow: 0 8px 24px rgba(40, 40, 224, .3);
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .9, .3, 1.3);
}
.to-top svg { width: 20px; height: 20px; transition: transform .3s ease; }
.to-top.is-on { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover svg { transform: translateY(-3px); }

/* [MEJORA] Visor de imágenes: clic en una imagen de un proyecto para verla en grande */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; visibility: hidden; }
.lightbox__bg { position: absolute; inset: 0; background: rgba(10, 10, 12, .97); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .45s ease; }
.lightbox.is-open { visibility: visible; }
.lightbox.is-open .lightbox__bg { opacity: 1; }
.lightbox__img { position: relative; object-fit: contain; border-radius: var(--radius); will-change: transform; cursor: zoom-in; transform-origin: 0 0; }
.lightbox__stage.is-zoomed { touch-action: none; }
.lightbox__stage.is-zoomed .lightbox__img { cursor: grab; }
.lightbox__stage.is-dragging .lightbox__img { cursor: grabbing; }
.lightbox__stage.is-zoomed .lightbox__glare { display: none; }
.lightbox__ui { position: absolute; inset: auto 0 24px; display: flex; justify-content: center; align-items: center; gap: 18px; color: var(--white);
  font-size: 13px; font-weight: 500; letter-spacing: -0.02em; opacity: 0; transition: opacity .3s ease .15s; }
.lightbox.is-open .lightbox__ui { opacity: 1; }
.lightbox--single .lightbox__ui, .lightbox--single .lightbox__nav { display: none; }
.lightbox__btn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); background: none; color: var(--white); cursor: pointer; transition: background .25s ease, border-color .25s ease; }
.lightbox__btn:hover { background: var(--accent); border-color: var(--accent); }
/* [MEJORA] flechas a los lados, en círculos de cristal con un chevron que se desplaza al pasar el ratón */
.lightbox__nav {
  position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; display: grid; place-items: center; padding: 0;
  background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; transition: opacity .3s ease .15s, background .25s ease, border-color .25s ease, transform .35s cubic-bezier(.2, .7, .2, 1);
}
.lightbox.is-open .lightbox__nav { opacity: 1; }
.lightbox__prev { left: 28px; }
.lightbox__next { right: 28px; }
.lightbox__nav svg { width: 22px; height: 22px; transition: transform .3s cubic-bezier(.2, .7, .2, 1); }
.lightbox__prev:hover svg { transform: translateX(-3px); }
.lightbox__next:hover svg { transform: translateX(3px); }
.lightbox__nav:active { transform: scale(.92); }
@media (max-width: 809.98px) {
  .lightbox__nav { width: 44px; height: 44px; margin-top: 0; top: auto; bottom: 18px; }
  .lightbox__prev { left: calc(50% - 90px); }
  .lightbox__next { right: calc(50% - 90px); }
  .lightbox__ui { bottom: 30px; }
}
.lightbox__close { position: absolute; top: 24px; right: 24px; display: grid; place-items: center; padding: 0; }
.lightbox__close svg { width: 16px; height: 16px; display: block; }
/* [MEJORA] Control de zoom visible: deslizador con - y + para que se vea que la imagen se puede ampliar */
.lightbox__zoom { position: absolute; right: 28px; bottom: 24px; display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--white);
  border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; font-size: 12px; font-weight: 500; letter-spacing: -0.02em; opacity: 0; transition: opacity .3s ease .15s; }
.lightbox.is-open .lightbox__zoom { opacity: 1; }
.lightbox__zoom .zhint { opacity: .6; margin-right: 6px; white-space: nowrap; }
.lightbox__zoom .zhint--touch { display: none; }
@media (hover: none) { .lightbox__zoom .zhint--mouse { display: none; } .lightbox__zoom .zhint--touch { display: inline; } }
.lightbox__zoom svg { width: 14px; height: 14px; opacity: .7; flex: none; }
.lightbox__zoom output { min-width: 26px; text-align: right; opacity: .7; font-variant-numeric: tabular-nums; }
.lightbox__zoom input { -webkit-appearance: none; appearance: none; width: 120px; height: 16px; background: transparent; cursor: pointer; margin: 0; }
.lightbox__zoom input::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.lightbox__zoom input::-moz-range-track { height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .35); }
.lightbox__zoom input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -5px; border-radius: 50%; background: var(--white); border: 0; transition: transform .2s ease; }
.lightbox__zoom input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 0; }
.lightbox__zoom input:hover::-webkit-slider-thumb { transform: scale(1.25); }
@media (max-width: 809px) { .lightbox__zoom { right: 50%; transform: translateX(50%); bottom: 90px; } }

/* Cursor: el del sistema, solo con lupa en las imágenes que se amplían */
.media img, .marquee__track img { cursor: zoom-in; }
.yt, .yt * { cursor: pointer; }
.yt img { cursor: pointer; }

/* Scroll suave (Lenis) */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] .rv, .js .fade-up { opacity: 1; transform: none; filter: none; transition: none; }
  .marquee__track { animation: none; }
  .js.no-vt .page { animation: none; }
  .intro { display: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}

/* ==========================================================================
   Pantallas de 1920px o más
   ========================================================================== */
@media (min-width: 1920px) {
  .about { max-width: none; padding: 160px 63px 60px 52px; grid-template-columns: minmax(0, 1fr) 610px; }
  .about__text { padding-top: 100px; }
  .about__title { padding-left: 27px; }
  .about__body { max-width: 641px; margin-left: 36px; }
  .about__bar { left: 928px; top: 212px; }
}

/* ==========================================================================
   Tablet: 810px a 1439px
   ========================================================================== */
@media (max-width: 1439.98px) {
  .works-page .t-h1 { font-size: 56px; }
  .works-page .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .details { grid-template-columns: minmax(0, 1fr) minmax(0, 260px); column-gap: 40px; }
  .details__info { padding-right: 0; }
  .media--poster-square { grid-template-columns: 466fr 380fr; }
  .about { max-width: none; grid-template-columns: 1fr 45%; padding: 160px 20px 60px 40px; }
  .about__bar { display: none; }
  .about__body { max-width: none; margin-right: 40px; }
  .contact { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 40px; padding-right: 20px; }
  .contact__info { padding-left: 0; padding-right: 0; }
}
@media (max-width: 1199.98px) {
  .about__title { font-size: 56px; }
}

/* ==========================================================================
   Móvil: hasta 809px
   ========================================================================== */
@media (max-width: 809.98px) {
  .nav__inner { height: 180px; padding: 46px 33px 0; flex-direction: column; justify-content: flex-start; }
  .nav__logo { transform-origin: center top; }
  .nav__links { gap: 28px; margin-top: -2px; }
  /* [MEJORA] al bajar: logo pequeño a la izquierda y enlaces a la derecha, en una sola fila */
  .nav.is-scrolled .nav__inner { height: 60px; padding: 0 20px; flex-direction: row; justify-content: space-between; align-items: center; }
  .nav.is-scrolled .nav__logo { width: 100px; height: 34px; transform: none; transform-origin: left center; }
  .nav.is-scrolled .nav__links { margin-top: 0; gap: 17px; }
  .footer__row { align-items: flex-start; flex-direction: column; }
  .footer--inline { grid-template-columns: 1fr; row-gap: 18px; }
  .footer--inline .footer__cta { justify-self: start; order: -1; }
  .footer__right { justify-content: flex-start; }
  .footer__links { flex-direction: column; gap: 12px; }

  .t-h2 { font-size: 32px; }
  .t-h1 { font-size: 40px; }

  .home { padding-top: 201px; }
  .home__intro { font-size: 16px; line-height: 22px; }
  .home .section-head { margin-top: 136px; }
  .crow { grid-template-columns: 23px minmax(0, 1fr) auto; }
  .crow__label { display: none; }
  .to-top { right: 16px; bottom: calc(16px + var(--tt-lift, 0px)); }
  .home .section-head .see-all { display: none; }
  .home-grid { grid-template-columns: 1fr; row-gap: 32px; margin-top: 35px; }
.home-card__sub { font-size: 12px; }
  .home .see-all--bottom { display: inline-flex; margin-top: 60px; }


  .work-grid, .works-page .work-grid { grid-template-columns: 1fr; }
  .works-page .t-h1 { font-size: 40px; }
  .work-card__tags { font-size: 12px; }

  .project { padding-top: 258px; }
  .project__title { padding-left: 0; }
  .details { grid-template-columns: 1fr; row-gap: 40px; margin-top: 60px; }
  .details__info { padding-left: 0; }
  .media { margin-top: 60px; }
  .media--main-side, .media--halves, .media--halves-flush, .media--poster-square { grid-template-columns: 1fr; }
  .media .row-3 { grid-template-columns: 1fr; }
  .media .first-on-mobile { order: -1; }
  .media .w-416 { width: 100%; }
  .only-desktop { display: none; }
  .only-mobile { display: block; }
  .indent-10 { padding-left: 0; }
  .pw-head { grid-template-columns: 1fr; row-gap: 12px; }
  .pw-head h2 { font-size: 36px; }
  .pw-block { margin-top: 80px; }
  .marquee__track img { width: 220px; height: 220px; }

  .more { margin-top: 100px; padding-bottom: 84px; }
  .more .section-head .more__links { display: none; }
  .more .more__bottom { display: inline-flex; margin-top: 24px; }

  .about { grid-template-columns: 1fr; padding: 200px 20px 60px; min-height: 0; row-gap: 40px; }
  .about__text { padding-top: 0; }
  .about__title { font-size: 44px; margin-bottom: 30px; }
  .about__body { margin: 0; }

  .contact { grid-template-columns: 1fr; padding: 200px 20px 80px; row-gap: 40px; }
  .contact__info { padding: 0; }
  .contact__title { font-size: 52px; line-height: 1; }
  .form { padding-top: 40px; }
  .form__doodle { right: 3%; width: 120px; height: 60px; top: -28px; }
  .details__meta { padding-top: 0; }
}

/* [MEJORA] imagenes y videos: no se arrastran ni se seleccionan, y sin menu de pulsacion larga en movil */
img, video { -webkit-user-drag: none; user-select: none; -webkit-touch-callout: none; }
img[data-nozoom] { cursor: default !important; }
/* [MEJORA] Safari: sin el boton de play nativo sobre los videos de portada (muestran el poster si no pueden arrancar) */
video::-webkit-media-controls, video::-webkit-media-controls-start-playback-button, video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; }
