/* =============================================================================
   MakScript — base.css
   Design tokens, reset, typography, utilities
   @author Sebastian Makoye
   ============================================================================= */

/* ---------- Tokens ------------------------------------------------------- */
:root {
    /* Navy palette */
    --navy-950: #050c18;
    --navy-900: #0a1628;
    --navy-800: #0f1f3a;
    --navy-700: #16305c;
    --navy-600: #1e3a6e;
    --navy-500: #26487f;
    --navy-400: #3a5a8e;
    --navy-300: #6b83ab;

    /* Cyan palette */
    --cyan-700: #008fa0;
    --cyan-600: #00a3b0;
    --cyan-500: #00c2d1;
    --cyan-400: #22d3e0;
    --cyan-300: #6be6f0;
    --cyan-200: #a3f0f7;
    --cyan-100: #d6f8fb;

    /* Neutrals */
    --ink:      #0e1726;
    --ink-2:    #2b3a55;
    --muted:    #5b6b85;
    --muted-2:  #8a97ad;
    --line:     #e3eaf3;
    --line-2:   #d2dce9;
    --bg:       #f6f9fc;
    --bg-2:     #eef3f9;
    --surface:  #ffffff;
    --white:    #ffffff;

    /* Semantic */
    --text:      var(--ink);
    --text-soft: var(--muted);
    --link:      var(--cyan-600);
    --link-hover: var(--cyan-700);
    --success:   #16a34a;
    --warning:   #f59e0b;
    --danger:    #dc2626;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;

    /* Spacing scale (4px base) */
    --s-1:  0.25rem;   /*  4px */
    --s-2:  0.5rem;    /*  8px */
    --s-3:  0.75rem;   /* 12px */
    --s-4:  1rem;      /* 16px */
    --s-5:  1.25rem;   /* 20px */
    --s-6:  1.5rem;    /* 24px */
    --s-8:  2rem;      /* 32px */
    --s-10: 2.5rem;    /* 40px */
    --s-12: 3rem;      /* 48px */
    --s-16: 4rem;      /* 64px */
    --s-20: 5rem;      /* 80px */
    --s-24: 6rem;      /* 96px */
    --s-32: 8rem;      /* 128px */

    /* Radius */
    --r-sm:  6px;
    --r-md:  10px;
    --r-lg:  14px;
    --r-xl:  20px;
    --r-2xl: 28px;
    --r-full: 9999px;

    /* Shadows */
    --sh-sm:  0 1px 2px rgba(10, 22, 40, .06), 0 1px 3px rgba(10, 22, 40, .08);
    --sh-md:  0 4px 12px rgba(10, 22, 40, .08), 0 2px 4px rgba(10, 22, 40, .06);
    --sh-lg:  0 12px 32px rgba(10, 22, 40, .12), 0 4px 8px rgba(10, 22, 40, .06);
    --sh-xl:  0 24px 64px rgba(10, 22, 40, .18), 0 8px 16px rgba(10, 22, 40, .08);
    --sh-cyan: 0 8px 32px rgba(0, 194, 209, .22);
    --sh-cyan-lg: 0 16px 64px rgba(0, 194, 209, .32);

    /* Container widths */
    --container: 1200px;
    --container-narrow: 800px;
    --container-wide: 1400px;

    /* Transitions */
    --t-fast:  150ms cubic-bezier(.4, 0, .2, 1);
    --t-base:  250ms cubic-bezier(.4, 0, .2, 1);
    --t-slow:  400ms cubic-bezier(.4, 0, .2, 1);
    --t-slower: 700ms cubic-bezier(.4, 0, .2, 1);

    /* Layout */
    --header-h: 76px;
    --scroll-progress-h: 3px;

    /* Z-index */
    --z-header: 100;
    --z-mobile-nav: 200;
    --z-modal: 300;
    --z-toast: 400;
    --z-scroll-progress: 500;
}

/* ---------- Reset -------------------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    overflow-x: hidden;
}

img, svg, video, canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

button, input, select, textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: var(--link);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { color: var(--link-hover); }

ul, ol { list-style: none; }

table {
    border-collapse: collapse;
    width: 100%;
}

hr {
    border: none;
    border-top: 1px solid var(--line);
    margin: var(--s-8) 0;
}

::selection {
    background: var(--cyan-200);
    color: var(--navy-900);
}

/* ---------- Typography --------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--navy-900);
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.75rem); }
h3 { font-size: clamp(1.35rem, 1.5vw + 1rem, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: var(--s-4);
    color: var(--ink-2);
}
p:last-child { margin-bottom: 0; }

.display-1 {
    font-size: clamp(2.5rem, 6vw + 1rem, 5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.display-2 {
    font-size: clamp(2rem, 4vw + 1rem, 3.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.lead {
    font-size: clamp(1.05rem, 1vw + 0.75rem, 1.25rem);
    line-height: 1.6;
    color: var(--muted);
    font-weight: 400;
}

.eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan-600);
    margin-bottom: var(--s-4);
}

.text-soft { color: var(--muted); }
.text-cyan { color: var(--cyan-600); }
.text-navy { color: var(--navy-900); }

code, pre, kbd, samp {
    font-family: var(--font-mono);
    font-size: 0.92em;
}

code {
    background: var(--bg-2);
    color: var(--navy-700);
    padding: 0.15em 0.4em;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
}

pre {
    background: var(--navy-900);
    color: var(--cyan-100);
    padding: var(--s-5);
    border-radius: var(--r-lg);
    overflow-x: auto;
    font-size: 0.875rem;
    line-height: 1.65;
    border: 1px solid var(--navy-800);
}
pre code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
}

blockquote {
    border-left: 3px solid var(--cyan-500);
    padding-left: var(--s-5);
    margin: var(--s-6) 0;
    color: var(--muted);
    font-style: italic;
    font-size: 1.05rem;
}

/* ---------- Focus -------------------------------------------------------- */
:focus-visible {
    outline: 2px solid var(--cyan-500);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Utilities ---------------------------------------------------- */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--s-4);
    padding: var(--s-2) var(--s-4);
    background: var(--navy-900);
    color: var(--white);
    border-radius: var(--r-md);
    z-index: 9999;
    font-weight: 600;
    transition: top var(--t-fast);
}
.skip-link:focus { top: var(--s-4); color: var(--white); }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--s-6);
}
.container--narrow { max-width: var(--container-narrow); }
.container--wide   { max-width: var(--container-wide); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: var(--s-6); }

.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-right  { text-align: right; }

.mt-0 { margin-top: 0; }
.mt-4 { margin-top: var(--s-4); }
.mt-6 { margin-top: var(--s-6); }
.mt-8 { margin-top: var(--s-8); }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--s-4); }
.mb-6 { margin-bottom: var(--s-6); }

.w-full { width: 100%; }

/* Section base */
.section {
    padding: var(--s-24) 0;
    position: relative;
}
.section--sm { padding: var(--s-16) 0; }
.section--lg { padding: var(--s-32) 0; }
.section--flush { padding: 0; }
.section--bg { background: var(--bg); }
.section--navy {
    background: var(--navy-900);
    color: var(--white);
}
.section--navy h1, .section--navy h2, .section--navy h3 {
    color: var(--white);
}
.section--navy p { color: var(--navy-300); }

.section-header {
    max-width: 680px;
    margin: 0 auto var(--s-16);
    text-align: center;
}
.section-header--left {
    margin-left: 0;
    text-align: left;
}