:root {
  --black: #0B0C10;
  --ink: #121419;
  --white: #F2F2F2;
  --muted: #8E939C;
  --line: rgba(242, 242, 242, .12);
  --blue: #00AEEF;
  --amber: #FFB13D;
  --sans: "Inter Tight", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.7, 0, .2, 1);
}
* { box-sizing: border-box; }
html { scroll-padding-top: 72px; }
body { margin: 0; background: var(--black); color: var(--white); font: 400 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { background: var(--amber); color: var(--black); }
.wrap { width: min(1400px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--white); color: var(--black); padding: 8px 14px; z-index: 300; }
.skip:focus { left: 8px; }
.label { font: 500 .72rem/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.ln { display: block; overflow: hidden; }
.ln > span { display: inline-block; }

/* apertura: dos barras y un timecode */
.intro { display: none; }
.js .intro { display: flex; flex-direction: column; justify-content: space-between; position: fixed; inset: 0; z-index: 250; pointer-events: none; }
.intro-bar { height: 50.5vh; background: var(--black); }
.intro-tc { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 500 .8rem var(--mono); letter-spacing: .16em; color: var(--amber); }
.js .intro.done { display: none; }

/* cursor */
.cursor { position: fixed; left: 0; top: 0; z-index: 400; pointer-events: none; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--white); mix-blend-mode: difference; display: none; transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease); }
.cursor-label { position: absolute; inset: 0; display: grid; place-items: center; font: 500 .68rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--black); opacity: 0; transition: opacity .2s; }
.cursor.is-label { width: 76px; height: 76px; margin: -38px 0 0 -38px; background: var(--white); mix-blend-mode: normal; }
.cursor.is-label .cursor-label { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cursor { display: block; } }

/* cabecera */
.top { position: fixed; inset: 0 0 auto; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 20px var(--gutter); mix-blend-mode: difference; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 500; font-size: .95rem; }
nav { display: flex; gap: clamp(16px, 3vw, 40px); }
nav a { text-decoration: none; font: 500 .72rem var(--mono); letter-spacing: .14em; text-transform: uppercase; position: relative; padding: 4px 0; }
nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* hero */
.hero { position: relative; height: 100svh; min-height: 520px; overflow: hidden; background: #000; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(11,12,16,.85), rgba(11,12,16,0) 45%), linear-gradient(to bottom, rgba(11,12,16,.5), rgba(11,12,16,0) 25%); }
.hero-inner { position: absolute; left: var(--gutter); bottom: clamp(28px, 6vh, 64px); z-index: 2; }
.hero-title { font-size: clamp(2.4rem, 6.4vw, 6rem); font-weight: 500; line-height: 1; letter-spacing: -.035em; }
.hero-role { margin-top: 10px; font: 500 .78rem var(--mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(242,242,242,.75); }
.hero-meta { position: absolute; right: var(--gutter); bottom: clamp(28px, 6vh, 64px); z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(242,242,242,.75); }
.meta-now b { font-weight: 500; color: var(--white); }
.meta-tc { color: var(--amber); font-variant-numeric: tabular-nums; }
.rec { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #E5675F; margin-right: 10px; vertical-align: 1px; animation: blink 1.2s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* enfoque */
.intro-text { display: grid; grid-template-columns: 1fr 3fr; gap: 24px; padding: clamp(96px, 14vw, 180px) 0 clamp(72px, 10vw, 140px); }
.intro-text .label { color: var(--muted); padding-top: .6em; }
.statement { font-size: clamp(1.5rem, 3.1vw, 2.75rem); line-height: 1.18; letter-spacing: -.025em; font-weight: 400; max-width: 30ch; }
.js .statement .w { opacity: .18; transition: opacity .25s linear; }
.js .statement .w.on { opacity: 1; }

/* trabajo */
.row-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 18px; margin-bottom: clamp(24px, 3vw, 40px); border-bottom: 1px solid var(--line); }
.work { padding-bottom: clamp(80px, 10vw, 140px); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(40px, 5vw, 72px) clamp(14px, 1.8vw, 28px); align-items: start; }
.mod { margin: 0; }
.mod-media { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; overflow: hidden; cursor: pointer; }
.mod-media video, .mod-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; filter: saturate(.85) brightness(.88); }
.mod-media:hover video, .mod-media:hover img, .mod.in-view .mod-media video { filter: none; }
.mod-media:hover video, .mod-media:hover img { transform: scale(1.035); }
.mod-cap { display: grid; grid-template-columns: auto 1fr; column-gap: 14px; padding-top: 14px; }
.mod-n { grid-row: span 2; font: 500 .72rem var(--mono); color: var(--muted); padding-top: .35em; }
.mod-cap h3 { font-size: 1.15rem; font-weight: 500; letter-spacing: -.01em; }
.mod-cap p { font-size: .88rem; color: var(--muted); }
.m-p42 { grid-column: 1 / 8; } .m-p42 .mod-media { aspect-ratio: 4 / 3; }
.m-reebok { grid-column: 9 / 13; margin-top: clamp(40px, 9vw, 140px); } .m-reebok .mod-media { aspect-ratio: 4 / 5; }
.m-nsb { grid-column: 1 / 13; } .m-nsb .mod-media { aspect-ratio: 1600 / 686; }
.m-carbon { grid-column: 1 / 6; } .m-carbon .mod-media { aspect-ratio: 4 / 5; }
.m-palma { grid-column: 7 / 13; margin-top: clamp(40px, 12vw, 200px); } .m-palma .mod-media { aspect-ratio: 4 / 3; }
.m-elysia { grid-column: 3 / 10; } .m-elysia .mod-media { aspect-ratio: 3 / 2; }

/* detrás de cámara */
.bts { padding-bottom: clamp(80px, 10vw, 140px); overflow: hidden; }
.bts-track { display: flex; gap: clamp(12px, 1.5vw, 20px); padding: 0 var(--gutter); width: max-content; }
.bts-track figure { margin: 0; height: clamp(320px, 62vh, 640px); flex: none; overflow: hidden; }
.bts-track img { height: 100%; width: auto; object-fit: cover; }

/* sobre mí */
.about { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 80px); align-items: end; padding: clamp(40px, 6vw, 80px) 0 clamp(96px, 12vw, 160px); border-top: 1px solid var(--line); }
.about-photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about:not(:has(.about-photo:not([hidden]))) { grid-template-columns: 1fr; }
.about-body .label { color: var(--muted); margin-bottom: 24px; }
.about-lead { font-size: clamp(1.4rem, 2.6vw, 2.3rem); line-height: 1.2; letter-spacing: -.02em; max-width: 30ch; }
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: clamp(40px, 6vw, 72px); }
.services div { border-top: 1px solid var(--line); padding-top: 14px; }
.services p { margin-top: 10px; font-size: 1.05rem; }

