/* =========================================================
   LOGICMINES — Ginny Riddle
   El tablón de investigación: corcho, polaroids, rotulador rojo
   ========================================================= */

:root{
  --cork:       #a9764f;
  --cork-2:     #8f6440;
  --cork-3:     #c08e5f;
  --paper:      #f6f1e2;
  --paper-2:    #ece3ca;
  --ink:        #17140f;
  --ink-soft:   #2e2920;
  --red:        #d1272a;
  --red-dark:   #9c1a1c;
  --green:      #2f7a4f;
  --green-bg:   #e3f0e6;
  --yellow:     #f4d94b;
  --slate:      #3d3a34;   /* botones secundarios: el rojo se reserva a la acción principal */
  --text-mute:  #6b6250;
  --text-mute-2:#453e30;

  --display: 'Anton', 'Arial Narrow', sans-serif;
  --type: 'Special Elite', 'Courier New', monospace;
  --hand: 'Caveat', cursive;
  --body: 'Inter', -apple-system, sans-serif;

  --maxw: 1180px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; background:var(--paper); color:var(--ink); font-family:var(--body);
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
}
img{ max-width:100%; display:block; }
a{ color:inherit; }
h1,h2,h3{ font-family:var(--display); margin:0; text-transform:uppercase; letter-spacing:.01em; font-weight:400; }
p{ margin:0; }
button{ font-family:inherit; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; transition-duration:0.001ms !important; }
  .ticker__track{ animation:none !important; }
}

/* ---- Grano de película (textura táctil global) ---- */
.grain{
  position:fixed; inset:0; z-index:80; pointer-events:none; opacity:.07; mix-blend-mode:multiply;
  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.9' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 28px; }
section{ position:relative; }
#reglas,#caso00,#libro,#case81,#suscribete,#suspects{ scroll-margin-top:72px; }

/* ============ NAV ============ */
.case-bar{
  position:sticky; top:0; z-index:60; background:var(--paper); border-bottom:3px solid var(--ink);
}
.case-bar__inner{ display:flex; align-items:center; justify-content:space-between; padding:13px 28px; max-width:var(--maxw); margin:0 auto; }
.case-bar__mark{ display:flex; align-items:center; gap:9px; font-family:var(--display); font-size:1.25rem; }
.case-bar__mark .red{ color:var(--red); }
.case-bar__mark .dot{ width:16px; height:16px; border-radius:50%; border:3px solid var(--red); }
.case-bar__nav{ display:flex; gap:24px; font-weight:600; font-size:.85rem; }
.case-bar__nav a{ text-decoration:none; color:var(--ink-soft); }
.case-bar__nav a:hover{ color:var(--red); }
.case-bar__cta{
  font-weight:700; font-size:.8rem; color:#fff; background:var(--slate);
  padding:10px 16px; text-decoration:none; border:2px solid var(--ink); box-shadow:3px 3px 0 var(--ink);
  transition:transform .15s, box-shadow .15s;
}
.case-bar__cta:hover{ transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--ink); }
@media (max-width:760px){ .case-bar__nav{ display:none; } }

/* ============ HERO — el tablero ============ */
.hero{
  padding:70px 0 110px; overflow:hidden;
  background-color:var(--paper-2);
  background:
    linear-gradient(180deg, rgba(246,241,226,.5), rgba(236,227,202,.72)),
    var(--paper-2);
}
.hero__center{ text-align:center; position:relative; z-index:2; }

