/* Impretienda — brand palette + type. Static asset, served per domain at
 * /static/theme.css (fonts at /static/fonts/). One seed (the brand color);
 * hover/muted/selected DERIVE from it via color-mix. `:root:root` (specificity 0,2,0)
 * so the brand always wins over the base skin regardless of injection order. */

/* Montserrat — tipografía del sitio. Self-hosted (una woff2 variable por subconjunto
 * cubre 100–900), así que no hay dependencia externa. La de producción de impretienda
 * es Muli/Mulish; se cambia el día que se traigan sus woff2, y es UN @font-face. */
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/montserrat-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: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/montserrat-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;
}

:root:root {
  /* Store-level scale: stable on large monitors, using Sorolla's root token.
     Keep full-width surfaces independent from their centered content. */
  --sui-root-size: 16px;
  --sui-text-sm: 0.875rem;
  --sui-text-xs: 0.75rem;
  --app-page-max: 75rem;
  /* No override of the section air here (one lived here from 2026-09-28 to 2026-10-02,
     `2.5 × s0` at `:root:root`, which squashed every page's macro rhythm under the one
     the previous theme breathes by): the air between sections is sorolla's `--sui-gap-section`,
     wired in site/blocks.css. */

  /* Brand typeface (html reads --sui-font-sans). */
  --sui-font-sans: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* EL ROJO DE LA MARCA es #ff003b: el píxel dominante de su propio logotipo
     (logo-impretienda-400.png: 30.558 píxeles) y el que usa el CSS de producción.
     Todo lo demás —hover, seleccionado, foco— DERIVA de la semilla: una línea, y
     la tienda entera cambia de dueño.

     LA SEMILLA NO ES EL PÍXEL, y es a propósito (2026-09-08): blanco sobre #ff003b
     da 3,95:1, y esta casa no pinta texto por debajo de WCAG AA (4,5:1) — lo vigila
     `site/contrast.test.ts` en 55 muestras (botones, eyebrows). Producción lo
     incumple. #eb0036 es el mismo tono, un 8 % más oscuro, y da 4,58:1 con blanco
     en las dos direcciones; a simple vista es el mismo rojo. Quien quiera el píxel
     exacto tiene `--brand-red` para lo que no sea texto.

     (Primero se cogió el verde de `impre2.svg`, que está en la misma carpeta de
     logos y NO es de esta marca: es de Impretwo. Un fichero llamado "logo" en
     el directorio de logos no basta para saber de quién es el logo.) */
  --brand-red: #ff003b;
  --sui-color-accent: #eb0036;

  /* Los banners de la portada son los de producción, 1920×480 (`assets/web.manifest`):
     el carrusel reserva ESA proporción, no la de unas bandas de 1800×964, o recorta
     el arte por los lados y lo estira a lo alto. */
  --app-hero-ratio: 1920 / 480;
  --sui-color-accent-hover: color-mix(in srgb, var(--sui-color-accent) 85%, black);
  /* Tints mix with the PAGE background, not with white: on the light theme that is
     white anyway; on the dark one a white-mixed tint was a pale pink slab. */
  --sui-color-accent-muted: color-mix(in srgb, var(--sui-color-accent) 12%, var(--sui-color-bg));
  --sui-color-focus-ring: var(--sui-color-accent);
  --sui-color-item-selected-bg: color-mix(in srgb, var(--sui-color-accent) 10%, var(--sui-color-bg));
  --sui-color-item-selected-fg: var(--sui-color-accent-hover);
  --sui-color-row-selected-bg: color-mix(in srgb, var(--sui-color-accent) 16%, var(--sui-color-bg));

  /* Impretienda escribe en caja natural: sus títulos y botones de producción no
     van en mayúsculas. El seam es el mismo, el valor no. */
  --sui-btn-transform: none;
  --app-heading-transform: none;
}

/* Dark theme (OS preference by default, `data-theme` as the override — sorolla's
 * convention). The brand red is a SURFACE color on dark: buttons and bands keep it,
 * but as ink (headings, prices, links, selected edges) it sinks into gray-12 — the ink
 * goes white. The hover on a surface lightens instead of darkening, for the same
 * reason. The platform's rule, not a taste. */
@media (prefers-color-scheme: dark) {
  :root:root:not([data-theme='light']) {
    --app-ink-accent: var(--sui-color-fg);
    --sui-color-accent-hover: color-mix(in srgb, var(--sui-color-accent) 85%, white);
    --sui-color-item-selected-fg: var(--sui-color-fg);
    --sui-color-focus-ring: var(--sui-color-fg);
  }
}
:root:root[data-theme='dark'] {
  --app-ink-accent: var(--sui-color-fg);
  --sui-color-accent-hover: color-mix(in srgb, var(--sui-color-accent) 85%, white);
  --sui-color-item-selected-fg: var(--sui-color-fg);
  --sui-color-focus-ring: var(--sui-color-fg);
}

/* Header, navigation, and listings keep their existing full-width layouts. */
.app-shell .sui-megamenu {
  font-size: var(--sui-text-sm);
}
/* The page-ending air is `.app-main`'s own (app.css: `--app-air-y`, the section token of
   sorolla since 2026-10-02). A hand-typed `4 × s0` lived here from 2026-09-28, written to
   escape the compact section air the same commit had set; both are gone. */
.app-pcard .pcard__title {
  font-size: var(--sui-text-sm);
}
.app-pcard .pcard__price {
  font-size: var(--sui-text-md);
}
/* The homepage's main heading gains h1 semantics without changing its callout scale. */
.home .app-callout .app-text--h1 {
  font-size: var(--sui-text-2xl);
  line-height: var(--sui-leading-heading);
  text-transform: var(--app-heading-transform, none);
}
