/*
Theme Name: Veneno Film Crew
Theme URI: https://veneno.film
Author: Veneno Film Crew
Author URI: https://veneno.film
Description: Tema WordPress portafolio para el colectivo de fotografía analógica Veneno Film Crew. Tres fotógrafos (Alex, Igor, Álvaro), galerías intercambiables (carrete / mosaico / full-bleed), marcos de 35mm con perforaciones, grano de película. 80% minimalismo moderno, 20% retro analógico. Modular mediante archivos en /template-parts/.
Version: 1.0.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: veneno-film-crew
Tags: portfolio, photography, three-columns, custom-colors, custom-menu, featured-images, translation-ready
*/

/* ─────────────────────────────────────────────
   Veneno Film Crew — Visual system
   80% minimal moderno · 20% retro analógico
   ───────────────────────────────────────────── */

:root {
  /* Color */
  --bg: #efeae0;          /* warm cream */
  --bg-2: #e8e1d3;        /* warmer cream for sections */
  --paper: #f6f2e9;       /* lighter card surface */
  --ink: #14110d;         /* deep film-base */
  --ink-2: #2a251f;
  --mute: #6e665b;
  --mute-2: #948a7b;
  --line: rgba(20, 17, 13, 0.12);
  --line-strong: rgba(20, 17, 13, 0.28);
  --accent: oklch(0.55 0.18 28);  /* film red */
  --accent-2: oklch(0.78 0.10 75); /* kodak gold */

  /* Type */
  --sans: "Archivo", "Söhne", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --mono: "JetBrains Mono", "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Sizing */
  --maxw: 1400px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Grain (controlled by tweak) */
  --grain-opacity: 0.18;
  --grain-blend: multiply;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv02", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  position: relative;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(0,0,0,0.04), transparent 60%);
}

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

/* Film grain overlay – sits above content, ignores pointer */
.grain {
  position: fixed;
  inset: -10%;
  width: 120%;
  height: 120%;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch' seed='7'/><feColorMatrix values='0 0 0 0 0.08  0 0 0 0 0.06  0 0 0 0 0.04  0 0 0 1 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.85'/></svg>");
  background-size: 240px 240px;
  animation: grainShift 1.4s steps(4) infinite;
}
@keyframes grainShift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-3%, 2%); }
  50%  { transform: translate(2%, -2%); }
  75%  { transform: translate(-2%, -3%); }
  100% { transform: translate(0, 0); }
}

/* Type styles ───────────────────────────────────────── */
.display {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.92;
  font-size: clamp(56px, 11vw, 168px);
  text-wrap: balance;
}
.editorial {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  letter-spacing: -0.01em;
  line-height: 1.05;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--mute);
  font-weight: 500;
}
.mono { font-family: var(--mono); }
p { line-height: 1.55; font-size: 16px; }
a { color: inherit; text-decoration: none; }

/* Layout helpers ───────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section {
  padding: clamp(60px, 10vh, 140px) 0;
  position: relative;
}
/* Cuando el hero es el primer bloque, necesita padding-top extra para no
   meterse debajo de la nav fija. */
.veneno-home-content > section:first-child,
.veneno-hero-section {
  padding-top: clamp(140px, 18vh, 220px) !important;
}
.divider { height: 1px; background: var(--line); width: 100%; }

/* ─── NAV ───────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(239,234,224,0.88), rgba(239,234,224,0));
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav-logo .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
}
.nav-logo b { font-weight: 600; letter-spacing: 0.12em; }
.nav-logo .sub { color: var(--mute); }

.nav-links {
  display: flex;
  gap: 28px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  list-style: none;
  margin: 0; padding: 0;
}
.nav-links a {
  color: var(--ink);
  opacity: 0.7;
  transition: opacity 0.2s;
  position: relative;
}
.nav-links a:hover { opacity: 1; }
.nav-links .current-menu-item > a,
.nav-links a.active {
  opacity: 1;
}
.nav-links .current-menu-item > a::after,
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--ink);
}

/* ─── FRAME — 35mm style ─────────────────────────── */
.frame {
  position: relative;
  background: var(--ink);
  padding: 18px 14px;
  border-radius: 2px;
}
.frame-inner {
  position: relative;
  overflow: hidden;
  background: #1a1814;
}
/* Sprocket holes */
.frame::before,
.frame::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  height: 18px;
  background-image:
    radial-gradient(circle, transparent 0 3.2px, var(--ink) 3.6px),
    linear-gradient(var(--ink), var(--ink));
  background-size: 14px 12px, auto;
  background-repeat: repeat-x, no-repeat;
  background-position: 0 center;
  pointer-events: none;
}
.frame::before { top: 0; }
.frame::after  { bottom: 0; }

