/* ==========================================================================
   SupaCortex - brand layer
   Loaded after theme.min.css. The theme itself is recoloured to the magenta
   brand ramp; everything here is either (a) a colour role the recolour could
   not infer, or (b) a utility the pages use that the theme does not ship.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Brand ramp - single source of truth for magenta
   -------------------------------------------------------------------------- */
:root {
    --sc-magenta-50: #fdf2f8;
    --sc-magenta-100: #fce7f3;
    --sc-magenta-200: #fbcfe8;
    --sc-magenta-300: #f9a8d4;
    --sc-magenta-400: #ec6fae;
    --sc-magenta-500: #d9489a;
    --sc-magenta-600: #b82c78; /* == --primary, 5.7:1 on white */
    --sc-magenta-700: #941f60;
    --sc-magenta-800: #76194d;
    --sc-magenta-900: #59143b;
    --sc-magenta-950: #370a22;

    /* The "spark": the one warm accent, used for the thought in the logo and
       for highlights. Never for text on white (it fails contrast there). */
    --sc-spark: #fbbf24;
    --sc-spark-deep: #f59e0b;

    /* Hero ground. A midnight plum rather than black - white body text clears
       15:1 against it, and the magenta aurora reads as glowing, not neon. */
    --sc-hero-bg: #1b1035;

    --sc-ink: #1a1026;
    --sc-ink-soft: #4b4358;

    --sc-grad-brand: linear-gradient(135deg, #b82c78 0%, #d9489a 50%, #f59e0b 100%);
    --sc-grad-soft: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 60%, #fff7ed 100%);
    --sc-grad-text: linear-gradient(90deg, #fbcfe8 0%, #f9a8d4 40%, #fde68a 100%);
}

/* --------------------------------------------------------------------------
   2. Success is its own green
   The theme derived --success from --primary, so the recolour turned every
   checkmark magenta - the same colour as a link. Success gets a distinct,
   yellower green so "done" never reads as "click me".
   -------------------------------------------------------------------------- */
:root,
[data-bs-theme=light] {
    --success: #16a34a;
    --success-rgb: 22, 163, 74;
    --success-text-emphasis: #15803d;
    --success-bg-subtle: #f0fdf4;
    --success-border-subtle: #bbf7d0;
}

[data-bs-theme=dark] {
    --success: #22c55e;
    --success-rgb: 34, 197, 94;
    --success-text-emphasis: #86efac;
    --success-bg-subtle: #0b2a17;
    --success-border-subtle: #14532d;
}

.btn-success {
    --btn-bg: #16a34a;
    --btn-border-color: #16a34a;
    --btn-hover-bg: #15803d;
    --btn-hover-border-color: #15803d;
    --btn-active-bg: #14763a;
    --btn-active-border-color: #14763a;
    --btn-focus-shadow-rgb: 22, 163, 74;
    --btn-disabled-bg: #16a34a;
    --btn-disabled-border-color: #16a34a;
}

.btn-outline-success {
    --btn-color: #16a34a;
    --btn-border-color: #16a34a;
    --btn-hover-bg: #16a34a;
    --btn-hover-border-color: #16a34a;
    --btn-active-bg: #16a34a;
    --btn-active-border-color: #16a34a;
    --btn-focus-shadow-rgb: 22, 163, 74;
    --btn-disabled-color: #16a34a;
    --btn-disabled-border-color: #16a34a;
}

.link-success:hover,
.link-success:focus {
    color: rgba(21, 128, 61, var(--link-opacity, 1)) !important;
    text-decoration-color: rgba(21, 128, 61, var(--link-underline-opacity, 1)) !important;
}

.alert-success {
    --alert-bg: rgba(22, 163, 74, .06);
    --alert-border-color: rgba(22, 163, 74, .25);
}

/* --------------------------------------------------------------------------
   3. Gradients and brand surfaces
   -------------------------------------------------------------------------- */
.text-gradient {
    background: var(--sc-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.text-gradient-brand {
    background: var(--sc-grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.bg-gradient-brand {
    background-image: var(--sc-grad-brand);
}

.bg-gradient-soft {
    background-image: var(--sc-grad-soft);
}

/* Hero: a midnight-plum ground with a magenta, violet and amber aurora -
   "neurons firing" - so it never reads flat */
.hero-brand {
    position: relative;
    background-color: var(--sc-hero-bg);
    background-image:
        radial-gradient(60rem 32rem at 12% -10%, rgba(217, 72, 154, .55), transparent 62%),
        radial-gradient(48rem 28rem at 88% 8%, rgba(109, 64, 217, .45), transparent 60%),
        radial-gradient(40rem 26rem at 50% 116%, rgba(245, 158, 11, .22), transparent 65%);
    overflow: hidden;
}

.hero-brand > * {
    position: relative;
    z-index: 1;
}

/* Faint dot grid - the "neuron field" motif reused across sections */
.bg-dotgrid {
    background-image: radial-gradient(rgba(184, 44, 120, .14) 1px, transparent 1px);
    background-size: 22px 22px;
}

.hero-brand .bg-dotgrid,
[data-bs-theme=dark] .bg-dotgrid {
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
}

.section-divider {
    line-height: 0;
}

.section-divider svg {
    display: block;
    width: 100%;
    height: 60px;
}

/* --------------------------------------------------------------------------
   4. Utilities the pages use that Bootstrap / the theme do not ship
   -------------------------------------------------------------------------- */
.ls-wider { letter-spacing: .08em; }
.ls-widest { letter-spacing: .16em; }

.py-6 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
.pt-6 { padding-top: 5rem !important; }
.pb-6 { padding-bottom: 5rem !important; }

@media (min-width: 992px) {
    .py-lg-6 { padding-top: 6rem !important; padding-bottom: 6rem !important; }
    .pt-lg-6 { padding-top: 6rem !important; }
    .pb-lg-6 { padding-bottom: 6rem !important; }
}

.bg-opacity-15 { --bg-opacity: .15; }
.bg-opacity-8 { --bg-opacity: .08; }

.icon-tile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: .875rem;
    font-size: 1.375rem;
    flex: 0 0 auto;
}

.icon-tile-lg {
    width: 5rem;
    height: 5rem;
    border-radius: 1.25rem;
    font-size: 2.25rem;
}

/* --------------------------------------------------------------------------
   5. Components
   -------------------------------------------------------------------------- */
.lift {
    transition: transform .25s ease, box-shadow .25s ease;
}

.lift:hover {
    transform: translateY(-.375rem);
    box-shadow: 0 1.25rem 2.5rem rgba(55, 10, 34, .16) !important;
}

.eyebrow {
    display: inline-block;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sc-magenta-600);
    background-color: var(--sc-magenta-100);
    border-radius: 2rem;
    padding: .4rem 1rem;
}

[data-bs-theme=dark] .eyebrow,
.hero-brand .eyebrow {
    color: #fff;
    background-color: rgba(255, 255, 255, .14);
}

/* Comparison tables on the /Compare and /Alternative pages */
.table-compare th,
.table-compare td { vertical-align: middle; }

.table-compare thead th { white-space: nowrap; }

.table-compare .col-us { background-color: var(--sc-magenta-50); }

[data-bs-theme=dark] .table-compare .col-us { background-color: rgba(184, 44, 120, .2); }

/* Product mock used on the home page */
.desk-mock {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2rem 4rem rgba(27, 16, 53, .4);
    background: #fff;
}

.desk-mock-bar {
    background: #fdf2f8;
    border-bottom: 1px solid var(--sc-magenta-200);
    padding: .625rem .875rem;
}

.desk-mock-dot {
    width: .625rem;
    height: .625rem;
    border-radius: 50%;
    display: inline-block;
    margin-right: .3rem;
}

/* Footer: theme footers use .nav-link inside plain <li> elements */
.footer h6 {
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .7;
    margin-bottom: .875rem;
}

.footer ul { list-style: none; padding-left: 0; }

.footer ul li { font-size: .875rem; margin-bottom: .4rem; }

.follow-us a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    margin-right: .5rem;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    transition: background-color .2s ease;
}

.follow-us a:hover { background: var(--sc-magenta-600); color: #fff; }

/* --------------------------------------------------------------------------
   6. Layout corrections
   -------------------------------------------------------------------------- */

/* The theme gives .container a 2rem gutter (1rem of padding per side), but
   Bootstrap's .g-5 / .gx-5 use a 3rem gutter. A g-5 row placed directly in a
   container therefore pulls 0.5rem past each viewport edge, which shows up as a
   horizontal scrollbar on narrow screens. Clamp the horizontal gutter on those
   rows to match the container; the vertical gap from g-5 is unaffected. */
.container > .row.g-5,
.container > .row.gx-5,
.container-fluid > .row.g-5,
.container-fluid > .row.gx-5 {
    --gutter-x: 2rem;
}

/* Fixed navbar must not cover a heading that was jumped to */
:target { scroll-margin-top: 6rem; }

/* --------------------------------------------------------------------------
   7. "Ask your favorite AI" band above the footer
   -------------------------------------------------------------------------- */
.ask-ai {
    --ask-ai-btn-bg: #f6f2f5;
    --ask-ai-btn-hover-bg: var(--sc-magenta-100);
    --ask-ai-btn-color: var(--sc-ink-soft);
    --ask-ai-btn-hover-color: var(--sc-ink);
}

[data-bs-theme=dark] .ask-ai {
    --ask-ai-btn-bg: rgba(255, 255, 255, .08);
    --ask-ai-btn-hover-bg: rgba(255, 255, 255, .16);
    --ask-ai-btn-color: rgba(255, 255, 255, .8);
    --ask-ai-btn-hover-color: #fff;
}

.ask-ai-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .875rem 1.375rem;
    border-radius: 999px;
    background: var(--ask-ai-btn-bg);
    color: var(--ask-ai-btn-color);
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.ask-ai-btn:hover,
.ask-ai-btn:focus-visible {
    background: var(--ask-ai-btn-hover-bg);
    color: var(--ask-ai-btn-hover-color);
}

.ask-ai-btn img { width: 20px; height: 20px; border-radius: 4px; }

@media (max-width: 575.98px) {
    .ask-ai h2 { font-size: 1.75rem; }
    .ask-ai-btn { padding: .75rem 1.125rem; font-size: .9375rem; }
}

/* --------------------------------------------------------------------------
   8. SupaCortex additions
   -------------------------------------------------------------------------- */

/* The amber "spark" - small highlights only, never body text on white */
.text-spark { color: var(--sc-spark) !important; }
.bg-spark { background-color: var(--sc-spark) !important; }

/* Citation chip, as answers show them: [1] */
.cite {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 .3rem;
    border-radius: .4rem;
    font-size: .72rem;
    font-weight: 700;
    color: var(--sc-magenta-700);
    background: var(--sc-magenta-100);
    vertical-align: .1em;
}

/* Status chips on the integrations page */
.status-chip {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 2rem;
    padding: .2rem .6rem;
}
.status-live { color: #15803d; background: #dcfce7; }
.status-beta { color: #92400e; background: #fef3c7; }
.status-next { color: var(--sc-ink-soft); background: #ece8f0; }

[data-bs-theme=dark] .status-next { color: #ddd; background: rgba(255,255,255,.12); }

/* "Sources -> brain -> channels" diagram on the home page */
.flow-node {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .85rem;
    border-radius: .75rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    font-size: .875rem;
    font-weight: 500;
}
.flow-node i { width: 1.1rem; text-align: center; opacity: .9; }
.flow-core {
    border-radius: 1.5rem;
    padding: 1.75rem 1.25rem;
    text-align: center;
    background: radial-gradient(circle at 50% 30%, rgba(217, 72, 154, .45), rgba(27, 16, 53, .2) 70%);
    border: 1px solid rgba(249, 168, 212, .35);
    box-shadow: 0 0 4rem rgba(217, 72, 154, .35);
}
a.flow-node { text-decoration: none; transition: background-color .2s ease, border-color .2s ease; }
a.flow-node:hover, a.flow-node:focus-visible { color: #fff; background: rgba(217, 72, 154, .28); border-color: rgba(249, 168, 212, .55); }
