/* Crazi University · guías gratis (04-12-2026). Tokens de pronto/ (estilo de Crazi Tracker): fondo #07070a, violeta #7652ff,
   Inter 800. Pensado para el navegador de Instagram en el móvil; en escritorio solo se centra. */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("/guias/fuentes/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("/guias/fuentes/inter-600.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 800; font-display: swap; src: url("/guias/fuentes/inter-800.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --fondo: #07070a;
  --superficie: #101016;
  --superficie-2: #16161e;
  --campo: #0b0b10;
  --linea: #1f1f29;
  --linea-2: #2a2a36;
  --texto: #ededf0;
  --texto-2: #a8a8b3;
  --texto-3: #878793;
  --acento: #7652ff;
  --acento-hover: #6a46f5;
  --acento-texto: #9a80ff;
  --acento-rgb: 118, 82, 255;
  --bien: #3ddc97;
  --bien-rgb: 61, 220, 151;
  --error: #ff6b81;
  --titulo-degradado: linear-gradient(180deg, #ffffff 30%, #b7a6ff 120%);
  --halo: 0.24;
  --sombra-portada: 0 30px 60px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --foco: 0 0 0 3px rgba(118, 82, 255, 0.5);
  --letra: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --curva: cubic-bezier(0.23, 1, 0.32, 1);
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --fondo: #f6f6f9;
    --superficie: #ffffff;
    --superficie-2: #f0eff6;
    --campo: #f6f6f9;
    --linea: #e4e4ec;
    --linea-2: #d3d3de;
    --texto: #15151d;
    --texto-2: #4b4b59;
    --texto-3: #5f5f6b;
    --acento-texto: #5b3dff;
    --bien: #0f9d63;
    --bien-rgb: 15, 157, 99;
    --error: #d12a45;
    --titulo-degradado: linear-gradient(180deg, #15151d 30%, #5b3dff 120%);
    --halo: 0.14;
    --sombra-portada: 0 24px 50px -22px rgba(30, 20, 80, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.06);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(42rem 26rem at 50% -6rem, rgba(var(--acento-rgb), var(--halo)), transparent 70%), var(--fondo);
  color: var(--texto);
  font: 400 16px/1.5 var(--letra);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--acento-texto); }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.envoltura { width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px; }
.envoltura.ancha { max-width: 960px; }

/* Cabecera con la marca */
.cabecera { padding: 18px 0 6px; }
.marca { display: inline-flex; align-items: center; gap: 10px; color: var(--texto); text-decoration: none; font-weight: 800; font-size: 17px; letter-spacing: -0.03em; }
.marca img { width: auto; height: 28px; display: block; }
.marca span { color: var(--acento-texto); }

main { flex: 1; }

/* Portada de la guía */
.portada {
  position: relative;
  width: min(40vw, 190px);
  margin: 14px auto 0;
  aspect-ratio: 9 / 16;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--sombra-portada);
  transform: rotate(-2.5deg);
  background: var(--superficie-2);
}
.portada::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.portada img { width: 100%; height: 100%; object-fit: cover; }
.halo-portada { position: relative; }
.halo-portada::before {
  content: ""; position: absolute; left: 50%; top: 52%; width: 240px; height: 240px; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(var(--acento-rgb), 0.45), transparent); filter: blur(10px); z-index: -1;
}

.pildora {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 5px 12px;
  border: 1px solid var(--linea-2); border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--texto-2);
}
.pildora::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 4px rgba(var(--acento-rgb), 0.18); }

h1.palabra {
  margin: 12px 0 0;
  font-weight: 800;
  font-size: clamp(42px, 13vw, 64px);
  line-height: 0.95;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
  letter-spacing: -0.05em;
  background: var(--titulo-degradado);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  overflow-wrap: anywhere;
}
.titulo { margin: 12px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; }
.titulo mark, .tarjeta-guia mark { background: none; color: var(--acento-texto); }
.subtitulo { margin: 6px 0 0; color: var(--texto-2); font-size: 15px; }

/* Caja del formulario y del «Ya tienes este PDF» */
.caja {
  margin-top: 22px;
  padding: 22px 18px;
  background: linear-gradient(180deg, rgba(var(--acento-rgb), 0.07), transparent 60%), var(--superficie);
  border: 1px solid var(--linea-2);
  border-radius: 22px;
}
.caja label.etiqueta { display: block; font-weight: 600; font-size: 15px; color: var(--texto-2); margin-bottom: 10px; }
.campo {
  width: 100%; height: 54px; padding: 0 18px;
  border: 1px solid var(--linea-2); border-radius: 16px; background: var(--campo);
  color: var(--texto); font: 400 17px var(--letra); /* 17px: iOS no hace zoom al tocar */
  transition: border-color 160ms var(--curva), box-shadow 160ms var(--curva);
}
.campo::placeholder { color: var(--texto-3); }
.campo:focus { outline: none; border-color: var(--acento); box-shadow: var(--foco); }
.campo[aria-invalid="true"] { border-color: var(--error); }
.error { margin: 8px 2px 0; color: var(--error); font-size: 14px; font-weight: 600; }