/* Rejilla de tablero como fondo del hero */
.hero__grid{
  position:absolute; inset:-4% -2% -4% -2%; width:104%; height:108%;
  z-index:1; opacity:.92; pointer-events:none;
  -webkit-mask-image:radial-gradient(ellipse 92% 84% at 50% 46%, #000 40%, transparent 82%);
          mask-image:radial-gradient(ellipse 92% 84% at 50% 46%, #000 40%, transparent 82%);
}
.hero__grid .hg-lines line{ stroke:rgba(23,20,15,.13); stroke-width:1.4; }
.hero__grid .hg-num{ fill:rgba(23,20,15,.13); font-family:var(--body); font-weight:800; font-size:26px; text-anchor:middle; dominant-baseline:central; }
.hero__grid .hg-let{ fill:rgba(23,20,15,.16); font-family:var(--body); font-weight:800; font-size:26px; text-anchor:middle; dominant-baseline:central; }

/* X y círculos que se pintan y despintan en bucle (solo sobre letras) */
.hero__grid .hg-x path{
  stroke:rgba(209,39,42,.42); stroke-width:5; stroke-linecap:round; fill:none;
  stroke-dasharray:90; stroke-dashoffset:90;
  animation:hgStroke 7s ease-in-out infinite; animation-delay:var(--d, 0s);
}
.hero__grid .hg-x path:nth-child(2){ animation-delay:calc(var(--d, 0s) + .32s); }
.hero__grid .hg-circ{
  fill:none; stroke:rgba(209,39,42,.40); stroke-width:4;
  stroke-dasharray:300; stroke-dashoffset:300;
  animation:hgStroke 8s ease-in-out infinite; animation-delay:var(--d, 0s);
}
@keyframes hgStroke{
  0%   { stroke-dashoffset:var(--len, 90); }
  22%  { stroke-dashoffset:0; }            /* pintado */
  70%  { stroke-dashoffset:0; }            /* se mantiene */
  92%  { stroke-dashoffset:calc(-1 * var(--len, 90)); } /* se despinta por el otro extremo */
  100% { stroke-dashoffset:calc(-1 * var(--len, 90)); }
}
.hero__grid .hg-circ{ --len:300; }
.hero__grid .hg-x path{ --len:90; }

@media (prefers-reduced-motion: reduce){
  .hero__grid .hg-x path, .hero__grid .hg-circ{ animation:none; stroke-dashoffset:0; }
}

.hero__sticky{
  position:absolute; top:-26px; right:3%; width:200px; padding:18px 16px 22px;
  background:var(--yellow); transform:rotate(4deg);
  box-shadow:0 12px 22px -8px rgba(0,0,0,.5);
  font-family:var(--hand); font-size:1.35rem; line-height:1.15; text-align:left; font-weight:700;
  z-index:5;
}
.hero__sticky u{ text-decoration-color:var(--red); text-decoration-thickness:3px; }
.hero__sticky::before{
  content:''; position:absolute; top:-7px; left:50%; margin-left:-8px; width:15px; height:15px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #ff6b6b, var(--red-dark)); box-shadow:0 3px 4px rgba(0,0,0,.4);
}
@media (max-width:980px){ .hero__sticky{ position:static; margin:0 auto 26px; transform:rotate(-2deg); } }

.hero__eyebrow{
  font-family:var(--hand); font-size:1.6rem; color:var(--red-dark); font-weight:700;
  display:inline-block; transform:rotate(-1.5deg); margin-bottom:14px;
}

/* Título en papel rasgado, como la portada */
.torn-title{
  display:inline-block; position:relative; background:#fff; padding:26px 46px 20px;
  transform:rotate(-.8deg); box-shadow:0 18px 34px -12px rgba(0,0,0,.5);
  clip-path: polygon(0% 6%, 4% 0%, 13% 3%, 23% 0%, 35% 4%, 48% 0%, 59% 3%, 72% 0%, 84% 4%, 93% 0%, 100% 4%,
                      99% 93%, 90% 100%, 78% 96%, 67% 100%, 54% 97%, 41% 100%, 29% 96%, 17% 100%, 7% 96%, 0% 100%);
}
.torn-title h1{ font-size:clamp(3.4rem, 11vw, 7.6rem); line-height:.95; color:var(--ink); letter-spacing:.01em; }
.torn-title h1 .red{ color:var(--red); }

/* Tipografía cinética: cada letra entra como un sello */
.torn-title h1 .st{
  display:inline-block; will-change:transform;
  animation:stampIn .55s cubic-bezier(.2,1.5,.35,1) both;
  animation-delay:var(--d, 0s);
}
.torn-title h1 .st.done{ animation:none; transition:transform .18s; }
.torn-title h1 .st.done:hover{ transform:translateY(-5px) rotate(var(--r, -3deg)); }
@keyframes stampIn{
  0%{ opacity:0; transform:scale(2.6) rotate(var(--r, 6deg)); }
  55%{ opacity:1; transform:scale(.9) rotate(calc(var(--r, 6deg) * -0.3)); }
  100%{ opacity:1; transform:scale(1) rotate(0deg); }
}
.hero__tagline{
  display:inline-block; background:var(--ink); color:#fff; font-family:var(--type);
  font-size:clamp(.82rem, 2.2vw, 1.2rem); letter-spacing:.16em; padding:11px 24px 9px;
  transform:rotate(-.8deg) translateY(-8px); box-shadow:0 10px 20px -8px rgba(0,0,0,.5);
}

.hero__actions{ display:flex; gap:14px; margin-top:34px; justify-content:center; flex-wrap:wrap; }
.btn{
  font-weight:700; font-size:.88rem; padding:15px 26px; text-decoration:none; display:inline-block;
  cursor:pointer; transition:transform .15s, box-shadow .15s; border:2px solid var(--ink);
}
.btn--stamp{ background:var(--red); color:#fff; box-shadow:4px 4px 0 var(--ink); }
.btn--ghost{ background:var(--paper); color:var(--ink); box-shadow:4px 4px 0 var(--ink); }
/* Secundario. Regla de la web: un solo rojo por pantalla, y si hay enlace a
   Amazon el rojo es ese. Todo lo demas va en gris oscuro. */
.btn--slate{ background:var(--slate); color:#fff; box-shadow:4px 4px 0 var(--ink); }
.btn--stamp:hover,.btn--ghost:hover,.btn--slate:hover{ transform:translate(-2px,-2px); box-shadow:6px 6px 0 var(--ink); }

.hero__meta{
  margin-top:44px; display:flex; gap:38px; justify-content:center; flex-wrap:wrap;
  font-size:.72rem; color:var(--ink); font-weight:700; text-transform:uppercase; letter-spacing:.05em;
}
.hero__meta b{ color:#d9a520; display:block; font-size:1.7rem; font-family:var(--display); text-shadow:1px 1px 0 var(--ink), 2px 2px 0 rgba(23,20,15,.18); }

/* ============ TICKER rojo (como la franja de la portada) ============ */
.ticker{ background:var(--red); border-bottom:3px solid var(--ink); overflow:hidden; padding:10px 0; }

/* Banda de retratos de sospechosos — bajo el ticker, ~3x su grosor, en bucle */
.suspect-band{
  overflow:hidden; background:var(--ink); border-bottom:3px solid var(--ink);
  height:132px; position:relative;
}
.suspect-band__track{
  display:flex; height:100%; width:max-content;
  animation:bandScroll 55s linear infinite;
}
.suspect-band__track img{
  height:calc(100% - 12px); aspect-ratio:1/1; width:auto; object-fit:cover;
  margin:6px 5px; border:6px solid #fff; box-sizing:border-box; background:#fff;
  display:block; flex:0 0 auto;
}
@keyframes bandScroll{
  from{ transform:translateX(0); }
  to{ transform:translateX(-50%); }   /* la mitad = una tanda completa de 15 */
}
@media (max-width:640px){
  .suspect-band{ height:96px; }
}
@media (prefers-reduced-motion: reduce){
  .suspect-band__track{ animation:none; }
}
.ticker__track{
  display:flex; gap:0; white-space:nowrap; width:max-content;
  animation:tick 26s linear infinite;
}
.ticker span{
  font-family:var(--display); color:#fff; font-size:1rem; letter-spacing:.14em; padding:0 22px;
  display:inline-flex; align-items:center; gap:22px;
}
.ticker span::after{ content:'✕'; color:var(--ink); font-size:.9rem; }
@keyframes tick{ from{ transform:translateX(0); } to{ transform:translateX(-50%); } }

/* ============ Divisor de papel rasgado ============ */
.torn-divider{
  height:24px; margin-bottom:-2px; position:relative; z-index:2;
  clip-path: polygon(0% 100%, 4% 35%, 9% 92%, 14% 28%, 19% 85%, 24% 18%, 29% 90%, 34% 22%,
                      39% 95%, 44% 15%, 49% 82%, 54% 20%, 59% 88%, 64% 25%, 69% 92%, 74% 15%,
                      79% 85%, 84% 20%, 89% 90%, 94% 25%, 100% 100%);
}

/* ============ Cabeceras de sección ============ */
.section-head{ max-width:660px; margin-bottom:52px; }
.section-head__tag{ font-family:var(--hand); font-size:1.5rem; color:var(--red); font-weight:700; margin-bottom:4px; display:block; transform:rotate(-1deg); }
.section-head h2{ font-size:clamp(1.9rem,4vw,2.8rem); color:var(--ink); line-height:1.04; }
.section-head p{ margin-top:14px; color:var(--text-mute-2); font-size:1.02rem; line-height:1.6; max-width:54ch; font-weight:500; }

/* ============ Reglas — hilo rojo ============ */
.rules{ padding:96px 0 120px; background:var(--paper); overflow:hidden; }
.board{ position:relative; min-height:540px; margin-top:8px; }
.board__strings{ position:absolute; inset:0; width:100%; height:100%; overflow:visible; z-index:1; }
.board__strings path{ fill:none; stroke:var(--red); stroke-width:2.5; stroke-dasharray:1 9; stroke-linecap:round; opacity:.75; }
.board__strings path.cover{
  stroke:var(--paper); stroke-width:5; stroke-linecap:butt; opacity:1;
  transition:stroke-dashoffset 1.1s ease; transition-delay:var(--td, 0s);
}
.board__strings circle{ fill:var(--red); opacity:0; transition:opacity .3s ease; transition-delay:var(--td, 0s); }
.board.drawn .board__strings circle{ opacity:1; }

.tag{
  position:absolute; width:270px; background:#fff; border:2px solid var(--ink);
  box-shadow:5px 5px 0 var(--ink); padding:24px 22px; z-index:2;
}
.tag__pin{
  position:absolute; top:-9px; left:24px; width:15px; height:15px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #ff6b6b, var(--red-dark)); box-shadow:0 3px 4px rgba(0,0,0,.4);
}
.tag__label{ font-family:var(--type); font-weight:700; font-size:.8rem; color:#fff; background:var(--red); display:inline-block; padding:4px 11px 2px; margin-bottom:15px; letter-spacing:.04em; text-transform:uppercase; }
.tag h3{ font-size:1.06rem; color:var(--ink); margin-bottom:8px; font-weight:800; text-transform:none; font-family:var(--body); }
.tag p{ color:var(--text-mute-2); font-size:.9rem; line-height:1.55; font-weight:500; }
.tag--1{ left:0%;  top:0px;   transform:rotate(-2deg); }
.tag--2{ left:33%; top:150px; transform:rotate(1.6deg); }
.tag--3{ left:4%;  top:315px; transform:rotate(-1.2deg); }
.tag--culprit{ left:64%; top:60px; transform:rotate(2deg); background:var(--ink); border-color:var(--red); box-shadow:5px 5px 0 var(--red); }
.tag--culprit .tag__label{ background:var(--yellow); color:var(--ink); }
.tag--culprit h3{ color:#fff; }
.tag--culprit p{ color:#c9c1ae; }
@media (max-width:900px){
  .board{ min-height:0; display:flex; flex-direction:column; gap:20px; }
  .board__strings{ display:none; }
  .tag{ position:static; width:100%; transform:none !important; }
}

/* ============ CASO 00 — el corazón de la página ============ */
.case00{
  padding:96px 0 120px;
  background:
    radial-gradient(ellipse 480px 320px at 88% 14%, var(--cork-3), transparent 60%),
    radial-gradient(ellipse 500px 400px at 8% 85%, var(--cork-2), transparent 60%),
    radial-gradient(circle, rgba(0,0,0,.12) 1px, transparent 1px) 0 0/13px 13px,
    var(--cork);
}
.case00 .section-head__tag{ color:var(--yellow); text-shadow:0 1px 3px rgba(0,0,0,.4); }
.case00 .section-head h2{ color:#fff; text-shadow:2px 2px 0 var(--ink); }
.case00 .section-head p{ color:#fff; text-shadow:0 1px 3px rgba(0,0,0,.35); }

.case00__grid{ display:grid; grid-template-columns:1.05fr .95fr; gap:44px; align-items:start; }

/* Columna de sospechosos: nota encima + rejilla 2x2 de polaroids */
.suspects-col{ display:flex; flex-direction:column; gap:14px; }
.suspects{ display:grid; grid-template-columns:1fr 1fr; gap:26px 22px; }

@media (max-width:980px){
  .case00__grid{ grid-template-columns:1fr; gap:24px; }
  .case00__grid > *{ min-width:0; }
  .suspects-col{ min-width:0; }
  /* En móvil: los 4 sospechosos en UNA fila horizontal con scroll lateral, encima de la rejilla */
  .suspects{
    display:flex; gap:14px; width:100%; min-width:0; max-width:100%;
    overflow-x:auto; overflow-y:visible;
    padding:6px 4px 16px; margin:0 -4px;
    -webkit-overflow-scrolling:touch;
  }
  .suspects::-webkit-scrollbar{ height:5px; }
  .suspects::-webkit-scrollbar-thumb{ background:rgba(23,20,15,.25); border-radius:3px; }
  .suspect{ flex:0 0 auto; width:min(38vw, 135px); }
}
.suspect{
  position:relative; background:#fff; padding:10px 10px 12px; border:1px solid rgba(0,0,0,.15);
  box-shadow:0 14px 26px -10px rgba(0,0,0,.55); transition:transform .25s;
}
.suspect:nth-child(1){ transform:rotate(-2.4deg); }
.suspect:nth-child(2){ transform:rotate(1.8deg); }
.suspect:nth-child(3){ transform:rotate(2.2deg); }
.suspect:nth-child(4){ transform:rotate(-1.6deg); }
.suspect:hover{ transform:rotate(0deg) scale(1.02); z-index:3; }
.suspect__pin{
  position:absolute; top:-8px; left:50%; margin-left:-8px; width:16px; height:16px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #ff6b6b, var(--red-dark)); box-shadow:0 3px 4px rgba(0,0,0,.4); z-index:4;
}
.suspect__photo{ position:relative; overflow:hidden; aspect-ratio:5/6; }
.suspect__photo img{ width:100%; height:100%; object-fit:cover; }
.suspect__name{ margin-top:9px; text-align:center; font-family:var(--display); font-size:.95rem; letter-spacing:.04em; }
.suspect__role{ text-align:center; font-family:var(--type); font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.03em; color:var(--text-mute); margin-top:1px; }
/* Marcador ✓/✗ grande, tipo rotulador a mano, junto a la frase */
.suspect__traits{ margin:12px 4px 0; padding:0; list-style:none; display:flex; flex-direction:column; gap:9px; }
.suspect__traits li{
  font-size:.72rem; font-weight:600; color:var(--text-mute-2); line-height:1.3;
  padding-left:0; position:relative; min-height:24px; display:flex; align-items:center;
  transition:color .25s, padding-left .3s cubic-bezier(.2,1.5,.4,1);
}
/* Cuando se marca, la frase se desplaza para dejar sitio a la marca grande */
.suspect__traits li.ok, .suspect__traits li.no{ padding-left:32px; }
.trait-mark{
  position:absolute; left:0; top:50%; transform:translateY(-50%) scale(0) rotate(-8deg);
  width:24px; height:24px; line-height:24px; text-align:center;
  font-family:var(--hand); font-weight:700; font-size:26px; opacity:0;
  transition:transform .3s cubic-bezier(.2,1.8,.4,1), opacity .2s;
}
.suspect__traits li.ok .trait-mark,
.suspect__traits li.no .trait-mark{ transform:translateY(-50%) scale(1) rotate(-8deg); opacity:1; }
.suspect__traits li.ok::before,
.suspect__traits li.no::before{ opacity:0; }
/* Tick verde grande */
.suspect__traits li.ok .trait-mark::after{ content:'✓'; color:var(--green); }
.suspect__traits li.ok{ color:var(--green); font-weight:700; }
/* Cruz roja grande */
.suspect__traits li.no .trait-mark::after{ content:'✗'; color:var(--red); }
.suspect__traits li.no{ color:var(--text-mute); }

/* Tachado (X de rotulador) y círculo del culpable */
.suspect__mark{ position:absolute; inset:0; pointer-events:none; z-index:3; }
.suspect__mark svg{ width:100%; height:100%; }
.suspect__mark path{
  fill:none; stroke:var(--red); stroke-width:11; stroke-linecap:round; opacity:.9;
  stroke-dasharray:600; stroke-dashoffset:600;
}
.suspect.eliminated .suspect__mark path{ animation:draw .45s ease forwards; }
.suspect.eliminated .suspect__mark path:nth-child(2){ animation-delay:.28s; }
.suspect.eliminated{ filter:grayscale(.5); }
.suspect__circle path{
  fill:none; stroke:var(--red); stroke-width:10; stroke-linecap:round; opacity:.95;
  stroke-dasharray:1400; stroke-dashoffset:1400;
}
.suspect.culprit .suspect__circle path{ animation:draw 1s ease .15s forwards; }
@keyframes draw{ to{ stroke-dashoffset:0; } }

.suspect__killer{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  font-family:var(--display); font-size:1.6rem; letter-spacing:.08em; color:#fff;
  transform:rotate(-8deg); opacity:0; z-index:5; pointer-events:none;
  text-shadow:0 2px 5px rgba(0,0,0,.7), 0 0 22px rgba(0,0,0,.5);
}
.suspect.culprit .suspect__killer{ animation:popIn .45s cubic-bezier(.2,1.4,.4,1) .95s forwards; }
@keyframes popIn{ from{ opacity:0; transform:rotate(-8deg) scale(2.3); } to{ opacity:1; transform:rotate(-8deg) scale(1); } }

/* Columna derecha: expediente con tablero + pruebas */
.dossier{
  background:var(--paper); border:2px solid var(--ink); box-shadow:8px 8px 0 var(--ink);
  padding:24px; transform:rotate(.8deg); position:relative;
}
.dossier::before,.dossier::after{
  content:''; position:absolute; width:96px; height:26px; background:rgba(246,241,226,.85);
  border:1px solid rgba(0,0,0,.12); z-index:3;
}
.dossier::before{ top:-13px; left:-20px; transform:rotate(-40deg); }
.dossier::after{ top:-13px; right:-20px; transform:rotate(40deg); }
.dossier__head{ display:flex; align-items:center; justify-content:space-between; margin-bottom:14px; }
.dossier__title{ font-family:var(--type); font-weight:700; font-size:1rem; letter-spacing:.03em; text-transform:uppercase; }
.dossier__title .red{ color:var(--red); }
.dossier__reset{
  background:none; border:2px solid var(--ink); font-size:.68rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.05em; padding:6px 10px; cursor:pointer; box-shadow:2px 2px 0 var(--ink);
  transition:transform .15s, box-shadow .15s;
}
.dossier__reset:hover{ transform:translate(-1px,-1px); box-shadow:3px 3px 0 var(--ink); }
.dossier__brief{
  font-family:var(--hand); font-size:1.18rem; line-height:1.25; color:var(--ink-soft); font-weight:600;
  border-left:3px solid var(--red); padding-left:12px; margin-bottom:16px;
}

.mgrid{
  display:grid; grid-template-columns:repeat(6,1fr); gap:3px;
  aspect-ratio:1; margin:0 auto; max-width:340px; background:var(--ink); border:2px solid var(--ink);
}
.mcell{
  display:flex; align-items:center; justify-content:center; position:relative;
  background:#fff; font-weight:800; font-size:1.05rem; color:var(--ink);
  cursor:pointer; user-select:none; -webkit-user-select:none; aspect-ratio:1;
  transition:background .15s, transform .1s; touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}
.mcell:active:not(.num){ transform:scale(.88); }
.mcell:hover{ background:var(--paper-2); }
.mcell.num{ background:#e2d8bb; color:var(--text-mute-2); cursor:default; font-weight:700; }
.mcell.num:hover{ background:#e2d8bb; }
.mcell.redacted{ color:rgba(23,20,15,.25); }
.mcell.redacted::before,
.mcell.redacted::after{
  content:''; position:absolute; width:112%; height:4px; background:var(--red); border-radius:2px;
  transform-origin:left center;
}
.mcell.redacted::before{ left:9%; top:10%; transform:rotate(45deg); animation:xdraw1 .22s ease-out both; }
.mcell.redacted::after{ left:91%; top:10%; transform:rotate(135deg); animation:xdraw2 .22s ease-out .12s both; }
@keyframes xdraw1{ from{ transform:rotate(45deg) scaleX(0); } to{ transform:rotate(45deg) scaleX(1); } }
@keyframes xdraw2{ from{ transform:rotate(135deg) scaleX(0); } to{ transform:rotate(135deg) scaleX(1); } }
.mgrid.solved .mcell:not(.num):not(.redacted){
  background:var(--green-bg); box-shadow:inset 0 0 0 3px var(--green); border-radius:50%; color:var(--green);
}
.mgrid-status{
  margin-top:12px; text-align:center; font-family:var(--type); font-weight:700; font-size:.76rem;
  color:var(--text-mute-2); min-height:1.4em; text-transform:uppercase; letter-spacing:.02em;
}
.mgrid-status.solved{ color:var(--green); }
.mgrid-status.error{ color:var(--red); }

/* Pruebas */
.evidence{ margin-top:18px; display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.evcard{ perspective:600px; }
.evcard__inner{
  position:relative; width:100%; min-height:96px; transform-style:preserve-3d; transition:transform .55s;
}
.evcard.revealed .evcard__inner{ transform:rotateY(180deg); }
.evcard__face{
  position:absolute; inset:0; backface-visibility:hidden; border:2px solid var(--ink);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; padding:8px;
}
.evcard__front{ background:var(--ink); color:var(--paper); }
.evcard__front b{ font-family:var(--display); font-size:1.5rem; color:var(--yellow); }
.evcard__front span{ font-family:var(--type); font-size:.58rem; font-weight:700; text-transform:uppercase; letter-spacing:.04em; opacity:.75; }
.evcard__back{ background:var(--yellow); color:var(--ink); transform:rotateY(180deg); }
.evcard__back b{ font-family:var(--display); font-size:1.15rem; }
.evcard__back span{ font-family:var(--type); font-size:.66rem; font-weight:700; line-height:1.25; text-align:center; }

.case00__cta{
  margin-top:36px; text-align:center; opacity:0; transform:translateY(8px); transition:opacity .5s, transform .5s;
  pointer-events:none;
}
.case00__cta.show{ opacity:1; transform:none; pointer-events:auto; }

/* ============ El libro ============ */
.book{ padding:96px 0; background:var(--paper-2); }
.book__grid{ display:grid; grid-template-columns:.8fr 1.2fr; gap:56px; align-items:center; }
@media (max-width:900px){ .book__grid{ grid-template-columns:1fr; } }
.cover-frame{ position:relative; transform:rotate(-1.5deg); }
.cover-frame img{ width:100%; border:2px solid var(--ink); box-shadow:10px 10px 0 var(--ink); }
/* Render 3D: sin marco ni cintas, sombra que sigue la silueta del libro */
.cover-frame.cover-frame--render{ transform:rotate(-7deg); max-width:50%; margin-left:auto; margin-right:auto; }
.cover-frame--render img{
  border:0; box-shadow:none; display:block;
  filter:drop-shadow(8px 11px 14px rgba(23,20,15,.38));
}
.cover-frame--render::before,
.cover-frame--render::after{ display:none; }
@media (max-width:900px){
  /* en móvil la columna ya es estrecha: algo más grande para que se lea la portada */
  .cover-frame.cover-frame--render{ max-width:62%; margin-left:auto; margin-right:auto; }
}
.cover-frame::before,.cover-frame::after{
  content:''; position:absolute; width:110px; height:30px; background:rgba(244,238,220,.7);
  border:1px solid rgba(0,0,0,.12); z-index:2;
}
.cover-frame::before{ top:-14px; left:-24px; transform:rotate(-38deg); }
.cover-frame::after{ bottom:-12px; right:-26px; transform:rotate(-42deg); }
.specs{ list-style:none; margin:0; padding:0; }
.specs li{ display:flex; justify-content:space-between; padding:13px 0; border-bottom:2px dashed rgba(23,20,15,.18); font-size:.92rem; }
.specs li span:first-child{ font-family:var(--type); color:var(--text-mute); text-transform:uppercase; letter-spacing:.02em; font-size:.68rem; font-weight:700; }
.specs li span:last-child{ font-family:var(--type); color:var(--ink); font-weight:700; text-align:right; font-size:.86rem; }
.levels{ display:flex; gap:6px; margin-top:24px; flex-wrap:wrap; }
.level{ flex:1; min-width:70px; text-align:center; padding:10px 4px; border:2px solid var(--ink); background:#fff; font-family:var(--type); font-weight:700; font-size:.66rem; }
.level b{ display:block; font-family:var(--display); font-size:1.3rem; color:var(--red); }

/* ============ Caso 81 ============ */
.case81{ padding:96px 0; background:var(--paper); }
.case81__panel{
  background:var(--ink); color:var(--paper); padding:50px; display:grid; grid-template-columns:1fr auto;
  gap:36px; align-items:center; position:relative; overflow:hidden; border:2px solid var(--ink); box-shadow:10px 10px 0 var(--red);
}
@media (max-width:760px){ .case81__panel{ grid-template-columns:1fr; } }
.case81__num{ font-family:var(--hand); font-size:1.35rem; color:var(--yellow); font-weight:700; }
.case81__panel h2{ font-size:clamp(1.7rem,3.4vw,2.3rem); margin-top:8px; color:#fff; }
.case81__panel p{ margin-top:14px; color:#c9c1ae; max-width:48ch; line-height:1.6; font-weight:500; }

/* ============ Suscripción ============ */
.subscribe{ padding:96px 0; background:var(--paper-2); }
.subscribe__box{ max-width:620px; margin:0 auto; text-align:center; }
.subscribe h2{ font-size:clamp(1.9rem,4vw,2.6rem); color:var(--ink); }
.subscribe p{ margin-top:14px; color:var(--text-mute-2); font-size:1rem; line-height:1.6; font-weight:500; }
.email-form{ margin-top:30px; display:flex; gap:10px; max-width:460px; margin-left:auto; margin-right:auto; flex-wrap:wrap; }
.email-form input{
  flex:1; min-width:220px; background:#fff; border:2px solid var(--ink); padding:14px 16px;
  color:var(--ink); font-size:.92rem; outline:none;
}
.email-form input:focus-visible{ box-shadow:3px 3px 0 var(--ink); }
.email-form button{
  background:var(--red); color:#fff; border:2px solid var(--ink); padding:0 24px;
  font-weight:700; font-size:.86rem; cursor:pointer; box-shadow:4px 4px 0 var(--ink);
  transition:transform .15s, box-shadow .15s;
}
.email-form button:hover{ transform:translate(-2px,-2px); box-shadow:6px 6px 0 var(--ink); }
.form-note{ margin-top:14px; font-size:.78rem; color:var(--text-mute); font-weight:600; }
.form-note.ok{ color:var(--green); }

/* ============ Footer ============ */
footer{ border-top:3px solid var(--ink); padding:30px 0; background:var(--ink); }
.foot__inner{ display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:16px; }
.foot__brand{ font-family:var(--display); font-size:.85rem; color:var(--paper); letter-spacing:.04em; }
.foot__links{ display:flex; gap:20px; font-size:.78rem; font-weight:600; }
.foot__links a{ color:#c9c1ae; text-decoration:none; }
.foot__links a:hover{ color:#fff; }

/* ============ Reveal on scroll (solo opacidad: no pisa las rotaciones) ============ */
.reveal{ opacity:0; transition:opacity .7s ease; }
.reveal.in{ opacity:1; }

a:focus-visible, button:focus-visible, .mcell:focus-visible{ outline:3px solid var(--red); outline-offset:2px; }

/* ============ Cursor lupa en la escena del caso (solo puntero fino) ============ */
@media (pointer:fine){
  .case00 .mcell:not(.num),
  .case00 .suspect{
    cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='34' height='34' viewBox='0 0 34 34'><circle cx='13' cy='13' r='9' fill='rgba(255,255,255,0.35)' stroke='%2317140f' stroke-width='3'/><line x1='20' y1='20' x2='31' y2='31' stroke='%2317140f' stroke-width='4' stroke-linecap='round'/></svg>") 13 13, pointer;
  }
}

/* ============ Scroll-driven (mejora progresiva) ============ */
@supports (animation-timeline: view()){
  .cover-frame{
    animation:coverSettle linear both;
    animation-timeline:view();
    animation-range:entry 10% cover 45%;
  }
  /* el render 3D no se desplaza al entrar: carga ya centrado y girado */
  .cover-frame--render{ animation:none; translate:none; rotate:none; }
  @keyframes coverSettle{
    from{ translate:0 34px; rotate:-4deg; }
    to{ translate:0 0; rotate:0deg; }
  }
  .hero__sticky{
    animation:stickyDrift linear both;
    animation-timeline:scroll();
    animation-range:0 500px;
  }
  @keyframes stickyDrift{
    to{ translate:0 46px; rotate:4deg; }
  }
  .suspect:nth-child(odd){ animation:polaroidSettleA linear both; animation-timeline:view(); animation-range:entry 0% entry 80%; }
  .suspect:nth-child(even){ animation:polaroidSettleB linear both; animation-timeline:view(); animation-range:entry 0% entry 80%; }
  @keyframes polaroidSettleA{ from{ translate:0 34px; rotate:-5deg; } to{ translate:0 0; rotate:0deg; } }
  @keyframes polaroidSettleB{ from{ translate:0 52px; rotate:5deg; } to{ translate:0 0; rotate:0deg; } }
}

/* =========================================================
   MÓVIL (~85% del tráfico) — misma esencia, mejor en pantalla pequeña
   ========================================================= */
@media (max-width:760px){
  .wrap{ padding:0 18px; }

  /* Grano sin blend: menos coste de composición en gamas bajas */
  .grain{ mix-blend-mode:normal; opacity:.045; }

  /* Nav compacta */
  .case-bar__inner{ padding:11px 16px; }
  .case-bar__mark{ font-size:1.02rem; }
  .case-bar__mark .dot{ width:13px; height:13px; border-width:2px; }
  .case-bar__cta{ font-size:.7rem; padding:9px 12px; }

  /* Hero */
  .hero{ padding:44px 0 70px; }
  .hero__sticky{ width:172px; font-size:1.12rem; padding:12px 12px 16px; margin-bottom:20px; }
  .hero__eyebrow{ font-size:1.3rem; }
  .torn-title{ padding:16px 20px 12px; }
  .torn-title h1{ font-size:clamp(2.5rem, 13vw, 4.2rem); }
  .hero__tagline{ font-size:.74rem; letter-spacing:.14em; padding:8px 14px; }
  .hero__actions{ flex-direction:column; margin-top:26px; }
  .hero__actions .btn{ width:100%; text-align:center; padding:16px 20px; }
  .hero__meta{ gap:16px 26px; margin-top:32px; }
  .hero__meta b{ font-size:1.3rem; }

  .ticker span{ font-size:.8rem; padding:0 14px; gap:14px; }

  /* Reglas */
  .rules{ padding:64px 0 72px; }
  .rules::before{ display:none; }           /* mancha de café fuera en móvil */
  .section-head{ margin-bottom:34px; }
  .tag{ padding:20px 18px; }

  /* Caso 00 */
  .case00{ padding:64px 0 84px; }
  .dossier{ padding:18px 14px; transform:rotate(0deg); }
  .dossier::before,.dossier::after{ width:74px; height:22px; }
  .dossier::before{ left:-12px; } .dossier::after{ right:-12px; }
  .dossier__brief{ font-size:1.06rem; }
  .mgrid{ max-width:100%; }
  .suspects{ gap:22px 12px; }
  .suspect{ padding:7px 7px 9px; }
  .suspect__name{ font-size:.72rem; margin-top:7px; }
  .suspect__role{ font-size:.52rem; }
  .suspect__traits{ margin-top:8px; gap:5px; }
  .suspect__traits li{ font-size:.6rem; min-height:18px; }
  .suspect__traits li.ok, .suspect__traits li.no{ padding-left:24px; }
  .suspect__traits .trait-mark{ width:18px; height:18px; line-height:18px; font-size:19px; }
  .suspect__killer{ font-size:1.25rem; }
  .evcard__inner{ min-height:112px; }
  .evcard__back b{ font-size:1rem; }
  .evcard__back span{ font-size:.62rem; }
  .evcard__front b{ font-size:1.3rem; }
  .evcard__front span{ font-size:.55rem; }

  /* Libro */
  .book{ padding:64px 0; }
  .book__grid{ gap:38px; }
  .cover-frame{ margin:0 8px; }

  /* Caso 81 */
  .case81{ padding:64px 0; }
  .case81__panel{ padding:32px 22px 36px; box-shadow:7px 7px 0 var(--red); }
  .case81__panel .btn{ width:100%; text-align:center; }

  /* Suscripción */
  .subscribe{ padding:64px 0; }
  .email-form{ flex-direction:column; }
  .email-form input{ min-width:0; width:100%; }
  .email-form button{ width:100%; padding:15px 0; }

  footer{ padding:24px 0; }
  .foot__inner{ flex-direction:column; text-align:center; }
}

@media (max-width:400px){
  .evidence{ gap:6px; }
  .suspects{ gap:18px 10px; }
  .torn-title h1{ font-size:clamp(2.2rem, 13.5vw, 3.4rem); }
}

/* =========================================================
   FREEBIE — página de las dos puertas
   ========================================================= */
.case81__actions{ display:flex; flex-direction:column; gap:12px; }
.book__buy{ margin-top:26px; }
.book__buy .btn{ width:100%; max-width:340px; text-align:center; }

.doors-hero{
  padding:52px 0 60px; text-align:center;
  background:
    radial-gradient(ellipse 480px 320px at 12% 18%, var(--cork-3), transparent 60%),
    radial-gradient(ellipse 420px 300px at 85% 12%, var(--cork-2), transparent 55%),
    radial-gradient(circle, rgba(0,0,0,.12) 1px, transparent 1px) 0 0/13px 13px,
    var(--cork);
}
.doors-hero .torn-title{ padding:18px 26px 14px; }
.doors-hero .torn-title h1{ font-size:clamp(1.5rem, 5.4vw, 2.6rem); }

.doors{ padding:64px 0 96px; background:var(--paper); }
.doors__grid{ display:grid; grid-template-columns:1fr 1fr; gap:34px; max-width:920px; margin:0 auto; }
@media (max-width:820px){ .doors__grid{ grid-template-columns:1fr; gap:28px; } }

.door{
  position:relative; background:#fff; border:2px solid var(--ink);
  box-shadow:6px 6px 0 var(--ink); padding:30px 26px;
}
.door--a{ transform:rotate(-1.1deg); }
.door__pin{
  position:absolute; top:-9px; left:50%; margin-left:-8px; width:16px; height:16px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #ff6b6b, var(--red-dark)); box-shadow:0 3px 4px rgba(0,0,0,.4);
}
.door__quote{
  font-family:var(--hand); font-size:1.45rem; font-weight:700; line-height:1.2;
  color:var(--ink-soft); margin-bottom:16px;
}
.door__label{
  font-family:var(--type); font-weight:700; font-size:.82rem; color:#fff; background:var(--red);
  display:inline-block; padding:5px 12px 3px; margin-bottom:12px; letter-spacing:.04em; text-transform:uppercase;
}
.door__desc{ font-size:.92rem; color:var(--text-mute-2); line-height:1.55; font-weight:500; }

.door__form{ display:flex; flex-direction:column; gap:10px; margin-top:18px; }
.door__form input{
  background:var(--paper); border:2px solid var(--ink); padding:14px 14px;
  color:var(--ink); font-size:.92rem; outline:none; width:100%; font-family:var(--body);
}
.door__form input:focus-visible{ box-shadow:3px 3px 0 var(--ink); }
.door__form button{
  background:var(--red); color:#fff; border:2px solid var(--ink); padding:14px 0;
  font-weight:700; font-size:.86rem; cursor:pointer; box-shadow:4px 4px 0 var(--ink);
  transition:transform .15s, box-shadow .15s; width:100%;
}
.door__form button:hover{ transform:translate(-2px,-2px); box-shadow:6px 6px 0 var(--ink); }
.door__note{ margin-top:12px; font-size:.78rem; font-weight:700; color:var(--text-mute); min-height:1.3em; }
.door__note.ok{ color:var(--green); }
.door__note.err{ color:var(--red-dark); }



/* Anotación manuscrita sobre los sospechosos (contraportada) */
.suspects-note{
  font-family:var(--hand); font-size:1.4rem; font-weight:700;
  color:#fff; transform:rotate(-1.5deg); text-shadow:0 2px 4px rgba(0,0,0,.45);
  margin-bottom:8px;
}

/* =========================================================
   Popup de idioma + conmutador ES/EN
   ========================================================= */
.case-bar__right{ display:flex; align-items:center; gap:10px; }
.case-bar__lang{
  font-weight:800; font-size:.74rem; letter-spacing:.04em; text-decoration:none;
  color:var(--ink); border:2px solid var(--ink); padding:8px 10px; background:var(--paper);
  box-shadow:3px 3px 0 var(--ink); transition:transform .15s, box-shadow .15s;
}
.case-bar__lang:hover{ transform:translate(-2px,-2px); box-shadow:5px 5px 0 var(--ink); }

.langpop{
  position:fixed; inset:0; z-index:120; display:none; align-items:center; justify-content:center;
  background:rgba(23,20,15,.82); padding:20px;
}
.langpop.show{ display:flex; }
.langpop__card{
  background:var(--paper); border:2px solid var(--ink); box-shadow:8px 8px 0 var(--ink);
  padding:34px 30px 30px; text-align:center; max-width:430px; width:100%; position:relative;
}
.langpop__card::before{
  content:''; position:absolute; top:-9px; left:50%; margin-left:-8px; width:16px; height:16px; border-radius:50%;
  background:radial-gradient(circle at 35% 30%, #ff6b6b, var(--red-dark)); box-shadow:0 3px 4px rgba(0,0,0,.4);
}
.langpop__eyebrow{
  font-family:var(--hand); font-size:1.35rem; font-weight:700; color:var(--red);
  display:block; margin-bottom:4px; transform:rotate(-1deg);
}
.langpop__title{ font-family:var(--display); font-size:1.35rem; margin-bottom:22px; letter-spacing:.03em; }
.langpop__btns{ display:flex; gap:12px; }
.langpop__btns button{
  flex:1; font-family:var(--display); font-size:1.05rem; letter-spacing:.05em; padding:16px 6px;
  border:2px solid var(--ink); box-shadow:4px 4px 0 var(--ink); cursor:pointer;
  transition:transform .15s, box-shadow .15s;
}
.langpop__btns button[data-lang="es"]{ background:var(--red); color:#fff; }
.langpop__btns button[data-lang="en"]{ background:var(--ink); color:#fff; }
.langpop__btns button:hover{ transform:translate(-2px,-2px); box-shadow:6px 6px 0 var(--ink); }
@media (max-width:400px){ .langpop__btns{ flex-direction:column; } }

/* =========================================================
   REVISIÓN v8 — lenguaje LogicMines (grid + evidence + redaction)
   ========================================================= */

/* ---- Ranks (antes .levels, ahora sin "difficulty levels" de ficha) ---- */
.ranks{ display:flex; gap:6px; margin-top:8px; flex-wrap:wrap; }
.rank{
  flex:1; min-width:70px; text-align:center; padding:12px 4px; border:2px solid var(--ink);
  background:#fff; font-family:var(--type); font-weight:700; font-size:.66rem;
  overflow-wrap:break-word; word-break:break-word; line-height:1.15;
}
.rank b{ display:block; font-family:var(--display); font-size:1.4rem; color:var(--red); }
@media (max-width:760px){
  .rank{ min-width:56px; font-size:.56rem; padding:10px 3px; }
}
@media (max-width:520px){
  /* En móvil estrecho: 3 arriba, 2 abajo, sin desbordar */
  .ranks{ gap:5px; }
  .rank{ flex:1 1 28%; min-width:0; }
  .rank b{ font-size:1.15rem; }
}

.book__buy{ margin-top:28px; }
.book__buy .btn{ width:100%; max-width:360px; text-align:center; }
.book__fineprint{
  margin-top:12px; font-family:var(--type); font-size:.72rem; color:var(--text-mute);
  letter-spacing:.01em;
}

/* ---- CLASSIFIED // CASE 81 ---- */
.case81__panel{ position:relative; display:block; }
/* foto del lugar de fondo, muy atenuada */
.case81__panel::before{
  content:''; position:absolute; inset:0; z-index:0;
  background:url('../img/venue.jpg') center/cover no-repeat;
  opacity:.30; filter:grayscale(.3);
}
.case81__panel::after{
  content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
  background:linear-gradient(105deg, rgba(26,23,18,.93) 0%, rgba(26,23,18,.82) 45%, rgba(26,23,18,.55) 100%);
}
.case81__body, .case81__actions, .case81__stamp{ position:relative; z-index:2; }
.case81__stamp{
  position:absolute; top:24px; right:-6px; transform:rotate(9deg);
  font-family:var(--display); font-size:1.15rem; letter-spacing:.14em; color:var(--red);
  border:3px solid var(--red); padding:5px 16px; opacity:.85; pointer-events:none;
}
.case81__body{ max-width:640px; }
.case81__num{ font-family:var(--type); font-weight:700; font-size:.82rem; color:var(--yellow); letter-spacing:.04em; text-transform:uppercase; }
/* Módulo "vídeos dentro" con piloto de grabación */
.case81__media{
  margin-top:26px; display:flex; align-items:center; gap:16px;
  border:1px solid rgba(255,255,255,.18); background:rgba(0,0,0,.34); padding:16px 18px;
}
.case81__rec{
  flex:0 0 auto; display:inline-flex; align-items:center; gap:8px;
  font-family:var(--type); font-size:.78rem; letter-spacing:.12em; color:var(--red);
  border:1.5px solid var(--red); padding:5px 11px;
}
.case81__rec i{
  width:9px; height:9px; border-radius:50%; background:var(--red);
  animation:recPulse 1.5s ease-in-out infinite;
}
@keyframes recPulse{ 0%,100%{ opacity:1; } 50%{ opacity:.2; } }
.case81__mediatxt{ flex:1 1 auto; min-width:0; line-height:1.35; }
.case81__mediatxt strong{
  display:block; font-family:var(--display); font-size:1.1rem; letter-spacing:.03em; color:#fff;
}
.case81__mediatxt span{ font-family:var(--type); font-size:.75rem; color:#c9c1ae; }
.case81__runtime{
  flex:0 0 auto; font-family:var(--type); font-size:.78rem; color:#8c8577; letter-spacing:.06em;
}
@media (max-width:560px){
  .case81__media{ flex-wrap:wrap; gap:12px; }
  .case81__runtime{ width:100%; }
}
@media (prefers-reduced-motion: reduce){ .case81__rec i{ animation:none; } }
.case81__actions{ display:flex; flex-direction:column; align-items:flex-start; gap:14px; margin-top:26px; }
.case81__amz{ font-family:var(--type); font-size:.82rem; color:#c9c1ae; text-decoration:underline; text-underline-offset:3px; }
.case81__amz:hover{ color:#fff; }
@media (prefers-reduced-motion: reduce){ .wave span{ animation:none; height:45%; } }
@media (max-width:600px){ .case81__stamp{ top:16px; font-size:.95rem; } }

/* ---- Footer catálogo ---- */
.foot__brand{ display:flex; flex-direction:column; gap:6px; }
.foot__logo{ font-family:var(--display); font-size:1.15rem; color:var(--paper); letter-spacing:.03em; }
.foot__logo-img{ width:180px; height:auto; display:block; opacity:.95; }
.foot__tag{ font-family:var(--type); font-size:.7rem; color:#9a927f; letter-spacing:.05em; }
@media (max-width:600px){ .foot__brand{ align-items:center; } .foot__logo-img{ margin:0 auto; } }
.foot__catalog{ text-align:right; }
.foot__catalog-label{ display:block; font-family:var(--type); font-size:.66rem; color:#9a927f; text-transform:uppercase; letter-spacing:.08em; margin-bottom:6px; }
@media (max-width:600px){ .foot__catalog{ text-align:center; } }

/* =========================================================
   CTA fijo en móvil (aparece al hacer scroll)
   ========================================================= */
.sticky-cta{
  position:fixed; left:0; right:0; bottom:0; z-index:70;
  display:none; text-align:center;
  background:var(--red); color:#fff; text-decoration:none;
  font-family:var(--body); font-weight:800; font-size:1.02rem;
  padding:16px 20px; border-top:3px solid var(--ink);
  box-shadow:0 -4px 14px rgba(0,0,0,.18);
  transform:translateY(100%); transition:transform .25s ease;
}
.sticky-cta.show{ transform:translateY(0); }
@media (max-width:980px){
  .sticky-cta{ display:block; }
  /* espacio para que el CTA no tape el footer al final */
  body{ padding-bottom:0; }
}
@media (prefers-reduced-motion: reduce){
  .sticky-cta{ transition:none; }
}

/* ---- Footer: email en imagen + enlace legal ---- */
.foot__email{ display:block; height:26px; width:auto; margin-top:14px; opacity:.85; }
.foot__legal{
  display:inline-block; margin-top:14px; font-family:var(--type); font-size:.72rem;
  color:#9a927f; text-decoration:none; letter-spacing:.03em;
}
.foot__legal:hover{ color:var(--paper); text-decoration:underline; }
/* Mientras solo haya un libro publicado, el footer no lista catalogo y el
   aviso legal queda solo: sin enlaces encima, sobra la separacion. */
.foot__catalog > .foot__legal:only-child{ margin-top:0; }
@media (max-width:600px){
  .foot__email{ margin:14px auto 0; }
  .foot__legal{ display:block; text-align:center; }
}

/* ---- Etiqueta "vídeos dentro" en la esquina de la Puerta B ---- */
@keyframes badgeRec{ 0%,100%{ opacity:1; } 50%{ opacity:.2; } }

/* ---- Pista de la clave en la Puerta B ---- */

/* ============================================================
   FREEBIES — un solo formulario y, debajo, el atajo al Caso 81
   ============================================================ */
.doors__grid--one{ grid-template-columns:1fr; max-width:460px; }

.have-book{
  max-width:580px; margin:44px auto 0; padding-top:34px; text-align:center;
  border-top:1px dashed rgba(23,20,15,.22);
}
.have-book__q{
  margin:0 0 20px; font-family:var(--type);
  font-size:1.12rem; line-height:1.5; color:var(--ink);
}
.have-book__q b{ color:var(--red); }
.have-book__note{
  margin:16px 0 0; font-size:.82rem; color:var(--text-mute);
  display:inline-flex; align-items:center; gap:7px;
}
/* puntito rojo de "grabando", el mismo guiño que tenia la etiqueta de video */
.have-book__note i{
  width:7px; height:7px; border-radius:50%; background:var(--red);
  flex:0 0 auto; animation:recBlink 1.6s ease-in-out infinite;
}
@keyframes recBlink{ 0%,100%{ opacity:1; } 50%{ opacity:.25; } }
@media (prefers-reduced-motion: reduce){ .have-book__note i{ animation:none; } }

@media (max-width:520px){
  .have-book{ margin-top:34px; padding-top:28px; }
  .have-book__q{ font-size:1rem; }
}

/* ============================================================
   FREEBIES — descarga inmediata tras validar el email
   ============================================================ */
.files{ display:none; max-width:520px; margin:26px auto 0; text-align:center; }
.files.show{ display:block; animation:filesIn .4s ease both; }
@keyframes filesIn{ from{ opacity:0; transform:translateY(8px); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce){ .files.show{ animation:none; } }

.files__t{
  margin:0 0 16px; font-family:var(--type); font-size:1.02rem;
  color:var(--ink); letter-spacing:.01em;
}
.files__btns{ display:flex; gap:12px; justify-content:center; flex-wrap:wrap; }
.files__btns .btn{
  font-size:.84rem; padding:13px 20px;
  display:inline-flex; align-items:center; justify-content:center; gap:10px;
}
/* La bandera lleva su propio filo oscuro para no diluirse sobre el rojo. */
.files__btns .flag{
  flex:0 0 auto; display:block; width:22px; height:12px;
  outline:1px solid rgba(0,0,0,.45); outline-offset:0;
}
.files__note{
  margin:16px auto 0; max-width:46ch; font-size:.8rem;
  color:var(--text-mute); line-height:1.6;
}
@media (max-width:460px){
  .files__btns{ flex-direction:column; }
  .files__btns .btn{ width:100%; }
}
