:root {
    --primary: #5B2EFF;
    --primary-hover: #4520D9;
    --heading: #111827;
    --body-text: #4B5563;
    --border: #E5E7EB;
    --bg: #ffffff;
}

/* =========================
   GLOBAL
========================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.wrapper {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}


/* =========================
   HEADER
========================= */

header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(120%) blur(4px);
}

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.5rem 0;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 3rem;
    min-width: 0; /* lets logo-area shrink instead of forcing a wrap */
}

.logo {
    color: var(--primary);
    display: block;
}

.logo img {
    height: 3rem; /* was 2.5rem — bumped up for mobile per request */
    width: auto;
}

@media (min-width: 1024px) {
    .logo img {
        height: 4rem;
    }
}


nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    font-size: 0.875rem;
}

nav a {
    color: var(--body-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--heading);
}


/* ---- Plans dropdown (desktop) ---- */
.has-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--body-text);
    cursor: pointer;
}

.dropdown-trigger:hover {
    color: var(--heading);
}

.dropdown-trigger svg {
    width: 0.875rem;
    height: 0.875rem;
    transition: transform 0.2s ease;
}

.has-dropdown:hover .dropdown-trigger svg,
.has-dropdown.open .dropdown-trigger svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 1rem);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    padding: 0.5rem;
    min-width: 15rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: var(--body-text);
}

.dropdown-menu a:hover {
    background: #F1EEFE;
    color: var(--primary);
}


.actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}


.btn {
    display: inline-block;
    border-radius: 0.375rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: .2s ease;
}


.btn-primary {
    background: var(--primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
}


.btn-secondary {
    background: #F1EEFE;
    color: var(--primary);
}

.btn-secondary:hover {
    background: #E4DCFD;
}


.menu-toggle {
    display: none;
    border: 1px solid rgba(91, 46, 255, 0.16);
    background: #ffffff;
    color: var(--primary);
    border-radius: .25rem;
    padding: .5rem;
    box-shadow: 0 1px 2px rgba(91, 46, 255, 0.08);
    cursor: pointer;
    flex-shrink: 0; /* never let the toggle itself get squeezed/wrapped */
}

.menu-toggle svg {
    width: 1.5rem;
    height: 1.5rem;
}


#mobile-menu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    border-top: 1px solid var(--border);
    background: #ffffff;
    transition: max-height 0.32s ease, opacity 0.22s ease;
}

#mobile-menu.open {
    opacity: 1;
    /* max-height is set inline by script.js to the panel's real content
       height, so the reveal is precisely smooth instead of snapping. */
}

#mobile-menu nav {
    padding: 1rem;
}

#mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

/* ---- Plans accordion (mobile) ---- */
#mobile-menu .mobile-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center; /* matches the centered alignment of the other menu items */
    gap: 0.375rem;
    background: none;
    border: none;
    font: inherit;
    color: var(--body-text);
    padding: 0;
    cursor: pointer;
}

#mobile-menu .mobile-dropdown-trigger svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s ease;
}

#mobile-menu li.open .mobile-dropdown-trigger svg {
    transform: rotate(180deg);
}

#mobile-menu .mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
    text-align: center;
}

#mobile-menu li.open .mobile-submenu {
    max-height: 10rem;
    margin-top: 0.75rem;
}

#mobile-menu .mobile-submenu a {
    display: block;
    padding: 0.5rem 0;
    color: var(--body-text);
    text-decoration: none;
    font-size: 0.875rem;
}

#mobile-menu .mobile-submenu a:hover {
    color: var(--primary);
}


@media (max-width: 767px) {

    .logo-area nav,
    .actions .sm-links {
        display: none;
    }

    /* Forced explicitly (not just "removed") so this wins even if an old
       .bar { flex-wrap: wrap; } rule is still loading from a cached file
       or a second stylesheet somewhere in the cascade. */
    .bar {
        flex-wrap: nowrap !important;
    }

    .logo-area {
        gap: .75rem;
    }

    .actions {
        justify-content: flex-end;
        width: auto !important; /* guards against a leftover width:100% rule */
    }

    .actions .btn-primary {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        padding: 0;
    }
}


@media (min-width: 768px) {
    .menu-toggle {
        display: none !important;
    }
}


/* =========================
   FOOTER
========================= */

footer {
    background: #111827;
    color: #ffffff;
    padding: 4rem 0 2rem;
}

.hero-fade {
    opacity: 0;
    transform: translateY(12px);
    animation: hero-fade-in 0.9s ease-out forwards;
}

.hero-fade-delay-1 {
    animation-delay: 0.15s;
}

.hero-fade-delay-2 {
    animation-delay: 0.3s;
}

@keyframes hero-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-fade {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

.fade-button {
    transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.fade-button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.fade-button:active {
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .fade-button {
        transition: none;
    }

    .fade-button:hover,
    .fade-button:active {
        opacity: 1;
        transform: none;
    }
}


.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}


.footer-logo img {
    height: 3rem;
}


.footer-title {
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}


.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}


.footer-links li {
    margin-bottom: .75rem;
}


.footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: .875rem;
    transition: color .2s ease;
}


.footer-links a:hover {
    color: #ffffff;
}


.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .875rem;
    color: #9CA3AF;
}


.backed-by {
    display: flex;
    align-items: center;
    gap: .5rem;
}


.backed-by img {
    height: 1.5rem;
}


@media (max-width: 767px) {

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}