/* Layout: vídeo fijo a pantalla completa detrás; paneles opacos suben por encima al hacer scroll.
   Mundo visual: sala de cine a oscuras, tipografía de cartel (Bodoni), datos en mono como una claqueta. */
:root {
  --ink: #120f11;          /* fondo principal, negro cálido */
  --ink-2: #1b1719;        /* panel alterno */
  --paper: #f2ede7;        /* texto principal */
  --muted: #a89f9b;        /* texto secundario */
  --line: rgba(242, 237, 231, 0.14);
  --rose: #d08f86;         /* acento: rosa vino del fondo burdeos de los headshots */
  --rose-deep: #8e4a47;

  --f-display: "Bodoni Moda", "Didot", "Bodoni 72", Georgia, serif;
  --f-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --maxw: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

/* ---------- Tipografía ---------- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
  margin: 0 0 14px;
}
.h2 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}
.h3 {
  font-family: var(--f-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  margin: 0 0 18px;
}
.lede { font-size: 20px; line-height: 1.55; }
.muted { color: var(--muted); }
.todo { color: var(--rose); font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.06em; }
.section-head { display: grid; gap: 10px; margin-bottom: 48px; max-width: 640px; }
.section-head .muted { margin: 6px 0 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; border-radius: 999px;
  transition: background .25s, color .25s, border-color .25s;
}
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--rose); }
.btn--ghost { border: 1px solid rgba(242,237,231,.6); color: var(--paper); }
.btn--ghost:hover { background: rgba(242,237,231,.12); }
.btn--line { border: 1px solid var(--line); color: var(--paper); }
.btn--line:hover { border-color: var(--rose); color: var(--rose); }

/* ---------- Vídeo fijo ---------- */
.stage { position: fixed; inset: 0; z-index: 0; background: var(--ink); overflow: hidden; }
.stage__video {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(calc(1 + var(--p, 0) * 0.08));
  filter: saturate(0.9);
}
.stage__veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(to bottom, rgba(18,15,17,.55) 0%, rgba(18,15,17,0) 28%, rgba(18,15,17,0) 55%, rgba(18,15,17,.85) 100%),
    rgba(18,15,17, calc(0.15 + var(--p, 0) * 0.6));
}

