/* =============================================================
   LA CHUSMA NECESITA LOKAL — fanzine punk / brutalist
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --paper:   #e9e2d2;   /* papel fotocopia */
  --paper-2: #ddd4bf;
  --bone:    #f4efe2;
  --ink:     #0d0d0c;   /* negro tinta */
  --ink-2:   #21201c;
  --ink-mute:#5a564c;
  --red:     #d6231b;   /* rojo agitprop */
  --red-2:   #a1130c;
  --line:    #0d0d0c;

  --serif: Georgia, "Times New Roman", serif;
  --display: "Anton", Impact, "Arial Narrow Bold", sans-serif;
  --sans: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "Space Mono", "Courier New", monospace;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --wrap: 1240px;
  --pad: clamp(1.1rem, 5vw, 4rem);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
::selection { background: var(--red); color: var(--bone); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =============================================================
   3. Utilities
   ============================================================= */
.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 10001;
  padding: .6rem 1rem; background: var(--ink); color: var(--bone);
  font-family: var(--mono); font-size: .8rem;
}
.skip-link:focus { top: 1rem; }

/* bilingüe: muestra solo el idioma activo */
[data-lang="es"] [data-lang-ca] { display: none !important; }
[data-lang="ca"] [data-lang-es] { display: none !important; }

/* grain / fotocopia */
.grain {
  position: fixed; inset: 0; z-index: 9000; pointer-events: none;
  opacity: .055; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.7 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 200px 200px;
}

/* barra de progreso */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 4px;
  z-index: 8000; background: transparent; pointer-events: none;
}
.scroll-progress span {
  display: block; height: 100%; background: var(--red);
  transform-origin: 0 0; transform: scaleX(0);
  transition: transform .08s linear;
}

/* =============================================================
   4. Splash
   ============================================================= */
.splash {
  position: fixed; inset: 0; z-index: 10000;
  background: var(--ink);
  display: grid; place-items: center;
  transition: opacity .8s var(--ease-out), clip-path 1s var(--ease-out);
  animation: splashSafety .01s 4.5s forwards;
}
.splash.is-out { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); }
@keyframes splashSafety { to { opacity: 0; pointer-events: none; clip-path: inset(0 0 100% 0); } }
.splash-inner { text-align: center; }
.splash-title {
  display: block; font-family: var(--display);
  font-size: clamp(2.6rem, 12vw, 7rem); color: var(--bone);
  letter-spacing: .02em; line-height: .9;
}
.splash-bar {
  display: block; height: 5px; width: 0; margin: 1.2rem auto 0;
  background: var(--red); animation: splashBar 1.6s var(--ease-out) forwards;
}
@keyframes splashBar { to { width: min(60vw, 360px); } }

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 7000;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .7rem var(--pad);
  border-bottom: 2px solid transparent;
  transition: background-color .35s var(--ease-out), border-color .35s var(--ease-out);
}
.nav.is-scrolled {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}
.nav-brand {
  font-family: var(--display); font-size: 1.35rem; line-height: .85;
  display: flex; flex-direction: column; color: var(--bone);
  text-shadow: 0 1px 8px rgba(0,0,0,.6);
}
.nav.is-scrolled .nav-brand { color: var(--ink); text-shadow: none; }
.nav-brand-sub { font-family: var(--mono); font-size: .52rem; letter-spacing: .35em; text-transform: uppercase; }

.nav-links { display: none; gap: 1.4rem; }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-link {
  font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--bone); position: relative; padding: .2rem 0;
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}
.nav.is-scrolled .nav-link { color: var(--ink); text-shadow: none; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
  background: var(--red); transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease-out);
}
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-actions { display: flex; align-items: center; gap: .8rem; }
.lang-toggle {
  display: flex; align-items: center; gap: .35rem;
  font-family: var(--mono); font-size: .78rem; color: var(--bone);
  text-shadow: 0 1px 6px rgba(0,0,0,.55);
}
.nav.is-scrolled .lang-toggle { color: var(--ink); text-shadow: none; }
.lang-toggle button { opacity: .55; letter-spacing: .05em; }
.lang-toggle button.is-active { opacity: 1; color: var(--red); font-weight: 700; }

/* Hamburguesa (solo móvil/tablet) */
.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 6px;
  width: 40px; height: 40px; padding: 8px; color: var(--bone);
}
.nav.is-scrolled .nav-burger { color: var(--ink); }
.nav-burger span {
  display: block; height: 2px; width: 100%; background: currentColor;
  transition: transform .35s var(--ease-out), opacity .25s var(--ease-out);
}
.nav-burger.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
@media (max-width: 959px) {
  .nav-burger { display: flex; }
  .nav .btn-trailer { display: none; }   /* el tráiler vive en el menú móvil */
}

