/* =============================================================
   ThesisFR — sistema visual "digital oscuro"
   ============================================================= */

:root {
  --bg:        #05060a;
  --bg-2:      #090b11;
  --surface:   #0e1118;
  --surface-2: #141822;
  --line:      rgba(255, 255, 255, .085);
  --line-2:    rgba(255, 255, 255, .16);

  --red:       #e11d26;
  --red-hi:    #ff3b43;
  --red-dim:   rgba(225, 29, 38, .13);
  --pixel:     #8e9be6;

  --ink:       #eef1f7;
  --muted:     #939caf;
  --muted-2:   #677082;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --r:   14px;
  --r-s: 9px;
  --maxw: 1180px;
  --nav-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  line-height: 1.12;
  letter-spacing: -.022em;
  margin: 0 0 .5em;
  font-weight: 640;
}
h1 { font-size: clamp(2.4rem, 6.2vw, 4.4rem); font-weight: 680; letter-spacing: -.035em; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.65rem); }
h3 { font-size: 1.16rem; }
p  { margin: 0 0 1em; }

.wrap { width: min(100% - 2.6rem, var(--maxw)); margin-inline: auto; }

section { position: relative; padding: clamp(4.5rem, 9vw, 7.5rem) 0; }

/* ---------- etiquetas de seccion ---------- */
.kicker {
  font-family: var(--mono);
  font-size: .705rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.1rem;
}
.kicker::before {
  content: "";
  width: 26px; height: 1px;
  background: currentColor;
  opacity: .65;
}

.lead { color: var(--muted); font-size: 1.06rem; max-width: 62ch; }

/* =============================================================
   Fondo ASCII — las dos manos que casi se tocan
   ============================================================= */
