/* ============================================================
   juan vela — sistema visual compartido (home + páginas)
   Cream #F2F0E8 · Midnight #080D28 (dos tintas, sin dorado)
   Distribución: fondo cream, paneles midnight con letra cream.
   Sin sombras, sin degradados.
   ============================================================ */

:root {
  /* paleta oficial */
  --bg:       #F2F0E8;   /* Cream — fondo */
  --midnight: #080D28;   /* Azul oscuro principal — paneles, wordmark, texto */
  --indigo:   #141C5E;   /* Índigo — reserva */
  --gold:     #F2C241;   /* Acento de firma — punto del tag + sello «gratis» */
  --ink:      #0A0A0A;   /* (sin uso: el texto va en midnight) */
  --steel:    #686B73;   /* Neutro — texto secundario · 4.67:1 sobre cream (AA) */
  --line:     #CED0D6;   /* Líneas sobre fondo claro */
  /* Anillo de foco: tiene que verse sobre las DOS tintas del sitio.
     El dorado daba 1.46:1 sobre cream — WCAG 2.2 pide 3:1 en indicadores de
     foco. Este índigo claro (familia de --indigo) da 4.12:1 sobre cream y
     4.07:1 sobre midnight. */
  --focus:    #5E6AD2;

  --fg:       var(--midnight);
  --muted:    var(--steel);
  --tint:     color-mix(in oklch, var(--fg) 6%, transparent);

  /* sobre midnight (paneles) */
  --on-dark:        var(--bg);
  --on-dark-muted:  color-mix(in oklch, var(--bg) 62%, transparent);
  --on-dark-line:   color-mix(in oklch, var(--bg) 22%, transparent);
  --on-dark-tint:   color-mix(in oklch, var(--bg) 9%, transparent);
  --panel-hover:    color-mix(in oklch, var(--fg) 90%, var(--bg));

  --font-display: 'Golos Text', 'Arial Black', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --radius-frame: clamp(20px, 2.6vw, 34px);
  --radius-card:  clamp(14px, 1.5vw, 22px);
  --frame-pad:    clamp(16px, 2.2vw, 34px);

      /* grano fino + fibra de papel (washi) */
      --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
      --paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012 0.016' numOctaves='3' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='320' height='320' filter='url(%23p)'/%3E%3C/svg%3E");
}

/* ─── base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  padding: clamp(10px, 1.6vw, 22px);
}
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

/* ─── marco único con textura ───────────────────────────────── */
.frame {
  position: relative;
  height: 100%;
  border: 1.5px solid var(--fg);
  border-radius: var(--radius-frame);
  padding: var(--frame-pad);
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vh, 22px);
  min-height: 0;
  overflow: hidden;
}
.frame::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image: var(--noise);
  opacity: 0.13;
  pointer-events: none;
  z-index: 0;
  animation: grain-shift 1.6s steps(4) infinite;   /* grano vivo, sutil */
}
.frame::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image: var(--paper);
  mix-blend-mode: multiply;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}
@keyframes grain-shift {
  0%   { background-position: 0 0; }
  25%  { background-position: -46px 32px; }
  50%  { background-position: 28px -54px; }
  75%  { background-position: -30px -28px; }
  100% { background-position: 0 0; }
}
.frame > * { position: relative; z-index: 1; }

/* ─── cabecera ─────────────────────────────────────────────── */
.site-header { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 14px; }
.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(15px, 1.5vw, 21px);
  letter-spacing: 0.01em;
  color: var(--midnight);
  text-decoration: none;
  padding: 4px 2px;
}
.logo-tag {
  position: relative;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--steel);
  padding: 3px 4px;
}
.logo-tag::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);            /* acento de firma 1/1 */
}
.site-nav { display: flex; gap: clamp(14px, 2.2vw, 30px); }
/* El ítem deshabilitado («proyectos») es un <span>, no un <a> — tiene que
   heredar el mismo tamaño, familia y color que los enlaces reales, o termina
   siendo el ítem más llamativo del menú justo por no ser clickeable. */
.site-nav a, .site-nav span {
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted); text-decoration: none;
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover { color: var(--fg); }
.site-nav a.is-active { color: var(--fg); border-bottom-color: var(--fg); }
.is-disabled { pointer-events: none; opacity: 0.4; cursor: not-allowed; }

