/* ==========================================================================
   GPT INVESTOR DESIGN SYSTEM v4 · LINEAR DIRECTION · BASE (palette v3, dark)
   Loaded on every page, after the page's own styles. Page-specific layers
   (ds-home.css, ds-tidbits.css, ds-brief.css, ds-support.css) load after it.
   Source of truth: gpt-investor-design-system (spec/atomic-spec.md,
   handoff/tokens.json). Linear GPT-120.

   Rules applied across the site:
   - Bricolage Grotesque 600 −0.02em for titles and big numbers only;
     Plus Jakarta Sans for everything else.
   - Solid backgrounds: no gradient text, washes or glows.
   - Surfaces by level (bg → raised → tile), edges by 1px hairline, no shadows
     except overlays (menus, toasts).
   - Radius: 6 pills, 8 tiles, 12 cards, full for every button.
   - Violet for links, selection and focus only. Sentence-case labels.
   - Gains and losses carry a sign and a triangle, never colour alone.
   ========================================================================== */

:root {
    /* Colour · palette v3 dark */
    --bg: #14121D;
    --raised: #25223A;
    --tile: #2F2B47;
    --line: #3A3654;
    --muted: #C3BED3;
    --body: #CFCCD6;
    --ink: #F8F7FA;
    --primary: #F8F7FA;
    --on-primary: #0F121B;
    --violet: #B19BFF;
    --focus: #C3B2FF;
    --violet-soft: #352A6E;
    --tile-strong: #2F2B47;
    --chip: #4C4767;
    --track: #2F2B47;
    --control: #7F79A0;
    --gain: #3DEBA6;
    --gain-soft: #103D2B;
    --loss: #FFA04D;
    --loss-soft: #4A2C12;
    --error: #FF78A3;
    --error-soft: #4A1530;
    --caution: #FFD84D;
    --caution-soft: #3A2E05;

    /* Type */
    --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
    --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

    /* Radius */
    --r-xs: 6px;
    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-full: 999px;

    /* Elevation (overlays only) */
    --shadow-overlay: 0 7px 32px rgba(0, 0, 0, 0.35);

    /* Motion */
    --ease-emphasised: cubic-bezier(0.25, 1, 0.5, 1);
    --dur-fast: 150ms;
    --dur-base: 200ms;
}

/* The tidbit and brief pages name their colours with older variables.
   Point every one of them at a v4 token so their inline styles follow the
   palette. These pages load this file after their own <style> block. */
:root {
    --bg-dark: var(--bg);
    --bg-card: var(--raised);
    --bg-card-hover: var(--tile);
    --accent: var(--violet);
    --accent-hover: var(--focus);
    --accent-light: var(--violet-soft);
    --text-main: var(--ink);
    --text-muted: var(--muted);
    --border: var(--line);
    --danger: var(--loss);
    --danger-light: var(--loss-soft);
    --warning: var(--caution);
    --warning-light: var(--caution-soft);
    --info: var(--violet);
    --info-light: var(--violet-soft);
    --success: var(--gain);
    --success-light: var(--gain-soft);
    --green: var(--gain);
    --green-light: var(--gain-soft);
    --link: var(--violet);
    --link-hover: var(--focus);
    --radius: 12px;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */

body {
    background-color: var(--bg);
    color: var(--body);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Every title in one display style: solid ink, never gradient-clipped text */
.mainhero-texts h1,
.gptb-head h2,
.wgi-head h2,
.keyfeatures-head h2,
.indvbenefit-texts h3,
.wgi-texts h4,
.footer-maintexts h4,
.in-texts h4 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--ink);
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    text-transform: none;
}

section.hero-section,
section.partners,
section.gpt-benefits,
section.why-gptinvestor,
section.key-features,
footer.footer,
.mainhero-texts,
.mainhero-ctas,
.clipped-div,
.header a,
.footer-links,
.footer-ground p,
.footer-maintexts .footermainpara {
    font-family: var(--font-body);
}

/* Keyboard focus: violet ring that follows each element's own radius */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 3px;
    border-radius: inherit;
}

/* --------------------------------------------------------------------------
   Buttons · every button is a full pill
   Primary = off-white pill; secondary = transparent pill with a hairline.
   Press: 0.98 scale. No hover lift or shadow.
   -------------------------------------------------------------------------- */

.nav-ctas a,
.mainhero-ctas a,
.benefit-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
    border-radius: var(--r-full);
    font-family: var(--font-body);
    font-weight: 600;
    letter-spacing: 0;
    transition: background-color var(--dur-fast) var(--ease-emphasised),
                border-color var(--dur-fast) var(--ease-emphasised),
                transform var(--dur-fast) var(--ease-emphasised);
}

.nav-ctas a {
    min-height: 44px;
    padding: 0 20px;
}

