/* ===================================================================
   AGENCY CORE — vendor.css
   GLOBAL ONLY — tokens, reset, typography, buttons, breakpoints.
   Section CSS never goes in this file (see CLAUDE.md §6.1).
   =================================================================== */

/* ===================================================================
   FONTS — Lufga (whole site), self-hosted in assets/fonts
   =================================================================== */
@font-face { font-family: "Lufga"; src: url("../fonts/Lufga-Regular.woff2") format("woff2"), url("../fonts/Lufga-Regular.woff") format("woff"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lufga"; src: url("../fonts/Lufga-Medium.woff2") format("woff2"), url("../fonts/Lufga-Medium.woff") format("woff"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Lufga"; src: url("../fonts/Lufga-SemiBold.woff2") format("woff2"), url("../fonts/Lufga-SemiBold.woff") format("woff"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Lufga"; src: url("../fonts/Lufga-Bold.woff2") format("woff2"), url("../fonts/Lufga-Bold.woff") format("woff"); font-weight: 700; font-style: normal; font-display: swap; }

/* ===================================================================
   TOKENS
   =================================================================== */
:root {
    /* COLORS — BRAND */
    --blue-600: #1a54c9;
    --blue-500: #2a6cf0;
    --blue-400: #4d8bff;
    --blue-300: #93b8ff;
    --blue-100: #dce6fd;
    --blue-50: #eef3fe;
    --navy-950: #000c34;   /* top bar only — original brand navy */
    --navy-900: #0f2a78;
    --navy-800: #17388f;
    --navy-700: #2149b4;
    --coral-500: #f15039;
    --orange-400: #ff9d00;
    --red-400: #ff4e50;

    /* COLORS — NEUTRALS */
    --black: #0a0d14;
    --ink: #111522;
    --body: #4b5263;
    --muted: #6b7384;
    --line: #e3e7ee;
    --line-dark: rgba(255, 255, 255, .12);
    --surface-1: #f4f6f9;
    --surface-2: #f8f9fb;
    --dark-900: #111319;
    --dark-800: #1a1d25;
    --white: #ffffff;

    /* GRADIENTS */
    --gradient1: linear-gradient(90deg, var(--blue-600) 0%, var(--blue-400) 100%);
    --gradient2: linear-gradient(90deg, var(--blue-400) 0%, var(--blue-600) 100%);
    --gradient-warm: linear-gradient(135deg, var(--red-400) 0%, var(--orange-400) 100%);
    --gradient-hover: linear-gradient(90deg, var(--coral-500) 0%, #ff7a1a 100%);   /* every .btn on hover */
    --gradient-navy: linear-gradient(150deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);

    /* ROLE ALIASES */
    --text: var(--ink);
    --primary: var(--blue-500);
    --primary-dark: var(--blue-600);
    --primary-rgb: 42, 108, 240;
    --accent: var(--coral-500);

    /* FONTS */
    --font-display: "Lufga", system-ui, sans-serif;
    --font-body: "Lufga", system-ui, sans-serif;

    /* RAW TYPE SCALE (name == desktop px value) */
    --f13: 13px;
    --f14: 14px;
    --f15: 15px;
    --f16: 16px;
    --f18: 18px;
    --f20: 20px;
    --f24: 24px;
    --f28: 28px;
    --f32: 32px;
    --f40: 40px;
    --f48: clamp(2.375rem, 2.0625rem + 1vw, 3rem);          /* 48 - 38 */
    --f64: clamp(3.125rem, 2.5rem + 1.75vw, 4rem);          /* 64 - 50 */
    --f96: 96px;

    --bodyLh: 1.65;
    --lhTight: 1.15;

    /* CONTAINER & SPACE */
    --container: 1320px;
    --container-sm: 960px;
    --container-xs: 760px;
    --gutter: 24px;
    --sectionGap: 120px;
    --sectiongapHalf: 60px;
    --sp4: 4px;
    --sp8: 8px;
    --sp10: 10px;
    --sp12: 12px;
    --sp15: 15px;
    --sp20: 20px;
    --sp25: 25px;
    --sp30: 30px;
    --sp40: 40px;
    --sp50: 50px;
    --sp60: 60px;
    --sp80: 80px;
    --sp100: 100px;
    --g30: 30px;

    /* RADIUS / SHADOW / Z / EASE */
    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 14px;
    --r-xl: 24px;
    --r-btn: 9999px;
    --r-full: 9999px;
    --shadow-sm: 0 2px 10px rgba(16, 24, 40, .06);
    --shadow-md: 0 12px 32px rgba(16, 24, 40, .08);
    --shadow-lg: 0 24px 60px rgba(16, 24, 40, .14);
    --overlay: rgba(15, 42, 120, .72);
    --z-sticky: 200;
    --z-drop: 210;
    --z-modal: 300;
    --ease: .25s ease;
    --ease-out: .3s cubic-bezier(.2, .7, .3, 1);
    --transition: all .3s ease-in-out;

    /* SCROLLBAR */
    --scrollbar-width: 10px;
    --scrollbar-thumb: var(--primary);
    --scrollbar-thumb-hover: #1545a6;

    /* ---------------------------------------------------------------
       GLOBAL BREAKPOINTS — container / gutter / gap / type tokens step
       down here, so every layout using .container or these tokens
       follows automatically.
       --------------------------------------------------------------- */
    @media (max-width: 1599.98px) {
        --container: 1270px;
    }
    @media (max-width: 1439.98px) {
        --container: 1215px;
    }
    @media (max-width: 1365.98px) {
        --container: 1110px;
    }
    @media (max-width: 1199.98px) {
        --container: 1000px;
        --sectionGap: 80px;
        --sectiongapHalf: 40px;
        --g30: 25px;
        --f24: 22px;
        --f28: 26px;
        --f32: 30px;
        --f40: 36px;
        --f48: 2.375rem;
        --f64: 3.125rem;
        --f96: 72px;
        --sp40: 32px;
        --sp50: 40px;
        --sp60: 48px;
        --sp80: 64px;
        --sp100: 80px;
    }
    @media (max-width: 991.98px) {
        --container: 960px;
        --g30: 20px;
        --f20: 18px;
        --f24: 21px;
        --f28: 24px;
        --f32: 28px;
        --f40: 34px;
        --f96: 60px;
        --sp40: 26px;
        --sp50: 32px;
        --sp60: 40px;
        --sp80: 52px;
        --sp100: 64px;
    }
    @media (max-width: 767.98px) {
        --container: 100%;
        --gutter: 20px;
        --sectionGap: 64px;
        --sectiongapHalf: 32px;
        --g30: 16px;
        --f18: 17px;
        --f20: 18px;
        --f24: 20px;
        --f28: 22px;
        --f32: 26px;
        --f40: 30px;
        --f48: 2.125rem;
        --f64: 2.5rem;
        --f96: 48px;
        --sp40: 20px;
        --sp50: 25px;
        --sp60: 30px;
        --sp80: 40px;
        --sp100: 50px;
    }
    @media (max-width: 575.98px) {
        --gutter: 16px;
        --f48: 1.875rem;
        --f64: 2.25rem;
        --f96: 44px;
    }
}

/* ===================================================================
   RESET / BASE
   =================================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) transparent;
    -webkit-text-size-adjust: 100%;
    overflow-x: clip;
    scroll-behavior: smooth;
    scroll-padding-top: 140px;
}

/* NOT nested under html — WebKit only honours these at the top level. */
::-webkit-scrollbar { width: var(--scrollbar-width); }
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: var(--r-full);
    &:hover { background: var(--scrollbar-thumb-hover); }
}

body {
    font-family: var(--font-body);
    font-size: var(--f16);
    line-height: var(--bodyLh);
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
}

img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button {
    border: 0; background: none; color: inherit;
    font-family: inherit; cursor: pointer;
    transition: var(--transition);
}
input, textarea, select { font: inherit; color: inherit; }

/* Sections carry their own padding-block. No global margin between sections:
   this design alternates section backgrounds, and a margin would show as a
   white strip between two tinted sections. */
main section { overflow-x: clip; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }

::selection { background: var(--blue-100); color: var(--navy-900); }

/* ===================================================================
   TYPOGRAPHY
   =================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: var(--lhTight);
    letter-spacing: -.015em;
    color: var(--black);
}
h1 { font-size: var(--f64); letter-spacing: -.02em; }
h2 { font-size: var(--f48); }
h3 { font-size: var(--f28); }
h4 { font-size: var(--f24); letter-spacing: -.01em; }
h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.3;
    color: var(--black);
}
h5 { font-size: var(--f20); }
h6 { font-size: var(--f18); }

h1 span, h2 span { 
    color: var(--primary); 
    background: var(--gradient-warm);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

p {
    font-family: var(--font-body);
    font-size: var(--f16);
    line-height: var(--bodyLh);
    color: var(--body);
}
p + p { margin-top: var(--sp20); }

.lead p, p.lead { font-size: var(--f18); }

/* The site is light-only. .on-dark is kept as a harmless legacy hook and
   no longer changes colours. */

/* Long-form copy (blog posts, legal) */
.prose {
    max-width: var(--container-xs);
    & > * + * { margin-top: var(--sp20); }
    & h2 { margin-top: var(--sp50); font-size: var(--f32); }
    & h3 { margin-top: var(--sp40); font-size: var(--f24); }
    & h2 + *, & h3 + * { margin-top: var(--sp15); }
    & p, & li { font-size: var(--f18); color: var(--body); }
    & ul { display: grid; gap: var(--sp12); padding-left: var(--sp4); }
    & ul li {
        position: relative;
        padding-left: var(--sp30);
        &::before {
            position: absolute; top: .72em; left: 4px;
            width: 8px; height: 8px;
            background: var(--primary);
            border-radius: var(--r-full);
            content: "";
        }
    }
    & ul li > * + * { margin-top: var(--sp12); }
    & ul ul { margin-top: var(--sp12); }
    & ul ul li::before { background: transparent; border: 2px solid var(--primary); }
    & a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
    & strong, & b { color: var(--ink); }
}

/* ===================================================================
   LAYOUT UTILITIES
   =================================================================== */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}
.container-sm { max-width: var(--container-sm); }
.container-xs { max-width: var(--container-xs); }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); border: 0;
}

