/* ============================================================
   BetterWay Devs — Design Tokens
   Colors · Typography · Spacing · Radii · Shadows · Transitions
   ============================================================ */

/* === BRAND FONTS: Rebrand (Display + Text) ===
   Display family = RebrandDis (humanist display) -> headings, hero, KPI
   Text family    = RebrandTxt (workhorse text)   -> body, UI, data
   JetBrains Mono kept for code (no brand mono provided).
*/
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap");

@font-face { font-family: "RebrandDis"; src: url("fonts/RebrandDis-Regular.otf") format("opentype");   font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "RebrandDis"; src: url("fonts/RebrandDis-Bold.otf") format("opentype");      font-weight: 700; font-style: normal; font-display: swap; }

@font-face { font-family: "RebrandTxt"; src: url("fonts/RebrandTxt-Regular.otf") format("opentype");   font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "RebrandTxt"; src: url("fonts/RebrandTxt-Medium.otf") format("opentype");    font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "RebrandTxt"; src: url("fonts/RebrandTxt-SemiBold.otf") format("opentype");  font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "RebrandTxt"; src: url("fonts/RebrandTxt-Bold.otf") format("opentype");      font-weight: 700; font-style: normal; font-display: swap; }


:root {
  /* === BRAND: NAVY (primary) === */
  --color-navy-dark:  #060F1F;
  --color-navy-900:   #0B1F3A;
  --color-navy-700:   #112A4D;
  --color-navy-500:   #1A3A66;
  --color-navy-100:   #D6E4F0;
  --color-navy-50:    #EBF3FB;

  /* === BRAND: CORAL (primary accent) === */
  --color-coral-dark: #C43E28;
  --color-coral-500:  #E8553E;
  --color-coral-400:  #ED6E57;
  --color-coral-300:  #F49A89;
  --color-coral-100:  #FDE8E4;

  /* === BRAND: TEAL (sage / growth — complements forest green) === */
  --color-teal-dark:  #2D6359;
  --color-teal-500:   #3F7A6E;
  --color-teal-400:   #5C9889;
  --color-teal-300:   #94B6A8;
  --color-teal-100:   #DCEAE3;

  /* === BRAND: AMBER (highlight) === */
  --color-amber-dark: #CC8C00;
  --color-amber-500:  #F2A900;
  --color-amber-400:  #F7BC33;
  --color-amber-300:  #FAD57A;
  --color-amber-100:  #FEF6E0;

  /* === NEUTRALS (warm gray w/ slight purple undertone) === */
  --color-gray-900:   #1A1A2E;
  --color-gray-800:   #2D2D44;
  --color-gray-700:   #4A4A66;
  --color-gray-600:   #6B6B8A;
  --color-gray-500:   #9090AA;
  --color-gray-400:   #B8B8CC;
  --color-gray-300:   #D4D4E4;
  --color-gray-200:   #E8E8F0;
  --color-gray-100:   #F4F4F8;
  --color-white:      #FFFFFF;

  /* === SEMANTIC === */
  --color-success:    #2E7D32;
  --color-success-bg: #E8F5E9;
  --color-warning:    #E65100;
  --color-warning-bg: #FFF3E0;
  --color-error:      #C62828;
  --color-error-bg:   #FFEBEE;
  --color-info:       #01579B;
  --color-info-bg:    #E1F5FE;

  /* === FOREGROUND / BACKGROUND ROLES === */
  --fg-1: var(--color-gray-900); /* headings */
  --fg-2: var(--color-gray-800); /* body */
  --fg-3: var(--color-gray-700); /* secondary */
  --fg-4: var(--color-gray-600); /* meta, placeholder */
  --fg-on-navy: var(--color-white);
  --fg-on-coral: var(--color-white);

  --bg-1: var(--color-white);
  --bg-2: var(--color-gray-100);
  --bg-3: var(--color-gray-200);
  --bg-navy: var(--color-navy-900);
  --bg-navy-dark: var(--color-navy-dark);
  --bg-coral: var(--color-coral-500);

  --border-1: var(--color-gray-300);
  --border-2: var(--color-gray-200);
  --border-strong: var(--color-navy-900);

  /* === TYPOGRAPHY: FAMILIES === */
  --font-display:  "RebrandDis", "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body:     "RebrandTxt", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono:     "JetBrains Mono", "Courier New", ui-monospace, monospace;
  --font-dingbats: "RebrandDingbats", system-ui, sans-serif;

  /* === TYPOGRAPHY: SCALE === */
  --text-display-xl: 4.5rem;   /* 72 */
  --text-display-l:  3.5rem;   /* 56 */
  --text-h1:         2.5rem;   /* 40 */
  --text-h2:         2rem;     /* 32 */
  --text-h3:         1.5rem;   /* 24 */
  --text-h4:         1.25rem;  /* 20 */
  --text-h5:         1rem;     /* 16 */
  --text-h6:         0.875rem; /* 14 */
  --text-body-xl:    1.25rem;  /* 20 */
  --text-body-l:     1.125rem; /* 18 */
  --text-body:       1rem;     /* 16 */
  --text-body-s:     0.875rem; /* 14 */
  --text-caption:    0.75rem;  /* 12 */

  /* === SPACING (8px base) === */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem;
  --space-4: 1rem;    --space-5: 1.25rem;--space-6: 1.5rem;
  --space-8: 2rem;    --space-10:2.5rem; --space-12:3rem;
  --space-16:4rem;    --space-20:5rem;   --space-24:6rem;
  --space-32:8rem;

  /* === RADIUS === */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* === SHADOWS (navy-tinted) === */
  --shadow-xs: 0 1px 4px rgba(11,31,58,0.08);
  --shadow-sm: 0 2px 8px rgba(11,31,58,0.08);
  --shadow-md: 0 4px 16px rgba(11,31,58,0.10);
  --shadow-lg: 0 8px 32px rgba(11,31,58,0.12);
  --shadow-xl: 0 16px 48px rgba(11,31,58,0.16);

  /* === MOTION === */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* === LAYOUT === */
  --container-max:     1280px;
  --container-content: 1120px;
  --container-narrow:  800px;
  --container-article: 680px;
  --sidebar-width:     240px;
  --sidebar-collapsed: 64px;
  --topbar-height:     56px;

  /* === FOCUS RING === */
  --focus-ring: 0 0 0 3px var(--color-amber-500);
}

