/*
Theme Name: Tocayo
Theme URI: https://tocayofilms.com
Author: Jorge "Tocayo" Ramírez
Description: Portafolio de Jorge "Tocayo" Ramírez — productor y director. Filmografía con pósters enlazados a IMDb, trayectoria completa, reconocimientos, semblanza y contacto. Los textos, cifras y fotos se editan en Apariencia → Personalizar → Tocayo; los proyectos, en el menú Proyectos.
Version: 1.0.0
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tocayo
*/

:root {
  --bg: #0E0E0E;
  --bg-2: #151515;
  --line: #262626;
  --text: #E6E4E0;
  --text-2: #B5B2AD;
  --muted: #8E8B86;
  --accent: #8E8B86;
  --gutter: 80px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
section[id] { scroll-margin-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus-visible { color: #FFFFFF; }
a:focus-visible, button:focus-visible { outline: 1px solid var(--text); outline-offset: 4px; }

img { max-width: 100%; display: block; }

h1, h2, h3, p { margin: 0; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}

.wrap { padding-left: var(--gutter); padding-right: var(--gutter); }

.kicker {
  font-size: 14px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}
.kicker--accent { color: var(--accent); }

.section-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--text);
}
.section-head h2, .section-head h3 {
  font-size: 15px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.section-head span { font-size: 14px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border: 1px solid var(--line); border-radius: 2px;
  font-weight: 600; font-size: 15px; white-space: nowrap;
}
.btn--solid { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn--solid:hover { background: #FFFFFF; color: var(--bg); }
.btn--outline { border-color: var(--text); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  height: 96px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: rgba(14, 14, 14, 0.92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.logo { font-size: 28px; font-weight: 600; letter-spacing: 0.02em; }
.logo span { color: var(--accent); }
.nav { display: flex; gap: 40px; font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.nav a { padding: 12px 0; }
.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--text); padding: 0; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  min-height: calc(100vh - 96px); max-height: 900px;
  padding-top: 96px; padding-bottom: 72px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 48px;
}
.hero h1 {
  font-weight: 300; font-size: clamp(56px, 10.5vw, 152px); line-height: 0.96; letter-spacing: -0.045em;
}
.hero h1 span { color: var(--accent); }
.hero-bottom {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 32px;
}
.stats { display: flex; gap: 72px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat strong { font-size: 48px; font-weight: 400; line-height: 1.1; }
.stat span { font-size: 14px; color: var(--muted); }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Posters ---------- */
.band { background: var(--bg-2); }
.recent { padding-top: 112px; padding-bottom: 112px; display: flex; flex-direction: column; gap: 56px; }
.recent-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.recent-head h2 { font-size: clamp(40px, 4.5vw, 64px); font-weight: 300; line-height: 1; }

.grid { display: grid; gap: 40px 24px; }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.poster { display: flex; flex-direction: column; gap: 14px; }
.poster-frame {
  aspect-ratio: 400 / 516; overflow: hidden; background: var(--bg-2); border: 1px solid var(--line);
}
.band .poster-frame { background: var(--bg); }
.poster-frame img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .5s ease, filter .5s ease;
}
.poster:hover .poster-frame img, .poster:focus-visible .poster-frame img { transform: scale(1.03); filter: none !important; }
.poster-fallback {
  height: 100%; padding: 18px; display: flex; align-items: flex-end;
  font-size: 28px; line-height: 1.05;
}
.poster-meta { display: flex; flex-direction: column; gap: 4px; }
.poster-top { display: flex; justify-content: space-between; font-size: 12px; }
.poster-top .year { color: var(--accent); }
.poster-top .imdb { color: var(--muted); letter-spacing: 0.08em; transition: color .2s ease; }
.poster:hover .imdb { color: var(--text); }
.poster-title { font-size: 20px; line-height: 1.2; }
.poster-role { font-size: 13px; color: var(--muted); }

.poster--featured { gap: 16px; }
.poster--featured .poster-caption {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-top: 1px solid var(--accent); padding-top: 12px;
}
.poster--featured .poster-caption strong { font-size: 17px; font-weight: 600; display: block; }
.poster--featured .poster-caption small { font-size: 14px; color: var(--muted); }

/* ---------- Filmografía ---------- */
.filmo { padding-top: 120px; padding-bottom: 120px; display: flex; flex-direction: column; gap: 64px; }
.filmo-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.filmo-head h2 { font-size: clamp(52px, 6.7vw, 96px); font-weight: 300; line-height: 1; }
.link-underline { font-size: 15px; font-weight: 500; padding: 12px 0; border-bottom: 1px solid var(--accent); }
.filmo-group { display: flex; flex-direction: column; gap: 32px; }
.more-link {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 32px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.more-link strong { display: block; font-size: 32px; font-weight: 300; letter-spacing: -0.02em; }
.more-link small { font-size: 15px; color: var(--muted); }
.more-link .arrow { font-size: 28px; font-weight: 300; }

/* ---------- Reconocimientos ---------- */
.awards { padding-bottom: 120px; display: flex; flex-direction: column; gap: 40px; }
.awards-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; }
.award { display: flex; flex-direction: column; gap: 16px; }
.award h3 { font-size: 44px; font-weight: 300; line-height: 1.1; letter-spacing: -0.02em; }
.award p { font-size: 18px; line-height: 1.6; color: var(--text-2); }

/* ---------- Semblanza ---------- */
.bio {
  padding-top: 120px; padding-bottom: 120px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 96px;
}
.bio-photo { grid-column: span 5; width: 100%; height: 640px; object-fit: cover; object-position: center 20%; }
.bio-text { grid-column: 7 / span 6; display: flex; flex-direction: column; justify-content: center; gap: 32px; }
.bio-text p { font-size: 18px; line-height: 1.6; color: var(--text-2); }
.bio-text .bio-headline { font-size: 40px; font-weight: 400; line-height: 1.2; color: var(--text); }
.set { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 24px; }
.set .section-head { border-bottom-color: var(--line); }
.set-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.set-grid img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* ---------- Contacto ---------- */
.contact { padding-top: 120px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 120px; }
.contact-main { display: flex; flex-direction: column; gap: 48px; }
.contact-email { font-size: clamp(32px, 6.7vw, 96px); line-height: 1; font-weight: 300; word-break: break-word; }
.contact-links { display: flex; gap: 64px; font-size: 18px; flex-wrap: wrap; }
.contact-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
.site-footer {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 24px; font-size: 14px; color: var(--muted);
}

/* ---------- Trayectoria ---------- */
.tray-hero {
  padding-top: 112px; padding-bottom: 80px; display: flex; flex-direction: column; gap: 28px;
  border-bottom: 1px solid var(--line);
}
.tray-hero h1 { font-size: clamp(48px, 6.7vw, 96px); font-weight: 300; line-height: 1; letter-spacing: -0.04em; }
.tray-hero p { max-width: 760px; font-size: 18px; line-height: 1.6; color: var(--text-2); }
.tray-body {
  padding-top: 96px; padding-bottom: 96px;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; align-items: start;
}
.tray-col { display: flex; flex-direction: column; gap: 72px; }
.credit {
  display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: baseline;
  padding: 16px 0; border-bottom: 1px solid var(--line);
}
.credit .year { font-size: 14px; color: var(--accent); }
.credit strong { display: block; font-size: 20px; font-weight: 400; line-height: 1.25; }
.credit small { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }
.tray-footer {
  padding-top: 32px; padding-bottom: 48px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  font-size: 14px; color: var(--muted);
}
.tray-footer div { display: flex; gap: 40px; }
.tray-footer a { padding: 12px 0; }

/* ---------- Páginas genéricas ---------- */
.generic { padding-top: 96px; padding-bottom: 96px; max-width: 880px; }
.generic h1 { font-size: 56px; font-weight: 300; margin-bottom: 32px; }
.generic .entry { font-size: 18px; line-height: 1.7; color: var(--text-2); }
.generic .entry a { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  :root { --gutter: 40px; }
  .grid--5 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stats { gap: 40px; }
}

@media (max-width: 860px) {
  :root { --gutter: 20px; }
  .site-header { height: 72px; }
  .logo { font-size: 24px; }
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .hero { min-height: 0; max-height: none; padding-top: 48px; padding-bottom: 48px; gap: 32px; }
  .kicker { font-size: 12px; letter-spacing: 0.14em; line-height: 1.6; }
  .hero-bottom { flex-direction: column; align-items: stretch; padding-top: 24px; gap: 32px; }
  .stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .stat strong { font-size: 36px; }
  .stat span { font-size: 13px; }
  .hero-actions { flex-direction: column; gap: 12px; }
  .btn { width: 100%; }
  .recent, .filmo, .bio { padding-top: 64px; padding-bottom: 64px; }
  .recent { gap: 32px; }
  .recent-head { flex-direction: column-reverse; align-items: flex-start; gap: 8px; }
  .grid--4, .grid--5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
  .poster { gap: 10px; }
  .poster-title { font-size: 17px; }
  .poster-role { font-size: 12px; }
  .poster-fallback { font-size: 22px; padding: 14px; }
  .poster--featured .poster-caption { flex-direction: column; gap: 2px; padding-top: 8px; }
  .poster--featured .poster-caption strong { font-size: 14px; }
  .poster--featured .poster-caption small { font-size: 12px; }
  .filmo { gap: 40px; }
  .filmo-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .filmo-group { gap: 20px; }
  .section-head h2, .section-head h3 { font-size: 13px; }
  .more-link { padding: 24px 0; gap: 16px; }
  .more-link strong { font-size: 24px; }
  .more-link small { font-size: 13px; }
  .awards { padding-bottom: 64px; gap: 28px; }
  .awards-grid { grid-template-columns: 1fr; gap: 28px; }
  .award { gap: 10px; }
  .award + .award { padding-top: 12px; border-top: 1px solid var(--line); }
  .award h3 { font-size: 30px; }
  .award p { font-size: 16px; }
  .bio { display: flex; flex-direction: column; gap: 28px; }
  .bio-photo { height: 440px; }
  .bio-text { gap: 28px; }
  .bio-text .bio-headline { font-size: 28px; }
  .bio-text p { font-size: 16px; }
  .set { gap: 12px; padding-top: 16px; }
  .set-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .set-grid img { aspect-ratio: 4 / 3; }
  .set-grid img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .contact { padding-top: 64px; padding-bottom: 32px; gap: 48px; }
  .contact-main { gap: 28px; }
  .contact-email { font-size: 26px; }
  section[id] { scroll-margin-top: 72px; }
  .contact-links { flex-direction: column; gap: 0; font-size: 17px; }
  .contact-links a { padding: 14px 0; }
  .site-footer { flex-direction: column; gap: 4px; padding-top: 20px; font-size: 13px; }
  .tray-hero { padding-top: 48px; padding-bottom: 40px; gap: 20px; }
  .tray-hero p { font-size: 16px; }
  .tray-body { display: flex; flex-direction: column; gap: 56px; padding-top: 48px; padding-bottom: 48px; }
  .tray-col { gap: 56px; }
  .credit { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; }
  .credit .year { font-size: 12px; }
  .credit strong { font-size: 18px; }
  .credit small { margin-top: 0; font-size: 13px; line-height: 1.4; }
  .tray-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .tray-footer div { flex-direction: column; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .poster-frame img { transition: none; }
}