/* ─── escenario home: wordmark + paneles ────────────────────── */
.stage { position: relative; flex: 1 1 auto; min-height: 0; }
.wordmark-wrap {
  position: absolute; inset-inline: 0; bottom: 0;
  z-index: 0;                       /* detrás de las cortinas */
  pointer-events: none;
}
.wordmark {
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  /* Escala con el ancho Y con el alto: en ventanas bajas y anchas (1440×800)
     el wordmark crecía hasta chocar con las cortinas por más cortas que
     estuvieran. El 30vh es el techo que mantiene la banda de cream limpia. */
  font-size: clamp(80px, min(17vw, 30vh), 290px);
  line-height: 0.95; letter-spacing: -0.02em;
  color: var(--fg);
  text-shadow:
    0 0 22px color-mix(in oklch, var(--bg) 85%, transparent),
    0 0 22px color-mix(in oklch, var(--bg) 85%, transparent),
    0 16px 38px color-mix(in oklch, var(--fg) 28%, transparent);
}
.wordmark-tag {
  margin: clamp(4px, 1vh, 12px) 0 0;
  text-align: center;
  font-family: var(--font-mono); font-weight: 700;
  font-size: clamp(11px, 1.3vw, 15px);
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--fg);
  opacity: 0.55;
}
.wordmark .ch {
  display: inline-block;
  opacity: 0; transform: translateY(0.35em);
  animation: ch-in 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.1s + var(--i) * 55ms);
}
.wordmark .ch-sp { width: 0.28em; }
@keyframes ch-in {
  to { opacity: 1; transform: none; }
}
.cards {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex; align-items: flex-start;   /* cuelgan desde arriba, como noren */
  gap: clamp(14px, 2.2vw, 34px);
}

/* vaivén de cortina (noren) — cada tela a su ritmo */
.pcard, .pcard-yo {
  transform-origin: 50% 0;
  animation: curtain-sway var(--dur, 5.6s) ease-in-out var(--delay, 0s) infinite alternate;
}
.cards > :nth-child(1) { --dur: 5.4s; --delay: -0.6s; }
.cards > :nth-child(2) { --dur: 6.3s; --delay: -2.2s; }
.cards > :nth-child(3) { --dur: 5.8s; --delay: -1.1s; }
.cards > :nth-child(4) { --dur: 6.8s; --delay: -3.4s; }
.cards > :nth-child(5) { --dur: 5.1s; --delay: -1.8s; }
@keyframes curtain-sway {
  from { transform: rotate(0.45deg) skewX(0.15deg); }
  to   { transform: rotate(-0.5deg) skewX(-0.2deg); }
}

/* textura tipo papel en las columnas */
.pcard::after, .pcard-yo::after, .page-side::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image: var(--noise);
  opacity: 0.14;
  mix-blend-mode: screen;
  pointer-events: none;
}
.pcard::before, .pcard-yo::before, .page-side::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  background-image:
    var(--paper),
    repeating-linear-gradient(90deg,
      color-mix(in oklch, var(--bg) 10%, transparent) 0 12px,
      transparent 12px 36px);
  opacity: 0.1;
  mix-blend-mode: screen;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.pcard:hover::before, .pcard-yo:hover::before { opacity: 0.18; }
.pcard > *, .pcard-yo > *, .page-side > * { position: relative; z-index: 1; }

/* ─── panel (enlace) — midnight, letra vertical ─────────────── */
.pcard {
  position: relative;
  flex: 1 1 0; min-width: 0;
  height: var(--h, 60%);
  background: var(--fg);
  border-radius: 0 0 var(--radius-card) var(--radius-card);   /* borde libre abajo */
  overflow: visible;                       /* el colgante sobresale del borde */
  color: var(--on-dark);
  text-decoration: none;
  /* La etiqueta va al pie de la cortina, no centrada — ver .pcard-label */
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: clamp(16px, 2vw, 26px) clamp(10px, 1vw, 16px);
  box-shadow: 0 24px 50px -14px color-mix(in oklch, var(--fg) 42%, transparent);
  transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.2s ease, box-shadow 0.35s ease,
              transform 0.45s ease;
}
.pcard:hover {
  height: 100%;
  background: var(--panel-hover);
  box-shadow: 0 36px 68px -16px color-mix(in oklch, var(--fg) 52%, transparent);
  animation: none;
  transform: rotate(1.1deg);
}

