/* ==========================================================================
   Juan Diego Hernández · Actor — estilos compartidos
   ========================================================================== */

:root {
  --bg: #0d0d0c;
  --surface: #161614;
  --surface-2: #1e1d1a;
  --text: #ece8e1;
  --muted: #9b968d;
  --line: #2b2925;
  --accent: #c9a96b;
  --accent-ink: #14120e;

  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --max: 1240px;
  --gutter: clamp(16px, 4vw, 48px);
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.05; margin: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; z-index: 200; }
.skip:focus { left: 8px; }

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s ease, border-color .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-solid, .nav.is-open { background: rgba(13,13,12,.92); backdrop-filter: blur(10px); border-color: var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--serif); font-size: 1.35rem; text-decoration: none; letter-spacing: .02em; white-space: nowrap; }
.brand small { font-family: var(--sans); font-size: .62rem; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); margin-left: 10px; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.lang { display: flex; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lang button {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: .7rem; letter-spacing: .1em;
  padding: 4px 10px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.menu-btn { display: none; background: none; border: 0; color: var(--text); width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; height: 1px; background: currentColor; margin: 6px 0; transition: transform .3s, opacity .3s; }
.nav.is-open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.is-open .menu-btn span:nth-child(2) { opacity: 0; }
.nav.is-open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .brand small { display: none; }
  .menu-btn { display: block; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(13,13,12,.97); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav.is-open .nav-links { opacity: 1; transform: none; visibility: visible; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--line); }
  .nav-links li:last-child { border: 0; padding-top: 16px; }
  .nav-links a { display: block; padding: 14px 0; font-size: .9rem; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border-radius: 2px;
  font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  border: 1px solid var(--accent); color: var(--accent); background: transparent;
  transition: background .2s, color .2s; cursor: pointer;
}
.btn:hover { background: var(--accent); color: var(--accent-ink); }
.btn-solid { background: var(--accent); color: var(--accent-ink); }
.btn-solid:hover { background: var(--text); border-color: var(--text); }
.btn svg { width: 14px; height: 14px; }

/* ---------- HERO ---------- */
.hero {
  min-height: min(100svh, 1000px);
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
}
.hero-media { position: relative; overflow: hidden; background: #000; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }
.hero-body {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--nav-h) + 40px) var(--gutter) clamp(40px, 8vh, 96px);
}
.hero h1 { font-size: clamp(3.2rem, 8.4vw, 7.6rem); letter-spacing: -.01em; }
.hero h1 span { display: block; }
.hero-role {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 1.6rem 0 2.2rem;
  font-size: .8rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.hero-role li + li::before { content: "·"; margin-right: 18px; color: var(--accent); }
.hero-role { list-style: none; padding: 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-now { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); max-width: 460px; font-size: .9rem; color: var(--muted); }
.hero-now strong { color: var(--text); font-weight: 500; }
.hero-now a { color: var(--accent); }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .hero-media { height: 78svh; min-height: 420px; }
  .hero-media::after { content: ""; position: absolute; inset: 50% 0 0 0; background: linear-gradient(transparent, var(--bg)); }
  .hero-body { padding-top: 0; margin-top: -120px; position: relative; z-index: 1; }
}

/* ---------- SECTIONS ---------- */
.section { padding: clamp(72px, 11vw, 140px) 0; border-top: 1px solid var(--line); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: clamp(32px, 5vw, 56px); flex-wrap: wrap; }
.section-head h2 { font-size: clamp(2.4rem, 5vw, 4rem); }
.link-arrow { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); text-decoration: none; white-space: nowrap; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ---------- ABOUT ---------- */
.about { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 96px); }
.about .lead { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.3; margin-bottom: 1.4rem; }
.about p { color: #cdc8bf; max-width: 62ch; }
.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 9.5rem 1fr; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; }
@media (max-width: 860px) { .about { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* ---------- VIDEO ---------- */
.video {
  position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden;
}
.video iframe, .video img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-play {
  position: absolute; inset: 0; width: 100%; border: 0; padding: 0; cursor: pointer; background: transparent; color: var(--text);
}
.video-play img { transition: transform .6s ease, opacity .3s; opacity: .82; }
.video-play:hover img { transform: scale(1.02); opacity: 1; }
.video-play .play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: clamp(64px, 9vw, 96px); aspect-ratio: 1; border-radius: 50%;
  background: rgba(13,13,12,.65); border: 1px solid rgba(236,232,225,.6);
  display: grid; place-items: center; backdrop-filter: blur(4px);
}
.video-play .play svg { width: 30%; margin-left: 8%; fill: currentColor; }
.video-caption { display: flex; justify-content: space-between; gap: 16px; margin-top: 14px; font-size: .85rem; color: var(--muted); flex-wrap: wrap; }

/* ---------- GALLERY ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery a { position: relative; display: block; overflow: hidden; background: var(--surface); aspect-ratio: 2 / 3; }
.gallery a.wide { grid-column: span 2; aspect-ratio: auto; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease, opacity .3s; }
.gallery a:hover img { transform: scale(1.03); }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- CREDITS ---------- */
.cv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 6vw, 88px); }
.cv-block h3 { font-size: 1.9rem; margin-bottom: 1rem; }
.credits { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.credits li {
  display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) minmax(0, auto);
  gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: baseline;
}
.credits .yr { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.credits .t { font-family: var(--serif); font-size: 1.28rem; line-height: 1.25; }
.credits .t a { text-decoration: none; border-bottom: 1px solid var(--accent); }
.credits .r { font-size: .85rem; color: var(--muted); text-align: right; }
.credits .r em { font-style: normal; color: var(--text); display: block; }
.cv-side { display: grid; gap: clamp(40px, 6vw, 72px); align-content: start; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { border: 1px solid var(--line); padding: 7px 14px; border-radius: 999px; font-size: .85rem; }
.cv-download { margin-top: clamp(48px, 7vw, 80px); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cv-download p { margin: 0 12px 0 0; color: var(--muted); }
@media (max-width: 960px) { .cv-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .credits li { grid-template-columns: 3.4rem minmax(0, 1fr); }
  .credits .r { grid-column: 2; text-align: left; }
  .credits .r em { display: inline; margin-right: 6px; }
}

/* ---------- CONTACT ---------- */
.contact { text-align: left; }
.contact .big {
  font-family: var(--serif); font-size: clamp(2rem, 6.4vw, 5.4rem); line-height: 1;
  text-decoration: none; display: inline-block; word-break: break-word;
  border-bottom: 1px solid var(--line); padding-bottom: .15em; transition: border-color .2s, color .2s;
}
.contact .big:hover { color: var(--accent); border-color: var(--accent); }
.contact-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: clamp(40px, 6vw, 72px); list-style: none; padding: 0; }
.contact-list li { border-top: 1px solid var(--line); padding-top: 16px; }
.contact-list span { display: block; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.contact-list a { text-decoration: none; font-size: 1.05rem; }
.contact-list a:hover { color: var(--accent); }
@media (max-width: 760px) { .contact-list { grid-template-columns: 1fr; } }

/* ---------- FOOTER ---------- */
.footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: .8rem; color: var(--muted); }
.footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer a { color: var(--muted); }

/* ---------- PHOTOS PAGE ---------- */
.page-head { padding: calc(var(--nav-h) + clamp(48px, 8vw, 104px)) 0 clamp(32px, 5vw, 56px); }
.page-head h1 { font-size: clamp(3rem, 8vw, 6.4rem); }
.page-head p { color: var(--muted); max-width: 60ch; margin-top: 1.2rem; }
.look { padding: clamp(40px, 6vw, 72px) 0; border-top: 1px solid var(--line); }
.look-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 24px; }
.look-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.look-head span { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.masonry { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 45%), 1fr)); gap: 10px; }
.masonry a { display: block; overflow: hidden; background: var(--surface); aspect-ratio: 2 / 3; }
.masonry img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.masonry a:hover img { transform: scale(1.03); }