.ascii-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(115% 88% at 50% 42%, #000 38%, transparent 82%);
  -webkit-mask-image: radial-gradient(115% 88% at 50% 42%, #000 38%, transparent 82%);
}
.ascii-bg pre {
  position: absolute;
  top: 46%; left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(6px, 1.02vw, 15px);
  line-height: 1.1;
  letter-spacing: .05em;
  white-space: pre;
  color: var(--red);
  opacity: .5;
  user-select: none;
  text-shadow: 0 0 16px rgba(225, 29, 38, .4);
  animation: ascii-soft 9s ease-in-out infinite;
}
@keyframes ascii-soft {
  0%, 100% { opacity: .4; }
  50%      { opacity: .6; }
}
@keyframes ascii-breathe {
  0%, 100% { opacity: .74; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ascii-bg pre, .ascii-band pre { animation: none; }
}

/* --- banda dedicada: aqui las manos se ven enteras, sin nada encima --- */
.ascii-band {
  position: relative;
  margin: clamp(2.4rem, 5vw, 3.6rem) 0;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: radial-gradient(120% 150% at 50% 50%, rgba(225, 29, 38, .07), transparent 62%), #040508;
  padding: clamp(1.6rem, 4vw, 2.6rem) 0;
}
.ascii-band pre {
  margin: 0 auto;
  width: max-content;
  font-family: var(--mono);
  font-size: clamp(4.2px, .84vw, 12px);
  line-height: 1.1;
  letter-spacing: .05em;
  white-space: pre;
  color: var(--red);
  opacity: .88;
  user-select: none;
  text-shadow: 0 0 18px rgba(225, 29, 38, .5);
  animation: ascii-breathe 9s ease-in-out infinite;
}
.ascii-band .cap {
  text-align: center;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: clamp(1rem, 3vw, 1.8rem);
  padding: 0 1rem;
}

/* velo para que el texto siempre gane contraste */
.veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    /* oscurece la columna del texto sin tapar el centro donde casi se tocan */
    linear-gradient(100deg, rgba(5, 6, 10, .93) 0%, rgba(5, 6, 10, .74) 34%, rgba(5, 6, 10, .1) 56%, transparent 72%),
    linear-gradient(180deg, rgba(5, 6, 10, .6) 0%, transparent 22%, transparent 70%, var(--bg) 100%);
}
@media (max-width: 960px) {
  .veil { background: linear-gradient(180deg, rgba(5, 6, 10, .8) 0%, rgba(5, 6, 10, .55) 45%, var(--bg) 100%); }
  .ascii-bg pre { opacity: .5; }
}

/* =============================================================
   Navegacion
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 60;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: rgba(5, 6, 10, .72);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; gap: 1.6rem; }

.brand {
  display: flex; align-items: center; gap: .62rem;
  text-decoration: none; font-weight: 660; letter-spacing: -.03em;
  font-size: 1.16rem; margin-right: auto; white-space: nowrap;
}
.brand .mark {
  width: 27px; height: 27px; flex: none;
  border-radius: 7px;
  background: linear-gradient(140deg, var(--red), #7c0f14);
  display: grid; place-items: center;
  font-family: var(--mono); font-size: .66rem; font-weight: 700;
  letter-spacing: -.04em; color: #fff;
}
.brand span.fr { color: var(--red); }

.nav-links { display: flex; align-items: center; gap: .35rem; }
.nav-links a {
  text-decoration: none; color: var(--muted);
  font-size: .905rem; padding: .48rem .78rem; border-radius: 8px;
  transition: color .18s, background .18s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink); background: rgba(255, 255, 255, .05); }
.nav-links a.on { color: var(--ink); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line-2);
  color: var(--ink); border-radius: 8px; padding: .42rem .6rem;
  font-size: 1.05rem; cursor: pointer; line-height: 1;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; inset: var(--nav-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: .6rem 1.3rem 1.2rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem .4rem; font-size: 1rem; }
  .nav-links .btn { margin-top: .6rem; justify-content: center; }
}

/* =============================================================
   Botones
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .78rem 1.32rem;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: .93rem; font-weight: 560; letter-spacing: -.01em;
  text-decoration: none; cursor: pointer;
  font-family: inherit;
  transition: transform .16s, background .18s, border-color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-red {
  background: var(--red); color: #fff;
  box-shadow: 0 8px 26px -10px rgba(225, 29, 38, .8);
}
.btn-red:hover { background: var(--red-hi); }

.btn-ghost {
  border-color: var(--line-2); color: var(--ink);
  background: rgba(255, 255, 255, .035);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .3); }

.btn-block { width: 100%; justify-content: center; }

/* =============================================================
   Hero
   ============================================================= */
.hero {
  min-height: clamp(560px, 86vh, 820px);
  display: flex; align-items: center;
  padding-top: clamp(3rem, 7vw, 5rem);
  border-bottom: 1px solid var(--line);
}
.hero .wrap { position: relative; z-index: 2; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.hero h1 { margin-bottom: .55rem; }
.hero h1 em {
  font-style: normal;
  background: linear-gradient(96deg, var(--red) 12%, #ff7a80 92%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero .lead { font-size: 1.11rem; margin-bottom: 1.9rem; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .72rem; margin-bottom: 2rem; }

.hero-note {
  font-family: var(--mono); font-size: .74rem;
  color: var(--muted-2); letter-spacing: .04em;
  border-left: 2px solid var(--red);
  padding-left: .85rem; max-width: 44ch; line-height: 1.72;
}

/* ---------- video pequeño en tarjeta ---------- */
.video-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 30px 70px -34px rgba(0, 0, 0, .95);
}
.video-card .bar {
  display: flex; align-items: center; gap: .45rem;
  padding: .62rem .9rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .022);
}
.video-card .dot { width: 9px; height: 9px; border-radius: 50%; background: #2b303c; }
.video-card .dot:first-child { background: var(--red); }
.video-card .bar span {
  margin-left: auto; font-family: var(--mono);
  font-size: .68rem; color: var(--muted-2); letter-spacing: .06em;
}
.video-card video {
  width: 100%; aspect-ratio: 16 / 10; object-fit: cover;
  background: #000; display: block;
}
.video-card .cap {
  padding: .8rem .95rem; font-size: .82rem; color: var(--muted);
  border-top: 1px solid var(--line);
}
.video-fallback {
  aspect-ratio: 16 / 10; display: grid; place-items: center;
  color: var(--muted-2); font-family: var(--mono); font-size: .78rem;
  text-align: center; padding: 1.5rem; background: #000;
}

/* =============================================================
   Metricas
   ============================================================= */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--surface), rgba(14, 17, 24, .35));
  overflow: hidden;
}
.stats div { padding: 1.6rem 1.2rem; text-align: center; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats b {
  display: block; font-size: clamp(1.7rem, 3.4vw, 2.35rem);
  font-weight: 660; letter-spacing: -.04em; color: var(--ink);
  font-family: var(--mono);
}
.stats small {
  color: var(--muted); font-size: .785rem;
  letter-spacing: .01em; display: block; margin-top: .18rem;
}
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

/* =============================================================
   Tarjetas
   ============================================================= */
.grid { display: grid; gap: 1.05rem; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .g-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .g-2, .g-4 { grid-template-columns: 1fr; } }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.55rem 1.45rem;
  transition: border-color .2s, transform .2s, background .2s;
}
.card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.card h3 { margin-bottom: .45rem; }
.card p  { color: var(--muted); font-size: .915rem; margin: 0; }

