/* ==========================================================================
   Website header & footer
   Colour tokens (--site-*) live in theme.css, which loads before this file.
   ========================================================================== */

:root {
    --sh-height: 74px;            /* header incl. its top/bottom gap */
}

/* --------------------------------------------------------------------------
   Header — compact floating pill
   -------------------------------------------------------------------------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--sh-height);
    margin-bottom: calc(var(--sh-height) * -1);   /* float over the first section */
    padding: 10px 0;
}

/* Let the first section's background run up behind the floating bar,
   without changing that section's own spacing */
.site-header + section {
    border-top: var(--sh-height) solid transparent;
    background-origin: border-box;
}

.sh-nav {
    min-height: 54px;
    padding: 6px 6px 6px 14px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 14px;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -18px rgba(15, 23, 42, .25);
    transition: background .25s, box-shadow .25s;
}
.site-header.is-scrolled .sh-nav {
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 14px 32px -16px rgba(15, 23, 42, .28);
}

.sh-brand {
    display: inline-flex;
    align-items: center;
    margin-right: 16px;
    text-decoration: none;
}
.sh-logo { height: 30px; width: auto; display: block; }

.sh-brand-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--site-ink);
    letter-spacing: -.01em;
}
.sh-brand-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    font-size: .75rem;
    color: #fff;
    background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
}

.sh-links { gap: 2px; }
.sh-link {
    display: block;
    width: 100%;
    padding: 6px 11px;
    border: 0;
    background: transparent;
    font-family: inherit;
    text-align: left;
    border-radius: 8px;
    font-size: .85rem;
    font-weight: 500;
    line-height: 1.6;
    color: #475569;
    text-decoration: none;
    transition: color .15s, background .15s;
}
.sh-link:hover { color: var(--site-primary); }
.sh-link:focus,
.sh-lang:focus,
.sh-avatar:focus { outline: none; box-shadow: none; }
.sh-link:focus-visible,
.sh-lang:focus-visible { outline: 2px solid rgba(19, 86, 103, .35); outline-offset: 1px; }
.sh-link.active {
    color: var(--site-primary);
    font-weight: 600;
    background: var(--site-primary-50);
}

.sh-link.dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; }
.sh-link.dropdown-toggle::after {
    margin: 0;
    border: 0;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: .6;
    transition: transform .2s;
}
.sh-link.dropdown-toggle.show::after { transform: translateY(1px) rotate(225deg); }

.sh-actions { display: flex; align-items: center; gap: 6px; }

/* Dropdown panels */
.sh-menu {
    min-width: 210px;
    margin-top: 10px !important;
    padding: 6px;
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 24px 48px -20px rgba(15, 23, 42, .28);
}
.sh-menu.show { animation: sh-drop .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes sh-drop { from { opacity: 0; transform: translateY(-6px); } }

/* Invisible bridge over the gap between the button and the panel,
   so moving the mouse down never "leaves" the dropdown */
.sh-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
}

.sh-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 500;
    color: #334155;
}
.sh-menu .dropdown-item i { width: 16px; text-align: center; color: var(--site-muted); }
.sh-menu .dropdown-item:hover { color: var(--site-primary); background: var(--site-primary-50); }
.sh-menu .dropdown-item:hover i { color: var(--site-primary); }
.sh-menu .dropdown-item.active,
.sh-menu .dropdown-item:active { color: var(--site-primary); background: var(--site-primary-50); font-weight: 600; }
.sh-menu .dropdown-divider { margin: 6px 0; border-color: var(--site-line); }
.sh-flag { font-size: 1rem; line-height: 1; }

.sh-menu-user { padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--site-line); }
.sh-menu-user strong { display: block; font-size: .875rem; color: var(--site-ink); }
.sh-menu-user small { display: block; font-size: .78rem; color: var(--site-muted); }

