/* TR:(STE — casa productora
   Layout: negro a sangre, el video es la página. Inicio partido en dos reels
   (Videoclips / Comercial); cada sección abre con su reel y un índice de proyectos
   que reproduce el trabajo de fondo al pasar el cursor. */

@font-face { font-family: "Triste Display"; src: url("fonts/neuehaasdisplaylight.woff") format("woff"); font-display: swap; }

:root {
  --k: #050505;                         /* negro */
  --w: #f2f1ee;                         /* blanco hueso */
  --dim: rgba(242, 241, 238, .52);
  --faint: rgba(242, 241, 238, .16);
  --sans: "Triste Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --gl: max(24px, env(safe-area-inset-left, 0px));
  --gr: max(24px, env(safe-area-inset-right, 0px));
  --st: env(safe-area-inset-top, 0px);
  --sb: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--k); color: var(--w); }
body { font-family: var(--sans); font-weight: 300; font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 1px solid var(--w); outline-offset: 4px; }
.lbl { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.dim { color: var(--dim); }

/* ---------- encabezado ---------- */
.hd {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  padding: calc(22px + var(--st)) var(--gr) 22px var(--gl);
  background: linear-gradient(rgba(5, 5, 5, .6), rgba(5, 5, 5, 0));
}
.hd .logo img { height: 16px; width: auto; }
.hd nav { display: flex; gap: 30px; }
.hd nav a, .hd .ig { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); transition: color .2s; }
.hd nav a:hover, .hd nav a.on, .hd .ig:hover { color: var(--w); }
.hd .hd-r { justify-self: end; display: flex; align-items: center; gap: 22px; }
.snd { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); transition: color .2s; }
.snd:hover, .snd[aria-pressed="true"] { color: var(--w); }
.snd .bars { display: inline-flex; align-items: end; gap: 2px; height: 12px; }
.snd .bars i { width: 2px; height: 5px; background: currentColor; }
.snd .bars i:nth-child(2) { height: 9px; }
.snd .bars i:nth-child(3) { height: 6px; }
.snd[aria-pressed="true"] .bars i { animation: eq .9s ease-in-out infinite alternate; }
.snd[aria-pressed="true"] .bars i:nth-child(2) { animation-delay: .25s; }
.snd[aria-pressed="true"] .bars i:nth-child(3) { animation-delay: .5s; }
@keyframes eq { from { height: 3px; } to { height: 12px; } }
@media (max-width: 760px) {
  .hd { grid-template-columns: auto 1fr; }
  .hd { grid-template-columns: auto 1fr auto; gap: 12px; }
  .hd .ig, .snd .txt { display: none; }
  .snd { padding: 6px 0 6px 4px; }
  .hd nav { justify-self: end; gap: 16px; }
  .hd nav a { font-size: 10px; letter-spacing: .1em; }
}

/* ---------- inicio: dos reels ---------- */
.pg-inicio { height: 100svh; overflow: hidden; }
.split { position: fixed; inset: 0; display: flex; }
.half {
  position: relative; flex: 1 1 50%; overflow: hidden; display: grid; align-content: end;
  padding: 0 var(--gr) calc(64px + var(--sb)) var(--gl); transition: flex-grow .8s cubic-bezier(.2, .7, .2, 1);
}
.half + .half { border-left: 1px solid var(--faint); }
.half video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .62; transition: opacity .6s; }
.half::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(5, 5, 5, .1) 50%, rgba(5, 5, 5, .7)); pointer-events: none; }
.half > div { position: relative; z-index: 1; display: grid; gap: 10px; }
.half h2 { margin: 0; font-weight: 300; font-size: clamp(38px, 6vw, 104px); line-height: .9; text-transform: uppercase; letter-spacing: -.02em; }
.half .go { display: inline-flex; gap: 10px; align-items: center; color: var(--dim); transition: color .3s; }
@media (hover: hover) {
  .split:hover .half { flex-grow: .7; }
  .split .half:hover { flex-grow: 1.3; }
  .split:hover .half video { opacity: .3; }
  .split .half:hover video { opacity: .85; }
  .half:hover .go { color: var(--w); }
}
.split-logo { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; pointer-events: none; transition: opacity .8s; }
.split-logo img { width: min(46vw, 640px); height: auto; filter: drop-shadow(0 2px 30px rgba(0, 0, 0, .35)); }
.split:hover ~ .split-logo { opacity: .15; }
@media (max-width: 760px) {
  .split { flex-direction: column; }
  .half { padding-bottom: 28px; }
  .half:first-child { align-content: start; }
  .half + .half { border-left: 0; border-top: 1px solid var(--faint); }
  .half:first-child { padding-top: calc(84px + var(--st)); }
  .split-logo img { width: 52vw; }
  }

