/*
 * Hoja de estilos de catchybox.com (landing y páginas legales).
 *
 * Tokens: docs/sprint-web/UX-EXTRACTO.md (claro por defecto, oscuro con prefers-color-scheme).
 * Fuente: Inter variable con eje opsz (Inter Display sale sola en tamaños grandes), autoalojada
 * en /fonts. Licencia SIL OFL 1.1 en /fonts/LICENSE-Inter.txt.
 * Íconos: Lucide (licencia ISC), trazos copiados de lucide-react 1.51 en un sprite inline por página.
 *
 * Decisiones de accesibilidad (AA) que se apartan de un uso literal de los tokens:
 * - El botón primario lleva texto tinta sobre coral (5.1:1). El blanco sobre #E85D2C da 3.5:1
 *   y no pasa AA en 15 px. Por eso el hover aclara el coral en vez de oscurecerlo.
 * - ink-tertiary (#9A9588 claro, #6E6759 oscuro) no llega a 4.5:1 sobre el fondo: solo se usa
 *   en separadores y decoración, nunca en texto.
 * - El coral como texto sobre crema da 3.3:1: los enlaces van en tinta con subrayado coral.
 */

/* ===== Fuente ===== */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-opsz-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304,
    U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Tokens ===== */
:root {
  color-scheme: light dark;

  --bg-1: #fbf8f4;
  --bg-2: #f4f0e8;
  --bg-3: #e9e3d5;
  --ink-1: #1a1814;
  --ink-2: #5c574f;
  --ink-3: #9a9588;
  --accent: #e85d2c;
  --accent-hi: #eb754c;
  --on-accent: #1a1814;
  --success: #4f8f5c;
  --line: rgba(26, 24, 20, 0.12);

  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.1);

  --r-chip: 4px;
  --r-btn: 8px;
  --r-card: 12px;
  --r-sheet: 16px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --page: 1120px;
  --header-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-1: #14110d;
    --bg-2: #1f1b16;
    --bg-3: #2d2820;
    --ink-1: #f4f0e8;
    --ink-2: #b8b0a0;
    --ink-3: #6e6759;
    --accent: #ff7548;
    --accent-hi: #ff8a63;
    --on-accent: #14110d;
    --success: #6fad7d;
    --line: rgba(244, 240, 232, 0.12);
    /* En oscuro, brillo sutil con el acento al 5% en vez de sombra. */
    --shadow-md: 0 0 0 1px rgba(255, 117, 72, 0.05), 0 4px 12px rgba(255, 117, 72, 0.05);
    --shadow-lg: 0 0 0 1px rgba(255, 117, 72, 0.05), 0 12px 32px rgba(255, 117, 72, 0.05);
  }
}

/* Colores de categoría (SYSTEM_CATEGORIES de packages/shared/src/taxonomy.ts). Nunca son la
   única señal: siempre van con ícono y etiqueta. */