.frame-mark {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  z-index: 2;
  pointer-events: none;
  white-space: nowrap;
}
.frame-mark.tl { top: 4px; left: 18px; }
.frame-mark.tr { top: 4px; right: 18px; }
.frame-mark.bl { bottom: 4px; left: 18px; }
.frame-mark.br { bottom: 4px; right: 18px; }

/* Standalone film strip wrapper */
.filmstrip {
  position: relative;
  background: var(--ink);
  padding: 16px 0;
}
.filmstrip::before,
.filmstrip::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 16px;
  background-image: radial-gradient(circle, #efeae0 0 2.6px, transparent 3px);
  background-size: 22px 16px;
  background-position: 0 center;
  background-repeat: repeat-x;
  pointer-events: none;
  opacity: 0.18;
}
.filmstrip::before { top: 0; }
.filmstrip::after  { bottom: 0; }

/* ─── PHOTO ─────────────────────────────────────────── */
.photo {
  position: relative;
  overflow: hidden;
  background: #1a1814;
  display: block;
}
.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.06) saturate(0.92);
  transition: transform 0.9s cubic-bezier(0.2, 0.6, 0.2, 1), filter 0.6s;
}
.photo:hover img { transform: scale(1.03); }
.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch' seed='3'/><feColorMatrix values='0 0 0 0 0.95  0 0 0 0 0.9  0 0 0 0 0.85  0 0 0 0.55 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 160px 160px;
  mix-blend-mode: overlay;
  opacity: 0.35;
}
.photo-bw img { filter: grayscale(1) contrast(1.1); }
.photo-sepia img { filter: sepia(0.55) contrast(1.05) saturate(0.85); }

/* ─── BUTTONS ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: transform 0.2s, background 0.2s;
  border: 1px solid var(--ink);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: var(--ink-2); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn .arrow { width: 14px; height: 14px; transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  transition: gap 0.2s;
  white-space: nowrap;
}
.link-arrow:hover { gap: 12px; }

/* ─── PAGE TRANSITIONS ─────────────────────────────── */
.page { animation: pageIn 0.6s cubic-bezier(0.2, 0.6, 0.2, 1); }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { opacity: 0; animation: fadeIn 0.9s ease-out forwards; }
@keyframes fadeIn { to { opacity: 1; } }

/* ─── UTILITIES ─────────────────────────────────────── */
.row { display: flex; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; } .gap-4 { gap: 40px; }
.mute { color: var(--mute); }
.center { text-align: center; }
.wrap-flex-between { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 16px; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
}

/* ─── FEATURED 3 LAYOUTS ─────────────────────────── */
.featured-grid { display: grid; gap: 24px; }
.featured-grid.layout-feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.featured-grid.layout-feature .stack {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 24px;
  min-width: 0;
}
.featured-grid.layout-row { grid-template-columns: repeat(3, 1fr); gap: 20px; }
.featured-grid.layout-stagger { grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: start; }
.featured-grid.layout-stagger > :nth-child(2) { margin-top: 80px; }
.featured-grid.layout-stagger > :nth-child(3) { margin-top: 40px; }

.ph-card { display: block; }
.ph-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 16px 2px 2px;
  color: var(--ink);
}
.ph-card-name {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ph-card-role {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--mute);
  letter-spacing: 0.12em;
  margin-top: 4px;
  text-transform: uppercase;
}

/* ─── PHOTOGRAPHER ROLL (cabecera ficha técnica) ──── */
.ph-roll {
  padding: clamp(40px, 6vh, 80px) 0 clamp(60px, 8vh, 100px);
  position: relative;
}
.ph-roll + .ph-roll {
  border-top: 1px solid var(--line);
}
.ph-roll-header {
  margin-bottom: 40px;
  max-width: 900px;
}
.ph-roll-id {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}
.ph-roll-date {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.ph-roll-title {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
  font-size: clamp(32px, 5vw, 64px);
  margin-bottom: 20px;
  text-wrap: balance;
}
.ph-roll-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-bottom: 16px;
}
.ph-roll-meta span {
  position: relative;
}
.ph-roll-meta span + span::before {
  content: "·";
  position: absolute;
  left: -14px;
  color: var(--mute-2);
}
.ph-roll-count {
  color: var(--ink) !important;
  font-weight: 500;
}
.ph-roll-count::before { display: none !important; }
.ph-roll-notes {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.4;
  color: var(--ink-2);
  max-width: 600px;
  margin-top: 12px;
}
@media (max-width: 700px) {
  .ph-roll-meta span + span::before { display: none; }
  .ph-roll-meta { gap: 4px 12px; }
}

/* ─── PHOTOGRAPHER HERO ─────────────────────────── */
.ph-hero { padding-top: 140px; padding-bottom: 40px; }
.ph-hero h1 {
  font-size: clamp(120px, 22vw, 360px);
  line-height: 0.88;
}
.ph-hero .count {
  margin-top: 24px;
  text-align: right;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(28px, 4vw, 56px);
  color: var(--mute);
}

