/* Carlos Sanz · Director de fotografía — v2 */
/* Layout: black cinema ground, serif titles at poster scale, work in letterboxed frames on a 12-col grid. */
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("fonts/instrument-serif-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --bg: #0a0a0a;
  --bg-2: #121212;
  --ink: #f1eee8;
  --muted: #8f8b84;
  --line: #1f1f1f;
  --tungsten: #e9b872;

  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-small: clamp(0.8125rem, 0.78rem + 0.12vw, 0.875rem);
  --t-body: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --t-lead: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);
  --t-head: clamp(3rem, 1.6rem + 6vw, 8.5rem);
  --t-display: clamp(4.5rem, 1rem + 15.5vw, 17rem);

  --m: clamp(16px, 3vw, 48px);
  --gap: clamp(120px, 16vw, 240px);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: var(--t-body); font-weight: 350; line-height: 1.55;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
em { font-style: italic; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--bg); }
.skip { position: absolute; left: var(--m); top: -80px; z-index: 200; background: var(--ink); color: var(--bg); padding: 10px 14px; }
.skip:focus { top: 10px; }

/* ---------- buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 30px;
  border-radius: 999px; border: 0; background: var(--ink); color: var(--bg); font-weight: 500; font-size: var(--t-body); cursor: pointer;
  overflow: hidden; isolation: isolate; transition: transform .5s var(--ease), color .4s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--tungsten); transform: translateY(101%); transition: transform .5s var(--ease); border-radius: inherit; }
.btn:hover::before { transform: none; }
.btn:active { transform: scale(.96); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px rgba(241, 238, 232, .35); }
.btn--ghost:hover { color: var(--bg); }

/* ---------- bar */
.bar {
  position: fixed; inset: 0 0 auto; z-index: 100; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 22px var(--m); mix-blend-mode: difference; color: #fff; font-size: var(--t-small);
  transition: transform .6s var(--ease);
}
.bar.is-hidden { transform: translateY(-110%); }
.bar__mark { font-family: var(--serif); font-size: 1.5rem; line-height: 1; }
.bar__nav { display: flex; gap: 34px; }
.bar__nav a, .bar__mark { position: relative; }
.bar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.bar__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.bar__time { justify-self: end; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .bar { grid-template-columns: 1fr auto; padding: 18px var(--m); }
  .bar__nav { gap: 20px; }
  .bar__time { display: none; }
}

/* ---------- hero */
.hero { position: relative; height: 100svh; min-height: 620px; overflow: hidden; }
.hero__media { position: absolute; inset: 0; will-change: transform; }
.hero__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); animation: breathe 18s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(1.14) translate(-1%, -1%); } }
.hero__video { position: absolute; inset: 0; overflow: hidden; background: #000; opacity: 0; transition: opacity 1.6s ease; }
.hero__video.is-on { opacity: 1; }
.hero__video iframe { position: absolute; top: 50%; left: 50%; border: 0; pointer-events: none; background: #000; transform: translate(-50%, -50%) scale(1.06); } /* sized to cover by script, using the clip's own ratio */
.hero__shade { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.18) 45%, rgba(0,0,0,0) 70%); } /* scrim under text on footage */
.hero__inner {
  position: relative; height: 100%; display: grid; grid-template-rows: 1fr auto auto; align-content: end;
  padding: 120px var(--m) clamp(28px, 4vw, 56px);
}
.hero__role { align-self: end; font-size: var(--t-lead); color: var(--ink); margin-bottom: clamp(8px, 1vw, 16px); }
.hero__title { font-family: var(--serif); font-weight: 400; font-size: var(--t-display); line-height: .82; letter-spacing: -0.035em; white-space: nowrap; }
.hero__foot { display: grid; grid-template-columns: repeat(12, 1fr); gap: 24px; align-items: end; margin-top: clamp(24px, 3vw, 44px); }
.hero__lead { grid-column: 1 / span 5; font-size: var(--t-lead); line-height: 1.3; max-width: 30ch; }
.hero__actions { grid-column: 6 / span 4; display: flex; flex-wrap: wrap; gap: 12px; }
.hero__now { position: absolute; right: var(--m); bottom: clamp(28px, 4vw, 56px); display: inline-flex; align-items: center; gap: 10px; font-size: var(--t-small); color: var(--ink); max-width: 30ch; }
.hero__now:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero__dot { width: 8px; height: 8px; border-radius: 50%; background: #e5483b; animation: rec 1.4s ease-in-out infinite; flex: none; }
@keyframes rec { 50% { opacity: .2; } }
@media (max-width: 900px) {
  .hero__title { font-size: 21vw; white-space: normal; line-height: .86; }
  .hero__foot { grid-template-columns: 1fr; gap: 20px; }
  .hero__lead, .hero__actions { grid-column: 1; }
  .hero__actions .btn { flex: 1; }
  .hero__now { position: static; margin-top: 22px; }
  .hero__inner { grid-template-rows: 1fr auto auto auto; }
}

/* ---------- split text */
.js [data-split] .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.js [data-split] .w > span { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i) * 60ms + var(--base, 0ms)); }
.js [data-split].is-in .w > span { transform: none; }

