/* ─────────────────────────────────────────────────────────────────────────
   CAPA BASE · @donaumorgen/canon

   Reset minimo, tipografia y las primitivas que usa todo: contenedor,
   seccion, boton, chip y foco.

   Carga DESPUES de tokens.css y ANTES de components.css.

   Los .woff2 tienen que existir en /fonts/ del sitio que consume el paquete.
   Astro no sirve archivos desde node_modules, asi que se copian a public/
   en el postinstall de cada landing.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Inter, auto-hospedada ───────────────────────────────────────────────
   No se trae de Google Fonts: el CSP de varias landings declara
   font-src 'self' y bloquearia tanto la hoja como el archivo.
   Es la variable (100-900), asi que los pesos intermedios se renderizan de
   verdad en vez de redondearse al mas cercano. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.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;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--page);
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-width: 320px;
  font-family: 'Inter', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--fg-soft);
  background: var(--page);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Ninguna imagen desborda su contenedor ni dispara scroll horizontal, aunque
   se anada sin regla propia. */
img,
svg,
video,
canvas {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ── Foco ────────────────────────────────────────────────────────────────
   Cubre summary, input, select y textarea, no solo a y button: los <details>
   del FAQ se quedaban sin anillo propio. El color es el de la marca; antes
   era un verde fijo del canon en landings violeta, indigo, ambar y rosa. */
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--brand-700);
  outline-offset: 3px;
}

:root[data-theme='dark'] :where(a, button, input, select, textarea, summary):focus-visible {
  outline-color: var(--brand-400);
}

.container {
  width: min(100% - var(--gutter), var(--container));
  margin-inline: auto;
}

.section {
  padding-top: var(--sec-y);
  padding-bottom: var(--sec-y);
  /* El header es sticky: sin esto, cada ancla del nav deja la seccion tapada
     por la barra. Es lo unico que sostenia el canon viejo en 12 de 13. */
  scroll-margin-top: 96px;
}

.section-soft {
  background: var(--surface-2);
}

.section-title {
  margin: 0;
  color: var(--fg);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.section-subtitle {
  margin-top: 0.85rem;
  color: var(--fg-muted);
  font-size: 1rem;
  max-width: 58ch;
}

/* ── Botones ─────────────────────────────────────────────────────────────— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  padding: 0.72rem 1.05rem;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--btn-from), var(--btn-to));
  border-color: var(--btn-from);
  color: var(--brand-ink);
  box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--brand-600) 45%, transparent);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-control);
  color: var(--fg);
}

.btn-sm {
  /* Mas compacto en padding y tipografia, pero NUNCA por debajo de 44px de
     alto: es el minimo de objetivo tactil, y bajarlo en la variante pequena
     dejaba el CTA del header de dos landings por debajo del resto. */
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
}

/* ── Eyebrow y chips ─────────────────────────────────────────────────────
   Un solo tratamiento: pill, sin icono y sin glifos decorativos. El texto va
   en caja normal en el markup y las mayusculas las pone el CSS — escrito en
   MAYUSCULAS, varios lectores de pantalla lo deletrean. */
.hero-badge,
.section-chip,
.plan-flag {
  display: inline-flex;
  align-items: center;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--eyebrow-fg);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.32rem 0.62rem;
}

.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-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 1000;
  background: var(--brand-600);
  color: var(--brand-ink);
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  left: 0.75rem;
}

@media (max-width: 767px) {
  .container {
    width: min(100% - var(--gutter-movil), var(--container));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