/* Overlay del menú móvil */
.nav-mobile {
  position: fixed; inset: 0; z-index: 6900;
  background: var(--ink); color: var(--bone);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 2rem; padding: 6rem 2rem 3rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .55s var(--ease-soft);
  pointer-events: none;
}
.nav-mobile.is-open { clip-path: inset(0); pointer-events: auto; }
.nav-mobile-list { list-style: none; text-align: center; display: flex; flex-direction: column; gap: 1.1rem; }
.nav-mobile-list a {
  font-family: var(--display); font-size: clamp(2rem, 9vw, 3rem);
  text-transform: uppercase; line-height: 1; color: var(--bone);
  transition: color .2s var(--ease-out);
}
.nav-mobile-list a:hover, .nav-mobile-list a:active { color: var(--red); }
.nav-mobile-trailer { margin-top: 1rem; }

/* =============================================================
   6. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; font-size: .82rem;
  text-transform: uppercase; letter-spacing: .06em;
  padding: .7rem 1.2rem; border: 2px solid var(--ink);
  transition: transform .2s var(--ease-out), background-color .2s, color .2s;
}
.btn:active { transform: translateY(1px); }
.btn-solid { background: var(--red); color: var(--bone); border-color: var(--red); }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); }
.btn-outline { background: transparent; color: var(--bone); border-color: var(--bone); }
.btn-outline:hover { background: var(--bone); color: var(--ink); }
.btn-outline-light { background: transparent; color: var(--bone); border-color: var(--bone); }
.btn-outline-light:hover { background: var(--red); border-color: var(--red); color: var(--bone); }
/* CTA de campaña (Goteo) en la cabecera — acción principal */
.btn-goteo { background: var(--red); color: var(--bone); border-color: var(--red); padding: .5rem .95rem; font-size: .74rem; }
.btn-goteo:hover { background: var(--ink); border-color: var(--ink); color: var(--bone); }

/* Tráiler en la cabecera — acción secundaria (ghost, se adapta a nav oscura/clara) */
.btn-trailer { background: transparent; color: var(--bone); border-color: currentColor; padding: .5rem .9rem; font-size: .74rem; }
.btn-trailer:hover { background: var(--bone); color: var(--ink); border-color: var(--bone); }
.nav.is-scrolled .btn-trailer { color: var(--ink); }
.nav.is-scrolled .btn-trailer:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-big { padding: 1rem 1.8rem; font-size: .95rem; }

/* =============================================================
   7. Hero + vídeo scroll
   ============================================================= */
.hero { position: relative; background: #000; }
.hero-pin {
  position: relative; height: 100svh; width: 100%;
  overflow: hidden; background: #000;
  display: grid; place-items: center;
}
.hero-canvas {
  position: absolute; top: 0; left: 0; width: 100%; height: 82%;
  display: block; background: transparent;
}
@media (min-width: 960px) { .hero-canvas { height: 80%; } }
/* CTAs que aparecen al final de la animación */
.hero-late {
  position: absolute; left: 50%; bottom: clamp(2.5rem, 8vh, 6rem);
  transform: translateX(-50%); z-index: 3; width: 100%;
  text-align: center; color: var(--bone); padding: 0 var(--pad);
  opacity: 0; will-change: opacity; pointer-events: none;
}
.hero-late.is-on { pointer-events: auto; }
.hero-sub {
  font-family: var(--mono); font-size: clamp(.85rem, 2.2vw, 1.1rem);
  color: var(--bone); text-shadow: 0 2px 14px rgba(0,0,0,.8);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.4rem; }
.hero-hint {
  position: absolute; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  z-index: 2; font-family: var(--mono); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--bone); opacity: .8;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
  animation: hintBob 2.4s var(--ease-soft) infinite;
}
@keyframes hintBob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* accesibilidad: oculto visualmente pero legible por lectores/buscadores */
.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =============================================================
   8. Marquee
   ============================================================= */
.marquee {
  overflow: hidden; border-block: 3px solid var(--ink);
  background: var(--ink); color: var(--bone); padding: .55rem 0;
  display: flex; flex-wrap: nowrap; align-items: center;
}
.marquee-red { background: var(--red); border-color: var(--red); }
.marquee-track {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 2.5rem; white-space: nowrap; will-change: transform;
  font-family: var(--display); font-size: clamp(1.3rem, 5vw, 2rem);
  text-transform: uppercase; letter-spacing: .03em;
  padding-left: 2.5rem;
}
.marquee-track .m-star { color: var(--red); }
.marquee-red .marquee-track .m-star { color: var(--ink); }

/* =============================================================
   9. Sections — base
   ============================================================= */
