/* HFN brand tokens (hfn-brand.css), built by brand/kit/make_kit.js (Oct 26 2026) from its TOKENS table.
   Do not hand-edit: change TOKENS in make_kit.js (or this template, src/css.js) and run  node make_kit.js  again.
   The same table writes app-tokens.css (the apps' own variable names), so the two files always carry the same values.

   Fonts: put these three lines in <head>, before this file:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap">

   Themes: Light is the default (everyday coaching clients).
   Put data-hfn-theme="white"  on <html> (or any wrapper) for the free 12-week program and the website (white page, white cards with a line),
       data-hfn-theme="dark"   for the strength athletes' coaching view (and the coach panel's icon and header band),
       data-hfn-theme="master" for the Master Program black card (black, silver, purple; no gold).
   Rules from the brief: gold is ONLY the Hastings Standard (never on anything people can buy).
   Silver only for the Master Program and mid-level badges. Purple text on light backgrounds is the deep purple.
   Never green, of any kind. Every neutral is a solid colour (emails, PDFs, sheets and canvases need solid colours).
   The one non-brand hue is --hfn-bad (pain, injury, errors, money overdue, allergens): it carries safety meaning. */

:root {
  /* the palette (the brief's eight colours, nothing else) */
  --hfn-black: #111111;      /* text on light, dark backgrounds */
  --hfn-charcoal: #2A2A2E;   /* dark cards and surfaces */
  --hfn-offwhite: #F4F4F6;   /* light backgrounds */
  --hfn-white: #FFFFFF;
  --hfn-purple: #7B61D9;     /* the pop: the mark's cap, buttons, highlights, chart lines */
  --hfn-purple-deep: #5B3FA0;  /* purple TEXT on light backgrounds (7.2:1 on off-white) */
  --hfn-silver: #B8BCC4;     /* Master Program and mid-level badges only */
  --hfn-gold: #E3B85C;       /* the Hastings Standard only */

  /* type: Space Grotesk = the name, headings, big numbers; Inter = body text, buttons, labels */
  --hfn-font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --hfn-font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --hfn-text-xs: 0.75rem;    /* 12 px  captions, chart labels */
  --hfn-text-sm: 0.875rem;   /* 14 px  secondary text */
  --hfn-text-base: 1rem;     /* 16 px  body */
  --hfn-text-lg: 1.125rem;   /* 18 px  lead text */
  --hfn-text-xl: 1.375rem;   /* 22 px  card titles */
  --hfn-text-2xl: 1.75rem;   /* 28 px  section headings */
  --hfn-text-3xl: 2.25rem;   /* 36 px  page headings */
  --hfn-text-4xl: 3rem;      /* 48 px  hero headings */
  --hfn-text-num: 4rem;      /* 64 px  the big numbers on results cards */
  --hfn-leading-tight: 1.1;
  --hfn-leading-snug: 1.3;
  --hfn-leading-body: 1.55;
  --hfn-tracking-display: -0.01em;
  --hfn-tracking-caps: 0.08em;

  /* shape and space */
  --hfn-radius-sm: 6px;
  --hfn-radius: 10px;
  --hfn-radius-lg: 16px;
  --hfn-radius-pill: 999px;
  --hfn-space-1: 4px;
  --hfn-space-2: 8px;
  --hfn-space-3: 12px;
  --hfn-space-4: 16px;
  --hfn-space-5: 24px;
  --hfn-space-6: 32px;
  --hfn-space-7: 48px;
  --hfn-space-8: 72px;   /* lots of empty space between sections */
  --hfn-focus-width: 3px;
  --hfn-focus-offset: 2px;

  /* semantic tokens, Light (the default) */
  --hfn-bg: var(--hfn-offwhite);
  --hfn-surface: var(--hfn-white);
  --hfn-text: var(--hfn-black);
  --hfn-text-muted: #5E5E66;   /* secondary text, labels (5.9:1 on off-white) */
  --hfn-line: #DEDEE3;          /* borders, dividers */
  --hfn-soft: #EDEDF0;          /* ghost buttons, segmented controls, neutral pills, "attention" backgrounds */
  --hfn-track: #E6E6EA;         /* empty bars and rings */
  --hfn-purple-soft: #EFECFA;   /* "done / good" pill background, selected-row tint */
  --hfn-field: #FFFFFF;         /* inputs */
  --hfn-bad: #B42318;           /* pain, injury, errors, money overdue, allergens (the only non-brand hue) */
  --hfn-bad-bg: #FDECEC;
  --hfn-heading: var(--hfn-black);
  --hfn-mark: var(--hfn-black);          /* the Ramp's body; its cap is --hfn-accent */
  --hfn-accent: var(--hfn-purple);
  --hfn-accent-hover: var(--hfn-purple-deep);
  --hfn-accent-text: var(--hfn-purple-deep);
  --hfn-eyebrow: var(--hfn-purple-deep);  /* small caps labels */
  --hfn-on-accent: var(--hfn-white);     /* white on purple = 4.6:1 */
  --hfn-link: var(--hfn-purple-deep);
  --hfn-link-underline: var(--hfn-purple);
  --hfn-focus: var(--hfn-purple);
  color-scheme: light;
}

/* the free 12-week program and the website: white page, white cards held by a line (no shadows), black, purple pop */
[data-hfn-theme="white"] {
  --hfn-bg: var(--hfn-white);
  --hfn-surface: var(--hfn-white);
  color-scheme: light;
}

