/* =========================================
   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: swap;
  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: swap;
  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: swap;
  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: swap;
  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);

  /* Colour palette (global — previously in index.css) */
  --haiti:       #161032;
  --java:        #14CFBC;
  --bright-sun:  #FFE830;
  --butterfly:   #5C51A2;
  --mine:        #333333;
  --alabaster:   #FAFAFA;
  --glass-1:     rgba(255, 255, 255, .10);
  --glass-2:     rgba(255, 255, 255, .06);

  /* Border radii */
  --radius-xxl: 32px;
  --radius-xl:  24px;
  --radius-lg:  16px;
  --radius-md:  12px;

  /* Shadows */
  --shadow-1: 0 10px 30px rgba(0, 0, 0, .25);
  --shadow-2: 0 16px 50px rgba(20, 207, 188, .15);

  /* Layout */
  --page-max:    1200px;
  --page-pad:    24px;
  --content-max: 70ch;
}

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

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  padding-top: 64px; /* reserve space for fixed navbar */
  color: var(--alabaster);
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(92, 81, 162, .35), rgba(92, 81, 162, 0)) no-repeat,
    radial-gradient(1000px 700px at 90% 10%, rgba(255, 232, 48, .2), rgba(255, 232, 48, 0)) no-repeat,
    var(--haiti);
  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;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

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);
}

/* =========================================
   Scroll Reveal & Stagger (global)
   ========================================= */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.show {
  opacity: 1;
  transform: none;
}

.stagger > * {
  opacity: 0;
  transform: translateY(18px);
}

.stagger.show > * {
  opacity: 1;
  transform: none;
  transition: opacity .6s ease, transform .6s ease;
}

.stagger.show > *:nth-child(1) { transition-delay: .05s }
.stagger.show > *:nth-child(2) { transition-delay: .12s }
.stagger.show > *:nth-child(3) { transition-delay: .20s }
.stagger.show > *:nth-child(4) { transition-delay: .28s }
.stagger.show > *:nth-child(5) { transition-delay: .36s }
.stagger.show > *:nth-child(6) { transition-delay: .44s }
.stagger.show > *:nth-child(7) { transition-delay: .52s }
.stagger.show > *:nth-child(8) { transition-delay: .60s }

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .stagger > * {
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