/* Nombre de la sección: horizontal y al pie de la cortina. En vertical
   (una letra por línea) la palabra había que decodificarla en vez de leerla,
   y esto es navegación — la verticalidad la aporta el panel colgando, no la
   tipografía. Al hover se abre el tracking, como la tela que se despliega. */
.pcard-label {
  flex: 0 0 auto; max-width: 100%;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(12px, 1.55vw, 24px);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.04;
  text-align: center;
  white-space: nowrap;
  transition: letter-spacing 0.35s ease;
}
.pcard:hover .pcard-label { letter-spacing: 0.12em; }

/* Va encima de la etiqueta, no al fondo — ahí ahora vive el nombre.
   Ocupa su espacio siempre (sólo cambia la opacidad) para que la etiqueta
   no salte de posición al entrar el cursor. */
.pcard-hint {
  order: -1;
  margin-bottom: 10px;
  text-align: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.3s ease 0.08s, transform 0.3s ease 0.08s;
}
.pcard:hover .pcard-hint { opacity: 1; transform: none; }

/* panel central «Yo» — cerrado como los demás; al hover se abren las redes */
.pcard-yo {
  position: relative;
  flex: 1 1 0; min-width: 0;
  height: var(--h, 70%);
  background: var(--fg);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  overflow: hidden;
  color: var(--on-dark);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding: clamp(16px, 2vw, 26px) clamp(10px, 1vw, 16px);
  box-shadow: 0 24px 50px -14px color-mix(in oklch, var(--fg) 42%, transparent);
  transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.2s ease, box-shadow 0.35s ease;
}
.pcard-yo:hover {
  height: 100%;
  background: var(--panel-hover);
  box-shadow: 0 36px 68px -16px color-mix(in oklch, var(--fg) 52%, transparent);
  animation: none;
  transform: rotate(1.1deg);
}
.yo-portrait {
  position: absolute; top: 18%; left: 0; right: 0; z-index: 0;
  width: 100%; height: 82%;
  object-fit: cover; object-position: top center;
  transition: opacity 0.4s ease;
}
.yo-portrait-scrim {
  position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(180deg,
      color-mix(in oklch, var(--fg) 58%, transparent) 0%,
      color-mix(in oklch, var(--fg) 80%, transparent) 65%,
      var(--fg) 100%);
  transition: opacity 0.4s ease;
}
.pcard-yo:hover .yo-portrait { opacity: 0.55; }
.pcard-yo:hover .yo-portrait-scrim { opacity: 0.7; }
.pcard-yo .pcard-label { transition: opacity 0.25s ease; }
.pcard-yo:hover .pcard-label { opacity: 0; }
.yo-open {
  position: absolute; inset: 0; z-index: 2;
  padding: clamp(18px, 2vw, 28px);
  overflow-y: auto;
  opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity 0.35s ease 0.18s, transform 0.35s ease 0.18s;
}
.pcard-yo:hover .yo-open { opacity: 1; transform: none; pointer-events: auto; }
.pcard-yo .yo-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.05;
  margin-bottom: 14px;
}
.pcard-yo .remate { margin-top: 18px; }

/* redes dentro del panel Yo (visibles al hover) */
.yo-links { list-style: none; margin: 6px 0 0; padding: 0; width: 100%; }
.yo-links li { border-top: 1px solid var(--on-dark-line); }
.yo-links li:last-child { border-bottom: 1px solid var(--on-dark-line); }
.yo-links a, .yo-links button {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  width: 100%; padding: 13px 6px;
  color: var(--on-dark); text-decoration: none;
  font: inherit; font-weight: 500; font-size: 15px;
  background: transparent; border: 0; cursor: pointer; text-align: left;
}
.yo-links a:hover, .yo-links button:hover { background: var(--on-dark-tint); }
.yo-links .go {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--on-dark-muted);
}
.yo-bio {
  margin: 12px 0 0;
  font-size: clamp(13.5px, 1.3vw, 16px);
  line-height: 1.45;
  color: var(--on-dark-muted);
}