/* ---------- section heads */
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px 64px; padding: 0 var(--m); margin-bottom: clamp(48px, 6vw, 96px); }
.sec-title { font-family: var(--serif); font-weight: 400; font-size: var(--t-head); line-height: .9; letter-spacing: -0.03em; }
.sec-note { max-width: 34ch; color: var(--muted); }

/* ---------- filter chips */
.filter { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer; background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px #2c2c2c; transition: color .3s, background-color .3s, box-shadow .3s; font-size: var(--t-small); }
.chip sup { font-size: .7em; margin-left: 3px; }
.chip:hover { color: var(--ink); box-shadow: inset 0 0 0 1px #555; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }

/* ---------- work grid: every piece visible at once, ARZ and Elio Toffana lead */
.work { padding: clamp(72px, 7vw, 112px) 0 var(--gap); }
.work .sec-head { margin-bottom: clamp(32px, 4vw, 56px); }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(8px, 1vw, 16px); padding: 0 var(--m); }
.tile { grid-column: span 4; }
.tile[hidden] { display: none; }
.t-xl { grid-column: span 8; }
.t-tall { grid-column: span 4; }
.tile__link { position: relative; display: block; height: 100%; overflow: hidden; background: var(--bg-2); aspect-ratio: 16 / 9; }
.t-xl .tile__link, .t-tall .tile__link { aspect-ratio: auto; height: 100%; min-height: 100%; }
.t-xl .tile__link { aspect-ratio: 16 / 9; }
.tile__link img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform 1.2s var(--ease), opacity .6s ease; }
.tile__link:hover img, .tile__link:focus-visible img { transform: scale(1.08); }
.feat__live { position: absolute; inset: 0; background: #000; opacity: 0; transition: opacity .8s ease; }
.feat__live.is-on { opacity: 1; }
.feat__live video { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); object-fit: cover; }
.feat__live iframe { position: absolute; top: 50%; left: 50%; border: 0; pointer-events: none; background: #000; transform: translate(-50%, -50%) scale(1.04); }
.tile__cap {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  padding: clamp(14px, 1.6vw, 24px); background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0)); /* scrim under text on footage */
}
.tile__title { font-family: var(--serif); font-weight: 400; font-size: clamp(1.25rem, 0.9rem + 0.9vw, 1.9rem); line-height: 1.05; letter-spacing: -0.01em; }
.tile__title em { color: #cfcbc4; }
.t-xl .tile__title, .t-tall .tile__title { font-size: clamp(1.75rem, 1rem + 2vw, 3.4rem); max-width: 18ch; }
.tile__cap > div { min-width: 0; }
.tile__feat { font-size: var(--t-small); color: #cfcbc4; margin-top: 6px; max-width: 40ch; }
.tile__meta { flex: none; font-size: var(--t-small); color: #cfcbc4; font-variant-numeric: tabular-nums; }
.grid:has(.tile__link:hover) .tile__link:not(:hover) img { opacity: .45; }
.js .tile[data-rise] { transform: translateY(40px); }
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .tile { grid-column: span 1; }
  .t-xl, .t-tall { grid-column: 1 / -1; }
  .t-tall .tile__link { aspect-ratio: 4 / 5; height: auto; }
  .tile__cap { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 560px) {
  .tile__title { font-size: 1.1rem; }
  .tile:not(.t-xl):not(.t-tall) .tile__meta { font-size: .8125rem; }
}

/* ---------- clients marquee */
.clients { padding: 0 0 var(--gap); }
.clients__title { padding: 0 var(--m); margin-bottom: 36px; font-size: var(--t-lead); color: var(--muted); font-weight: 350; }
.marquee { display: flex; overflow: hidden; }
.marquee__track { display: flex; flex: none; gap: clamp(32px, 4vw, 72px); padding-right: clamp(32px, 4vw, 72px); animation: marquee 48s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track li { font-family: var(--serif); font-size: clamp(2.6rem, 1.4rem + 4.6vw, 7rem); line-height: 1.1; white-space: nowrap; letter-spacing: -0.02em; }
.marquee__track li:nth-child(even) { font-style: italic; color: var(--muted); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- about */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: 32px; padding: 0 var(--m) var(--gap); align-items: start; }
.about__still { grid-column: 1 / span 5; position: sticky; top: 96px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-2); }
.about__still img { width: 100%; height: 118%; object-fit: cover; }
.about__still figcaption { position: absolute; left: 16px; bottom: 14px; font-size: var(--t-small); color: var(--ink); }
.about__text { grid-column: 7 / span 6; display: grid; gap: 28px; }
.about__lead { font-family: var(--serif); font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.6rem); line-height: 1.12; letter-spacing: -0.01em; }
.about__text > p:not(.about__lead) { max-width: 52ch; color: #cfcbc4; }
.about__list { display: grid; margin-top: 12px; }
.about__list div { display: grid; grid-template-columns: 1fr 2fr; gap: 24px; padding: 18px 0; box-shadow: inset 0 1px 0 var(--line); }
.about__list dt { color: var(--muted); font-size: var(--t-small); padding-top: 3px; }
@media (max-width: 900px) {
  .about { grid-template-columns: 1fr; }
  .about__still { grid-column: 1; position: relative; top: 0; aspect-ratio: 4 / 3; }
  .about__text { grid-column: 1; }
  .about__list div { grid-template-columns: 1fr; gap: 4px; }
  .about__lead { font-size: 1.4rem; }
}

/* ---------- contact */
.contact { padding: var(--gap) var(--m) clamp(64px, 8vw, 120px); display: grid; gap: 28px; background: var(--bg-2); }
.contact__title { font-family: var(--serif); font-weight: 400; font-size: var(--t-display); line-height: .82; letter-spacing: -0.04em; }
.contact__lead { font-size: var(--t-lead); max-width: 36ch; }
.contact__mail {
  justify-self: start; position: relative; font-size: clamp(1.6rem, 0.6rem + 4.2vw, 5.4rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1.1;
  overflow-wrap: anywhere; margin-top: 24px;
}
.contact__mail::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--ink); transform: scaleX(.12); transform-origin: left; transition: transform .8s var(--ease); }
.contact__mail:hover::after { transform: scaleX(1); }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.contact__info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 48px; padding-top: 28px; box-shadow: inset 0 1px 0 #262626; }
.contact__info dt { font-size: var(--t-small); color: var(--muted); margin-bottom: 6px; }
.contact__info a:hover { text-decoration: underline; text-underline-offset: 4px; }
@media (max-width: 760px) {
  .contact__info { grid-template-columns: 1fr; }
  .contact__actions .btn { flex: 1; }
  .contact__title { font-size: 26vw; }
}

/* ---------- footer */
.foot { padding: clamp(48px, 6vw, 96px) var(--m) 28px; overflow: hidden; }
.foot__name { font-family: var(--serif); font-size: 19.5vw; line-height: .8; letter-spacing: -0.045em; white-space: nowrap; color: #2a2a2a; margin-left: -.04em; }
.foot__row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; margin-top: 28px; font-size: var(--t-small); color: var(--muted); }
.foot__row a { color: var(--ink); }

/* ---------- player */
.player { width: min(100vw, 1440px); max-width: 100vw; max-height: 100svh; padding: 0; border: 0; background: #000; color: var(--ink); }
.player::backdrop { background: rgba(0, 0, 0, .94); }
.player[open] { animation: pop .5s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.player__bar { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 20px; padding: 12px 16px; font-size: var(--t-small); }
.player__title { font-family: var(--serif); font-size: 1.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player__ext { color: var(--muted); }
.player__ext:hover { color: var(--ink); }
.player__close { min-height: 40px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; }
.player__frame { position: relative; aspect-ratio: var(--ratio, 16 / 9); margin: 0 auto; }
.player__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 130; transform: translate(-50%, 16px); opacity: 0; background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-size: var(--t-small); transition: opacity .3s, transform .5s var(--ease); pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- generic rise */
.js [data-rise] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.2s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-rise].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .js [data-split] .w > span, .js [data-rise] { transform: none !important; opacity: 1 !important; transition: none !important; }
  .js [data-reveal], .js [data-reveal] img { clip-path: none !important; transform: none !important; transition: none !important; }
  .js .intro__text .wd { opacity: 1; }
  .marquee__track[aria-hidden] { display: none; }
  .marquee__track { flex-wrap: wrap; padding: 0 var(--m); gap: 8px 32px; flex: 1; }
}
