/* MelonVault design tokens.
 *
 * Every colour, size, radius, shadow and duration the storefront uses is
 * named here. Components in site.css read these and never carry a raw value
 * of their own, so a palette or scale change is an edit to this file only.
 *
 * The admin page does not load this file - it keeps styles.css.
 */

/* ---------- fonts ----------
   Self-hosted because the CSP is `font-src 'self'`. All three are variable
   fonts (weight 200-800) under the SIL Open Font License; see
   assets/fonts/OFL.txt. Latin subset only. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("/assets/fonts/atkinson-hyperlegible-mono-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  /* ---------- colour ----------
     Black, white and grey. The only colour on a page comes from things that
     own their colour: the logo, product artwork and the coin logos. The one
     exception is --danger, kept for form errors and an expired quote, where
     a mistake has to be impossible to miss.

     Contrast against --bg / --surface-2, WCAG AA needs 4.5 for text:
       --text 18.0 / 15.5   --text-muted 10.1 / 8.7   --text-dim 6.4 / 5.5
       --mark 14.0 / 12.1   --danger 8.7 / 7.5
     --line-control is the only border that has to be seen to use a control,
     so it alone is held to the 3:1 non-text minimum (4.7 / 4.1). */
  --bg: #0a0a0a;
  --surface-1: #141414;
  --surface-2: #1c1c1c;
  --surface-3: #272727;

  --line: #2a2a2a;
  --line-strong: #404040;
  --line-control: #7c7c7c;

  --text: #f4f4f4;
  --text-muted: #b9b9b9;
  --text-dim: #929292;

  /* The accent is white: primary buttons, links, the current step. */
  --accent: #f4f4f4;
  --accent-strong: #ffffff;
  --accent-deep: #7a7a7a;
  --accent-tint: #262626;
  --accent-ink: #0a0a0a;

  /* A second, quieter emphasis: labels and tags that should read above
     muted text without competing with the accent. */
  --mark: #d9d9d9;
  --mark-tint: #262626;
  --mark-ink: #0a0a0a;

  /* Errors only. */
  --danger: #ff8a80;
  --danger-tint: #2a1a19;

  /* Product artwork, not UI: the edge colours of the 3D cape on the home
     page, sampled from the same screenshot as its face. */
  --cape-edge: #000f30;
  --cape-edge-dark: #000a1d;

  --scrim: rgb(0 0 0 / 0.76);
  --qr-paper: #ffffff;

  /* ---------- type ---------- */
  --font-display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Body never drops below 16px: smaller text makes iOS zoom on focus and is
     hard going on a phone, which is where most visitors are. */
  --text-xs: 0.8125rem;   /* 13 */
  --text-sm: 0.875rem;    /* 14 */
  --text-base: 1rem;      /* 16 */
  --text-md: 1.125rem;    /* 18 */
  --text-lg: 1.375rem;    /* 22 */
  --text-xl: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);          /* 24 - 32 */
  --text-2xl: clamp(1.875rem, 1.3rem + 2.6vw, 2.75rem);    /* 30 - 44 */
  --text-3xl: clamp(2.25rem, 1.3rem + 4.4vw, 3.75rem);     /* 36 - 60 */
  --text-hero: clamp(2rem, 1.2rem + 3.4vw, 4rem);          /* 32 - 64 */

  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-body: 1.6;

  --weight-regular: 400;
  --weight-medium: 550;
  --weight-bold: 700;
  --weight-display: 750;

  --tracking-display: -0.025em;
  --tracking-label: 0.06em;

  /* ---------- space: 8px grid, with 4 and 12 as half steps ---------- */
  --space-1: 0.25rem;   /*  4 */
  --space-2: 0.5rem;    /*  8 */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.5rem;    /* 24 */
  --space-6: 2rem;      /* 32 */
  --space-7: 3rem;      /* 48 */
  --space-8: 4rem;      /* 64 */
  --space-9: 6rem;      /* 96 */

  --gutter: var(--space-4);
  --section-gap: var(--space-8);
  --maxw: 75rem;        /* 1200 */
  --maxw-prose: 42rem;
  --header-h: 3.75rem;  /* 60 */
  --tap: 2.75rem;       /* 44: minimum touch target */
  --drawer-w: 24rem;

  /* ---------- shape ---------- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --border: 1px;
  --border-thick: 2px;
  --pixel: 4px;         /* one "pixel" of the stepped corners and square dots */
  --cape-unit: 0.5rem;  /* one pixel of the 10x16 cape model */

  /* ---------- depth ----------
     Hard, unblurred edges for things you press; one soft shadow for things
     that float above the page (drawers, menus, toast). */
  --shadow-press: 0 3px 0 var(--accent-deep);
  --shadow-press-neutral: 0 3px 0 var(--line);
  --shadow-float: 0 16px 40px rgb(0 0 0 / 0.6);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent);

  /* ---------- motion ---------- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-fast: 120ms;
  --dur: 200ms;
  --dur-slow: 320ms;

  --z-header: 50;
  --z-scrim: 80;
  --z-drawer: 90;
  --z-toast: 100;
}

@media (min-width: 48rem) {
  :root {
    --gutter: var(--space-6);
    --section-gap: var(--space-9);
    --header-h: 4.5rem;
    --cape-unit: 1rem;
  }
}

@media (min-width: 75rem) {
  :root { --cape-unit: 1.25rem; }
}