/* ─── páginas de sección ────────────────────────────────────── */
.page-grid { flex: 1 1 auto; min-height: 0; display: flex; gap: clamp(12px, 1.6vw, 24px); }
.page-side {
  flex: 0 0 clamp(120px, 15%, 210px);
  background: var(--fg);
  border-radius: var(--radius-card);
  display: flex; justify-content: center; align-items: center;
  text-decoration: none; color: var(--on-dark);
  overflow: hidden;
  box-shadow: 0 24px 50px -14px color-mix(in oklch, var(--fg) 42%, transparent);
  animation: card-in 0.5s ease both;
  transition: background 0.2s ease;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.page-side:hover { background: var(--panel-hover); }
/* Sin texto a propósito: repetía el título de la página justo al lado
   («MENTORÍAS» en la barra + «mentorías» como h2). Es la cortina de la
   sección, y sigue siendo el enlace de vuelta — su nombre accesible va en
   el aria-label del <a>, no en un rótulo visible que duplicaba. */
.page-content {
  flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto;
  padding: clamp(10px, 1.6vw, 26px) clamp(6px, 1vw, 16px);
  animation: card-in 0.55s ease 0.08s both;
}
.back-link {
  display: inline-block;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); text-decoration: none;
  margin-bottom: 18px;
}
.back-link:hover { color: var(--fg); }
.body-eyebrow {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.page-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(30px, 4.2vw, 64px);
  line-height: 1.02; letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.page-text { max-width: 56ch; opacity: 0.85; font-size: 16px; }
.remate { margin-top: 18px; }

.link-list { list-style: none; margin: 20px 0 0; padding: 0; max-width: 640px; }
.link-list li { border-top: 1px solid var(--line); }
.link-list li:last-child { border-bottom: 1px solid var(--line); }
.link-list a, .link-list .row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 14px 6px; text-decoration: none;
}
.link-list a:hover { background: var(--tint); }
.link-list .name { font-weight: 500; flex: 1 1 auto; }
.link-list .meta {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.link-list .go { font-family: var(--font-mono); font-size: 12px; white-space: nowrap; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 24px; padding: 13px 24px;
  border: 1.5px solid var(--fg); border-radius: 12px;
  background: var(--fg); color: var(--bg);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-primary:hover { background: transparent; color: var(--fg); }
.btn-primary:active { transform: translateY(1px); }

.email-link {
  display: inline-block; margin-top: 10px;
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(20px, 2.4vw, 38px);
  color: var(--fg);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  word-break: break-all;
}
.email-link:hover { text-decoration-thickness: 4px; }

/* ─── tarjetas de formato (mentorías) ───────────────────────── */
.tier-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 22px);
  margin-top: 24px; max-width: 920px;
}
.tier {
  border: 1.5px solid var(--fg);
  border-radius: 0;
  padding: clamp(18px, 2vw, 26px);
  display: flex; flex-direction: column; gap: 8px;
  transition: transform 0.25s ease;
}
.tier:hover { transform: translateY(-4px); }
.tier-num {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--muted); margin: 0;
}
.tier-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(18px, 1.8vw, 24px); line-height: 1.1; margin: 0;
}
.tier-meta {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); margin: 0;
}
.tier-price {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(20px, 2vw, 28px); line-height: 1;
  margin: 6px 0 2px;
}
.tier-price span {
  font-family: var(--font-mono); font-weight: 400;
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
}
.tier-desc { font-size: 14px; opacity: 0.85; margin: 0; flex: 1 1 auto; }
.tier-cta {
  display: inline-block;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--fg); text-decoration: none;
}
.tier-cta:hover { text-decoration: underline; text-underline-offset: 4px; }
.tier-featured { background: var(--fg); color: var(--bg); }
.tier-featured .tier-num,
.tier-featured .tier-meta,
.tier-featured .tier-price span { color: var(--on-dark-muted); }
.tier-featured .tier-cta { border-color: var(--on-dark-line); color: var(--bg); }

/* ─── recurso individual: preview + gate + contenido completo ──
   Texto de lectura larga: más grande y más espaciado que el cuerpo
   general del sitio (15px/1.55) — se lee de corrido, no en fragmentos. */
.resource-preview, .resource-full { margin-top: 28px; max-width: 62ch; }
.resource-preview p, .resource-full p {
  margin: 0 0 20px; font-size: 16.5px; line-height: 1.75;
}
.resource-preview h3, .resource-full h3 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(19px, 1.9vw, 25px); margin: 40px 0 14px;
}
.resource-preview h3:first-child, .resource-full h3:first-child { margin-top: 0; }
.resource-preview h4, .resource-full h4 {
  font-family: var(--font-display); font-weight: 700;
  font-size: 16px; margin: 22px 0 10px;
}
.resource-preview ul, .resource-full ul { margin: 0 0 20px; padding-left: 22px; }
.resource-preview li, .resource-full li { margin-bottom: 10px; font-size: 16.5px; line-height: 1.65; }

