/**
 * CaseIQ — global site shell ONLY
 * Owns: header, desktop nav, mobile fullscreen nav, footer, containers
 * Page CSS must not override these selectors.
 */

:root {
    --site-purple: #7936E9;
    --site-navy: #1a2332;
    --site-header-h: 4rem;
    --header-height: 4rem;
}

html {
    min-height: 100%;
    scroll-padding-top: 5rem;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

#siteFooter {
    margin-top: auto;
    flex-shrink: 0;
}

.site-container {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

html.nav-open,
body.nav-open {
    overflow: hidden;
}

/* ─── Logo ─── */
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--site-navy, var(--text-dark, #1a2332));
}

.site-logo__icon {
    width: 32px;
    height: 32px;
    background: var(--site-purple);
    color: #fff;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
}

.site-logo__text {
    letter-spacing: -0.01em;
}

/* ─── Header ─── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #e8e8e6;
    transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
    box-shadow: 0 4px 24px rgba(12, 18, 34, 0.08);
}

.site-header__inner {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.site-header__bar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-height: var(--header-height);
    padding-block: 0.65rem;
}

.site-header__logo {
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
    order: 1;
}

.site-header__lang {
    flex-shrink: 0;
    order: 2;
}

.site-header__lang select {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.4rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--site-navy);
    background: #fff;
    cursor: pointer;
    min-width: 96px;
}

.site-header__nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1 1 auto;
    justify-content: center;
    order: 3;
    min-width: 0;
}

.site-header__nav-link {
    text-decoration: none;
    color: var(--text-gray, #64748b);
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.site-header__nav-link:hover,
.site-header__nav-link.is-active {
    color: var(--site-purple);
    font-weight: 700;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    order: 4;
}

.site-header__signin {
    text-decoration: none;
    color: var(--text-gray, #64748b);
    font-weight: 500;
    white-space: nowrap;
}

.site-header__burger {
    display: none;
    order: 5;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--site-navy);
    flex-shrink: 0;
    z-index: 1001;
}

.site-header__menu-icon {
    display: block;
    width: 22px;
    height: 22px;
    pointer-events: none;
}

.site-header__menu-icon--close {
    display: none;
}

.site-header__burger.is-open .site-header__menu-icon--bars {
    display: none;
}

.site-header__burger.is-open .site-header__menu-icon--close {
    display: block;
}

/* ─── Fullscreen mobile nav (body-level, never constrained) ─── */
.site-mobile-nav {
    position: fixed;
    inset: 0;
    width: 100vw;
    width: 100dvw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    z-index: 2000;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.site-mobile-nav.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.site-mobile-nav__panel {
    min-height: 100%;
    width: 100%;
    max-width: 100%;
    padding: 0 20px 32px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.site-mobile-nav__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
    padding-block: 0.65rem;
    border-bottom: 1px solid #e8e8e6;
    margin-bottom: 0.5rem;
}

.site-mobile-nav__close {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--site-navy);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

.site-mobile-nav__logo {
    text-decoration: none;
    color: inherit;
}

.site-mobile-nav__links {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
}

.site-mobile-nav__link {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0.85rem 0;
    border-bottom: 1px solid #e8e8e6;
    text-decoration: none;
    color: var(--site-navy);
    font-size: 1.05rem;
    font-weight: 600;
    box-sizing: border-box;
}

.site-mobile-nav__link.is-active {
    color: var(--site-purple);
}

.site-mobile-nav__actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding-top: 0.5rem;
}

.site-mobile-nav__signin {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    text-decoration: none;
    color: var(--site-navy);
    font-weight: 600;
}

.site-mobile-nav__demo,
.site-mobile-nav__trial {
    width: 100%;
    min-height: 52px;
    justify-content: center;
    box-sizing: border-box;
}

.site-mobile-nav__demo {
    border: 1px solid var(--site-navy) !important;
    color: var(--site-navy) !important;
    background: #fff !important;
}

.site-mobile-nav__trial {
    background: var(--site-purple) !important;
    color: #fff !important;
}

html[dir="rtl"] .site-mobile-nav__link,
html[dir="rtl"] .site-mobile-nav__top {
    text-align: right;
}

html[dir="ltr"] .site-mobile-nav__link,
html[dir="ltr"] .site-mobile-nav__top {
    text-align: left;
}

/* ─── Footer ─── */
.site-footer {
    background: #293f54;
    color: rgba(255, 255, 255, 0.72);
    padding: 48px 0 24px;
}

body.home-page.has-mobile-cta .site-footer {
    padding-bottom: calc(24px + 4.5rem);
}

.site-footer__inner {
    width: min(1180px, calc(100% - 32px));
    margin-inline: auto;
}

.site-footer__grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.5fr)
        minmax(0, 0.8fr)
        minmax(0, 0.8fr)
        minmax(0, 0.8fr);
    gap: 48px;
    align-items: start;
    width: 100%;
}

.site-footer__col {
    text-align: start;
    min-width: 0;
}

.site-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #fff;
    margin-bottom: 0.85rem;
}

.site-footer__brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
}

.site-footer__brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
}

.site-footer__desc {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.68);
    max-width: 22rem;
}

.site-footer__email {
    margin: 0;
    font-size: 0.875rem;
}

.site-footer__email a {
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
}

.site-footer__email a:hover {
    color: #fff;
}

.site-footer ul,
.site-footer__links,
.site-footer__links li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.site-footer__heading {
    margin: 0 0 0.85rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #fff;
}

.site-footer__links li + li {
    margin-top: 0.45rem;
}

.site-footer__links a {
    display: inline-block;
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.68);
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer__links a:hover {
    color: #fff;
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    width: 100%;
}

.site-footer__copy,
.site-footer__tagline {
    margin: 0;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.62);
}

.site-footer__tagline {
    color: rgba(255, 255, 255, 0.42);
}

/* ─── Breakpoints ─── */
@media (max-width: 1024px) {
    .site-header__nav {
        gap: 1rem;
    }

    .site-header__nav-link {
        font-size: 0.88rem;
    }
}

@media (max-width: 768px) {
    .site-container,
    .site-header__inner,
    .site-footer__inner {
        width: 100%;
        max-width: 100%;
        padding-inline: 20px;
        box-sizing: border-box;
    }

    .site-header__lang,
    .site-header__nav,
    .site-header__actions {
        display: none !important;
    }

    .site-header__burger {
        display: inline-flex !important;
    }

    .site-header__bar {
        justify-content: space-between;
    }

    /* RTL: logo right (order 1 start in RTL), burger left (order 2) */
    .site-header__logo {
        order: 1;
    }

    .site-header__burger {
        order: 2;
    }

    .site-footer {
        padding: 40px 0 20px;
    }

    .site-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 24px;
    }

    .site-footer__col--brand {
        grid-column: 1 / -1;
    }

    .site-footer__desc {
        max-width: none;
    }

    .site-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
        margin-top: 1.5rem;
    }

    body.nav-open .campaign-mobile-cta {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .site-footer__col--legal {
        grid-column: 1 / -1;
    }
}

/* Minimal shell styles retired — all marketing pages use the full shared header. */