/* ---------- sección: reel + índice ---------- */
.reel { position: relative; height: 100svh; min-height: 520px; overflow: hidden; display: grid; align-content: end; }
.reel > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(5, 5, 5, 0) 45%, rgba(5, 5, 5, .75)); pointer-events: none; }
.reel-over {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px;
  padding: 0 var(--gr) calc(40px + var(--sb)) var(--gl);
}
.reel-over h1 { margin: 6px 0 0; font-weight: 300; font-size: clamp(48px, 10vw, 176px); line-height: .85; text-transform: uppercase; letter-spacing: -.03em; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; padding: 14px 20px; background: var(--w); color: var(--k); transition: opacity .2s; }
.btn:hover { opacity: .85; }
.btn.ghost { background: transparent; color: var(--w); border: 1px solid var(--dim); }
.btn.ghost:hover { border-color: var(--w); opacity: 1; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: calc(14px + var(--sb)); transform: translateX(-50%); color: var(--dim); }

.bgv { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bgv video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.bgv.on video { opacity: .4; }
.index { position: relative; z-index: 1; padding: 96px var(--gr) 120px var(--gl); }
.index-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 28px; }
.works { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--faint); }
.works a {
  display: grid; grid-template-columns: 3rem minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, .8fr); gap: 24px; align-items: baseline;
  padding: 18px 0; border-top: 1px solid var(--faint); transition: opacity .3s;
}
.wi { color: var(--dim); font-variant-numeric: tabular-nums; }
.wa { font-size: clamp(22px, 2.8vw, 44px); line-height: 1; text-transform: uppercase; letter-spacing: -.01em; }
.wn { font-size: clamp(16px, 1.4vw, 20px); }
.wd { color: var(--dim); text-align: right; }
.wt { display: none; }
.works.dimmed li:not(.hov) a { opacity: .22; }
@media (max-width: 860px) {
  .works a { grid-template-columns: 104px minmax(0, 1fr); grid-template-areas: "t a" "t n" "t d"; gap: 4px 16px; align-items: start; }
  .wi { display: none; }
  .wt { display: block; grid-area: t; width: 104px; aspect-ratio: 4 / 3; object-fit: cover; }
  .wa { grid-area: a; font-size: 22px; }
  .wn { grid-area: n; font-size: 15px; }
  .wd { grid-area: d; text-align: left; }
}