.md-media {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-card);
  margin: 0 0 24px;
}
.md-embed {
  position: relative; width: 100%; padding-top: 56.25%; /* 16:9 */
  margin: 0 0 24px; border-radius: var(--radius-card); overflow: hidden;
}
.md-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.md-code {
  margin: 0 0 24px; padding: 16px 18px;
  background: var(--fg); color: var(--bg);
  border-radius: var(--radius-card);
  overflow-x: auto;
}
.md-code code {
  font-family: var(--font-mono); font-size: 13.5px; line-height: 1.6;
  white-space: pre;
}

.resource-preview:empty::before, .resource-full:empty::before {
  content: "Cargando…";
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}

/* El paso de "esto es lo que hay gratis" a "sigue leyendo" — es la
   acción más importante de la página antes de desbloquear, así que lleva
   peso de botón real, no un texto suelto. */
.continue-reading {
  margin: 32px 0 8px; padding-top: 26px;
  border-top: 1px dashed var(--line);
}
.continue-reading-btn {
  font: inherit; font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 12px 20px; border: 1.5px solid var(--fg); border-radius: 9px;
  background: var(--fg); color: var(--bg); cursor: pointer;
}
.continue-reading-btn:hover { background: transparent; color: var(--fg); }

.scroll-sentinel { height: 1px; margin-top: 60px; }
.scroll-sentinel[hidden] { display: none; }

.resource-actions {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 14px; margin: 20px 0;
}
.resource-action-btn {
  font: inherit; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 14px; border: 1.5px solid var(--fg); border-radius: 8px;
  background: transparent; color: var(--fg); cursor: pointer;
}
.resource-action-btn:hover { background: var(--fg); color: var(--bg); }

.lead-form { display: flex; flex-direction: column; gap: 14px; }
.lead-field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; border: 0; padding: 0; margin: 0; }
.lead-field span, .lead-role legend {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); padding: 0; margin: 0 0 6px;
}
.lead-field input[type="text"], .lead-field input[type="email"] {
  font: inherit; font-size: 15px; padding: 10px 12px;
  border: 1.5px solid var(--fg); border-radius: 8px;
  background: var(--bg); color: var(--fg);
}
.lead-role label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; padding: 4px 0; cursor: pointer;
}
.lead-role input { accent-color: var(--fg); }
.lead-status { margin: 4px 0 0; font-family: var(--font-mono); font-size: 12px; min-height: 16px; }
.lead-status.is-error { color: #b3261e; }
.lead-status.is-ok { color: var(--muted); }
.lead-form button[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ─── pop-ups genéricos (gate de recursos, donar) ───────────── */
.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 40px);
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: color-mix(in oklch, var(--fg) 55%, transparent);
}
.modal-panel {
  position: relative;
  background: var(--bg);
  border: 1.5px solid var(--fg);
  border-radius: var(--radius-card);
  max-width: 520px; width: 100%;
  max-height: min(88vh, 820px);
  overflow-y: auto;
  padding: clamp(24px, 3vw, 40px);
  box-shadow: 0 36px 68px -16px color-mix(in oklch, var(--fg) 45%, transparent);
  animation: card-in 0.3s ease both;
}
.modal-title { margin: 6px 40px 14px 0; }
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: transparent; border: 1.5px solid var(--fg); border-radius: 50%;
  font-size: 15px; line-height: 1; color: var(--fg); cursor: pointer;
}
.modal-close:hover { background: var(--fg); color: var(--bg); }
body.modal-open { overflow: hidden; }

/* ─── "¿Quieres donar algo?" ─────────────────────────────────── */
/* Un solo lugar para pedirlo (abajo, tras desbloquear) — cierre visible
   pero quieto, con borde, no un bloque sólido interrumpiendo la lectura. */
.donate-card {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 14px; margin: 32px 0 0; padding: 20px 24px;
  background: var(--bg); color: var(--fg);
  border: 1.5px solid var(--fg);
  border-radius: var(--radius-card);
  max-width: 62ch;
}
.donate-card span {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
}
.donate-card a, .donate-card button {
  font: inherit; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 10px 16px; border: 1.5px solid var(--fg); border-radius: 8px;
  background: transparent; color: var(--fg); cursor: pointer; white-space: nowrap;
  text-decoration: none;
}
.donate-card a:hover, .donate-card button:hover { background: var(--fg); color: var(--bg); }

