/* ════════════════════════════════
   JR TECHNOLOGIES — DESIGN TOKENS & RESET
   Load FIRST on every page
════════════════════════════════ */

/* ── Design Tokens ───────────────── */
:root {
    /* ── Brand Colors: blue scale ── */
    --blue: #2563eb;        /* primary brand blue: buttons, links, accents on white */
    --blue-deep: #1e40af;   /* darker blue: hover, call-to-action bands */
    --blue-bright: #3b82f6; /* lighter blue fill */
    --blue-light: #60a5fa;  /* blue text on dark (navy) backgrounds */
    --blue-pale: #eaf1ff;   /* pale blue tint for chips and icon boxes */
    --blue-glow: rgba(37, 99, 235, 0.12);

    /* ── Neutral Scale (slate greys) ── */
    --black: #0f172a;      /* deep navy: hero, nav, footer, headings */
    --charcoal: #1e293b;
    --dark: #1e293b;
    --gray-900: #334155;
    --gray-700: #5b6b82;  /* body text on white */
    --gray-500: #64748b;  /* secondary text on white */
    --gray-400: #94a3b8;  /* muted text on navy */
    --gray-300: #cbd5e1;
    --gray-100: #f1f5f9;
    --white: #ffffff;
    --off-white: #f8fafc;

    /* ── Typography ── */
    --serif: "Inter", sans-serif;
    --sans: "Inter", sans-serif;

    /* ── Font Sizes (fluid) ── */
    --text-xxs: 12px;
    --text-xs: 14px;
    --text-sm: 16px;
    --text-base: 18px;
    --text-md: 20px;
    --text-lg: 22px;
    --text-xl: 26px;
    --text-1xl: clamp(20px, 2.5vw, 30px);
    --text-2xl: clamp(24px, 3.5vw, 40px);
    --text-3xl: clamp(36px, 4vw, 58px);
    --text-4xl: clamp(38px, 4.5vw, 62px);
    --text-5xl: clamp(44px, 5.5vw, 72px);
    --text-hero: clamp(52px, 8vw, 110px);

    /* ── Font Weights ── */
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semi: 600;
    --fw-bold: 700;

    /* ── Line Heights ── */
    --lh-tight: 1;
    --lh-snug: 1.1;
    --lh-normal: 1.6;
    --lh-relaxed: 1.75;
    --lh-loose: 1.85;

    /* ── Letter Spacing ── */
    --ls-tighter: -1px;
    --ls-tight: -0.5px;
    --ls-normal: 0;
    --ls-wide: 0.5px;
    --ls-wider: 1px;
    --ls-widest: 2px;
    --ls-ultra: 3px;

    /* ── Spacing ── */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 20px;
    --space-lg: 32px;
    --space-xl: 48px;
    --space-2xl: 60px;
    --space-3xl: 80px;
    --space-4xl: 110px;

    /* ── Layout ── */
    --max-width: 1200px;
    --max-width-wide: 1520px;
    --gutter: 5vw;
    --nav-height: 72px;
    --nav-height-sm: 60px;

    /* ── Radii ── */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;
    --radius-full: 9999px;

    /* ── Shadows ── */
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 12px 40px rgba(37, 99, 235, 0.12);
    --shadow-lg: 0 24px 60px rgba(37, 99, 235, 0.15);
    --shadow-btn: 0 12px 40px rgba(37, 99, 235, 0.5);

    /* ── Transitions ── */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --duration-fast: 0.2s;
    --duration-base: 0.3s;
    --duration-slow: 0.7s;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* ── Z-Index Scale ── */
    --z-base: 1;
    --z-above: 2;
    --z-nav: 100;
    --z-modal: 200;
    --z-toast: 300;
}

/* ── Box Model & Base ───────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    tab-size: 4;
}

body {
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-family: var(--sans);
    background: var(--off-white);
    color: var(--black);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ─── TYPOGRAPHY RESET ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

p,
blockquote,
figure {
    margin: 0;
}

/* ─── LIST RESET ─── */
ul,
ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ─── LINK RESET ─── */
a {
    color: inherit;
    text-decoration: none;
}

/* ─── MEDIA RESET ─── */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* ─── FORM RESET ─── */
input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

/* ─── TABLE RESET ─── */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* ─── MISC RESET ─── */
fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
}

address {
    font-style: normal;
}

hr {
    border: none;
    border-top: 1px solid currentColor;
    margin: 0;
}

/* ─── SCROLLBAR (WebKit) ─── */
::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--black, #0f172a);
}
::-webkit-scrollbar-thumb {
    background: var(--blue, #2563eb);
    border-radius: 2px;
}

/* ─── SELECTION ─── */
::selection {
    background: var(--blue, #2563eb);
    color: var(--white, #ffffff);
}

/* ─── OVERFLOW ─── */
html,
body {
    overflow-x: hidden;
}

/* ─── FOCUS VISIBLE ─── */
:focus-visible {
    outline: 2px solid var(--blue-light, #60a5fa);
    outline-offset: 3px;
}

/* ─── HIDDEN UTILITY ─── */
[hidden] {
    display: none !important;
}