/* ============================================================
   SEMANTIC TYPE STYLES
   Use directly: <h1 class="t-h1">, or via element selectors
   ============================================================ */

html { font-family: var(--font-body); color: var(--fg-2); -webkit-font-smoothing: antialiased; }
body { font-size: var(--text-body); line-height: 1.6; }

.t-display-xl, .t-display-l, .t-h1, .t-h2, .t-h3, .t-h4, .t-h5, .t-h6 {
  font-family: var(--font-display);
  color: var(--fg-1);
  text-wrap: balance;
}

.t-display-xl { font-size: var(--text-display-xl); font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; }
.t-display-l  { font-size: var(--text-display-l);  font-weight: 800; line-height: 1.10; letter-spacing: -0.02em; }
.t-h1         { font-size: var(--text-h1); font-weight: 700; line-height: 1.15; letter-spacing: -0.01em; }
.t-h2         { font-size: var(--text-h2); font-weight: 700; line-height: 1.20; letter-spacing: -0.01em; }
.t-h3         { font-size: var(--text-h3); font-weight: 600; line-height: 1.25; }
.t-h4         { font-size: var(--text-h4); font-weight: 600; line-height: 1.30; }
.t-h5         { font-size: var(--text-h5); font-weight: 600; line-height: 1.40; }
.t-h6         { font-size: var(--text-h6); font-weight: 600; line-height: 1.40; }

.t-body-xl { font-size: var(--text-body-xl); font-weight: 400; line-height: 1.6;  }
.t-body-l  { font-size: var(--text-body-l);  font-weight: 400; line-height: 1.65; }
.t-body    { font-size: var(--text-body);    font-weight: 400; line-height: 1.6;  }
.t-body-s  { font-size: var(--text-body-s);  font-weight: 400; line-height: 1.5;  color: var(--fg-3); }
.t-caption { font-size: var(--text-caption); font-weight: 500; line-height: 1.4;  color: var(--fg-4); }

.t-label {
  font-size: var(--text-caption); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--fg-3);
}
.t-eyebrow {
  font-size: 0.8125rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--color-coral-500);
}
.t-mono { font-family: var(--font-mono); font-size: 0.875rem; }

/* Tabular numerics for any data display */
.t-num { font-variant-numeric: tabular-nums; }

/* KPI value display */
.t-kpi { font-family: var(--font-display); font-weight: 800; font-size: 2.25rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--color-navy-900); }

/* Pull quote */
.t-quote {
  font-family: var(--font-display);
  font-size: 1.375rem; font-weight: 500; font-style: italic;
  line-height: 1.5; color: var(--fg-1);
  border-left: 3px solid var(--color-coral-500);
  padding-left: var(--space-6);
}

/* === ELEMENT DEFAULTS === */
h1 { font: 700 var(--text-h1)/1.15 var(--font-display); color: var(--fg-1); letter-spacing: -0.01em; }
h2 { font: 700 var(--text-h2)/1.20 var(--font-display); color: var(--fg-1); letter-spacing: -0.01em; }
h3 { font: 600 var(--text-h3)/1.25 var(--font-display); color: var(--fg-1); }
h4 { font: 600 var(--text-h4)/1.30 var(--font-display); color: var(--fg-1); }
h5 { font: 600 var(--text-h5)/1.40 var(--font-display); color: var(--fg-1); }
h6 { font: 600 var(--text-h6)/1.40 var(--font-display); color: var(--fg-1); }
p  { font: 400 var(--text-body)/1.6 var(--font-body); color: var(--fg-2); }
code, pre { font-family: var(--font-mono); }
small { font-size: var(--text-body-s); color: var(--fg-3); }