.lead-field input[type="number"] {
  font: inherit; font-size: 15px; padding: 10px 12px;
  border: 1.5px solid var(--fg); border-radius: 8px;
  background: var(--bg); color: var(--fg);
}

/* ─── polaroids (proyectos) ─────────────────────────────────── */
.polaroid-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 26px);
  margin-top: 28px; max-width: 940px;
}
.polaroid {
  margin: 0;
  background: color-mix(in oklch, var(--bg) 55%, white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 10px 14px;
  transform: rotate(var(--rot, 0deg));
  box-shadow: 0 14px 30px -12px color-mix(in oklch, var(--fg) 25%, transparent);
  transition: transform 0.25s ease;
}
.polaroid:hover { transform: rotate(0deg) translateY(-4px); }
.polaroid-img {
  aspect-ratio: 4 / 3;
  background: var(--tint);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em;
  color: var(--muted); text-align: center; padding: 8px;
  filter: grayscale(1);
}
.polaroid figcaption {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px; margin-top: 10px;
}
.polaroid .name { font-weight: 600; font-size: 14px; }
.polaroid .meta {
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}

/* nota vertical al borde — guiño de póster editorial */
.edge-note {
  position: absolute; right: 7px; top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--muted);
  z-index: 2; pointer-events: none;
  white-space: nowrap;
}
@media (max-width: 1100px) { .edge-note { display: none; } }

/* ─── recursos: página larga con héroe + filtros + grid ─────── */
.frame-scroll { height: auto; min-height: 100%; }
body:has(.frame-scroll) { overflow: auto; }

.rec-hero {
  position: relative;
  min-height: calc(100dvh - 2 * var(--frame-pad) - 120px);
  display: grid; place-items: center;
}
.rec-hero-center { position: relative; text-align: center; }

/* sello dorado colgando de un clip */
.seal-wrap {
  position: absolute; z-index: 3;
  display: flex; flex-direction: column; align-items: center;
  transform-origin: 50% 0;
  animation: seal-sway 3.2s ease-in-out infinite alternate;
  pointer-events: none;
}
.rec-hero-center .seal-wrap { top: -44px; right: -44px; }
.pcard .seal-wrap { top: calc(100% - 8px); left: 50%; margin-left: -29px; }
.seal-clip {
  width: 12px; height: 16px;
  border: 2.5px solid var(--fg);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  margin-bottom: -5px;
  background: var(--bg);
}
@keyframes seal-sway {
  from { transform: rotate(-5deg); }
  to   { transform: rotate(5deg); }
}
.rec-seal {
  position: relative;
  display: grid; place-items: center;
  width: 58px; height: 58px;
  background: var(--gold);
  color: var(--fg);
  font-family: var(--font-mono); font-weight: 700; font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 6px;
  box-shadow: 0 8px 18px -8px color-mix(in oklch, var(--fg) 40%, transparent);
}
.rec-sub {
  margin: 14px 0 0;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.rec-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 9vw, 148px);
  line-height: 0.95; letter-spacing: -0.02em;
  text-align: center;
  margin: 0;
  color: var(--fg);
  animation: card-in 0.55s ease 0.05s both;
}
/* estampilla postal: borde dentado, solo texto */
.float-card {
  position: absolute;
  width: clamp(160px, 16vw, 220px);
  padding: 16px 18px;
  background: var(--bg);
  border: 1px solid var(--fg);
  border-radius: 2px;
  outline: 1px dashed color-mix(in oklch, var(--fg) 50%, transparent);
  outline-offset: -7px;
  text-decoration: none; color: var(--fg);
  transform: rotate(var(--rot, 0deg));
  box-shadow: 0 14px 30px -12px color-mix(in oklch, var(--fg) 30%, transparent);
  animation: float-bob 6s ease-in-out var(--delay, 0s) infinite alternate;
  transition: transform 0.25s ease;
}
.float-card:hover { animation: none; transform: rotate(0deg) translateY(-6px); }
.float-card .fc-type {
  display: block;
  font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.float-card .fc-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: 15px; line-height: 1.2;
}
@keyframes float-bob {
  from { transform: rotate(var(--rot, 0deg)) translateY(0); }
  to   { transform: rotate(var(--rot, 0deg)) translateY(-9px); }
}
.rec-scroll-hint {
  position: absolute; bottom: 6px; left: 50%;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em;
  color: var(--muted); text-decoration: none; text-align: center; line-height: 1.5;
  animation: hint-bob 1.8s ease-in-out infinite;
}
.rec-scroll-hint:hover { color: var(--fg); }
@keyframes hint-bob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(7px); }
}