/* strength athletes' coaching view (and the coach panel's header band): black and charcoal, white, purple pop */
[data-hfn-theme="dark"] {
  --hfn-bg: var(--hfn-black);
  --hfn-surface: var(--hfn-charcoal);
  --hfn-text: var(--hfn-white);
  --hfn-text-muted: #A6A6AE;   /* 7.8:1 on black */
  --hfn-line: #3A3A40;
  --hfn-soft: #34343A;
  --hfn-track: #34343A;
  --hfn-purple-soft: rgba(123,97,217,.24);
  --hfn-field: #1C1C20;
  --hfn-bad: #F97066;
  --hfn-bad-bg: #3A1C1C;
  --hfn-heading: var(--hfn-white);
  --hfn-mark: var(--hfn-white);
  --hfn-accent: var(--hfn-purple);
  --hfn-accent-hover: var(--hfn-purple-deep);
  --hfn-accent-text: var(--hfn-purple);  /* 4.1:1 on black, 3.1:1 on charcoal: headings and 19 px bold or larger only; small text takes --hfn-link */
  --hfn-eyebrow: var(--hfn-text-muted);  /* small labels stay off-purple on black for contrast */
  --hfn-link: var(--hfn-white);          /* small links stay white with a purple underline */
  --hfn-link-underline: var(--hfn-purple);
  --hfn-focus: var(--hfn-purple);
  color-scheme: dark;
}

/* the Master Program black card: black, silver, purple (no gold: gold is earned, never sold) */
[data-hfn-theme="master"] {
  --hfn-bg: var(--hfn-black);
  --hfn-surface: var(--hfn-charcoal);
  --hfn-text: var(--hfn-white);
  --hfn-text-muted: #A6A6AE;
  --hfn-line: #3A3A40;
  --hfn-soft: #34343A;
  --hfn-track: #34343A;
  --hfn-purple-soft: rgba(123,97,217,.24);
  --hfn-field: #1C1C20;
  --hfn-bad: #F97066;
  --hfn-bad-bg: #3A1C1C;
  --hfn-heading: var(--hfn-silver);
  --hfn-mark: var(--hfn-silver);
  --hfn-accent: var(--hfn-purple);
  --hfn-accent-hover: var(--hfn-purple-deep);
  --hfn-accent-text: var(--hfn-purple);  /* as on dark: big type only; small text takes --hfn-link */
  --hfn-eyebrow: var(--hfn-silver);
  --hfn-link: var(--hfn-white);
  --hfn-link-underline: var(--hfn-purple);
  --hfn-focus: var(--hfn-purple);
  color-scheme: dark;
}

/* ---------- optional base styles (all class-based, nothing global except the focus ring) ---------- */
.hfn-page {
  background: var(--hfn-bg);
  color: var(--hfn-text);
  font-family: var(--hfn-font-body);
  font-size: var(--hfn-text-base);
  line-height: var(--hfn-leading-body);
  -webkit-font-smoothing: antialiased;
}
.hfn-display, .hfn-h1, .hfn-h2, .hfn-h3 {
  font-family: var(--hfn-font-display);
  color: var(--hfn-heading);
  letter-spacing: var(--hfn-tracking-display);
  line-height: var(--hfn-leading-tight);
  margin: 0;
}
.hfn-display { font-size: var(--hfn-text-4xl); font-weight: 700; }
.hfn-h1 { font-size: var(--hfn-text-3xl); font-weight: 700; }
.hfn-h2 { font-size: var(--hfn-text-2xl); font-weight: 600; line-height: var(--hfn-leading-snug); }
.hfn-h3 { font-size: var(--hfn-text-xl); font-weight: 600; line-height: var(--hfn-leading-snug); }
.hfn-eyebrow {
  font-family: var(--hfn-font-display);
  font-size: var(--hfn-text-xs);
  font-weight: 600;
  letter-spacing: var(--hfn-tracking-caps);
  text-transform: uppercase;
  color: var(--hfn-eyebrow);
}
.hfn-num {
  font-family: var(--hfn-font-display);
  font-weight: 700;
  font-size: var(--hfn-text-num);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--hfn-heading);
}
.hfn-muted { color: var(--hfn-text-muted); }
.hfn-link {
  color: var(--hfn-link);
  text-decoration: underline;
  text-decoration-color: var(--hfn-link-underline);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.hfn-link:hover { text-decoration-color: currentColor; }
.hfn-card {
  background: var(--hfn-surface);
  border: 1px solid var(--hfn-line);
  border-radius: var(--hfn-radius-lg);
  padding: var(--hfn-space-5);
}

/* buttons: one purple primary per screen, everything else secondary */
.hfn-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--hfn-space-2);
  min-height: 44px;              /* comfortable tap target */
  padding: 0 var(--hfn-space-5);
  border-radius: var(--hfn-radius);
  border: 2px solid transparent;
  font-family: var(--hfn-font-body);
  font-size: var(--hfn-text-base);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.hfn-btn--primary { background: var(--hfn-accent); color: var(--hfn-on-accent); }
.hfn-btn--primary:hover { background: var(--hfn-accent-hover); }
.hfn-btn--secondary { background: transparent; color: var(--hfn-text); border-color: var(--hfn-text); }
/* hover: the purple goes on the border; the 16 px text takes --hfn-link (deep purple on light, white on dark and master) */
.hfn-btn--secondary:hover { border-color: var(--hfn-accent); color: var(--hfn-link); }
.hfn-btn--quiet { background: transparent; color: var(--hfn-link); padding: 0 var(--hfn-space-3); }
.hfn-btn:disabled, .hfn-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

/* the focus ring: purple, never removed. :where() keeps it easy to override */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible,
.hfn-btn:focus-visible {
  outline: var(--hfn-focus-width) solid var(--hfn-focus);
  outline-offset: var(--hfn-focus-offset);
}

@media (prefers-reduced-motion: reduce) {
  .hfn-btn { transition: none; }
}
