/* ==========================================================================
   TheDocs - brand layer
   Loaded after theme.min.css. The theme itself is recoloured to the purple
   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 purple
   -------------------------------------------------------------------------- */
:root {
    --td-purple-50: #f7f6ff;
    --td-purple-100: #f0eeff;
    --td-purple-200: #e2ddff;
    --td-purple-300: #ccc2ff;
    --td-purple-400: #af9aff;
    --td-purple-500: #9874ff;
    --td-purple-600: #8250f0; /* == --primary */
    --td-purple-700: #6632c8;
    --td-purple-800: #5925b3;
    --td-purple-900: #3f1782;
    --td-purple-950: #240553;

    /* Hero ground. Deliberately a rich violet rather than a near-black purple -
       white body text still clears 11:1 against it. */
    --td-hero-bg: #40209b;

    --td-ink: #14121f;
    --td-ink-soft: #4a4560;

    --td-grad-brand: linear-gradient(135deg, #8250f0 0%, #a855f7 55%, #d946ef 100%);
    --td-grad-soft: linear-gradient(135deg, #f7f6ff 0%, #f0eeff 60%, #fdf4ff 100%);
    --td-grad-text: linear-gradient(90deg, #ddd6ff 0%, #cdc0ff 45%, #f5c2fe 100%);
}

/* --------------------------------------------------------------------------
   2. Success stays green
   The theme derived --success from --primary, so the purple recolour turned
   every checkmark purple. Restore a real green for success semantics.
   -------------------------------------------------------------------------- */
:root,
[data-bs-theme=light] {
    --success: #12a37a;
    --success-rgb: 18, 163, 122;
    --success-text-emphasis: #007b5a;
    --success-bg-subtle: #effff8;
    --success-border-subtle: #c6f3df;
}

[data-bs-theme=dark] {
    --success: #2bc191;
    --success-rgb: 43, 193, 145;
    --success-text-emphasis: #6fdcb6;
    --success-bg-subtle: #0b2a20;
    --success-border-subtle: #14503c;
}

.btn-success {
    --btn-bg: #12a37a;
    --btn-border-color: #12a37a;
    --btn-hover-bg: #00926c;
    --btn-hover-border-color: #00926c;
    --btn-active-bg: #008562;
    --btn-active-border-color: #008562;
    --btn-focus-shadow-rgb: 18, 163, 122;
    --btn-disabled-bg: #12a37a;
    --btn-disabled-border-color: #12a37a;
}

.btn-outline-success {
    --btn-color: #12a37a;
    --btn-border-color: #12a37a;
    --btn-hover-bg: #12a37a;
    --btn-hover-border-color: #12a37a;
    --btn-active-bg: #12a37a;
    --btn-active-border-color: #12a37a;
    --btn-focus-shadow-rgb: 18, 163, 122;
    --btn-disabled-color: #12a37a;
    --btn-disabled-border-color: #12a37a;
}

.link-success:hover,
.link-success:focus {
    color: rgba(0, 133, 98, var(--link-opacity, 1)) !important;
    text-decoration-color: rgba(0, 133, 98, var(--link-underline-opacity, 1)) !important;
}

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

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

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

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

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

/* Hero: a rich violet ground with a soft aurora wash so it never reads flat */
.hero-brand {
    position: relative;
    background-color: var(--td-hero-bg);
    background-image:
        radial-gradient(60rem 32rem at 12% -10%, rgba(168, 85, 247, .60), transparent 62%),
        radial-gradient(48rem 28rem at 88% 8%, rgba(130, 80, 240, .58), transparent 60%),
        radial-gradient(40rem 26rem at 50% 116%, rgba(217, 70, 239, .34), transparent 65%);
    overflow: hidden;
}

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

/* Faint dot grid - the "documentation surface" motif reused across sections */
.bg-dotgrid {
    background-image: radial-gradient(rgba(130, 80, 240, .16) 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(63, 23, 130, .16) !important;
}

.eyebrow {
    display: inline-block;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--td-purple-600);
    background-color: var(--td-purple-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(--td-purple-50); }

[data-bs-theme=dark] .table-compare .col-us { background-color: rgba(130, 80, 240, .16); }

/* Docs-preview mock used on the home page */
.doc-mock {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2rem 4rem rgba(36, 5, 83, .32);
    background: #fff;
}

.doc-mock-bar {
    background: #f7f6ff;
    border-bottom: 1px solid var(--td-purple-200);
    padding: .625rem .875rem;
}

.doc-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(--td-purple-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; }