.rec-filters {
  display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
  border: 1.5px solid var(--fg);
  border-radius: 12px;
  padding: 6px;
  margin-bottom: clamp(18px, 3vh, 30px);
}
.rec-filter {
  font: inherit;
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 8px 14px;
  border: 0; border-radius: 8px;
  background: transparent; color: var(--muted);
  cursor: pointer;
}
.rec-filter:hover { color: var(--fg); }
.rec-filter.is-active { background: var(--fg); color: var(--bg); }

.rec-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 1.8vw, 24px);
  padding-bottom: clamp(20px, 3vh, 40px);
  counter-reset: rec;
}
.rec-card {
  position: relative;
  counter-increment: rec;
  border: 1.5px solid var(--fg);
  border-radius: 0;
  display: flex; flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rec-card-link {
  position: absolute; inset: 0; z-index: 1;
  border-radius: inherit;
}
.rec-card-link:focus-visible { outline: 2.5px solid var(--focus); outline-offset: -3px; }
.rec-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -16px color-mix(in oklch, var(--fg) 30%, transparent);
}
.rc-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 12px clamp(18px, 2vw, 26px);
  border-bottom: 1px solid var(--line);
}
.rc-head .rc-type {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
.rc-head .rc-index {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.1em; color: var(--fg);
}
.rc-head .rc-index::before { content: counter(rec, decimal-leading-zero); }
.rec-card h3 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(20px, 2vw, 26px); line-height: 1.1; margin: 0;
  padding: 16px clamp(18px, 2vw, 26px) 0;
}
.rec-card p {
  font-size: 15px; opacity: 0.85; margin: 0; flex: 1 1 auto;
  padding: 8px clamp(18px, 2vw, 26px) 18px;
}
.rc-foot {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  border-top: 1px solid var(--line);
  padding: 12px clamp(18px, 2vw, 26px);
}
.rc-meta {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--muted); white-space: nowrap;
}
.rc-go {
  font-family: var(--font-mono); font-size: 12px;
  color: var(--fg); text-decoration: none; white-space: nowrap;
}
.rc-go:hover { text-decoration: underline; text-underline-offset: 4px; }

/* tarjeta destacada (midnight) + botón cream */
.rec-card.rec-featured { background: var(--fg); color: var(--bg); }
.rec-featured .rc-head { border-color: var(--on-dark-line); }
.rec-featured .rc-type,
.rec-featured .rc-meta { color: var(--on-dark-muted); }
.rec-featured .rc-index { color: var(--bg); }
.rec-featured .rc-foot { border-color: var(--on-dark-line); }
.btn-card {
  display: block; text-align: center;
  margin: 0 clamp(18px, 2vw, 26px) clamp(18px, 2vw, 26px);
  padding: 13px 16px;
  background: var(--bg); color: var(--fg);
  border: 1.5px solid var(--bg);
  font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.btn-card:hover { background: transparent; color: var(--bg); }

/* ─── /admin/ — panel de guías ──────────────────────────────── */
.admin-main { flex: 1 1 auto; min-height: 0; overflow: auto; padding: clamp(10px, 1.6vw, 22px) 0; }
.admin-card { max-width: 760px; margin: 0 auto; animation: card-in 0.4s ease both; }
.admin-card h2 {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(24px, 2.6vw, 32px); margin: 0 0 10px;
}
.admin-login { text-align: center; max-width: 380px; padding-top: clamp(30px, 6vh, 70px); }
.admin-login .lead-form { text-align: left; margin-top: 22px; }

.admin-row-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-row-head h2 { margin: 0; }

.guide-list { display: flex; flex-direction: column; border: 1.5px solid var(--fg); border-radius: 12px; overflow: hidden; }
.guide-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 13px 18px; border-bottom: 1px solid var(--line);
}
.guide-row:last-child { border-bottom: 0; }
.guide-row .g-title { font-family: var(--font-display); font-weight: 700; font-size: 14.5px; flex: 1 1 auto; }
.guide-row .g-slug { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }
.pill {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap;
}
.pill-pub { background: color-mix(in oklch, var(--gold) 30%, var(--bg)); color: var(--midnight); }
.pill-draft { background: color-mix(in oklch, var(--steel) 18%, var(--bg)); color: var(--steel); }
.m-btn-outline-sm {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border: 1.5px solid var(--fg); border-radius: 7px;
  background: transparent; color: var(--fg); cursor: pointer;
}
.m-btn-outline-sm:hover { background: var(--fg); color: var(--bg); }