/* ---------- Barra superior ---------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--gutter-r) 18px var(--gutter);
  transition: background .3s, padding .3s;
}
.bar.is-solid {
  background: rgba(18,15,17,.92);
  padding-top: calc(env(safe-area-inset-top, 0px) + 12px); padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) { .bar.is-solid { background: rgba(18,15,17,.72); backdrop-filter: blur(12px); } }
.bar__name { font-family: var(--f-display); font-size: 20px; text-decoration: none; white-space: nowrap; }
.bar__nav { display: flex; gap: 26px; align-items: center; }
.bar__nav a {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; color: var(--paper); opacity: .85;
}
.bar__nav a:hover { opacity: 1; color: var(--rose); }
.bar__cta { border: 1px solid rgba(242,237,231,.5); border-radius: 999px; padding: 8px 16px; }

/* ---------- Portada ---------- */
main { position: relative; z-index: 1; }
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  padding-bottom: clamp(72px, 12vh, 140px);
}
.hero__inner { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.hero__kicker { font-family: var(--f-mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 18px; opacity: .9; }
.hero__name {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(56px, 12vw, 168px);
  line-height: .9; letter-spacing: -0.02em; margin: 0;
  text-shadow: 0 2px 40px rgba(0,0,0,.35);
}
.hero__name em { font-style: italic; font-weight: 400; color: var(--paper); }
.hero__line { font-size: 19px; margin: 22px 0 30px; max-width: 30ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__credit {
  position: absolute; right: var(--gutter-r); bottom: 28px; margin: 0;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7;
}
.hero__credit em { font-style: normal; color: var(--rose); }
.hero__scroll {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 26px; height: 42px; border: 1px solid rgba(242,237,231,.6); border-radius: 20px;
}
.hero__scroll span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  background: var(--paper); border-radius: 2px; animation: cue 1.8s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(14px); opacity: 0 } 100% { opacity: 0 } }

/* ---------- Paneles ---------- */
.panel { position: relative; background: var(--ink); padding-block: clamp(80px, 12vw, 150px); }
.panel:nth-of-type(odd) { background: var(--ink-2); }
.about { border-top-left-radius: 28px; border-top-right-radius: 28px; box-shadow: 0 -30px 60px rgba(0,0,0,.35); }

/* Sobre mí */
.about__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 90px); align-items: start; }
.about__photo { margin: 0; position: sticky; top: 100px; }
.about__photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 4px; }
.about__photo figcaption, .g figcaption { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; color: var(--muted); margin-top: 10px; text-transform: uppercase; }
.about__text { min-width: 0; }
.about__text .h2 { margin-bottom: 28px; }
.about__text p { max-width: 60ch; }
.facts { margin: 40px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.facts div { padding: 16px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.facts dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 4px 0 0; font-size: 16px; }

/* Videobook */
.reel__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 28px; align-items: start; }
.reel__grid--single { grid-template-columns: minmax(0, 1fr); }
.reel__grid--single .clip__frame, .reel__grid--single .clip--link .clip__frame img { aspect-ratio: 16/9; height: auto; }
.reel__grid--single .clip__frame img { object-position: 50% 25%; }
.clip { display: block; text-decoration: none; min-width: 0; }
.clip__frame { position: relative; aspect-ratio: 16/9; background: #000; border-radius: 4px; overflow: hidden; }
.clip__frame video, .clip__frame img { width: 100%; height: 100%; object-fit: cover; }
.clip--link .clip__frame { aspect-ratio: auto; height: 100%; }
.clip--link .clip__frame img { aspect-ratio: 4/5; transition: transform .6s ease; }
.clip--link:hover .clip__frame img { transform: scale(1.04); }
.play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: rgba(242,237,231,.92);
}
.play::after {
  content: ""; position: absolute; left: 31px; top: 24px;
  border-left: 20px solid var(--ink); border-top: 14px solid transparent; border-bottom: 14px solid transparent;
}
.clip__meta { padding-top: 16px; }
.clip__meta h3 { font-family: var(--f-display); font-weight: 500; font-size: 26px; margin: 0 0 6px; }
.slate { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.slate span + span::before { content: "/"; margin-right: 18px; color: var(--rose-deep); }

.voice { margin-top: 80px; padding-top: 48px; border-top: 1px solid var(--line); display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.4fr); gap: 40px; }
.voice__head .muted { margin: 0; max-width: 40ch; }
.voice__tracks { display: grid; gap: 18px; }
.track { display: grid; gap: 8px; }
.track__title { margin: 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.track audio { width: 100%; }

/* Fotos */
.gallery { columns: 3 280px; column-gap: 14px; }
.g { margin: 0 0 14px; break-inside: avoid; cursor: zoom-in; overflow: hidden; border-radius: 3px; background: var(--ink); }
.g img { width: 100%; height: auto; transition: transform .7s ease, opacity .4s; }
.g:hover img { transform: scale(1.03); }

/* Canto y doblaje */
.voice__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 28px; align-items: start; }
.clip--vertical .clip__frame { aspect-ratio: 9/16; max-height: 78vh; }
.muted-light { font-size: 16px; opacity: .85; }
.contact__sub { font-size: 20px; max-width: 34ch; margin: -24px 0 40px; color: var(--paper); }

