/* =====================================================================
   TwoBones design tokens — the single source of truth for colour, type,
   space, shape and motion. Read BRAND.md for how to use them.

   Taken from the customer app (src/app/customer.css). Two values are
   deliberately different from the app, both for contrast, and are marked
   WEB-CORRECTED below.
   ===================================================================== */

:root {
  /* ---- Surfaces: near-black with a blue cast, never pure grey ---- */
  --tb-bg: #05070c;            /* page */
  --tb-bg-2: #0b1120;          /* cards, rows */
  --tb-sheet: #0c1220;         /* raised panels, drawers */
  --tb-bg-deep: #020308;       /* behind a centred column on wide screens */

  /* ---- Lines: blue-tinted hairlines, not grey borders ---- */
  --tb-line: rgba(125, 190, 255, 0.14);
  --tb-line-strong: rgba(125, 190, 255, 0.36);

  /* ---- Ink ---- */
  --tb-ink: #eef3ff;           /* headings, primary text      18.1:1 on bg */
  --tb-ink-2: #a3b3d2;         /* body, secondary text         9.5:1 on bg */
  --tb-ink-3: #7186ad;         /* captions, hints              5.5:1 on bg
                                  WEB-CORRECTED: the app uses #62759a, which is
                                  4.35:1 on bg and 4.06:1 on cards - below 4.5. */

  /* ---- Brand blues ---- */
  --tb-blue: #1e78ff;          /* the brand colour: fills, glows, active states */
  --tb-blue-2: #4f9dff;        /* links on dark, active outlines, kickers */
  --tb-cyan: #7dd3ff;          /* accent word in a headline, HUD text, scan line */
  --tb-glow: rgba(30, 120, 255, 0.55);

  /* ---- Primary button fill ----
     WEB-CORRECTED: the app's gradient is #3f92ff -> #1e78ff, and white text on
     it measures 3.1-4.05:1. These two give 4.75:1 and 5.81:1. */
  --tb-btn-top: #1a6cee;
  --tb-btn-bottom: #1560d0;
  --tb-on-blue: #ffffff;

  /* ---- Status: always paired with a word or icon, never colour alone ---- */
  --tb-ok: #46d17f;
  --tb-warn: #f4b740;
  --tb-bad: #ff5c6c;
  --tb-bad-text: #ffb3bb;      /* error text on a tinted error panel */

  /* ---- Type ---- */
  --tb-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --tb-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --tb-text-display: clamp(2.5rem, 6vw, 4.5rem);   /* hero headline */
  --tb-text-h2: clamp(1.75rem, 3.5vw, 2.5rem);
  --tb-text-h3: 1.25rem;
  --tb-text-body: 1.0625rem;                        /* 17px */
  --tb-text-small: 0.875rem;                        /* 14px */
  --tb-text-label: 0.75rem;                         /* 12px mono labels - the floor */

  --tb-weight-body: 400;
  --tb-weight-strong: 700;
  --tb-weight-display: 800;

  --tb-leading-display: 1.02;
  --tb-leading-heading: 1.15;
  --tb-leading-body: 1.6;
  --tb-tracking-display: -0.025em;
  --tb-tracking-heading: -0.015em;
  --tb-tracking-label: 0.16em;                      /* uppercase mono labels */
  --tb-tracking-wordmark: 0.14em;

  /* ---- Space: 4px base ---- */
  --tb-space-1: 4px;
  --tb-space-2: 8px;
  --tb-space-3: 12px;
  --tb-space-4: 16px;
  --tb-space-5: 24px;
  --tb-space-6: 32px;
  --tb-space-7: 48px;
  --tb-space-8: 72px;
  --tb-space-9: 96px;
  --tb-space-10: 128px;
  --tb-gutter: 18px;            /* page edge on phones */
  --tb-container: 1120px;       /* max content width */
  --tb-measure: 62ch;           /* max line length for running text */

  /* ---- Shape ---- */
  --tb-radius-sm: 10px;
  --tb-radius-md: 14px;
  --tb-radius-lg: 16px;         /* buttons, cards */
  --tb-radius-xl: 26px;         /* sheets, large panels */
  --tb-radius-pill: 999px;

  /* ---- Light: glow replaces drop shadow ---- */
  --tb-shadow-btn: 0 10px 30px rgba(30, 120, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  --tb-shadow-glow: 0 0 14px var(--tb-glow);
  --tb-shadow-panel: 0 40px 120px rgba(0, 0, 0, 0.8);
  --tb-focus-ring: 0 0 0 3px rgba(125, 211, 255, 0.55);

  /* ---- Motion ---- */
  --tb-dur-press: 120ms;        /* button press */
  --tb-dur-hover: 150ms;        /* hover, focus */
  --tb-dur-enter: 450ms;        /* content fading up into place */
  --tb-dur-scan: 9s;            /* one pass of the hero scan line */
  --tb-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --tb-rise: 10px;              /* distance content travels on enter */
}

/* ---------------------------------------------------------------------
   Signature recipes. Copy these rather than re-inventing them.
   --------------------------------------------------------------------- */

/* Blueprint grid: a faint engineering grid that fades out from the centre. */
.tb-grid {
  background-image:
    linear-gradient(rgba(125, 190, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 190, 255, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 20%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 35%, #000 20%, transparent 70%);
}

/* Scan line: the one moving element the brand owns. */
.tb-scanline {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tb-cyan) 30%, #fff 50%, var(--tb-cyan) 70%, transparent);
  box-shadow: 0 0 22px var(--tb-cyan), 0 0 60px rgba(125, 211, 255, 0.5);
}

/* Primary button. */
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  border: 1px solid transparent; border-radius: var(--tb-radius-lg);
  background: linear-gradient(180deg, var(--tb-btn-top), var(--tb-btn-bottom));
  color: var(--tb-on-blue); font: var(--tb-weight-strong) 1rem/1 var(--tb-sans);
  box-shadow: var(--tb-shadow-btn); cursor: pointer; text-decoration: none;
  transition: transform var(--tb-dur-press) ease, box-shadow var(--tb-dur-hover) ease, filter var(--tb-dur-hover) ease;
}
.tb-btn:hover { filter: brightness(1.08); }
.tb-btn:active { transform: scale(0.985); }
.tb-btn:focus-visible { outline: none; box-shadow: var(--tb-shadow-btn), var(--tb-focus-ring); }

/* Secondary button: outlined, same size. */
.tb-btn--ghost {
  background: rgba(30, 120, 255, 0.1); color: var(--tb-ink);
  border-color: var(--tb-line-strong); box-shadow: none;
}

/* Card. */
.tb-card {
  background: var(--tb-bg-2); border: 1px solid var(--tb-line);
  border-radius: var(--tb-radius-lg); padding: var(--tb-space-5);
}

/* Mono label: kickers, units, HUD readouts. */
.tb-label {
  font: 600 var(--tb-text-label)/1.2 var(--tb-mono);
  letter-spacing: var(--tb-tracking-label); text-transform: uppercase; color: var(--tb-blue-2);
}

/* Wordmark: uppercase name with the glowing dot. */
.tb-wordmark {
  display: inline-flex; align-items: center; gap: 9px;
  font: var(--tb-weight-display) 0.8125rem/1 var(--tb-sans);
  letter-spacing: var(--tb-tracking-wordmark); text-transform: uppercase; color: var(--tb-ink);
  text-decoration: none;
}
.tb-wordmark::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--tb-blue);
  box-shadow: 0 0 0 3px rgba(30, 120, 255, 0.2), var(--tb-shadow-glow);
}

/* Content rising into place. */
@keyframes tb-enter {
  from { opacity: 0; transform: translateY(var(--tb-rise)); }
  to { opacity: 1; transform: none; }
}
.tb-enter { animation: tb-enter var(--tb-dur-enter) var(--tb-ease) both; }

/* Motion is decoration here, so all of it stops when asked. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}