/* ---------- LIGHTBOX ---------- */
.lb {
  position: fixed; inset: 0; z-index: 300; background: rgba(5,5,5,.96);
  display: none; align-items: center; justify-content: center;
}
.lb.is-open { display: flex; }
.lb img { max-width: min(92vw, 1600px); max-height: 86svh; width: auto; height: auto; object-fit: contain; user-select: none; }
.lb button, .lb a {
  position: absolute; background: none; border: 0; color: var(--text); cursor: pointer;
  width: 52px; height: 52px; display: grid; place-items: center; text-decoration: none; opacity: .75;
}
.lb button:hover, .lb a:hover { opacity: 1; }
.lb svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.4; }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.lb-bar {
  position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px; font-size: .78rem; letter-spacing: .12em; color: var(--muted);
}
.lb-bar a { position: static; width: auto; height: auto; display: inline-flex; gap: 8px; color: var(--text); letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; }
.lb-bar a svg { width: 16px; height: 16px; }
@media (max-width: 640px) { .lb-prev, .lb-next { top: auto; bottom: 46px; transform: none; } }

/* ---------- MOTION ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform .8s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
.no-js .reveal { opacity: 1; transform: none; }

/* Listas sin columna de año */
.credits.no-yr li { grid-template-columns: minmax(0, 1fr) minmax(0, auto); }
.credits.stacked li { grid-template-columns: 1fr; gap: 2px; }
.credits.stacked .r { text-align: left; }
.badge {
  font-family: var(--sans); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 2px 8px; margin-left: 8px; vertical-align: middle; white-space: nowrap;
}
@media (max-width: 520px) {
  .credits.no-yr li { grid-template-columns: 1fr; }
  .credits.no-yr .r { grid-column: 1; }
}