.boton {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 56px; margin-top: 14px; padding: 0 20px;
  border: 0; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, #8a6bff, var(--acento));
  box-shadow: 0 10px 30px -10px rgba(var(--acento-rgb), 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #fff; font: 800 17px var(--letra); letter-spacing: -0.01em; text-decoration: none;
  transition: transform 160ms var(--curva), filter 160ms var(--curva);
  -webkit-tap-highlight-color: transparent;
}
.boton:hover { filter: brightness(1.06); }
.boton:active { transform: scale(0.98); }
.boton:focus-visible { outline: none; box-shadow: var(--foco); }
.boton[disabled] { opacity: 0.7; cursor: progress; }
.boton svg { width: 20px; height: 20px; flex: none; }

.casilla { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-size: 14.5px; color: var(--texto-2); cursor: pointer; }
.casilla input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--linea-2); border-radius: 7px; background: var(--campo); display: grid; place-content: center; cursor: pointer; }
.casilla input:checked { background: var(--acento); border-color: var(--acento); }
.casilla input:checked::after { content: ""; width: 10px; height: 6px; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.casilla input:focus-visible { box-shadow: var(--foco); outline: none; }
.letra-pequena { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--texto-3); }
.letra-pequena a { color: var(--texto-2); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.hecho-cabeza { display: flex; align-items: center; gap: 14px; }
.check { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(var(--bien-rgb), 0.14); color: var(--bien); }
.check svg { width: 22px; height: 22px; }
.hecho-cabeza h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.hecho-texto { margin: 14px 0 0; color: var(--texto-2); font-size: 15.5px; overflow-wrap: anywhere; }
.hecho-texto b { color: var(--texto); }
.nota { margin: 14px 0 0; color: var(--texto-3); font-size: 14.5px; }
.enlace-boton { background: none; border: 0; padding: 0; font: inherit; color: var(--texto-2); text-decoration: underline; cursor: pointer; }

/* Siguiente paso */
.siguiente { margin-top: 16px; padding: 22px 18px; border-radius: 22px; border: 1px solid rgba(var(--acento-rgb), 0.35); background: radial-gradient(28rem 12rem at 100% 0, rgba(var(--acento-rgb), 0.18), transparent 70%), var(--superficie); }
.siguiente .etiqueta-mayus { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--acento-texto); }
.siguiente h3 { margin: 8px 0 0; font-size: 20px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.siguiente p { margin: 8px 0 0; color: var(--texto-2); font-size: 15px; }
.boton.secundario { background: transparent; border: 1.5px solid rgba(var(--acento-rgb), 0.55); box-shadow: none; color: var(--texto); }

/* Más guías e índice */
.seccion-titulo { margin: 40px 0 14px; font-size: 13px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texto-3); }
.rejilla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 640px) { .rejilla { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 880px) { .rejilla.indice { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tarjeta-guia { position: relative; display: flex; flex-direction: column; gap: 10px; color: var(--texto); text-decoration: none; padding: 10px 10px 14px; border-radius: 18px; background: var(--superficie); border: 1px solid var(--linea); transition: transform 160ms var(--curva), border-color 160ms var(--curva); }
.tarjeta-guia:hover { border-color: rgba(var(--acento-rgb), 0.5); }
.tarjeta-guia:active { transform: scale(0.98); }
.tarjeta-guia .mini { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--superficie-2); }
.tarjeta-guia .mini img { width: 100%; height: 100%; object-fit: cover; }
.tarjeta-guia b { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; padding: 0 4px; }
.tarjeta-guia small { font-size: 13px; line-height: 1.35; color: var(--texto-2); padding: 0 4px; }
.tarjeta-guia .ya { position: absolute; bottom: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; background: rgba(7, 7, 10, 0.75); color: var(--bien); font-size: 11.5px; font-weight: 800; backdrop-filter: blur(6px); }
.tarjeta-guia .nueva { position: absolute; top: 8px; left: 8px; padding: 3px 9px; border-radius: 999px; background: var(--acento); color: #fff; font-size: 11.5px; font-weight: 800; }

.indice-cabeza h1 { margin: 26px 0 0; font-weight: 800; font-size: clamp(40px, 12vw, 64px); line-height: 0.98; letter-spacing: -0.05em; background: var(--titulo-degradado); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.indice-cabeza p { margin: 12px 0 0; color: var(--texto-2); max-width: 36ch; }
.buscador { position: relative; margin: 22px 0 18px; }
.buscador svg { position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--texto-3); pointer-events: none; }
.buscador .campo { padding-left: 44px; }
.vacio { color: var(--texto-3); text-align: center; padding: 24px 0; }

/* Pie */
.pie { padding: 40px 16px 32px; text-align: center; font-size: 13px; color: var(--texto-3); }
.pie nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 8px; }
.pie a { color: var(--texto-3); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .portada { transform: none; } }

/* Indicador (RANGO): pasos y código */
.pasos { margin: 18px 0 0; padding-left: 22px; display: grid; gap: 10px; color: var(--texto-2); font-size: 15px; }
.pasos li::marker { color: var(--acento-texto); font-weight: 800; }
.pasos b { color: var(--texto); }
.codigo { margin-top: 16px; border: 1px solid var(--linea-2); border-radius: 14px; background: var(--campo); }
.codigo summary { cursor: pointer; padding: 12px 14px; font-weight: 600; font-size: 14.5px; color: var(--texto-2); }
.codigo pre { margin: 0; padding: 0 14px 14px; max-height: 360px; overflow: auto; font: 12px/1.5 ui-monospace, "SF Mono", Menlo, monospace; color: var(--texto-2); white-space: pre; }