.section { padding-block: clamp(3.5rem, 9vw, 7rem); position: relative; }
.grid-12 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 960px) {
  .grid-12 { grid-template-columns: 3fr 9fr; gap: 3rem; }
}
.col-num { display: flex; flex-direction: column; gap: .4rem; }
@media (min-width: 960px) { .col-num { position: sticky; top: 90px; height: max-content; } }
.num {
  font-family: var(--display); font-size: clamp(2.6rem, 7vw, 4.5rem);
  line-height: .8; color: var(--red);
}
.num-label, .num-light { font-family: var(--mono); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; }
.section-head { margin-bottom: 2rem; display: flex; flex-direction: column; gap: .4rem; }
.section-head .num { display: block; }
.section-title {
  font-family: var(--display); font-size: clamp(2.4rem, 8vw, 5.5rem);
  text-transform: uppercase; line-height: .85; margin-top: .3rem;
}
.section-note { font-family: var(--mono); font-size: .85rem; margin-top: 1rem; max-width: 50ch; color: var(--ink-mute); }

.lead { font-size: clamp(1.25rem, 2.5vw, 1.7rem); line-height: 1.4; font-weight: 600; }
.body { font-size: 1.05rem; margin-top: 1.2rem; max-width: 65ch; }
.block-title { font-family: var(--display); font-size: clamp(1.8rem, 5vw, 3rem); text-transform: uppercase; line-height: .9; margin-bottom: 1.2rem; }
.dropcap {
  float: left; font-family: var(--display); font-size: 4.2rem; line-height: .72;
  margin: .1rem .5rem 0 0; color: var(--red);
}
.pull {
  font-family: var(--display); font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  line-height: 1; text-transform: uppercase; color: var(--ink);
  border-left: 8px solid var(--red); padding-left: 1.2rem; margin-bottom: 2rem;
}

/* Cita de apertura (entre hero y sección 01) */
.section-intro { padding-block: clamp(2.6rem, 7vw, 4.5rem); border-block: 2px solid var(--line); }
.intro-quote {
  font-family: var(--display); font-size: clamp(1.4rem, 3.6vw, 2.5rem);
  line-height: 1.08; text-transform: uppercase; text-align: center;
  max-width: 32ch; margin-inline: auto; color: var(--ink);
}
/* Titular editorial de la sección 01 */
.doc-title {
  font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2.6rem);
  line-height: 1; color: var(--red); margin-bottom: 1.4rem;
}

/* reveal */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft); }
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* =============================================================
   10. Archivo / collage
   ============================================================= */
.section-archive { /* mismo fondo que el resto de secciones */ }
.carousel { position: relative; }
.car-track {
  display: flex; gap: clamp(1rem, 2.5vw, 1.8rem);
  overflow-x: auto; overflow-y: visible;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  padding: .5rem 0 1.6rem; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--ink) transparent;
}
.car-track::-webkit-scrollbar { height: 8px; }
.car-track::-webkit-scrollbar-thumb { background: var(--ink); }
.car-track::-webkit-scrollbar-track { background: rgba(13,13,12,.12); }
.car-slide {
  flex: 0 0 auto; width: clamp(240px, 74vw, 380px);
  scroll-snap-align: center; position: relative;
  background: transparent;
  transition: transform .35s var(--ease-out);
}
.car-slide:hover { transform: translateY(-4px); }
.car-slide img {
  width: 100%; height: clamp(280px, 44vw, 420px);
  object-fit: contain; background: transparent;
}
.car-slide figcaption { display: none; }
.car-btn {
  position: absolute; top: clamp(140px, 24vw, 210px); transform: translateY(-50%);
  z-index: 5; width: 52px; height: 52px;
  background: var(--red); color: var(--bone); border: 3px solid var(--ink);
  font-family: var(--display); font-size: 2rem; line-height: 0;
  display: grid; place-items: center;
  transition: background-color .2s var(--ease-out);
}
.car-btn:hover { background: var(--ink); }
.car-prev { left: -8px; }
.car-next { right: -8px; }

/* Archivo en modo texto (sin carrusel) */
.archive-text { max-width: 70ch; }
.archive-soon {
  margin-top: 1.8rem; font-family: var(--mono); font-size: 1.02rem; line-height: 1.6;
  border-left: 8px solid var(--red); padding: 1rem 1.3rem; background: var(--bone);
}
.archive-soon strong { color: var(--red); }

/* =============================================================
   11. Carta del director
   ============================================================= */
.section-letter { background: var(--ink); color: var(--bone); }
.section-letter .num-label { color: var(--bone); }
.section-letter .num { color: var(--red); }
.letter {
  font-family: var(--mono); font-size: 1.02rem; line-height: 1.85;
  max-width: 62ch; border: 1px solid rgba(244,239,226,.25); padding: clamp(1.4rem, 4vw, 2.8rem);
  background: linear-gradient(rgba(244,239,226,.03), rgba(244,239,226,.03));
}
.letter p { margin-bottom: 1.1rem; }
.letter-h { font-family: var(--display); font-size: clamp(1.2rem, 3vw, 1.6rem); color: var(--red); text-transform: uppercase; letter-spacing: .02em; margin: 1.6rem 0 .4rem; }
.letter-sign { font-family: var(--display); font-size: 1.8rem; color: var(--red); margin-top: 1.5rem; }