.fam-screen,
.c-anime { --c: #b0589b; }
.fam-media { --c: #8c6b3d; }
.fam-world,
.c-restaurant { --c: #4f8f5c; }
.c-recipe { --c: #c28a3d; }
.c-movie { --c: #e85d2c; }
.fam-tech { --c: #3d6b8c; }
.c-ai { --c: #7a4fb0; }
.fam-learn,
.c-tutorial { --c: #2f8f83; }
.fam-business,
.c-business { --c: #a07a1f; }
.fam-life { --c: #c25a6e; }

@media (prefers-color-scheme: dark) {
  .fam-screen,
  .c-anime { --c: #d77bc1; }
  .fam-media { --c: #b58a56; }
  .fam-world,
  .c-restaurant { --c: #6fad7d; }
  .c-recipe { --c: #e5ab58; }
  .c-movie { --c: #ff7548; }
  .fam-tech { --c: #6a9cc0; }
  .c-ai { --c: #a57fe0; }
  .fam-learn,
  .c-tutorial { --c: #5bb8ab; }
  .fam-business,
  .c-business { --c: #d4a73f; }
  .fam-life { --c: #e58599; }
}

/* ===== Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg-1);
  color: var(--ink-1);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  color: var(--ink-1);
  text-wrap: balance;
}

h1 {
  font-size: 34px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.005em;
}

p {
  text-wrap: pretty;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: rgba(232, 93, 44, 0.25);
}

[id] {
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.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;
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 16px;
  border-radius: var(--r-btn);
  background: var(--ink-1);
  color: var(--bg-1);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* Un solo ancho exterior por página: todo el contenido vive dentro de .wrap. */
.wrap {
  width: 100%;
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 1024px) {
  .wrap {
    padding-inline: 32px;
  }
}

/* ===== Botones (regla de Yamil: rol + ícono, una sola voz tipográfica) ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-btn);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 120ms var(--ease),
    border-color 120ms var(--ease),
    color 120ms var(--ease),
    box-shadow 120ms var(--ease),
    transform 120ms var(--ease);
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-lg {
  min-height: 48px;
  padding: 0 20px;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hi);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-secondary {
  background: transparent;
  border-color: var(--ink-2);
  color: var(--ink-1);
}

.btn-secondary:hover {
  background: var(--bg-2);
  border-color: var(--ink-1);
}

.btn-secondary:active {
  transform: translateY(1px);
}

.btn-tertiary {
  padding-inline: 8px;
  color: var(--ink-1);
  text-underline-offset: 4px;
}

.btn-tertiary:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===== Encabezado ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

.wordmark {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink-1);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark span {
  color: var(--accent);
}

.header-nav {
  display: none;
  gap: 24px;
  margin-inline-start: 16px;
}

.header-nav a {
  color: var(--ink-2);
  font-weight: 500;
  text-decoration: none;
  padding-block: 8px;
}

.header-nav a:hover {
  color: var(--ink-1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.only-narrow {
  display: inline;
}

.only-wide,
.header-signin {
  display: none;
}

@media (min-width: 640px) {
  .only-narrow {
    display: none;
  }

  .only-wide {
    display: inline;
  }

  .header-signin {
    display: inline-flex;
  }
}

@media (min-width: 1024px) {
  .header-nav {
    display: flex;
  }
}

/* ===== Secciones ===== */
.section {
  padding-block: 48px;
}

@media (min-width: 1024px) {
  .section {
    padding-block: 64px;
  }
}

.section-head {
  max-width: 62ch;
  margin-bottom: 32px;
}

.section-head h2 {
  margin: 0 0 12px;
}

.section-head p {
  margin: 0;
  color: var(--ink-2);
  font-size: 17px;
}

.lede {
  font-size: 17px;
  color: var(--ink-2);
}

.fineprint {
  font-size: 13px;
  color: var(--ink-2);
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

/* Dos columnas: texto y figura. */
.split {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 1024px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
  }

  .split-reverse > :first-child {
    order: 2;
  }
}

.split h2 {
  margin: 0 0 12px;
}

.split .lede {
  margin: 0 0 24px;
}

.checks {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 12px;
}

.checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.checks .icon {
  margin-top: 2px;
  color: var(--success);
}

.note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
  padding: 12px 16px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  font-size: 13px;
  color: var(--ink-2);
}

.note .icon {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--ink-1);
}

/* ===== Hero ===== */
.hero {
  padding-block: 40px 48px;
}

@media (min-width: 1024px) {
  .hero {
    padding-block: 64px;
  }
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr);
    gap: 56px;
  }
}

.hero h1 {
  margin: 0 0 16px;
}

.hero .lede {
  margin: 0 0 24px;
  max-width: 52ch;
}

.hero .fineprint {
  margin: 16px 0 0;
}

/* ===== Figuras del producto (decorativas, role="img" con descripción) ===== */
.mock {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sheet);
  box-shadow: var(--shadow-lg);
  padding: 16px;
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.mock-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 140px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  background: var(--bg-1);
  color: var(--ink-2);
  font-size: 13px;
}

.mock-search .icon {
  width: 16px;
  height: 16px;
}

.mock-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
}

.mock-chip.is-on {
  background: var(--ink-1);
  border-color: var(--ink-1);
  color: var(--bg-1);
}

.mock-grid {
  columns: 2;
  column-gap: 12px;
}

@media (min-width: 640px) {
  .mock-grid {
    columns: 3;
  }
}

.mock-card {
  break-inside: avoid;
  margin-bottom: 12px;
  padding: 8px 8px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-md);
}

@media (max-width: 639px) {
  .mock-card.hide-narrow {
    display: none;
  }
}

.thumb {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background:
    radial-gradient(120% 90% at 20% 10%, rgba(255, 255, 255, 0.35), transparent 60%),
    var(--c);
  color: #fff;
  margin-bottom: 8px;
}

.thumb.poster {
  aspect-ratio: 2 / 3;
}

.thumb.wide {
  aspect-ratio: 4 / 3;
}

/* En móvil la figura del hero va debajo del texto: miniaturas más bajas para no empujar
   tanto el resto de la página. */
@media (max-width: 639px) {
  .mock-grid .thumb {
    aspect-ratio: 4 / 3;
  }

  .mock-grid .thumb.poster {
    aspect-ratio: 3 / 4;
  }
}

.thumb .icon {
  width: 32px;
  height: 32px;
  stroke-width: 1.75;
  opacity: 0.95;
}

.thumb-tag {
  position: absolute;
  inset-block-start: 8px;
  inset-inline-end: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(20, 17, 13, 0.72);
  color: #fbf8f4;
  font-size: 11px;
  font-weight: 600;
}

.thumb-tag .icon {
  width: 12px;
  height: 12px;
}

.mock-title {
  margin: 0 4px 2px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink-1);
}

.mock-sub {
  margin: 0 4px 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-2);
}

.mock-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 4px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px 2px 6px;
  border-radius: var(--r-chip);
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-1);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.badge .icon {
  width: 12px;
  height: 12px;
  color: var(--c);
  stroke-width: 2.25;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-3);
  color: var(--ink-1);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.5;
}

.pill .icon {
  width: 12px;
  height: 12px;
  color: var(--success);
  stroke-width: 2.5;
}

.mock-action {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 4px 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-1);
}

.mock-action .icon {
  width: 12px;
  height: 12px;
}

/* ===== Cómo funciona ===== */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

@media (min-width: 1024px) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.step {
  padding: 24px;
}

.step-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tile {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-card);
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--ink-1);
}

.tile .icon {
  width: 22px;
  height: 22px;
}

.step-num {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
}

.step h3 {
  margin: 0 0 8px;
}

.step p:last-child {
  margin: 0;
  color: var(--ink-2);
}

/* ===== Familias de la taxonomía ===== */
.families {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .families {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .families {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }

  .families .span-2 {
    grid-column: span 2;
  }
}

.family {
  padding: 24px;
}

.family-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.family-top h3 {
  margin: 0;
}

.family .tile {
  background: var(--c);
  border-color: transparent;
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .family .tile {
    color: #14110d;
  }
}

.family p {
  margin: 0 0 16px;
  color: var(--ink-2);
}

.types {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.types li {
  padding: 4px 8px;
  border-radius: var(--r-chip);
  background: var(--bg-1);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

/* ===== Figura de investigación ===== */
.detail {
  padding: 20px;
}

.detail-head {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.detail-head .thumb {
  width: 72px;
  margin: 0;
  flex: none;
}

.detail-head .thumb .icon {
  width: 28px;
  height: 28px;
}

.detail-title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
}

.detail-sub {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

.facts {
  margin: 0 0 16px;
  display: grid;
  gap: 8px;
}

.fact {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-btn);
  font-size: 13px;
}

.fact dt {
  color: var(--ink-2);
}

.fact dd {
  margin: 0;
  color: var(--ink-1);
}

.cite {
  display: inline-grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  margin-inline-start: 4px;
  padding: 0 4px;
  border-radius: var(--r-chip);
  background: var(--bg-3);
  color: var(--ink-1);
  font-size: 11px;
  font-weight: 700;
  vertical-align: 1px;
}

.found {
  margin: 0 0 16px;
  padding: 12px;
  border-radius: var(--r-btn);
  background: var(--bg-3);
  font-size: 13px;
  color: var(--ink-1);
}

.sources-title {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
}

.sources {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--ink-2);
}

.sources li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sources .icon {
  width: 14px;
  height: 14px;
}

/* ===== Figura de box compartido ===== */
.box-figure {
  padding: 20px;
}

.mosaic {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.mosaic .thumb {
  margin: 0;
  aspect-ratio: 4 / 3;
}

.box-name {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 500;
}

.box-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ink-2);
}

.avatars {
  display: inline-flex;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid var(--bg-2);
  background: var(--bg-3);
  color: var(--ink-1);
  font-size: 11px;
  font-weight: 700;
}

.avatar + .avatar {
  margin-inline-start: -8px;
}

.activity {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px;
  border-radius: var(--r-btn);
  background: var(--bg-1);
  border: 1px solid var(--line);
  font-size: 13px;
}

.activity .icon {
  width: 16px;
  height: 16px;
  color: var(--ink-2);
}

/* ===== Figura del bot de Telegram ===== */
.chat {
  padding: 20px;
  display: grid;
  gap: 12px;
}

.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.chat-head .tile {
  width: 36px;
  height: 36px;
}

.chat-name {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.chat-status {
  margin: 0;
  font-size: 13px;
  color: var(--ink-2);
}

.bubble {
  max-width: 85%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13px;
  line-height: 1.45;
}

.bubble.me {
  justify-self: end;
  background: var(--ink-1);
  color: var(--bg-1);
  border-end-end-radius: 4px;
}

.bubble.bot {
  justify-self: start;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-end-start-radius: 4px;
}

.bubble-media {
  display: grid;
  grid-template-columns: repeat(2, 48px);
  gap: 4px;
  margin-bottom: 6px;
}

.bubble-media span {
  display: block;
  height: 48px;
  border-radius: 6px;
  background: var(--c);
}

/* ===== Planes ===== */
.plans {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .plans {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.plan {
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.plan.is-featured {
  border: 2px solid var(--accent);
  background: var(--bg-1);
  box-shadow: var(--shadow-lg);
}

.plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.plan h3 {
  margin: 0;
}

.plan-flag {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}

.plan-for {
  margin: 0 0 16px;
  color: var(--ink-2);
}

.price {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price strong {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.price span {
  color: var(--ink-2);
}

.price-alt {
  margin: 4px 0 20px;
  font-size: 13px;
  color: var(--ink-2);
}

.plan .checks {
  margin-bottom: 24px;
  flex: 1;
  align-content: start;
}

.plan .btn {
  width: 100%;
}

.plans-notes {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

@media (min-width: 1024px) {
  .plans-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ===== Privacidad ===== */
.promises {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .promises {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .promises {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
  }
}

.promise {
  padding: 24px;
}

.promise .tile {
  margin-bottom: 16px;
}

.promise h3 {
  margin: 0 0 8px;
  font-size: 17px;
}

.promise p {
  margin: 0;
  color: var(--ink-2);
}

/* ===== Preguntas frecuentes ===== */
.faq {
  max-width: 76ch;
  display: grid;
  gap: 8px;
}

.faq details {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 20px;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  border-radius: var(--r-card);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary .icon {
  color: var(--ink-2);
  transition: transform 200ms var(--ease);
}

.faq details[open] summary .icon {
  transform: rotate(180deg);
}

.faq details > div {
  padding: 0 20px 16px;
  color: var(--ink-2);
}

.faq details > div p {
  margin: 0 0 12px;
  max-width: 62ch;
}

.faq details > div p:last-child {
  margin-bottom: 0;
}

/* ===== Llamado final ===== */
.closing {
  display: grid;
  gap: 24px;
  padding: 40px 24px;
  text-align: center;
  justify-items: center;
}

@media (min-width: 1024px) {
  .closing {
    padding: 64px;
  }
}

.closing h2 {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.closing p {
  margin: 0;
  max-width: 52ch;
  color: var(--ink-2);
  font-size: 17px;
}

.closing .actions {
  justify-content: center;
}

/* ===== Pie ===== */
.site-footer {
  margin-top: 48px;
  padding-block: 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}

.footer-inner {
  display: grid;
  gap: 24px;
}

@media (min-width: 1024px) {
  .footer-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}

.footer-brand p {
  margin: 8px 0 0;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}

.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  color: var(--ink-1);
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.footer-nav .icon {
  width: 16px;
  height: 16px;
}

.footer-legal {
  margin: 0;
}

@media (min-width: 1024px) {
  .footer-legal {
    grid-column: 1 / -1;
  }
}

/* ===== Páginas legales ===== */
.legal-grid {
  display: grid;
  gap: 32px;
  padding-block: 40px 16px;
}

@media (min-width: 1024px) {
  .legal-grid {
    grid-template-columns: 232px minmax(0, 62ch);
    gap: 64px;
    padding-block: 64px 16px;
  }

  .toc {
    position: sticky;
    top: calc(var(--header-h) + 24px);
    align-self: start;
    max-height: calc(100vh - var(--header-h) - 48px);
    overflow: auto;
  }
}

.toc {
  padding: 16px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  font-size: 13px;
}

.toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-weight: 600;
}

.toc-title .icon {
  width: 16px;
  height: 16px;
}

.toc ol {
  margin: 0;
  padding-inline-start: 20px;
  display: grid;
  gap: 2px;
}

.toc a {
  /* block (no inline-block) para que el número del índice se alinee con la primera línea. */
  display: block;
  padding-block: 4px;
  color: var(--ink-1);
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose {
  max-width: 62ch;
  min-width: 0;
}

.prose h1 {
  margin: 0 0 8px;
}

.doc-meta {
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--ink-2);
}

.prose h2 {
  margin: 48px 0 12px;
  font-size: 20px;
}

.prose h3 {
  margin: 24px 0 8px;
  font-size: 17px;
}

.prose p,
.prose ul,
.prose ol {
  margin: 0 0 16px;
}

.prose ul,
.prose ol {
  padding-inline-start: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose a,
.faq a,
.promise a,
.inline-link {
  color: var(--ink-1);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:hover,
.faq a:hover,
.inline-link:hover {
  text-decoration-thickness: 3px;
}

.essentials {
  margin: 0 0 8px;
  padding: 20px 24px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.essentials h2 {
  margin: 0 0 12px;
  font-size: 17px;
}

.essentials ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.essentials li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 0;
}

.essentials .icon {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--success);
}

.table-wrap {
  margin: 0 0 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.prose th,
.prose td {
  padding: 12px 16px;
  text-align: start;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.prose tr:last-child td {
  border-bottom: 0;
}

.prose thead th {
  background: var(--bg-2);
  font-weight: 600;
}

.prose tbody th {
  font-weight: 600;
  width: 38%;
}

/* ===== Página 404 ===== */
.empty {
  display: grid;
  gap: 40px;
  padding-block: 48px 24px;
}

@media (min-width: 1024px) {
  .empty {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    padding-block: 64px 24px;
  }

  .empty-figure {
    grid-column: 1 / -1;
  }
}

.empty-figure {
  width: 160px;
  height: auto;
}

.empty-figure .f-box {
  fill: var(--bg-2);
  stroke: var(--ink-2);
  stroke-width: 2;
}

.empty-figure .f-flap {
  fill: var(--bg-3);
  stroke: var(--ink-2);
  stroke-width: 2;
  stroke-linejoin: round;
}

.empty-figure .f-catch {
  fill: var(--accent);
}

.empty-figure .f-trail {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1 7;
}

.empty-block h1,
.empty-block h2 {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.empty-block p {
  margin: 0 0 24px;
  color: var(--ink-2);
  font-size: 17px;
  max-width: 44ch;
}

/* ===== Movimiento reducido ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }

  .btn-primary:active,
  .btn-secondary:active {
    transform: none;
  }
}
