/*
 * base.css de las landings de producto (migración 20261007120000).
 *
 * Las landings son HTML libre dentro de un iframe aislado
 * (lib/landings.ts): no ven el CSS del sitio ni sus fuentes. Esta hoja les
 * da lo mismo que tiene la web, para que una landing no tenga que inventar
 * colores ni tamaños:
 *
 *   · Las tres fuentes, servidas desde xaviabat.com. Pedirlas a Google
 *     mandaría la IP del visitante a un tercero sin su permiso.
 *   · La paleta y la escala de app/globals.css, con los MISMOS nombres
 *     (`--color-acento`, `--text-t2`…). Si cambia el `@theme`, cambia aquí.
 *     Las reglas de contraste de AGENTS.md valen igual: oro sobre claro no
 *     se lee (1,8:1); sobre papel, el acento es `--color-acento-tinta`.
 *
 * Uso: <link rel="stylesheet" href="https://www.xaviabat.com/landing/base.css">
 *
 * Desde el 13/10/2026 la landing se pinta dentro de la página, sin iframe
 * (lib/landing-directa.ts), y la web ignora este <link>: los tokens y las
 * fuentes ya están, y el resto (desde «box-sizing» hasta el final) lo
 * antepone lib/landing-base.ts. Sirve para diseñar la landing en local.
 * Si cambia lo de abajo de los tokens, cambia también allí.
 */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fuentes/fraunces.woff2") format("woff2");
}
@font-face {
  font-family: "Work Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fuentes/work-sans.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fuentes/ibm-plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fuentes/ibm-plex-mono-600.woff2") format("woff2");
}

:root {
  /* Paleta (app/globals.css → @theme). Contrastes medidos allí. */
  --color-oscuro: #0A1628;
  --color-oscuro-2: #12233C;
  --color-paper: #FAFAF8;
  --color-surface: #FFFFFF;
  --color-surface-2: #F1F1EE;
  --color-borde: #DFDFD9;
  --color-borde-fuerte: #C4C4BC;
  --color-tinta: #0A1628;        /* 17,4:1 sobre papel */
  --color-tinta-suave: #4B5563;  /*  7,2:1 sobre papel */
  --color-tinta-clara: #F2EDE3;  /* 15,5:1 sobre oscuro */
  --color-tinta-clara-2: #8FB3D9;/*  8,3:1 sobre oscuro. Nunca en botones */
  --color-acento: #E0BA75;       /* el color de acción; encima, --color-oscuro (9,9:1) */
  --color-acento-tinta: #8A6420; /* acento como texto sobre claro, 5,1:1 */
  --color-acento-claro: #E0BA75; /* acento como texto sobre oscuro, 8,6:1 */
  --color-bien: #1B6B45;
  --color-aviso: #9A6114;
  --color-mal: #A33228;
  --color-mal-claro: #F08A7E;    /* error sobre oscuro, 7,5:1 sobre oscuro. Faltaba aquí y no en el @theme (15/10/2026) */

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Work Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Escala: ocho tamaños; 14 px es el suelo. Cada uno con su interlineado:
     `font-size: var(--text-t1); line-height: var(--text-t1--line-height)`. */
  --text-menuda: 0.875rem;
  --text-menuda--line-height: 1.5;
  --text-base: 1rem;
  --text-base--line-height: 1.6;
  --text-guia: 1.1875rem;
  --text-guia--line-height: 1.55;
  --text-t4: clamp(1.3125rem, 1.24rem + 0.38vw, 1.5rem);
  --text-t4--line-height: 1.3;
  --text-t3: clamp(1.625rem, 1.47rem + 0.78vw, 2rem);
  --text-t3--line-height: 1.2;
  --text-t2: clamp(2.125rem, 1.79rem + 1.72vw, 3rem);
  --text-t2--line-height: 1.08;
  --text-t1: clamp(2.625rem, 1.95rem + 3.44vw, 4.25rem);
  --text-t1--line-height: 1.02;
  --text-rotulo: clamp(3.25rem, 2.31rem + 4.69vw, 5.5rem);
  --text-rotulo--line-height: 1.02;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;
  --shadow-suave: 0 2px 8px -2px rgb(10 14 20 / 0.12);
  --shadow-marca: 0 24px 70px -24px rgb(10 14 20 / 0.34);
  --shadow-hondo: 0 2px 4px -1px rgb(10 14 20 / 0.28), 0 18px 40px -12px rgb(10 14 20 / 0.5);

  /* Lo pulsable mide 44 px como mínimo. */
  --tap: 2.75rem;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-tinta);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Como app/globals.css → Base. */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* El foco se ve siempre (AGENTS.md): el mismo anillo que la web. */
:focus-visible {
  outline: 3px solid var(--color-acento-tinta);
  outline-offset: 2px;
  border-radius: 2px;
}

/* El botón de pagar de la web (components/ui/boton.tsx, variante `acento`,
   tamaño `md`), para quien quiera usarlo tal cual:
   <button class="boton-acento" data-checkout="hero">Lo quiero</button> */
.boton-acento {
  display: inline-flex;
  min-height: var(--tap);
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  background: var(--color-acento);
  color: var(--color-oscuro);
  font: 600 var(--text-base) / 1.2 var(--font-body);
  text-align: center;
  cursor: pointer;
}

@media (hover: hover) {
  .boton-acento:hover {
    filter: brightness(0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
