/*
  Design tokens for the mockups. Every mockup uses these variables and nothing else.
  Add a token here before using a new value in a mockup.

  Source: the archived app (branch archive/npcface-final), as the owner asked on 2026-11-10:
  "match the existing application design theme, font, typography", built from scratch.
  What was carried over: near-black background, zinc greys, lime accent, JetBrains Mono
  everywhere, uppercase wide-tracked labels, square corners, hard pixel shadows and a CRT feel.
  Changed by the owner (2026-11-10): no grid and no scanlines over the page. Large titles (h1) carry
  the scanline texture; body text never does. The background is a faint dot pattern, like an old LCD.
  What changed, and why:
  - Smallest text is 12px (the old app used 8 to 11px, which fails readability).
  - Secondary text is zinc-400, not zinc-500 (zinc-500 on near-black is under 4.5:1 contrast).
  - A light theme exists because every mockup must work in light and dark. Dark is the brand
    default; light keeps the same character with paper-white and a darker lime for contrast.
  - Scanlines are subtle and switch off under reduced motion and in light mode.
*/

:root {
  /* Type */
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-size-xs: 0.75rem;   /* 12px: labels, captions. The smallest size allowed. */
  --font-size-sm: 0.875rem;  /* 14px: secondary text, buttons */
  --font-size-md: 1rem;      /* 16px: body, inputs */
  --font-size-lg: 1.25rem;   /* 20px: section titles */
  --font-size-xl: 1.75rem;   /* 28px: profile name on mobile */
  --font-size-2xl: 2.5rem;   /* 40px: hero and profile name on desktop */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --font-weight-black: 800;
  --line-height-tight: 1.15;
  --line-height-body: 1.55;
  --letter-spacing-label: 0.15em;  /* uppercase labels */
  --letter-spacing-wide: 0.2em;    /* uppercase hero kickers */

  /* Spacing (4px steps) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Shape: square, like pixels */
  --radius-none: 0;
  --border-width: 1px;
  --border-width-strong: 2px;
  --border-width-accent: 4px; /* coloured left edge on messages */
  --shadow-offset: 3px;       /* matches --shadow-pixel; buttons move this far when pressed */
  --pixel-size: 4px;          /* one character pixel at 1x on a 16x16 grid = 64px */
  --dot-spacing: 24px;        /* background dot pattern */
  --content-max: 72rem;
  --profile-max: 40rem;
  --measure: 40rem;           /* longest comfortable line of body text */
  --column-min: 9rem;         /* smallest column in an auto-filling grid */
  --label-column: 7rem;       /* side labels, like the type scale names */
  --field-max: 36rem;
  --phone-width: 23.4375rem;  /* 375px: the phone frame in previews */
  --preview-height: 40rem;    /* preview frame height */

  /* Motion */
  --duration-fast: 150ms;
  --duration-base: 300ms;
  --duration-slow: 500ms;
  --easing: cubic-bezier(0.2, 0, 0, 1);
  --stagger: 40ms;            /* delay between items that animate one after another */

  /* Colour: light theme */
  --color-bg: #fafafa;
  --color-surface: #ffffff;
  --color-surface-raised: #f4f4f5;
  --color-border: #d4d4d8;
  --color-border-strong: #18181b;
  --color-border-input: #8a8a93;  /* inputs and control edges: 3:1 or more (WCAG 1.4.11) */
  --color-text: #09090b;
  --color-text-muted: #52525b;
  --color-text-faint: #71717a;   /* large text and decoration only */
  --color-accent: #4d7c0f;       /* lime-700: lime-400 fails contrast on white */
  --color-accent-strong: #3f6212;
  --color-accent-soft: #ecfccb;
  --color-on-accent: #ffffff;
  --color-focus: #4d7c0f;
  --color-danger: #be123c;
  --color-danger-soft: #fff1f2;
  --color-warning: #b45309;
  --color-success: #4d7c0f;
  --color-dot: #d4d4d8;          /* background dots */
  --color-overlay: rgba(9, 9, 11, 0.6);
  --shadow-pixel: 3px 3px 0 #18181b;
  --shadow-glow: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --color-bg: #050505;
    --color-surface: #09090b;
    --color-surface-raised: #18181b;
    --color-border: #27272a;
    --color-border-strong: #fafafa;
    --color-border-input: #71717a;
    --color-text: #fafafa;
    --color-text-muted: #a1a1aa;
    --color-text-faint: #71717a;
    --color-accent: #a3e635;
    --color-accent-strong: #bef264;
    --color-accent-soft: rgba(163, 230, 53, 0.1);
    --color-on-accent: #050505;
    --color-focus: #a3e635;
    --color-danger: #fb7185;
    --color-danger-soft: rgba(251, 113, 133, 0.1);
    --color-warning: #fbbf24;
    --color-success: #a3e635;
    --color-dot: #27272a;
    --color-overlay: rgba(0, 0, 0, 0.75);
    --shadow-pixel: 3px 3px 0 rgba(163, 230, 53, 0.25);
    --shadow-glow: 0 0 15px rgba(163, 230, 53, 0.3);
  }
}

:root[data-theme="dark"] {
  --color-bg: #050505;
  --color-surface: #09090b;
  --color-surface-raised: #18181b;
  --color-border: #27272a;
  --color-border-strong: #fafafa;
  --color-border-input: #71717a;
  --color-text: #fafafa;
  --color-text-muted: #a1a1aa;
  --color-text-faint: #71717a;
  --color-accent: #a3e635;
  --color-accent-strong: #bef264;
  --color-accent-soft: rgba(163, 230, 53, 0.1);
  --color-on-accent: #050505;
  --color-focus: #a3e635;
  --color-danger: #fb7185;
  --color-danger-soft: rgba(251, 113, 133, 0.1);
  --color-warning: #fbbf24;
  --color-success: #a3e635;
  --color-dot: #27272a;
  --color-overlay: rgba(0, 0, 0, 0.75);
  --shadow-pixel: 3px 3px 0 rgba(163, 230, 53, 0.25);
  --shadow-glow: 0 0 15px rgba(163, 230, 53, 0.3);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --duration-fast: 0ms;
    --duration-base: 0ms;
    --duration-slow: 0ms;
    --stagger: 0ms;
  }
}
