/* =========================================
   miniCODEX — Global Typography System
   =========================================
   Fonts:   Roboto (headers) + Open Sans (body)
   Scale:   8px spacing grid
   ========================================= */

/* --- Fallback font-face with metric overrides to reduce CLS --- */
@font-face {
  font-family: 'Open Sans Fallback';
  src: local('Arial');
  size-adjust: 105.5%;
  ascent-override: 110%;
  descent-override: 30%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Roboto Fallback';
  src: local('Arial');
  size-adjust: 100.3%;
  ascent-override: 93%;
  descent-override: 24%;
  line-gap-override: 0%;
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: optional;
  src: url('/assets/fonts/open-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-stretch: 100%;
  font-display: optional;
  src: url('/assets/fonts/open-sans-latin.woff2') format('woff2');
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: optional;
  src: url('/assets/fonts/roboto-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: optional;
  src: url('/assets/fonts/roboto-latin.woff2') format('woff2');
  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+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- CSS Custom Properties ---- */
:root {
  /* Font families */
  --font-heading: 'Roboto', 'Roboto Fallback', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --font-body:    'Open Sans', 'Open Sans Fallback', system-ui, -apple-system, Segoe UI, Helvetica, Arial, sans-serif;
  --fw-heading-bold: 700;
  --fw-heading-medium: 500;
  --fw-body-regular: 400;

  /* Desktop type scale */
  --fs-h1:    48px;
  --fs-h2:    36px;
  --fs-h3:    28px;
  --fs-h4:    22px;
  --fs-body-lg: 18px;
  --fs-body:  16px;
  --fs-small: 14px;
  --fs-micro: 12px;
  --fs-btn:   16px;
  --fs-nav:   16px;

  /* Line heights */
  --lh-heading:   1.2;
  --lh-heading-2: 1.3;
  --lh-body:      1.6;

  /* Paragraph max width */
  --prose-max: 680px;

  /* 8px spacing grid */
  --sp-1:  8px;
  --sp-2:  16px;
  --sp-3:  24px;
  --sp-4:  32px;
  --sp-6:  48px;
  --sp-8:  64px;
  --section-space: var(--sp-6);
}

/* ---- Mobile type scale ---- */
@media (max-width: 768px) {
  :root {
    --fs-h1:    34px;
    --fs-h2:    28px;
    --fs-h3:    22px;
    --fs-h4:    20px;
    --fs-body:  16px;
  }
}

/* ---- Base ---- */
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: var(--fw-body-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p,
li,
label,
input,
select,
textarea {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* ---- Headings ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  font-weight: var(--fw-heading-bold);
  margin-top: 0;
  margin-bottom: var(--sp-2);
}

h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-heading-bold);
  line-height: var(--lh-heading);   /* 1.2 */
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-heading-bold);
  line-height: var(--lh-heading-2); /* 1.3 */
  letter-spacing: -0.01em;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-heading-medium);
  line-height: var(--lh-heading-2); /* 1.3 */
}

h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-heading-medium);
  line-height: var(--lh-heading-2); /* 1.3 */
}

/* ---- Body text utilities ---- */
p {
  max-width: var(--prose-max);
  margin-top: 0;
  margin-bottom: var(--sp-2);
  line-height: var(--lh-body);
}

.text-lg {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
}

.text-sm {
  font-size: var(--fs-small);
  line-height: var(--lh-body);
}

.text-micro {
  font-size: var(--fs-micro);
  line-height: var(--lh-body);
}

/* ---- Navigation text ---- */
nav, nav a, .navbar a, .links a {
  font-family: var(--font-body);
  font-size: var(--fs-nav);
  line-height: var(--lh-body);
}

/* ---- Buttons ---- */
button, .btn, [type="submit"] {
  font-family: var(--font-body);
  font-size: var(--fs-btn);
  line-height: 1.2;
}

/* ---- Labels, pills, badges, eyebrows ---- */
.eyebrow, .kicker, .hero-badge {
  font-family: var(--font-heading);
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: var(--lh-heading-2);
}

/* ---- Lead / subtitle ---- */
.lead, .sub, .enroll-subtitle, .enroll-sub {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-body);
}

/* ---- Credits / fine print ---- */
.credits {
  font-size: var(--fs-small);
}

/* ---- Prose sections (article content) ---- */
.prose p,
.prose li {
  max-width: var(--prose-max);
  line-height: var(--lh-body);
}

.prose h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-heading-2);
  margin-bottom: var(--sp-2);
}

.prose h3 {
  font-size: var(--fs-h3);
  line-height: var(--lh-heading-2);
  margin-bottom: var(--sp-1);
}

/* ---- Footer headings ---- */
.footer-col h4 {
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: var(--fw-heading-medium);
  line-height: var(--lh-heading-2);
}

/* ---- Card typography ---- */
.card-title, .course-title, .enroll-title {
  font-family: var(--font-heading);
  font-weight: var(--fw-heading-bold);
}

.card-title,
.course-title,
.enroll-title,
.card h3,
.card h4,
.benefit h3,
.benefit h4,
.faq-q .t,
.footer-col h4 {
  line-height: var(--lh-heading-2);
}

.card p,
.benefit p,
.site-footer p,
.site-footer li,
.journey-content p,
.faq-a p {
  font-size: var(--fs-body);
  line-height: var(--lh-body);
}

/* ---- Input fields ---- */
input, select, textarea {
  font-family: var(--font-body);
  font-size: var(--fs-body);
}

small,
.small,
.fine-print {
  font-size: var(--fs-small);
  line-height: var(--lh-body);
}