.skip-link {
    position: fixed; inset-block-start: 0; inset-inline-start: 0;
    z-index: var(--z-modal);
    width: 0; height: 0; overflow: hidden;
    background: var(--white); color: var(--primary);
}
.skip-content:focus, .skip-footer:focus {
    width: auto; height: auto;
    padding: var(--sp15) var(--sp25);
    font-weight: 600; clip: auto;
}

/* ===================================================================
   BUTTONS
   =================================================================== */
.btn {
    position: relative;
    isolation: isolate;
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--sp10);
    width: max-content; max-width: 100%;
    min-height: 54px;
    padding: var(--sp12) var(--sp30);
    border: 1px solid transparent;
    border-radius: var(--r-md);
    overflow: hidden;
    font-family: var(--font-body);
    font-size: var(--f15);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);

    /* orange hover layer — fades in over any variant's own background */
    /* The orange gradient sits on ::before and only its opacity animates.
       Gradients can't be transitioned directly, so the button's own
       background is never swapped for a gradient on hover — that is what
       caused the flash. Only background-color / border-color fade (to coral)
       underneath, so the edge never shows a blue fringe. */
    &::before {
        position: absolute; inset: -1px;
        z-index: -1;
        background: var(--gradient-hover);
        border-radius: inherit;
        opacity: 0;
        content: "";
        transition: opacity .4s ease;
        will-change: opacity;
    }

    &:hover, &:focus-visible {
        border-color: var(--coral-500);
        background-color: var(--coral-500);
        color: var(--white);
        /* box-shadow: 0 14px 30px rgba(241, 80, 57, .35); */
        /* transform: translateY(-2px); */
    }
    &:hover::before, &:focus-visible::before { opacity: 1; }

    & svg { flex: 0 0 auto; width: 18px; height: 18px; transition: var(--transition); }
    &:hover svg.btn__arrow { transform: translateX(4px); }

    @media (max-width: 575.98px) {
        width: 100%;
        padding-inline: var(--sp20);
    }
}