/* Fotogramas */
.stills__grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.st { margin: 0; aspect-ratio: 16/9; overflow: hidden; border-radius: 3px; cursor: zoom-in; background: #000; }
.st img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.st:hover img { transform: scale(1.04); }
@media (max-width: 860px) { .stills__grid { gap: 8px; } }
@media (max-width: 520px) { .stills__grid { gap: 5px; } }

/* Trayectoria */
.cv__cols { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(32px, 6vw, 80px); }
.cv__block { min-width: 0; }
.cv__block .h3 + .credits { margin-bottom: 48px; }
.credits { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.credits li { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.credits b { font-weight: 600; }
.credits .muted { font-size: 15px; }
.yr { font-family: var(--f-mono); font-size: 13px; color: var(--rose); padding-top: 2px; font-variant-numeric: tabular-nums; }
.credits--compact li { padding: 13px 0; }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 15px; }
.cv__download { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 56px; }

/* Contacto */
.contact { overflow: hidden; background: var(--ink) !important; min-height: 80vh; display: flex; align-items: center; }
.contact__bg { position: absolute; inset: 0; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .32; }
.contact__bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 15%, rgba(18,15,17,.4) 100%); }
.contact__inner { position: relative; width: 100%; }
.contact__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(64px, 12vw, 160px); line-height: 1; margin: 0 0 48px; }
.contact__title em { color: var(--rose); }
.contact__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-width: 620px; border-top: 1px solid var(--line); }
.contact__list li { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact__list a { font-size: 20px; text-decoration: none; overflow-wrap: anywhere; }
.contact__list a:hover { color: var(--rose); }
.label { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Pie */
.foot { position: relative; z-index: 1; background: var(--ink); border-top: 1px solid var(--line); padding-block: 28px; }
.foot__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--rose); }

/* Visor */
.lightbox {
  position: fixed; inset: 0; z-index: 50; background: rgba(10,8,9,.96);
  display: flex; align-items: center; justify-content: center;
  padding: calc(env(safe-area-inset-top, 0px) + 56px) max(56px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 40px) max(56px, env(safe-area-inset-left, 0px));
}
.lightbox[hidden] { display: none !important; }
.lightbox__fig { margin: 0; max-width: 100%; max-height: 100%; display: grid; gap: 10px; justify-items: center; }
.lightbox__fig img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; }
.lightbox__fig figcaption { font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.lightbox button { background: none; border: 0; color: var(--paper); cursor: pointer; font-family: var(--f-display); }
.lightbox__close { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: max(14px, env(safe-area-inset-right, 0px)); font-size: 44px; line-height: 1; padding: 6px 12px; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 56px; padding: 10px 16px; opacity: .8; }
.lightbox__nav:hover, .lightbox__close:hover { color: var(--rose); opacity: 1; }
.lightbox__prev { left: max(4px, env(safe-area-inset-left, 0px)); }
.lightbox__next { right: max(4px, env(safe-area-inset-right, 0px)); }

/* Aparición suave (siempre visible si JS falla) */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* ---------- Móvil ---------- */
@media (max-width: 860px) {
  .bar__nav a:not(.bar__cta) { display: none; }
  .about__grid, .reel__grid, .voice, .voice__grid, .cv__cols { grid-template-columns: minmax(0,1fr); }
  .about__photo { position: static; max-width: 440px; }
  .clip--link .clip__frame img { aspect-ratio: 16/10; }
  .hero { padding-bottom: 96px; }
  .hero__credit { left: var(--gutter); right: var(--gutter-r); bottom: 32px; }
  .hero__scroll { display: none; }
  .gallery { columns: 2 150px; column-gap: 10px; }
  .g { margin-bottom: 10px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .facts { grid-template-columns: minmax(0,1fr); }
  .contact__list li { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .credits li { grid-template-columns: 62px minmax(0,1fr); gap: 12px; }
  .lightbox { padding-left: max(8px, env(safe-area-inset-left, 0px)); padding-right: max(8px, env(safe-area-inset-right, 0px)); }
  .lightbox__nav { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 4px); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__scroll span { animation: none; }
}

@media (max-width: 860px) { .clip--vertical { max-width: 360px; } }
.reel__grid--single .clip--main .clip__frame { aspect-ratio: 16/9; }