.nav-ctas p {
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.mainhero-ctas a,
.benefit-cta,
.indvbenefit-texts a {
    min-height: 56px;
    padding: 0 24px;
    font-size: 16px;
    line-height: 24px;
    border-radius: var(--r-full);
}

.benefit-cta p {
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0;
}

.mainhero-ctas img,
.benefit-cta img {
    width: 20px;
    height: 20px;
}

/* Primary */
.primary-cta,
.hero-maincta,
.benefit-cta {
    background-color: var(--primary);
    border: 1px solid var(--primary);
    color: var(--on-primary);
}

.benefit-cta p {
    color: var(--on-primary);
}

/* Secondary */
.secondary-cta,
.hro-subcta {
    background-color: transparent;
    border: 1px solid var(--line);
    color: var(--ink);
}

/* Hover: a 6% state layer, no colour swap */
.primary-cta:hover,
.hero-maincta:hover,
.benefit-cta:hover {
    background-color: #E7E5EC;
    border-color: #E7E5EC;
    color: var(--on-primary);
    box-shadow: none;
    transform: none;
}

.secondary-cta:hover,
.hro-subcta:hover {
    background-color: rgba(248, 247, 250, 0.06);
    border-color: var(--line);
    color: var(--ink);
    box-shadow: none;
    transform: none;
}

.nav-ctas a:active,
.mainhero-ctas a:active,
.benefit-cta:active,
.install-link a:active {
    transform: scale(0.98);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

header {
    /* Some pages set `* { box-sizing: border-box }`; the header's width maths
       (100% minus its side padding) assumes content-box. */
    box-sizing: content-box;
    transition: background-color var(--dur-base) var(--ease-emphasised),
                box-shadow var(--dur-base) var(--ease-emphasised);
}

header.scrolled {
    background-color: var(--bg);
    box-shadow: inset 0 -1px 0 var(--line);
}

.nav-links {
    gap: 32px;
}

.nav-links p {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--muted);
    transition: color var(--dur-fast) var(--ease-emphasised);
}

.nav-links a:hover p {
    color: var(--ink);
    opacity: 1;
}

.hamburger span {
    background: var(--ink);
}

@media (max-width: 1080px) {
    /* The open menu is one overlay panel under the header bar: raised surface,
       hairline, overlay shadow. It flows inside the header so the links and the
       download buttons never overlap, whatever the text size. */
    .header {
        flex-wrap: wrap;
    }

    .nav-links,
    .nav-ctas {
        position: static;
        width: 100%;
        min-width: 0;
        background: var(--raised);
        box-sizing: border-box;
        border: 1px solid var(--line);
        box-shadow: var(--shadow-overlay);
    }

    .nav-links {
        order: 3;
        position: relative;
        z-index: 1;
        box-shadow: none;
        margin-top: 12px;
        gap: 4px;
        border-radius: var(--r-md) var(--r-md) 0 0;
        border-bottom: 0;
        padding: 8px 8px 4px;
    }

    .nav-links a {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 48px;
        padding: 0 12px;
        box-sizing: border-box;
        border-radius: var(--r-sm);
    }

    .nav-links a:hover {
        background-color: rgba(248, 247, 250, 0.06);
    }

    .nav-ctas {
        order: 4;
        border-radius: 0 0 var(--r-md) var(--r-md);
        border-top: 0;
        padding: 8px 20px 20px;
        gap: 12px;
    }

    .nav-links p {
        font-size: 15px;
        line-height: 22px;
        color: var(--ink);
    }

    .nav-ctas a {
        width: 100%;
        min-height: 44px;
        padding: 0 16px;
    }

    .secondary-cta,
    .secondary-cta:hover {
        border: 1px solid var(--line);
    }

    .primary-cta,
    .primary-cta:hover {
        border: 1px solid var(--primary);
    }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer-card {
    background-color: var(--raised);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: none;
}

/* Solid backgrounds: no glow blobs */
.fdeco {
    display: none;
}

.footer-maintexts h4 {
    font-size: 36px;
    line-height: 40px;
}

.footer-maintexts .footermainpara {
    font-size: 18px;
    line-height: 28px;
    font-weight: 400;
    color: var(--body);
}

/* Layout for the footer links row (also set in polish.css, which only the
   home page loads) */
.footer-ground {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-ground p.footer-disclaimer {
    max-width: 760px;
}

.footer-maintexts {
    position: relative;
    z-index: 3;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--ink);
}

.footer-links a {
    color: var(--ink);
    transition: color var(--dur-fast) var(--ease-emphasised);
}

.footer-links a:hover {
    color: var(--violet);
    opacity: 1;
}

.footer-links .dot {
    color: var(--muted);
}

.footer-ground p,
.footer-ground p.footer-disclaimer {
    font-size: 13px;
    line-height: 20px;
    font-weight: 400;
    color: var(--muted);
}

@media (max-width: 1080px) {
    .footer-card {
        border-radius: var(--r-md);
    }

    .footer-maintexts h4 {
        font-size: 28px;
        line-height: 34px;
    }

    .footer-maintexts .footermainpara {
        font-size: 16px;
        line-height: 26px;
    }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }

    .nav-ctas a:active,
    .mainhero-ctas a:active,
    .benefit-cta:active,
    .install-link a:active {
        transform: none;
    }
}
