/* Copied from @tadamio/design-tokens (packages/design-tokens/src/tokens.css in the tadamio repo). Copy it again when the brand changes. */

/* Sorpri's design tokens. Keep in step with index.ts; see README.md for the contract. */

/* Onest and Caprasimo, self-hosted (SIL Open Font License, see fonts/OFL.txt and fonts/OFL-Caprasimo.txt). */
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./fonts/onest-latin-ext-wght-normal.woff2") format("woff2-variations");
  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;
}
@font-face {
  font-family: "Onest";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("./fonts/onest-latin-wght-normal.woff2") format("woff2-variations");
  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;
}
/* Caprasimo, the logo's font, for headlines. One weight only. */
@font-face {
  font-family: "Caprasimo";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./fonts/caprasimo-latin-ext-400-normal.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;
}
@font-face {
  font-family: "Caprasimo";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("./fonts/caprasimo-latin-400-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;
}

:root {
  color-scheme: light dark;
  /* Caprasimo has one weight: never fake a bold of it. Onest has them all. */
  font-synthesis-weight: none;

  /* Colour: «Tienda de regalos» (16d, 2026-11-03): Ciruela on Nata, Frambuesa buttons */
  --color-bg: #fff8f2;
  --color-surface: #f8eae2;
  --color-text: #3a0f2a;
  --color-text-muted: #75606b;
  --color-border: #eeddd6;
  /* The edge of what's typed in or picked: 3:1 on bg and surface (WCAG 1.4.11). */
  --color-border-strong: #958089;
  --color-primary: #d3195a;
  --color-primary-contrast: #fff8f2;
  --color-danger: #c0262d;
  --color-success: #18794e;
  --color-accent: #d3195a;
  /* Text in the accent's place on --color-primary, 4.5:1: a pale Mantequilla on Frambuesa. */
  --color-accent-on-primary: #fff3cf;
  --color-focus: #3a0f2a;
  /* Behind a dialog or a sheet, over the page. The same in dark mode. */
  --color-scrim: rgb(40 10 30 / 0.6);
  /* On a photo or a product, whatever the page's theme: Ciruela, and white. The same in dark mode. */
  --color-overlay-dark: #3a0f2a;
  --color-overlay-light: #ffffff;
  /* A badge on a photo, cut like the logo's tag: Rosa, with --color-overlay-dark text. The same in dark mode. */
  --color-overlay-tag: #ffd4e0;

  /* Marks: what marks something (an Order's status, a warning, the Editor's guides), 3:1 on the page.
     Never body text or decoration. */
  --color-mark-frambuesa: #d3195a;
  --color-mark-miel: #c47410;
  --color-mark-menta: #1f8a73;
  --color-mark-anil: #5458d4;

  --font-sans: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Caprasimo", Georgia, serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-weight-display: 400;
  --tracking-display: -0.01em;
  --leading-tight: 1.1;
  --leading-body: 1.55;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.5rem;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgb(29 29 38 / 0.08);
  --shadow-md: 0 4px 14px rgb(29 29 38 / 0.1);
  --shadow-lg: 0 14px 36px rgb(29 29 38 / 0.14);
}

/* A dialog's backdrop inherited nothing from the page before Safari 17.4, Chrome 122 and Firefox 120,
   so it carries the scrim itself. */
::backdrop {
  --color-scrim: rgb(40 10 30 / 0.6);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #1c0b16;
    --color-surface: #2a1521;
    --color-text: #fff3ea;
    --color-text-muted: #c9b2bd;
    --color-border: #432a39;
    --color-border-strong: #8c7080;
    --color-primary: #f0407d;
    --color-primary-contrast: #1c0b16;
    --color-danger: #ff8a8f;
    --color-success: #4cc38a;
    --color-accent: #f0407d;
    --color-accent-on-primary: #1c0b16;
    --color-focus: #ffd4e0;
    --color-mark-frambuesa: #f0407d;
    --color-mark-miel: #f2b13f;
    --color-mark-menta: #4cc3a6;
    --color-mark-anil: #8b8ef5;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 4px 14px rgb(0 0 0 / 0.45);
    --shadow-lg: 0 14px 36px rgb(0 0 0 / 0.5);
  }
}

:root[data-theme="dark"] {
  --color-bg: #1c0b16;
  --color-surface: #2a1521;
  --color-text: #fff3ea;
  --color-text-muted: #c9b2bd;
  --color-border: #432a39;
  --color-border-strong: #8c7080;
  --color-primary: #f0407d;
  --color-primary-contrast: #1c0b16;
  --color-danger: #ff8a8f;
  --color-success: #4cc38a;
  --color-accent: #f0407d;
  --color-accent-on-primary: #1c0b16;
  --color-focus: #ffd4e0;
  --color-mark-frambuesa: #f0407d;
  --color-mark-miel: #f2b13f;
  --color-mark-menta: #4cc3a6;
  --color-mark-anil: #8b8ef5;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-md: 0 4px 14px rgb(0 0 0 / 0.45);
  --shadow-lg: 0 14px 36px rgb(0 0 0 / 0.5);
}