.btn-sm { min-height: 44px; padding: var(--sp8) var(--sp20); font-size: var(--f14); }
.btn-lg { min-height: 62px; padding: var(--sp15) var(--sp40); font-size: var(--f16); }

.btn-primary {
    background-color: var(--blue-500);
    background-image: var(--gradient1);
    color: var(--white);
    /* box-shadow: 0 10px 24px rgba(var(--primary-rgb), .28); */
    border: 0;
}

.btn-dark {
    background: var(--navy-900);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    border-color: var(--line);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.btn-outline {
    background: var(--white);
    border-color: var(--line);
    color: var(--primary);
}

.btn-outline-light {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}

/* Round play/icon button + label, e.g. "Watch the podcast" */
.btn-icon {
    display: inline-flex; align-items: center;
    gap: var(--sp10);
    font-size: var(--f15);
    font-weight: 600;
    color: var(--black);
    transition: var(--transition);

    & .btn-icon__circle {
        display: grid; place-items: center;
        color: var(--primary);
        transition: var(--transition);
    }
    & svg { width: 22px; height: 22px; }
    &:hover { color: var(--primary); }
    &:hover .btn-icon__circle { transform: translateY(2px); }
}

/* The arrow link. The arrow is a masked SVG on ::after whose background-color is
   currentColor, so it always matches the link's own colour and no section ever
   writes arrow markup or arrow CSS. */
.btn-link {
    position: relative;
    display: flex; align-items: center;
    width: max-content; max-width: 100%;
    font-family: var(--font-body);
    font-size: var(--f16);
    font-weight: 600;
    color: var(--primary);

    &::after {
        flex: 0 0 auto;
        width: 22px; height: 10px;
        margin-left: var(--sp10);
        background-color: currentColor;
        content: '';
        transition: var(--transition);
        -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 10" fill="none"><path d="M17 9L21 5L17 1M21 5H1" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center;
                mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 10" fill="none"><path d="M17 9L21 5L17 1M21 5H1" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>') no-repeat center;
        -webkit-mask-size: contain;
                mask-size: contain;
    }
    &:hover::after { margin-left: var(--sp20); }

    &.btn-black { color: var(--black); }
    &.btn-orange { color: var(--accent); }
}

.btn-group {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: var(--sp20) var(--sp30);
}

/* ===================================================================
   SECTION TITLES
   =================================================================== */
/* One block for every section heading on the site. Sections never style
   their own title — that is the whole point of this component. */
.section-title-wrap {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: var(--sp15);
    max-width: 820px;
    margin-inline: auto;
    margin-bottom: var(--sp60);
    text-align: center;

    &:last-child { margin-bottom: 0; }

    & h2:not(.section-title) span { 
        /* color: var(--primary);  */
        background: var(--gradient-warm);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    & .section-title-desc {
        max-width: 680px;
        margin-top: var(--sp4);
        & p { font-size: var(--f18); }
    }

    &.section-title-left {
        align-items: flex-start;
        margin-inline: 0;
        text-align: left;
    }

}

/* ===================================================================
   EYEBROW — the small label above every heading on the site.
   Plain uppercase text with a short leading rule. .title-eyebrow
   (inside .section-title-wrap) is the same component.
   =================================================================== */
.eyebrow,
:where(.section-title-wrap) .title-eyebrow {
    display: inline-flex; align-items: center;
    gap: var(--sp12);
    max-width: 100%;
    font-family: var(--font-body);
    font-size: var(--f14);
    font-weight: 600;
    letter-spacing: .14em;
    line-height: 1.3;
    text-transform: uppercase;
    color: var(--body);

    /* &::before {
        flex: 0 0 auto;
        width: 28px; height: 2px;
        background: currentColor;
        border-radius: 2px;
        content: "";
    } */
}

/* "live" variant — red pulsing dot instead of the rule */
.eyebrow--live::before {
    width: 8px; height: 8px;
    background: var(--coral-500);
    border-radius: var(--r-full);
    box-shadow: 0 0 0 3px rgba(241, 80, 57, .25);
    animation: eyebrow-pulse 1.8s ease-in-out infinite;
}
@keyframes eyebrow-pulse {
    50% { box-shadow: 0 0 0 6px rgba(241, 80, 57, 0); }
}

/* centred heading with a rule on each side */
.section-title {
    display: flex; align-items: center; justify-content: center;
    gap: var(--sp30);
    width: 100%;
    text-align: center;

    &::before, &::after {
        flex: 1;
        height: 1px;
        max-width: min(50vw, 820px);
        background: var(--line);
        content: "";
    }
}

.heading-orange span { color: var(--accent); }

/* ===================================================================
   HELPERS
   =================================================================== */
.txt-primary { color: var(--primary); }
.txt-accent { color: var(--accent); }
.txt-gradient {
    background: var(--gradient-warm);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
}
.bg-surface { background: var(--surface-1); }
.bg-tint { background: var(--blue-50); }
.bg-navy { background: var(--surface-1); }

/* Scroll reveal — attribute driven, see assets/js/vendor.js.
   Hidden state only applies when JS has marked the page ready, so the page
   still reads with JS off. */
.js-reveal [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1);
    transition-delay: var(--reveal-delay, 0ms);
}
.js-reveal [data-reveal="fade"] { transform: none; }
.js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