.card .num {
  font-family: var(--mono); font-size: .72rem;
  color: var(--red); letter-spacing: .14em; display: block; margin-bottom: .9rem;
}

/* ---------- planes ---------- */
.plan { display: flex; flex-direction: column; }
.plan.destacado {
  border-color: rgba(225, 29, 38, .48);
  background: linear-gradient(180deg, var(--red-dim), var(--surface) 46%);
}
.plan .tag {
  position: absolute; top: -10px; right: 1.2rem;
  background: var(--red); color: #fff;
  font-family: var(--mono); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase;
  padding: .24rem .6rem; border-radius: 5px;
}
.plan ul { list-style: none; padding: 0; margin: 1.05rem 0 1.5rem; }
.plan li {
  position: relative; padding-left: 1.5rem;
  font-size: .89rem; color: var(--muted); margin-bottom: .5rem;
}
.plan li::before {
  content: ""; position: absolute; left: .28rem; top: .62em;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); opacity: .85;
}
.plan .btn { margin-top: auto; }

/* ---------- ecosistema / subdominios ---------- */
.eco {
  display: flex; flex-direction: column;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.5rem 1.4rem;
  transition: border-color .2s, transform .2s, background .2s;
}
.eco:hover {
  border-color: rgba(225, 29, 38, .5);
  transform: translateY(-3px);
  background: var(--surface-2);
}
.eco .dom {
  font-family: var(--mono); font-size: .715rem;
  color: var(--muted-2); letter-spacing: .04em; margin-bottom: .95rem;
  display: flex; align-items: center; gap: .4rem;
}
.eco .dom::before { content: "//"; color: var(--red); }
.eco h3 { margin-bottom: .38rem; }
.eco p { color: var(--muted); font-size: .89rem; margin: 0 0 1.1rem; }
.eco .go {
  margin-top: auto; font-size: .845rem; font-weight: 560;
  color: var(--ink); display: inline-flex; align-items: center; gap: .4rem;
}
.eco:hover .go { color: var(--red-hi); }
.eco .go::after { content: "→"; transition: transform .2s; }
.eco:hover .go::after { transform: translateX(4px); }

/* ---------- banda de financiamiento (FYAPE) ---------- */
.fyape {
  border: 1px solid rgba(225, 29, 38, .4);
  border-radius: var(--r);
  background:
    radial-gradient(120% 160% at 8% 0%, rgba(225, 29, 38, .2), transparent 62%),
    var(--surface);
  padding: clamp(1.9rem, 4vw, 2.9rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2rem; align-items: center;
}
@media (max-width: 800px) { .fyape { grid-template-columns: 1fr; } }
.fyape h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); margin-bottom: .5rem; }
.fyape p  { color: var(--muted); margin: 0; max-width: 56ch; }
.fyape .pct {
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(2.6rem, 6vw, 3.6rem);
  color: var(--red); letter-spacing: -.05em; line-height: 1;
}

/* =============================================================
   Formularios / paginas de cuenta
   ============================================================= */
.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: grid; place-items: center;
  padding: 3rem 0;
  position: relative;
}
.auth-box {
  position: relative; z-index: 2;
  width: min(100% - 2.6rem, 452px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(1.7rem, 4vw, 2.4rem);
  box-shadow: 0 34px 80px -40px #000;
}
.auth-box h1 { font-size: 1.72rem; margin-bottom: .35rem; letter-spacing: -.03em; }
.auth-box > p { color: var(--muted); font-size: .92rem; margin-bottom: 1.6rem; }

.field { margin-bottom: 1.05rem; }
.field label {
  display: block; font-size: .805rem; font-weight: 560;
  margin-bottom: .38rem; color: var(--ink);
}
.field input, .field textarea, .field select {
  width: 100%; padding: .74rem .88rem;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-s);
  color: var(--ink); font: inherit; font-size: .93rem;
  transition: border-color .16s, box-shadow .16s;
}
.field textarea { resize: vertical; min-height: 140px; line-height: 1.6; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-dim);
}
.field .hint { font-size: .765rem; color: var(--muted-2); margin-top: .32rem; }