/* Shared two-line item text (title + hint) */
.sh-mega-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-mega-text strong {
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--site-ink);
    transition: color .15s;
}
.sh-mega-text small {
    font-size: .75rem;
    line-height: 1.35;
    color: var(--site-muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* Media: rich list */
.sh-menu-rich { min-width: 280px; padding: 8px; }
.sh-rich-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: background .15s;
}
.sh-rich-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: .9rem;
    color: var(--site-primary);
    background: var(--site-primary-50);
    transition: background .15s, color .15s;
}
.sh-rich-item:hover,
.sh-rich-item.active { background: #f6f9fa; }
.sh-rich-item:hover strong,
.sh-rich-item.active strong { color: var(--site-primary); }
.sh-rich-item:hover .sh-rich-icon,
.sh-rich-item.active .sh-rich-icon {
    color: #fff;
    background: linear-gradient(135deg, var(--site-primary), var(--site-primary-400));
}

/* Features: mega panel, centred under the whole bar */
.sh-nav { position: relative; }
@media (min-width: 1200px) {
    /* beats `.navbar-nav .nav-item { position: relative }` in custom.css */
    .sh-nav .navbar-nav .sh-mega { position: static; }
    .sh-mega-menu {
        left: 0 !important;
        right: 0;
        width: min(860px, 100%);
        margin-left: auto;
        margin-right: auto;
    }
}
.sh-mega-menu.show { display: grid; }
.sh-mega-menu {
    grid-template-columns: 230px 1fr;
    gap: 8px;
    padding: 8px;
}

.sh-mega-intro {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 10px;
    color: #cde4e9;
    background:
        radial-gradient(220px 160px at 100% 0%, rgba(43, 179, 192, .45), transparent 70%),
        linear-gradient(160deg, var(--site-primary) 0%, var(--site-dark) 100%);
    overflow: hidden;
}
.sh-mega-intro::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 0 0 22px rgba(255, 255, 255, .03);
}
.sh-mega-badge {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-bottom: 14px;
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 255, 255, .14);
}
.sh-mega-intro h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; color: #fff; }
.sh-mega-intro p { margin: 0 0 18px; font-size: .8rem; line-height: 1.55; }
.sh-mega-cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    align-self: flex-start;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--site-primary);
    background: #fff;
    text-decoration: none;
}
.sh-mega-cta:hover { color: var(--site-primary-600); }
.sh-mega-cta i { font-size: .7rem; transition: transform .15s; }
.sh-mega-cta:hover i { transform: translateX(3px); }

.sh-mega-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-content: start;
    gap: 2px;
    max-height: min(420px, 70vh);
    padding: 4px;
    overflow-y: auto;
}
.sh-mega-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    transition: background .15s;
}
.sh-mega-item:hover { background: #f6f9fa; }
.sh-mega-item:hover strong { color: var(--site-primary); }
.sh-mega-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--site-primary-50);
    transition: transform .2s;
}
.sh-mega-icon img { width: 22px; height: 22px; object-fit: contain; }
.sh-mega-item:hover .sh-mega-icon { transform: scale(1.06); }

/* Language switcher & avatar */
.sh-lang,
.sh-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    border: 1px solid var(--site-line);
    border-radius: 9px;
    background: #fff;
    font-family: inherit;
    font-size: .8rem;
    font-weight: 600;
    color: #334155;
    transition: border-color .15s, color .15s;
}
.sh-lang { padding: 0 10px; }
.sh-lang i { font-size: .8rem; color: var(--site-muted); }
.sh-lang::after, .sh-avatar::after { display: none; }
.sh-lang:hover, .sh-lang.show { border-color: var(--site-primary); color: var(--site-primary); }
.sh-avatar {
    width: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font-size: .9rem;
    color: #fff;
    background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(19, 86, 103, .25);
}
.sh-avatar:hover, .sh-avatar.show { color: #fff; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--site-primary); }

/* Shared button (also used in footer) */
.sh-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: .85rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    overflow: hidden;
    transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.sh-btn i { font-size: .72rem; transition: transform .15s; }
.sh-btn:hover i.fa-arrow-right { transform: translateX(3px); }

.sh-btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--site-primary) 0%, var(--site-primary-400) 100%);
    box-shadow: 0 6px 14px -8px rgba(19, 86, 103, .7);
}
.sh-btn-primary:hover { color: #fff; box-shadow: 0 8px 18px -8px rgba(19, 86, 103, .85); }
/* light sweep on hover */
.sh-btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .25) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform .6s ease;
}
.sh-btn-primary:hover::after { transform: translateX(100%); }