/* ─── BIO ───────────────────────────────────────────── */
.ph-bio { padding-top: 60px; padding-bottom: 80px; }
.ph-bio-grid {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: start;
}
.ph-bio-text {
  font-size: clamp(20px, 1.8vw, 28px);
  line-height: 1.35;
  max-width: 760px;
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-2);
}

/* ─── GALLERIES ─────────────────────────────────────── */
/* Filmstrip */
.filmstrip-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.filmstrip-progress {
  margin-top: 14px;
  height: 1px;
  background: var(--line);
  position: relative;
}
.filmstrip-progress > div {
  position: absolute;
  left: 0; top: -1px;
  height: 3px;
  background: var(--ink);
  width: 8%;
  transition: width 0.1s;
}
.filmstrip-scroll {
  display: flex;
  gap: 16px;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filmstrip-scroll::-webkit-scrollbar { display: none; }
.filmstrip-frame {
  scroll-snap-align: start;
  flex-shrink: 0;
}

/* Mosaic */
.mosaic-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.mosaic-grid figure { margin: 0; }
.mosaic-grid figcaption,
.fullbleed-list figcaption {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
}
/* Hand-tuned editorial pattern: 12-col spans cycling */
.mosaic-grid figure:nth-child(9n+1) { grid-column: span 7; }
.mosaic-grid figure:nth-child(9n+2) { grid-column: span 5; }
.mosaic-grid figure:nth-child(9n+3),
.mosaic-grid figure:nth-child(9n+4),
.mosaic-grid figure:nth-child(9n+5) { grid-column: span 4; }
.mosaic-grid figure:nth-child(9n+6) { grid-column: span 5; }
.mosaic-grid figure:nth-child(9n+7) { grid-column: span 7; }
.mosaic-grid figure:nth-child(9n+8),
.mosaic-grid figure:nth-child(9n+0) { grid-column: span 6; }

/* Fullbleed */
.fullbleed-list { display: flex; flex-direction: column; gap: 40px; }
.fullbleed-list figure { margin: 0; }
.fullbleed-list figcaption { margin-top: 14px; padding: 0 var(--gutter); }

/* ─── PHOTOGRAPHER NEXT ─────────────────────────── */
.ph-next {
  border-top: 1px solid var(--line);
}
.ph-next a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}
.ph-next h2 {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.92;
  font-size: clamp(72px, 12vw, 200px);
}
.ph-next .meta {
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--mute);
  letter-spacing: 0.1em;
  display: flex;
  flex-direction: column;
}

/* ─── FOOTER ────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 60px var(--gutter) 40px;
  margin-top: 80px;
}
.site-footer .footer-top {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}
.site-footer .big {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 0.9;
  font-size: clamp(48px, 8vw, 120px);
}
.site-footer .big .editorial { display: block; line-height: 1; }
.site-footer .estudio {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--mute);
  text-transform: uppercase;
  margin-top: 24px;
}
.site-footer .columns {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}
.site-footer .columns ul {
  list-style: none;
  margin: 0; padding: 0;
}
.site-footer .columns li a { font-size: 18px; display: block; padding: 4px 0; }
.site-footer .footer-bottom {
  margin-top: 80px;
  display: flex;
  justify-content: space-between;
  color: var(--mute);
  font-size: 11px;
  font-family: var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 12px;
}

/* ─── CONTACT PAGE ──────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 80px;
}
.contact-list .row-item {
  display: flex;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.contact-list .row-item + .row-item { margin-top: 24px; }

/* ─── LIGHTBOX ──────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(20,17,13,0.97);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 95vw; max-height: 90vh; object-fit: contain; }
.lightbox__close {
  position: absolute;
  top: 24px; right: 24px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--bg);
  background: none;
  border: 1px solid rgba(239,234,224,0.4);
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

/* ─── RESPONSIVE ────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-links.mobile-open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    padding: 24px var(--gutter);
    flex-direction: column;
    gap: 16px;
    border-bottom: 1px solid var(--line);
  }
  .nav-toggle {
    display: block !important;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: none;
    border: 1px solid var(--line-strong);
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
  }

  .featured-grid.layout-feature { grid-template-columns: 1fr; }
  .featured-grid.layout-feature .stack { grid-template-rows: auto auto; }
  .featured-grid.layout-row { grid-template-columns: 1fr; }
  .featured-grid.layout-stagger { grid-template-columns: 1fr; }
  .featured-grid.layout-stagger > * { margin-top: 0 !important; }

  .ph-bio-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .mosaic-grid figure { grid-column: span 12 !important; }
  .site-footer .footer-top { flex-direction: column; }
  .site-footer .footer-bottom { flex-direction: column; }
}
.nav-toggle { display: none; }

/* WordPress alignment helpers */
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: 100%; }
.wp-caption-text { font-family: var(--mono); font-size: 10px; color: var(--mute); margin-top: 8px; }
