/* ============================================================
   Modern Training - Brand tokens (colors, type, spacing)
   ------------------------------------------------------------
   This file is the Brand System expressed as CSS variables.
   It comes straight from the Claude Design handoff bundle
   (colors_and_type.css) with font paths adjusted for the theme.

   If a brand color ever changes, change it HERE and it changes
   everywhere on the site.
   ============================================================ */

/* Hanken Grotesk - Modern Training's brand font, self-hosted.
   OFL-licensed variable fonts (weights 100-900, upright + italic).
   See assets/fonts/OFL.txt for the license. */

/* Upright - Latin */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../fonts/HankenGrotesk-VariableFont_wght-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Upright - Latin Extended */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../fonts/HankenGrotesk-VariableFont_wght-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Italic - Latin */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../fonts/HankenGrotesk-Italic-VariableFont_wght-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Italic - Latin Extended */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('../fonts/HankenGrotesk-Italic-VariableFont_wght-latin-ext.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ----- Core palette (from brand guide) ----- */
  --mt-white:        #FFFFFF;
  --mt-black:        #000000;
  --mt-ink:          #212026;  /* near-black, preferred body color */
  --mt-gray-line:    #DCDCDC;  /* light neutral, hairlines, surfaces */
  --mt-gray-slate:   #53575D;  /* secondary text, UI chrome */

  /* ----- Brand colors ----- */
  --mt-orange:       #FA7D00;  /* PRIMARY - the "o" in the logo */
  --mt-orange-hover: #E06F00;  /* darkened orange for button hovers */
  --mt-navy:         #003663;  /* deep brand navy */
  --mt-teal-deep:    #006785;  /* secondary teal */
  --mt-teal:         #006064;  /* darker green-teal */
  --mt-cyan:         #00AFE2;  /* bright accent cyan */
  --mt-cyan-soft:    #80E3FF;  /* pale cyan tint */
  --mt-forest:       #395C16;  /* dark forest */

  /* ----- Section background tints ----- */
  --mt-warm:         #FFEDDB;  /* warm orange tint sections */
  --mt-gray-cool:    #F1F2F4;  /* cool gray sections */

  /* ----- Semantic / status ----- */
  --mt-success:      #218C03;
  --mt-warning:      #FFC60A;
  --mt-danger:       #CC0033;
  --mt-info:         #00AFE2;

  /* ----- Role-based foreground ----- */
  --fg-1:            var(--mt-ink);        /* default body */
  --fg-2:            var(--mt-gray-slate); /* secondary text */
  --fg-3:            #8A8D93;              /* tertiary, captions */
  --fg-inverse:      var(--mt-white);
  --fg-brand:        var(--mt-orange);
  --fg-accent:       var(--mt-navy);
  --fg-link:         var(--mt-teal-deep);

  /* ----- Role-based surfaces ----- */
  --bg-1:            var(--mt-white);       /* page */
  --bg-2:            #F7F7F8;               /* alt surface */
  --bg-3:            #EEEFF1;               /* sunken */
  --bg-inverse:      var(--mt-ink);
  --bg-brand:        var(--mt-orange);
  --bg-accent:       var(--mt-navy);

  /* ----- Borders ----- */
  --border-subtle:   var(--mt-gray-line);
  --border-strong:   #B9BBC0;
  --border-focus:    var(--mt-orange);

  /* ----- Radii ----- */
  --radius-xs:       4px;
  --radius-sm:       8px;
  --radius-md:       12px;
  --radius-lg:       20px;
  --radius-xl:       28px;
  --radius-pill:     999px;
  --radius-circle:   50%;

  /* ----- Shadow / elevation ----- */
  --shadow-0:        0 0 0 1px rgba(33, 32, 38, 0.06);
  --shadow-1:        0 1px 2px rgba(33, 32, 38, 0.06), 0 1px 3px rgba(33, 32, 38, 0.08);
  --shadow-2:        0 4px 10px rgba(33, 32, 38, 0.08), 0 2px 4px rgba(33, 32, 38, 0.06);
  --shadow-3:        0 12px 28px rgba(33, 32, 38, 0.14), 0 4px 8px rgba(33, 32, 38, 0.08);
  --shadow-focus:    0 0 0 3px rgba(250, 125, 0, 0.35);

  /* ----- Spacing scale (4pt grid, slightly loose) ----- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  24px;
  --space-6:  32px;
  --space-7:  48px;
  --space-8:  64px;
  --space-9:  96px;

  /* ----- Type families ----- */
  --font-display: 'Hanken Grotesk', sans-serif;
  --font-body:    'Hanken Grotesk', sans-serif;
  --font-mono:    ui-monospace, SFMono-Regular, 'SF Mono', Menlo,
                  Consolas, monospace;

  /* ----- Type scale ----- */
  --fs-display:   clamp(40px, 5.2vw, 72px);
  --fs-h1:        clamp(32px, 3.6vw, 48px);
  --fs-h2:        clamp(26px, 2.6vw, 36px);
  --fs-h3:        22px;
  --fs-h4:        18px;
  --fs-body:      16px;
  --fs-small:     14px;
  --fs-caption:   12px;

  --lh-tight:     1.1;
  --lh-snug:      1.25;
  --lh-normal:    1.5;
  --lh-relaxed:   1.65;

  --fw-regular:   400;
  --fw-medium:    600;
  --fw-bold:      700;
  --fw-black:     800;

  /* ----- Transitions ----- */
  --ease-out:     cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-in-out:  cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:     120ms;
  --dur-base:     180ms;
  --dur-slow:     320ms;
}

/* ============================================================
   Base element styles
   ============================================================ */
html, body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--fg-1);
  background: var(--bg-1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--fg-1);
  line-height: var(--lh-tight);
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-4);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); font-weight: var(--fw-black); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); font-weight: var(--fw-bold); }
h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); }
h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); }

p { margin: 0 0 var(--space-4); line-height: var(--lh-relaxed); text-wrap: pretty; }

a {
  color: var(--fg-link);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1.5px;
  transition: color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--mt-orange); }

/* Visible keyboard focus everywhere, in brand orange */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-xs);
}

small { font-size: var(--fs-small); color: var(--fg-2); }

hr {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: var(--space-6) 0;
}

::selection { background: var(--mt-orange); color: var(--mt-white); }

/* ============================================================
   Utility type classes
   ============================================================ */
.u-display { font-family: var(--font-display); font-size: var(--fs-display); font-weight: var(--fw-black); letter-spacing: -0.025em; line-height: 0.98; }
.u-eyebrow { font-family: var(--font-display); font-size: 13px; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-brand); }
.u-lead    { font-size: 20px; line-height: var(--lh-relaxed); color: var(--fg-2); }
.u-caption { font-size: var(--fs-caption); color: var(--fg-3); letter-spacing: 0.02em; }