.sh-btn-ghost { color: var(--site-ink); background: transparent; }
.sh-btn-ghost:hover { color: var(--site-primary); background: var(--site-primary-50); }

/* Toggler */
.sh-toggler {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    background: var(--site-primary-50);
}
.sh-toggler span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--site-primary);
    transition: transform .2s, opacity .2s;
}
.sh-toggler[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sh-toggler[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sh-toggler[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.sh-toggler:focus-visible { outline: 3px solid rgba(19, 86, 103, .3); outline-offset: 2px; }

@media (max-width: 1199.98px) {
    :root { --sh-height: 68px; }
    .site-header { padding: 8px 0; }
    .sh-nav { min-height: 52px; padding: 6px 6px 6px 12px; background: rgba(255, 255, 255, .94); }
    .sh-logo { height: 28px; }
    .sh-nav .navbar-collapse {
        margin: 8px -6px -6px -12px;
        padding: 8px;
        border-top: 1px solid var(--site-line);
    }
    .sh-link { padding: 10px 12px; font-size: .9rem; }
    .sh-actions {
        margin-top: 8px;
        padding-top: 10px;
        border-top: 1px solid var(--site-line);
    }
    .sh-actions .sh-btn { flex: 1; height: 40px; }
    .sh-actions .sh-btn-ghost { border-color: var(--site-line); }
    .sh-actions .sh-lang { height: 40px; }
    .sh-nav .navbar-collapse { max-height: calc(100vh - 90px); overflow-y: auto; }
    .sh-menu { margin: 2px 0 6px !important; border: 0; box-shadow: none; background: #f8fafc; }
    .sh-menu::before { display: none; }
    .sh-mega-menu.show { display: block; }
    .sh-mega-intro { display: none; }
    .sh-mega-grid { max-height: none; padding: 0; }
    .sh-actions .dropdown-menu { position: absolute; background: #fff; border: 1px solid var(--site-line); box-shadow: 0 16px 40px -16px rgba(15, 23, 42, .25); }
}

@media (max-width: 575.98px) {
    .sh-mega-grid { grid-template-columns: 1fr; }
}

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

.site-foot {
    position: relative;
    padding-top: 1px;
    margin-top: 96px;
    color: #9fbcc4;
    font-size: .92rem;
    background:
        radial-gradient(700px 320px at 85% 20%, rgba(29, 122, 146, .25), transparent 70%),
        var(--site-dark);
    overflow: hidden;
}
.site-foot:has(.sf-cta) { overflow: visible; }

/* faint dot grid */
.site-foot::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 60%, transparent 100%);
    pointer-events: none;
}
.site-foot > .container { position: relative; }

/* Call-to-action band, overlapping the top edge */
.sf-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: -64px;
    padding: 34px 40px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(120deg, var(--site-primary-600) 0%, var(--site-primary) 45%, var(--site-primary-400) 100%);
    box-shadow: 0 28px 56px -28px rgba(11, 42, 51, .7);
    overflow: hidden;
    isolation: isolate;
}
/* decorative rings */
.sf-cta::before,
.sf-cta::after {
    content: '';
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .14);
    pointer-events: none;
}
.sf-cta::before {
    width: 320px;
    height: 320px;
    right: -80px;
    top: -170px;
    box-shadow: 0 0 0 40px rgba(255, 255, 255, .03), 0 0 0 80px rgba(255, 255, 255, .02);
}
.sf-cta::after {
    width: 140px;
    height: 140px;
    left: 38%;
    bottom: -90px;
    background: radial-gradient(circle, rgba(43, 179, 192, .35), transparent 70%);
    border: 0;
}

.sf-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #d6eef2;
    background: rgba(255, 255, 255, .1);
}
.sf-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5eead4;
    box-shadow: 0 0 0 0 rgba(94, 234, 212, .7);
    animation: sf-pulse 2s infinite;
}
@keyframes sf-pulse {
    70% { box-shadow: 0 0 0 7px rgba(94, 234, 212, 0); }
    100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); }
}

