/* =====================================================================
   DESIGN TOKENS — the one place for colour, type, spacing and shape.
   Landing and admin both use these. Change a value here and both sites follow.
   ===================================================================== */

:root {
  color-scheme: dark;   /* the light block below switches this */

  /* ---- Colour ------------------------------------------------------ */
  --c-ground:      #07080a;   /* page background */
  --c-surface:     #101317;   /* panels, mosaic frame */
  --c-surface-2:   #181c22;   /* inputs, hovered rows */
  --c-surface-3:   #222730;   /* pressed / selected */
  --c-ink:         #f1f4ee;   /* main text */
  --c-ink-2:       #98a0a8;   /* secondary text, labels */
  --c-accent:      #c6ff3a;   /* the one accent: primary button, focus, key cells */
  --c-accent-ink:  #07080a;   /* text on the accent */
  --c-danger:      #ff6a5c;
  --c-ok:          #c6ff3a;
  --c-line:        #20242b;   /* dividers between card rows */

  /* Invoice status colours (dot next to the status) */
  --c-status-unpaid:    #ffc53d;
  --c-status-paid:      #3ddc84;
  --c-status-expired:   #6b7380;
  --c-status-cancelled: #ff6a5c;

  /* Mosaic (the generated "signature" of each invoice number) */
  --mosaic-0: #14171c;        /* empty cell */
  --mosaic-1: #262b33;        /* low */
  --mosaic-2: #5b636d;        /* mid */
  --mosaic-3: var(--c-accent);/* lit */
  --mosaic-glow: 0 0 10px rgb(198 255 58 / 0.55);

  /* ---- Type -------------------------------------------------------- */
  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;  /* headlines, amount */
  --f-text:    "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-code:    "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace; /* invoice numbers only */

  --t-hero:   clamp(2.5rem, 1.2rem + 5vw, 5.5rem);   /* landing headline */
  --t-amount: clamp(3.25rem, 1rem + 8vw, 8.5rem);   /* the big amount (also shrinks to fit, see landing/style.css) */
  --t-h2:     clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
  --t-lead:   clamp(1.125rem, 1rem + 0.4vw, 1.375rem);
  --t-body:   1rem;
  --t-small:  0.875rem;

  --lh-display: 0.95;
  --lh-text:    1.5;
  --track-display: -0.04em;

  /* ---- Space ------------------------------------------------------- */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 72px;
  --s-9: 120px;

  --gutter: clamp(16px, 4vw, 48px);   /* left/right page margin */
  --max: 1280px;                      /* content width */

  /* ---- Shape ------------------------------------------------------- */
  --radius: 12px;         /* buttons, inputs. Try 0 for sharp, 999px for pills. */
  --radius-card: 24px;    /* invoice card, panels, mosaic frame */
  --control-h: 56px;      /* input + button height */

  /* ---- Motion ------------------------------------------------------ */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 140ms;
  --dur: 320ms;
  --dur-slow: 700ms;
}

/* =====================================================================
   LIGHT THEME (closer to the reference picture: white card on lavender).
   Applied AUTOMATICALLY when the visitor's device is in light (day) mode;
   dark (night) mode keeps the dark tokens above.
   To force one theme for everyone: add data-theme="light" or data-theme="dark"
   to <html> in landing/index.html and admin/index.html.
   The two blocks below hold the same values: change both.
   ===================================================================== */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --c-ground:      #ecebf8;
    --c-surface:     #ffffff;
    --c-surface-2:   #f3f3f8;
    --c-surface-3:   #e6e6f0;
    --c-ink:         #1b1d29;
    --c-ink-2:       #5b6170;
    --c-accent:      #5b4dff;
    --c-accent-ink:  #ffffff;
    --c-line:        #ececf3;
    --c-danger:      #c62f1e;
    --c-ok:          #1f9d55;
    --c-status-unpaid: #e0a100;
    --c-status-paid:   #1f9d55;
    --c-status-expired: #9aa0ae;
    --c-status-cancelled: #d93a2b;
    --mosaic-0: #f1f1f7;
    --mosaic-1: #e2e2ee;
    --mosaic-2: #b9bbd0;
    --mosaic-glow: 0 0 0 transparent;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --c-ground:      #ecebf8;
  --c-surface:     #ffffff;
  --c-surface-2:   #f3f3f8;
  --c-surface-3:   #e6e6f0;
  --c-ink:         #1b1d29;
  --c-ink-2:       #6e7387;
  --c-accent:      #5b4dff;
  --c-accent-ink:  #ffffff;
  --c-line:        #ececf3;
  --c-danger:      #d93a2b;
  --c-ok:          #1f9d55;
  --c-status-unpaid: #e0a100;
  --c-status-paid:   #1f9d55;
  --c-status-expired: #9aa0ae;
  --c-status-cancelled: #d93a2b;
  --mosaic-0: #f1f1f7;
  --mosaic-1: #e2e2ee;
  --mosaic-2: #b9bbd0;
  --mosaic-glow: 0 0 0 transparent;
}