/* casilla de consentimiento */
.consent {
  display: flex; gap: .7rem; align-items: flex-start;
  margin-top: 1.2rem; padding: .9rem 1rem;
  border: 1px solid var(--line-2); border-radius: var(--r-s);
  background: rgba(255, 255, 255, .022);
  cursor: pointer;
}
.consent input {
  flex: none; width: 17px; height: 17px; margin-top: .18rem;
  accent-color: var(--red); cursor: pointer;
}
.consent span { font-size: .795rem; line-height: 1.55; color: var(--muted); }
.consent:has(input:checked) { border-color: rgba(225, 29, 38, .45); }

/* precios */
.precios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 560px) { .precios { grid-template-columns: 1fr; } }
.precio {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); padding: 1.5rem 1.4rem;
  display: flex; flex-direction: column;
}
.precio.destacado {
  border-color: rgba(225, 29, 38, .48);
  background: linear-gradient(180deg, var(--red-dim), var(--surface) 46%);
}
.precio .tag {
  position: absolute; top: -10px; right: 1.2rem;
  background: var(--red); color: #fff; font-family: var(--mono);
  font-size: .64rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .24rem .6rem; border-radius: 5px;
}
.precio h4 {
  font-family: var(--mono); font-size: .72rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted-2); margin: 0 0 .7rem; font-weight: 500;
}
.precio .monto {
  font-size: clamp(1.9rem, 4.4vw, 2.5rem); font-weight: 660;
  letter-spacing: -.04em; line-height: 1; margin-bottom: .35rem;
}
.precio .nota { font-size: .8rem; color: var(--muted); margin-bottom: 1.2rem; }
.precio ul { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.precio li {
  position: relative; padding-left: 1.4rem;
  font-size: .865rem; color: var(--muted); margin-bottom: .45rem;
}
.precio li::before {
  content: ""; position: absolute; left: .25rem; top: .6em;
  width: 5px; height: 5px; border-radius: 50%; background: var(--red);
}
.precio .btn { margin-top: auto; }

/* logo de Fya */
.fya-logo { height: 40px; width: auto; margin-bottom: 1rem; }

/* adjuntos del articulo */
.adjuntos { display: grid; gap: .6rem; margin: 1.8rem 0; }
.adj {
  display: flex; align-items: center; gap: .9rem;
  padding: .85rem 1rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--r-s);
  background: var(--surface); transition: border-color .18s, background .18s;
}
.adj:hover { border-color: var(--line-2); background: var(--surface-2); }
.adj .ext {
  flex: none; width: 44px; text-align: center;
  font-family: var(--mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .04em; color: var(--red);
  border: 1px solid rgba(225, 29, 38, .38); border-radius: 5px; padding: .28rem 0;
}
.adj .txt { min-width: 0; flex: 1; }
.adj .txt b { display: block; font-size: .9rem; font-weight: 560; }
.adj .txt small { color: var(--muted-2); font-size: .76rem; font-family: var(--mono); }
.adj .go { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.adj.bloqueado { opacity: .55; cursor: not-allowed; }

.alert {
  border-radius: var(--r-s); padding: .78rem .95rem;
  font-size: .875rem; margin-bottom: 1.15rem;
  border: 1px solid;
}
.alert-err { background: rgba(225, 29, 38, .1);  border-color: rgba(225, 29, 38, .45); color: #ffb3b6; }
.alert-ok  { background: rgba(34, 197, 94, .1);  border-color: rgba(34, 197, 94, .42); color: #86efac; }
.alert-info{ background: rgba(142, 155, 230, .1);border-color: rgba(142, 155, 230, .42); color: #c3cbf5; }

.auth-alt {
  margin-top: 1.35rem; padding-top: 1.35rem;
  border-top: 1px solid var(--line);
  font-size: .875rem; color: var(--muted); text-align: center;
}
.auth-alt a { color: var(--red-hi); text-decoration: none; font-weight: 560; }
.auth-alt a:hover { text-decoration: underline; }

/* =============================================================
   Articulos
   ============================================================= */
.art-list { display: grid; gap: 1rem; }

.art-card {
  display: block; text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.5rem 1.5rem;
  transition: border-color .2s, transform .2s;
}
.art-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.art-meta {
  font-family: var(--mono); font-size: .715rem;
  color: var(--muted-2); letter-spacing: .05em;
  display: flex; flex-wrap: wrap; gap: .55rem; align-items: center;
  margin-bottom: .7rem;
}
.art-meta .cat { color: var(--red); }
.art-card h3 { font-size: 1.28rem; margin-bottom: .45rem; }
.art-card p { color: var(--muted); font-size: .925rem; margin: 0; }

.lock {
  display: inline-flex; align-items: center; gap: .38rem;
  font-family: var(--mono); font-size: .68rem;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--red); border: 1px solid rgba(225, 29, 38, .4);
  border-radius: 5px; padding: .16rem .48rem;
}

.prose { max-width: 74ch; }
.prose h2 { font-size: 1.5rem; margin: 2.2rem 0 .7rem; }
.prose h3 { font-size: 1.16rem; margin: 1.7rem 0 .55rem; }
.prose p, .prose li { color: #cfd5e2; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .4rem; }
.prose a { color: var(--red-hi); }
.prose blockquote {
  margin: 1.5rem 0; padding: .3rem 0 .3rem 1.2rem;
  border-left: 2px solid var(--red); color: var(--muted); font-style: italic;
}
.prose code {
  font-family: var(--mono); font-size: .88em;
  background: var(--surface-2); padding: .12em .4em; border-radius: 4px;
}
.prose pre {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-s); padding: 1rem; overflow-x: auto;
}
.prose img { border-radius: var(--r-s); margin: 1.4rem 0; }

.paywall {
  margin-top: 2rem;
  border: 1px solid rgba(225, 29, 38, .38);
  border-radius: var(--r);
  background: radial-gradient(120% 140% at 10% 0%, rgba(225, 29, 38, .16), transparent 60%), var(--surface);
  padding: 2rem 1.8rem; text-align: center;
}
.paywall h3 { font-size: 1.3rem; }
.paywall p { color: var(--muted); max-width: 46ch; margin: 0 auto 1.4rem; }

/* =============================================================
   Tablas (panel admin)
   ============================================================= */
.table-wrap {
  border: 1px solid var(--line); border-radius: var(--r);
  overflow: auto; background: var(--surface);
}
table { width: 100%; border-collapse: collapse; font-size: .89rem; }
th, td { padding: .8rem .95rem; text-align: left; border-bottom: 1px solid var(--line); }
th {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted-2); font-weight: 500;
  background: rgba(255, 255, 255, .022);
}
tr:last-child td { border-bottom: 0; }
td a { color: var(--ink); }

.pill {
  font-family: var(--mono); font-size: .68rem;
  padding: .16rem .5rem; border-radius: 5px;
  border: 1px solid var(--line-2); color: var(--muted);
}
.pill.pub { color: #86efac; border-color: rgba(34, 197, 94, .42); }
.pill.bor { color: #fcd34d; border-color: rgba(252, 211, 77, .42); }

.admin-head {
  display: flex; flex-wrap: wrap; gap: 1rem;
  align-items: center; justify-content: space-between;
  margin-bottom: 1.8rem;
}

/* =============================================================
   Contacto
   ============================================================= */
.contact-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.05rem;
}
@media (max-width: 800px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-grid .card strong { display: block; font-size: 1.02rem; margin-bottom: .25rem; }
.contact-grid .card a { color: var(--muted); text-decoration: none; font-size: .92rem; }
.contact-grid .card a:hover { color: var(--red-hi); }

/* =============================================================
   Pie
   ============================================================= */
.foot {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 3.2rem 0 2.2rem;
  font-size: .885rem;
}
.foot-grid {
  display: grid; grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 2rem; margin-bottom: 2.6rem;
}
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }
.foot h4 {
  font-family: var(--mono); font-size: .7rem;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 500; margin-bottom: .9rem;
}
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin-bottom: .5rem; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--ink); }
.foot .bottom {
  border-top: 1px solid var(--line); padding-top: 1.5rem;
  display: flex; flex-wrap: wrap; gap: 1rem;
  justify-content: space-between; color: var(--muted-2); font-size: .805rem;
}

/* =============================================================
   WhatsApp flotante
   ============================================================= */
.wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 70;
  width: 52px; height: 52px; border-radius: 50%;
  background: #25d366; display: grid; place-items: center;
  box-shadow: 0 10px 30px -8px rgba(37, 211, 102, .6);
  transition: transform .18s;
}
.wa:hover { transform: scale(1.08); }
.wa svg { width: 27px; height: 27px; fill: #fff; }

/* =============================================================
   Reveal on scroll
   ============================================================= */
/* El contenido es visible por defecto. Solo se esconde para animarlo cuando
   sabemos que el JavaScript esta vivo (la clase .js la pone head.php).
   Si el script falla, la pagina se ve entera igual: nunca en blanco. */
.rv { opacity: 1; transform: none; }

.js .rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; transform: none; transition: none; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