.sf-cta-title { margin: 0 0 6px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.sf-cta-text { margin: 0; color: #cde4e9; }
.sf-cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sf-cta-actions .sh-btn { height: 42px; padding: 0 18px; font-size: .9rem; }
.sf-btn-light { color: var(--site-primary); background: #fff; }
.sf-btn-light:hover { color: var(--site-primary-600); background: #eef6f8; }
.sf-btn-outline { color: #fff; border-color: rgba(255, 255, 255, .35); }
.sf-btn-outline:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, .08); }

.sf-main { padding: 64px 0 24px; }

.sf-brand { display: inline-flex; margin-bottom: 18px; text-decoration: none; }
.sf-brand .sh-brand-text { color: #fff; font-size: 1.1rem; }
.sf-brand .sh-brand-mark { width: 34px; height: 34px; font-size: .9rem; }
.sf-logo { height: 42px; width: auto; }
.sf-logo.on-chip { padding: 6px 10px; border-radius: 10px; background: #fff; }
.sf-about { max-width: 340px; margin: 0 0 22px; line-height: 1.7; }

.sf-social { display: flex; gap: 8px; }
.sf-social a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    color: #cde4e9;
    background: rgba(255, 255, 255, .04);
    text-decoration: none;
    transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.sf-social a:hover {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, var(--site-primary), var(--site-accent));
    transform: translateY(-3px);
}

.sf-heading {
    margin: 0 0 18px;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #fff;
}

.sf-links { margin: 0; padding: 0; list-style: none; }
.sf-links li + li { margin-top: 10px; }
.sf-links a {
    display: inline-flex;
    align-items: center;
    color: #9fbcc4;
    text-decoration: none;
    transition: color .2s;
}
/* sliding accent line on hover */
.sf-links a::before {
    content: '';
    width: 0;
    height: 2px;
    margin-right: 0;
    border-radius: 2px;
    background: var(--site-accent);
    transition: width .2s, margin-right .2s;
}
.sf-links a:hover { color: #fff; }
.sf-links a:hover::before { width: 12px; margin-right: 8px; }

.sf-contact { margin: 0; padding: 0; list-style: none; }
.sf-contact li { display: flex; gap: 12px; align-items: center; line-height: 1.5; }
.sf-contact li + li { margin-top: 12px; }
.sf-contact i {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: .8rem;
    color: var(--site-accent);
    background: rgba(43, 179, 192, .1);
}
.sf-contact a, .sf-bottom-links a { color: #9fbcc4; text-decoration: none; transition: color .15s; }
.sf-contact a:hover, .sf-bottom-links a:hover { color: #fff; }

.sf-app { display: inline-block; margin-top: 20px; }
.sf-app img { height: 42px; width: auto; }

.sf-bottom {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .84rem;
}
.sf-bottom-links { display: flex; gap: 22px; }

@media (max-width: 767.98px) {
    .site-foot { margin-top: 80px; }
    .sf-cta { flex-direction: column; align-items: flex-start; margin-top: -56px; padding: 26px 22px; }
    .sf-cta-title { font-size: 1.25rem; }
    .sf-cta-actions { width: 100%; }
    .sf-cta-actions .sh-btn { flex: 1; }
    .sf-main { padding: 48px 0 16px; }
    .sf-bottom { flex-direction: column; text-align: center; }
}

/* Footer without the CTA band */
.site-foot:not(:has(.sf-cta)) .sf-main { padding-top: 56px; }

@media (prefers-reduced-motion: reduce) {
    .sh-nav, .sh-btn, .sh-btn::after, .sf-links a::before, .sf-social a { transition: none; }
    .sf-dot { animation: none; }
}