/* =============================================================
   12. Equipo
   ============================================================= */
.team { display: grid; grid-template-columns: 1fr; gap: 0; border-top: 3px solid var(--ink); }
@media (min-width: 720px) { .team { grid-template-columns: 1fr 1fr; } }
.member {
  padding: 1.8rem 0; border-bottom: 1px solid var(--ink);
}
@media (min-width: 720px) {
  .member { padding: 1.8rem; border-right: 1px solid var(--ink); }
  .member:nth-child(2n) { border-right: 0; }
}
.member header { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .9rem; }
.member h3 { font-family: var(--display); font-size: clamp(1.5rem, 4vw, 2.3rem); text-transform: uppercase; line-height: .9; }
.member .role { font-family: var(--mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: var(--red); }
.member p { font-size: .98rem; }

/* =============================================================
   13. CTA / Apoya
   ============================================================= */
.section-cta { background: var(--red); color: var(--bone); text-align: center; }
.cta-wrap { max-width: 880px; }
.num-light { color: var(--bone); opacity: .8; display: inline-block; margin-bottom: 1rem; }
.cta-title { font-family: var(--display); font-size: clamp(2.8rem, 11vw, 7rem); text-transform: uppercase; line-height: .85; }
.cta-text { font-family: var(--mono); font-size: 1.02rem; max-width: 54ch; margin: 1.5rem auto 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-top: 2.2rem; }
.section-cta .btn-solid { background: var(--ink); border-color: var(--ink); }
.section-cta .btn-solid:hover { background: var(--bone); color: var(--ink); }
.cta-mini { font-family: var(--mono); font-size: .82rem; margin-top: 1.4rem; }

/* =============================================================
   14. Footer
   ============================================================= */
.footer { background: var(--ink); color: var(--bone); padding-top: clamp(2.5rem, 6vw, 4rem); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; padding-bottom: 2.5rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-logo { font-family: var(--display); font-size: 2.6rem; display: block; line-height: .85; }
.footer-tag { font-family: var(--mono); font-size: .76rem; letter-spacing: .15em; text-transform: uppercase; color: var(--red); }
.footer-col { display: flex; flex-direction: column; gap: .4rem; font-size: .9rem; }
.footer-fraguart { width: clamp(150px, 24vw, 200px); height: auto; margin: .3rem 0; }
.footer-h { font-family: var(--mono); font-size: .72rem; letter-spacing: .15em; text-transform: uppercase; color: var(--red); margin-bottom: .3rem; }
.footer-col a { position: relative; width: max-content; }
.footer-col a::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: var(--bone); transition: width .35s var(--ease-out); }
.footer-col a:hover::after { width: 100%; }

/* Iconos de redes sociales (en línea, encima del logo de Fraguart) */
.social-row { display: flex; align-items: center; gap: 1rem; }
.social-mini { margin: .2rem 0 1.4rem; }
.footer-prod .social-link { width: max-content; color: var(--bone); transition: color .2s var(--ease-out), transform .2s var(--ease-out); }
.footer-prod .social-link svg { width: 46px; height: 46px; display: block; }
.footer-prod .social-link::after { display: none; }        /* anula el subrayado de .footer-col a */
.footer-prod .social-link:hover { color: var(--red); transform: translateY(-2px); }
.footer-base {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem;
  border-top: 1px solid rgba(244,239,226,.2); padding-block: 1.2rem;
  font-family: var(--mono); font-size: .72rem; color: rgba(244,239,226,.6);
}

/* =============================================================
   15. Modal tráiler
   ============================================================= */
.modal {
  width: min(92vw, 960px); max-width: 960px; padding: 0; border: 3px solid var(--bone);
  background: var(--ink); color: var(--bone); overflow: hidden;
}
.modal::backdrop { background: rgba(0,0,0,.85); }
.modal-close {
  position: absolute; top: -3px; right: -3px; z-index: 2;
  background: var(--red); color: var(--bone); width: 44px; height: 44px;
  font-size: 1.1rem; border: 3px solid var(--bone);
}
.modal-frame { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; }
.modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.modal-empty { font-family: var(--mono); font-size: .95rem; padding: 2rem; text-align: center; }

/* =============================================================
   16. Responsive tweaks
   ============================================================= */
@media (max-width: 539px) {
  .nav-actions .lang-toggle { font-size: .72rem; }
  .clip-wide { grid-column: span 2; }
}

/* =============================================================
   17. Reduced motion — solo lo intrusivo
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-hint { animation: none; }
  .splash-bar { animation: none; width: min(60vw, 360px); }
}