@media (max-width: 760px) {
  .reel { height: auto; min-height: 0; display: block; padding-top: calc(64px + var(--st)); }
  .reel > video { position: static; width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .reel::after { display: none; }
  .reel-over { gap: 14px; padding: 18px var(--gr) 8px var(--gl); align-items: start; flex-direction: column; }
  .reel-over h1 { font-size: 36px; line-height: .95; letter-spacing: -.02em; margin-top: 4px; }
  .reel-over .lbl { font-size: 10px; }
  .reel-over .btn { padding: 10px 14px; font-size: 10px; }
  .index { padding-top: 40px; }
}

/* ---------- nosotros ---------- */
.about-bg { position: fixed; inset: 0; z-index: 0; }
.about-bg video { width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.about { position: relative; z-index: 1; display: grid; gap: 128px; padding: 150px var(--gr) 120px var(--gl); }
.about h1 { margin: 18px 0 0; font-weight: 300; font-size: clamp(32px, 4.6vw, 70px); line-height: 1.02; max-width: 19ch; text-wrap: balance; }
.about .big { margin: 36px 0 0; font-size: clamp(20px, 2vw, 28px); line-height: 1.35; max-width: 38ch; color: var(--dim); }
.about .obj { margin: 40px 0 0; max-width: 46ch; font-size: 17px; line-height: 1.5; display: grid; gap: 8px; }
.svc { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.svc li { border-top: 1px solid var(--faint); padding-top: 16px; font-size: clamp(20px, 2vw, 30px); text-transform: uppercase; }
.logos { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 44px 36px; align-items: center; }
.logos img { max-height: 40px; width: auto; filter: brightness(0) invert(1); opacity: .8; }
.mail { display: block; margin-top: 18px; font-size: clamp(30px, 6.4vw, 104px); line-height: 1; overflow-wrap: anywhere; }
.mail:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .12em; }
.contact-row { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 28px; }
.contact-row a:hover { color: var(--w); }
@media (max-width: 760px) { .svc { grid-template-columns: 1fr; gap: 0; } .svc li { padding-block: 14px; } }

/* ---------- proyecto ---------- */
.p-hero { position: relative; height: 100svh; min-height: 540px; overflow: hidden; display: grid; align-content: end; }
.p-hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.p-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(5, 5, 5, 0) 40%, rgba(5, 5, 5, .78)); pointer-events: none; }
.p-hero .back { position: absolute; z-index: 3; top: calc(78px + var(--st)); left: var(--gl); color: var(--dim); }
.p-hero .back:hover { color: var(--w); }
.p-meta h1 { margin: 10px 0 8px; font-weight: 300; font-size: clamp(42px, 7.4vw, 128px); line-height: .9; text-transform: uppercase; letter-spacing: -.02em; overflow-wrap: anywhere; }
.p-meta .t { margin: 0 0 12px; font-size: clamp(20px, 2.2vw, 32px); }
.p-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 48px 72px; align-items: start; padding: 96px var(--gr) 88px var(--gl); }
.credits { margin: 0; display: grid; gap: 20px; position: sticky; top: 96px; }
.credits dt { color: var(--dim); margin-bottom: 4px; }
.credits dd { margin: 0; font-size: 20px; line-height: 1.25; }
.stills { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stills button { cursor: zoom-in; display: block; }
.stills button:first-child { grid-column: 1 / -1; }
.stills img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity .3s; }
.stills button:first-child img { aspect-ratio: 16 / 9; }
.stills button:hover img { opacity: .82; }
@media (max-width: 860px) {
  .p-body { grid-template-columns: 1fr; }
  .credits { position: static; grid-template-columns: 1fr 1fr; }
  .stills { gap: 8px; }
}
.p-next { position: relative; display: grid; align-content: end; gap: 10px; min-height: 72svh; padding: 48px var(--gr) 56px var(--gl); overflow: hidden; border-top: 1px solid var(--faint); }
.p-next img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; transition: opacity .6s, transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.p-next:hover img { opacity: .7; transform: scale(1.03); }
.p-next > span { position: relative; }
.p-next .na { font-size: clamp(42px, 7.4vw, 128px); line-height: .9; text-transform: uppercase; letter-spacing: -.02em; }

/* ---------- pie ---------- */
.ft {
  position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding: 28px var(--gr) calc(28px + var(--sb)) var(--gl); border-top: 1px solid var(--faint); color: var(--dim);
}
.ft a:hover { color: var(--w); }

/* ---------- visores ---------- */
.modal { border: 0; padding: 0; margin: 0; background: transparent; width: 100vw; height: 100vh; max-width: none; max-height: none; color: var(--w); }
.modal::backdrop { background: rgba(0, 0, 0, .95); }
.modal[open] { display: grid; place-items: center; }
.modal .x { position: fixed; z-index: 2; top: calc(20px + var(--st)); right: var(--gr); }
.frame16 { width: min(92vw, calc(82vh * 16 / 9)); aspect-ratio: 16 / 9; background: #000; }
.frame16 iframe, .frame16 video { width: 100%; height: 100%; border: 0; }
.modal > img { max-width: 92vw; max-height: 80vh; width: auto; height: auto; }
.lbn { position: fixed; left: 0; right: 0; bottom: calc(20px + var(--sb)); display: flex; justify-content: center; align-items: center; gap: 28px; }
.lbn button { font-size: 22px; padding: 8px 12px; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.reel-over > *, .p-meta > *, .half > div > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.reel-over > *:nth-child(2), .p-meta > *:nth-child(2), .half > div > *:nth-child(2) { animation-delay: .08s; }
.p-meta > *:nth-child(3), .half > div > *:nth-child(3) { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