/* contacto */
.contact { padding: clamp(40px, 6vw, 80px) 0 clamp(96px, 12vw, 160px); border-top: 1px solid var(--line); }
.contact .label { color: var(--muted); margin-bottom: 24px; }
.contact-mail { display: inline-block; font-size: clamp(1.6rem, 4.4vw, 3.8rem); letter-spacing: -.03em; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .6s var(--ease), color .3s; }
.contact-mail:hover { background-size: 100% 1px; color: var(--amber); }
.contact > p { margin-top: 16px; }

.foot { display: flex; justify-content: space-between; padding: 24px 0 32px; border-top: 1px solid var(--line); font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--white); }

/* sobre flotante */
.mail-fab { position: fixed; right: clamp(16px, 2.5vw, 32px); bottom: clamp(16px, 2.5vw, 32px); z-index: 90; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--black); box-shadow: 0 10px 30px rgba(0,0,0,.35); transition: transform .4s var(--ease), background .3s, opacity .4s; }
.mail-fab:hover { transform: scale(1.08); background: var(--amber); }
.js .mail-fab { opacity: 0; transform: translateY(20px); pointer-events: none; }
.js .mail-fab.on { opacity: 1; transform: none; pointer-events: auto; }

/* visor */
.viewer { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--black); color: var(--white); }
.viewer::backdrop { background: transparent; }
.viewer-in { height: 100%; display: flex; flex-direction: column; padding: 18px var(--gutter) 24px; gap: 16px; }
.viewer-head { display: flex; justify-content: space-between; align-items: flex-start; }
.viewer-head h2 { font-size: clamp(1.4rem, 2.4vw, 2rem); margin-top: 6px; }
.viewer-close { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; display: grid; place-items: center; transition: background .3s, color .3s; }
.viewer-close:hover { background: var(--white); color: var(--black); }
.viewer-tabs { display: flex; gap: 8px; }
.viewer-tabs:empty { display: none; }
.viewer-tabs button { border: 1px solid var(--line); background: transparent; border-radius: 99px; padding: 8px 16px; cursor: pointer; font: 500 .72rem var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.viewer-tabs button[aria-pressed="true"] { background: var(--white); color: var(--black); border-color: var(--white); }
.viewer-stage { flex: 1; min-height: 0; display: grid; place-items: center; }
.viewer-stage .box { position: relative; max-width: 100%; max-height: 100%; background: #000; }
.viewer-stage iframe, .viewer-stage video, .viewer-stage img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: contain; }
.viewer-note { color: var(--muted); font-size: .92rem; max-width: 60ch; }

.js .reveal { clip-path: inset(100% 0 0 0); }

@media (max-width: 860px) {
  .intro-text { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; gap: 40px; }
  .grid > .mod { grid-column: 1 / -1; margin-top: 0; }
  .m-reebok .mod-media, .m-carbon .mod-media { aspect-ratio: 4 / 5; }
  .about { grid-template-columns: 1fr; }
  .services { grid-template-columns: 1fr 1fr; }
  .hero-meta .meta-now { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rec { animation: none; }
  .js .intro { display: none; }
  .js .reveal { clip-path: none; }
  .js .statement .w { opacity: 1; }
  .js .mail-fab { opacity: 1; transform: none; pointer-events: auto; }
}

@media (max-width: 560px) {
  .brand span { display: none; }
  nav { gap: 18px; }
  nav a { letter-spacing: .1em; }
}

/* Retrato fundido con el fondo: el negro de la foto toma el negro de la página y los bordes se disuelven. */
.about-photo { background: none; overflow: visible; }
.about-photo img {
  mix-blend-mode: lighten;
  -webkit-mask-image: radial-gradient(ellipse 82% 78% at 50% 40%, #000 58%, transparent 100%);
  mask-image: radial-gradient(ellipse 82% 78% at 50% 40%, #000 58%, transparent 100%);
}
