/* ==========================================================================
   Tech Made Simple Cherokee — Design Tokens
   Import this first. Everything else reads from these variables.
   ========================================================================== */

/* Brand font: Fraunces variable (upright + italic). Self-hosted. */
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/Fraunces-VariableFont_SOFT_WONK_opsz_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('fonts/Fraunces-Italic-VariableFont_SOFT_WONK_opsz_wght.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

/* DM Sans still pulled from Google Fonts — no brand file supplied. */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* ---------- Color: raw palette ---------- */
  --tmsc-cream:           #FFFDF5;
  --tmsc-cream-deep:      #F7F1E1;   /* hover on cream surfaces */
  --tmsc-white:           #FFFFFF;   /* card surface */
  --tmsc-charcoal:        #333333;
  --tmsc-charcoal-soft:   #5C5C5C;   /* secondary body */
  --tmsc-charcoal-muted:  #8A8A8A;   /* metadata, captions */
  --tmsc-hairline:        #E8E2D4;   /* cream-toned 1px border */
  --tmsc-hairline-dark:   rgba(255, 253, 245, 0.12); /* borders on dark fills */

  --tmsc-clay:            #A0452D;   /* primary accent */
  --tmsc-clay-hover:      #8B3A25;
  --tmsc-clay-press:      #762F1D;
  --tmsc-teal:            #2A7A6E;   /* secondary accent */
  --tmsc-teal-hover:      #226458;
  --tmsc-teal-press:      #1B4F45;
  --tmsc-sky:             #4A90E2;   /* supporting accent */
  --tmsc-sky-hover:       #3B7BC7;
  --tmsc-apricot:         #F4B58E;   /* warm highlight (fill only) */
  --tmsc-apricot-soft:    #FAD9C2;   /* subtle pull-quote wash */

  /* ---------- Color: semantic ---------- */
  --bg:                   var(--tmsc-cream);
  --bg-alt:               var(--tmsc-white);
  --bg-inverse:           var(--tmsc-charcoal);
  --bg-highlight:         var(--tmsc-apricot-soft);

  --fg:                   var(--tmsc-charcoal);
  --fg-soft:              var(--tmsc-charcoal-soft);
  --fg-muted:             var(--tmsc-charcoal-muted);
  --fg-inverse:           var(--tmsc-cream);

  --accent-primary:       var(--tmsc-clay);
  --accent-primary-hover: var(--tmsc-clay-hover);
  --accent-secondary:     var(--tmsc-teal);
  --accent-secondary-hover: var(--tmsc-teal-hover);
  --accent-link:          var(--tmsc-sky);
  --accent-link-hover:    var(--tmsc-sky-hover);

  --border:               var(--tmsc-hairline);
  --border-strong:        var(--tmsc-charcoal);
  --focus-ring:           var(--tmsc-sky);

  /* ---------- Typography: families ---------- */
  --font-display: 'Fraunces', 'Georgia', 'Times New Roman', serif;
  --font-body:    'DM Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-print:   'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* ---------- Typography: scale (px / line-height) ---------- */
  --fs-display:   60px;
  --lh-display:   1.08;
  --fs-h1:        44px;
  --lh-h1:        1.15;
  --fs-h2:        32px;
  --lh-h2:        1.2;
  --fs-h3:        22px;
  --lh-h3:        1.35;
  --fs-body-lg:   19px;
  --lh-body-lg:   1.6;
  --fs-body:      17px;
  --lh-body:      1.65;
  --fs-small:     15px;
  --lh-small:     1.55;

  /* ---------- Spacing (8-pt scale) ---------- */
  --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;
  --space-10:  128px;

  /* ---------- Radii ---------- */
  /* Only two radii — no sharp edges and no very small corners. */
  --radius-2: 8px;   /* buttons, inputs, badges, small blocks */
  --radius-3: 12px;  /* cards, illustration panels, larger surfaces */

  /* ---------- Elevation (used sparingly) ---------- */
  --elev-0: none;
  --elev-1: 0 4px 20px rgba(51, 51, 51, 0.08); /* modals & floating menus only */

  /* ---------- Layout ---------- */
  --measure-prose:  720px;
  --measure-shell:  1120px;

  /* ---------- Motion ---------- */
  --dur-fast:   160ms;
  --dur-base:   220ms;
  --dur-slow:   320ms;
  --ease-out:   cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ==========================================================================
   Base element styles — semantic defaults reading from the tokens above.
   Include on any TMSC surface to get the brand for free.
   ========================================================================== */

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg);
  font-weight: 500;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-h1);
  letter-spacing: -0.01em;
}

h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-h2);
  letter-spacing: -0.005em;
}

h3 {
  font-family: var(--font-body);
  font-size: var(--fs-h3);
  line-height: var(--lh-h3);
  font-weight: 600;
  letter-spacing: 0;
}

.display {
  font-family: var(--font-display);
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: -0.015em;
  font-weight: 400;
}

p {
  margin: 0 0 var(--space-4);
  max-width: var(--measure-prose);
  text-wrap: pretty;
}

.lead {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body-lg);
  color: var(--fg-soft);
}

small, .small {
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  color: var(--fg-muted);
}

a {
  color: var(--accent-link);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-out);
}

a:hover {
  color: var(--accent-link-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-radius: var(--radius-2);
}

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