.admin-guide-form .field { margin-bottom: 18px; }
.admin-guide-form label { display: block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.admin-guide-form input[type="text"],
.admin-guide-form input[type="password"],
.admin-guide-form select,
.admin-guide-form textarea {
  width: 100%; font: inherit; font-size: 14.5px;
  padding: 10px 12px; border: 1.5px solid var(--fg); border-radius: 8px;
  background: var(--bg); color: var(--fg);
}
.admin-guide-form textarea { resize: vertical; line-height: 1.6; }
.admin-guide-form input.mono, .admin-guide-form textarea.mono { font-family: var(--font-mono); font-size: 13px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.url-preview { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); margin: 6px 0 0; }
.url-preview strong { color: var(--fg); }

.editor-toolbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.editor-toolbar button {
  font-family: var(--font-mono); font-size: 11px; padding: 7px 11px;
  border: 1.5px solid var(--fg); border-radius: 7px;
  background: var(--bg); color: var(--fg); cursor: pointer;
}
.editor-toolbar button:hover { background: var(--fg); color: var(--bg); }

.upload-drop {
  margin-top: 10px; border: 1.5px dashed var(--line); border-radius: 10px;
  padding: 18px; text-align: center;
  font-family: var(--font-mono); font-size: 12px; color: var(--muted);
}
.upload-drop.is-drag { border-color: var(--gold); color: var(--fg); }
.upload-pick { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.editor-note { font-size: 11.5px; color: var(--muted); margin: 8px 0 0; min-height: 1em; }
.editor-note.is-ok { color: var(--fg); }
.editor-note.is-error { color: var(--midnight); font-weight: 600; }

.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.toggle-row { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.toggle-row input { width: 16px; height: 16px; }

/* ─── responsive ────────────────────────────────────────────── */
@media (max-width: 860px) {
  .stage { display: flex; flex-direction: column; gap: 14px; overflow: auto; }
  .wordmark-wrap { position: static; }
  .wordmark { font-size: clamp(42px, 12vw, 92px); text-align: left; }
  .wordmark-tag { text-align: left; }
  .cards { position: static; flex: 0 0 auto; flex-direction: column; align-items: stretch; }
  .pcard, .pcard-yo { animation: none; }
  .pcard { height: auto; min-height: 56px; flex-direction: row; justify-content: flex-start; padding: 0 18px; border-radius: var(--radius-card); box-shadow: none; }
  .pcard:hover { height: auto; background: var(--fg); transform: none; }
  .pcard-yo:hover { transform: none; }
  .pcard-label { font-size: 16px; letter-spacing: 0.04em; text-align: left; }
  .pcard-hint { display: none; }
  .pcard-yo {
    height: auto; flex: 0 0 auto; border-radius: var(--radius-card); box-shadow: none;
    flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: center;
    padding: 14px 18px; gap: 12px;
  }
  .pcard-yo:hover .pcard-label { opacity: 1; }
  .yo-portrait, .yo-portrait-scrim { display: none; }
  .pcard-yo .yo-open {
    position: static; opacity: 1; transform: none; pointer-events: auto;
    flex: 1 1 100%; padding: 8px 0 4px;
  }
  .page-grid { flex-direction: column; overflow: auto; }
  /* Sin rótulo, apilada arriba, la barra sólo gastaba 56px de alto sin
     acompañar nada — en desktop es la columna que sostiene la lectura, en
     móvil no. El «← volver» del contenido ya cubre la vuelta. */
  .page-side { display: none; }
  .tier-grid, .polaroid-grid { grid-template-columns: 1fr; }
  .polaroid { transform: none; }

  /* recursos en móvil */
  .rec-hero { min-height: 0; padding: 36px 0 48px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
  .rec-seal, .seal-wrap { display: none; }
  .float-card { position: static; width: 100%; max-width: 320px; transform: none; animation: none; }
  .rec-scroll-hint { position: static; transform: none; margin-top: 14px; animation: none; }
  .rec-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
