/* ============================================
   Muxarr website — thin theme layer.
   Same approach as the app: Bootstrap does the work,
   this only covers branding and the navy dark mode.
   ============================================ */

:root {
    --mux-navy: #0d0d1a;
    --mux-navy-light: #1e1e32;
    --mux-surface: #232338;
    --mux-border: rgba(255, 255, 255, 0.06);
    --mux-orange: #f0521e;
}

html {
    scroll-behavior: smooth;
}

/* Light theme: warm off-white rather than flat #fff */
[data-bs-theme="light"] {
    --bs-body-bg: #f7f6f4;
    --bs-tertiary-bg: #edebe7;
}

[data-bs-theme="light"] .card {
    background: #fff;
}

/* Match the app: navy body, not Bootstrap's default grey */
[data-bs-theme="dark"] {
    --bs-body-bg: var(--mux-navy);
    --bs-body-color: rgba(255, 255, 255, 0.87);
    --bs-heading-color: #fff;
    --bs-border-color: var(--mux-border);
}

[data-bs-theme="dark"] .card {
    background: var(--mux-navy-light);
    border-color: var(--mux-border);
}

/* Bootstrap's outline-secondary sits at too low a contrast on the navy */
[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: rgba(255, 255, 255, 0.87);
    --bs-btn-border-color: rgba(255, 255, 255, 0.25);
    --bs-btn-hover-bg: var(--mux-surface);
    --bs-btn-hover-border-color: rgba(255, 255, 255, 0.4);
    --bs-btn-hover-color: #fff;
}

section[id], header[id] {
    scroll-margin-top: 64px;
}

/* ---- Navbar (stays navy in both themes, like the app sidebar) ---- */

/* The bar stays navy in both themes, so pin Bootstrap's dark navbar variables
   instead of letting them follow data-bs-theme. */
.mux-navbar {
    background: var(--mux-navy);
    border-bottom: 1px solid var(--mux-border);
    --bs-navbar-color: rgba(255, 255, 255, 0.72);
    --bs-navbar-hover-color: #fff;
    --bs-navbar-active-color: #fff;
    --bs-navbar-brand-color: #fff;
    --bs-navbar-brand-hover-color: #fff;
    --bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.15);
    --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.mux-navbar .navbar-brand {
    font-weight: 600;
}

.mux-navbar .nav-link {
    font-size: 0.9375rem;
    white-space: nowrap;
}

.mux-navbar .navbar-toggler:focus {
    box-shadow: none;
}

/* Room to breathe once the links drop below the bar */
@media (max-width: 991.98px) {
    .mux-navbar .navbar-collapse {
        padding-bottom: 0.5rem;
    }

    .mux-navbar .nav-link {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

.mux-theme-btn {
    color: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.15);
    line-height: 1;
}

.mux-theme-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

/* ---- Hero ---- */

.mux-hero {
    padding: 4rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

/* Warm wash behind the logo, picked from the logo's own gradient.
   Keeps the light theme off the flat-white default. */
.mux-hero::before {
    content: '';
    position: absolute;
    top: -18rem;
    left: 50%;
    width: 60rem;
    height: 42rem;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(240, 82, 30, 0.13), transparent);
    pointer-events: none;
    z-index: -1;
}

[data-bs-theme="dark"] .mux-hero::before {
    background: radial-gradient(closest-side, rgba(240, 82, 30, 0.20), transparent);
}

.mux-hero-logo {
    height: auto;
    filter: drop-shadow(0 10px 24px rgba(240, 82, 30, 0.28));
}

/* Never scale past the 960px source, upscaling makes the UI text mushy */
.mux-shot video {
    display: block;
    width: 100%;
    max-width: 860px;
    height: auto;
    margin: 0 auto;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.mux-wordmark {
    font-size: clamp(2.5rem, 7vw, 3.75rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
}

.mux-hero-text {
    max-width: 44rem;
    color: var(--bs-secondary-color);
}

/* ---- Sections ---- */

.mux-section {
    padding: 4rem 0;
}

.mux-section-alt {
    background: var(--bs-tertiary-bg);
}

[data-bs-theme="dark"] .mux-section-alt {
    background: var(--mux-navy-light);
}

/* Centered heading with a short brand rule under it, like the *arr sites */
.mux-heading {
    text-align: center;
    font-weight: 600;
    margin-bottom: 2.5rem;
    padding-bottom: 0.75rem;
    position: relative;
}

.mux-heading::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 3rem;
    height: 3px;
    background: var(--mux-orange);
    transform: translateX(-50%);
    border-radius: 2px;
}

/* ---- Feature cards ---- */

.mux-icon {
    font-size: 1.75rem;
    color: var(--mux-orange);
    display: block;
    margin-bottom: 0.75rem;
}

.card {
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(240, 82, 30, 0.45);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.10);
}

[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.45);
}

.card p {
    color: var(--bs-secondary-color);
    font-size: 0.9375rem;
}

/* ---- Screenshots ---- */

.mux-shot {
    margin: 0;
}

.mux-shot img {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
}

.mux-caption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    text-align: center;
}

/* ---- Code blocks ---- */

.mux-code {
    position: relative;
}

.mux-code pre {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
    font-size: 0.875rem;
}

[data-bs-theme="dark"] .mux-code pre {
    background: var(--mux-navy);
    border-color: var(--mux-border);
}

.mux-copy {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1;
}

.mux-tab-body {
    border: 1px solid var(--bs-border-color);
    border-top: 0;
    border-radius: 0 0 var(--bs-border-radius) var(--bs-border-radius);
    padding: 1.5rem;
}

[data-bs-theme="dark"] .mux-tab-body,
[data-bs-theme="dark"] .nav-tabs {
    border-color: var(--mux-border);
}

.mux-steps li {
    margin-bottom: 0.5rem;
}

/* ---- Support ---- */

.mux-support-icon {
    font-size: 2.5rem;
    color: var(--mux-orange);
    display: block;
    margin-bottom: 0.75rem;
}

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

.mux-footer {
    background: var(--mux-navy);
    color: rgba(255, 255, 255, 0.72);
    padding: 2rem 0;
}

.mux-footer a {
    color: rgba(255, 255, 255, 0.92);
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .card,
    .card:hover {
        transition: none;
        transform: none;
    }
}
