/* ==========================================================================
   Public website: page frame (container, header, menu panels, drawer, footer).
   Colours and sizes come from css/app/tokens.css; the site-only values are here.
   ========================================================================== */

.site {
    --site-width: 1200px;
    --site-padding: 24px;
    --site-header-height: 68px;
    --site-line: #DFE7D7;
    --site-text: #4C5852;
    --site-muted: #637069;
    --site-dark-line: #1F2A25;
    --site-dark-raised: #26332D;
    --site-on-dark: #C3CDC6;
    --site-on-dark-muted: #A9B5AE;
    --site-accent-light: #B9E05A;
    background: var(--color-bg);
    font-size: 16px;
}

@media (max-width: 600px) {
    .site { --site-padding: 16px; }
}

.site-container {
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 var(--site-padding);
}

.site a {
    color: inherit;
}

.accent {
    color: var(--color-brand);
}

section[id],
[data-tabs] {
    scroll-margin-top: calc(var(--site-header-height) + 24px);
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    border-bottom: 1px solid var(--site-dark-line);
    background: var(--color-dark);
    color: var(--site-on-dark);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 0 32px;
    min-height: var(--site-header-height);
}

.site-header__logo img {
    display: block;
    width: auto;
    height: 30px;
}

.site-header__spacer {
    flex: 1 1 0;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: 6px 16px;
}

.site-header__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 6px;
    color: var(--site-on-dark);
    font-size: 14px;
    font-weight: var(--font-weight-bold);
}

.site-header__link:hover,
.is-open > .site-header__link {
    color: #fff;
}

.site-header__burger {
    display: none;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--site-dark-raised);
    border-radius: 10px;
    color: var(--color-bg);
}

.site-header__burger .icon {
    width: 22px;
    height: 22px;
}

/* ---------- Main menu ---------- */

.site-nav {
    display: flex;
    align-self: stretch;
    gap: 0 26px;
}

.site-nav__group,
.site-language {
    position: relative;
    display: flex;
}

.site-nav__item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: var(--site-header-height);
    padding: 0 2px;
    color: var(--site-on-dark);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}

.site-nav__item:hover,
.is-open > .site-nav__item {
    color: #fff;
}

.is-open > .site-nav__item {
    box-shadow: inset 0 -3px 0 var(--color-brand);
}

/* Menu panel (opened by app.js: [data-dropdown].is-open) */
.mega {
    position: absolute;
    top: var(--site-header-height);
    left: -16px;
    z-index: 30;
    display: none;
    max-width: calc(100vw - 32px);
    padding: 12px;
    border: 1px solid var(--site-line);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 24px 60px rgba(16, 25, 22, .28);
}

.is-open > .mega {
    display: flex;
}

.mega--platform { width: 560px; gap: 4px; flex-wrap: wrap; }
.mega--services { width: 620px; flex-direction: column; gap: 16px; }
.mega--roles { width: 320px; flex-direction: column; gap: 4px; }
.mega--languages { top: calc(100% + 8px); left: auto; right: 0; width: 200px; flex-direction: column; gap: 2px; }

.mega__links {
    display: grid;
    flex: 1 1 260px;
    gap: 4px;
    min-width: 0;
}

.mega__link {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
}

.mega__link:hover,
.mega__link.is-active {
    background: var(--color-brand-light);
}

.mega__link b {
    display: block;
    font-size: 15px;
}

.mega__link span {
    display: block;
    margin-top: 2px;
    color: var(--site-muted);
    font-size: 13px;
    line-height: 1.45;
}

.mega--languages .mega__link {
    display: flex;
    gap: 10px;
    padding: 9px 12px;
}

.mega--languages .mega__link span {
    margin: 0;
}

.mega__feature {
    display: flex;
    flex: 0 1 200px;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border-radius: 12px;
    background: var(--color-dark);
    color: var(--color-bg);
}

.site .mega__feature {
    color: var(--color-bg);
}

.mega__feature span {
    color: var(--site-accent-light);
    font-size: 13px;
    font-weight: var(--font-weight-bold);
}

.mega__columns {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.mega__column {
    display: flex;
    flex: 1 1 170px;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.mega__heading {
    color: var(--site-muted);
    font-size: 11px;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.mega__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mega__foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--color-line-soft);
    color: var(--site-text);
    font-size: 14px;
}

.mega__foot a {
    color: var(--color-brand-darker);
    font-weight: var(--font-weight-bold);
}

/* ---------- Mobile drawer ---------- */

.site-drawer {
    display: none;
}

@media (max-width: 1100px) {
    .site-nav,
    .site-header__desktop {
        display: none;
    }

    .site-header__burger {
        display: grid;
    }

    .site-header__inner {
        gap: 0 10px;
    }

    .site-drawer.is-open {
        display: block;
        padding-bottom: 16px;
        border-top: 1px solid var(--site-dark-line);
    }

    .site-drawer a {
        display: flex;
        align-items: center;
        min-height: 48px;
        border-bottom: 1px solid var(--site-dark-line);
        color: var(--color-bg);
        font-size: 17px;
        font-weight: 600;
    }

    .site-drawer__languages {
        display: flex;
        gap: 16px;
    }

    .site-drawer__languages a {
        border: 0;
        color: var(--site-on-dark-muted);
        font-size: 14px;
    }

    .site-drawer__languages a.is-active {
        color: var(--color-brand);
    }
}

@media (max-width: 600px) {
    .site-header__logo img { height: 24px; }
    .site-header__actions { gap: 8px; }
    .site-header__actions .button { min-height: 40px; padding: 0 12px; font-size: 14px; }
}

/* 360px phones: logo, demo button and burger on one line */
@media (max-width: 400px) {
    .site-header__logo img { height: 21px; }
    .site-header__actions .button { padding: 0 10px; font-size: 13px; }
}

/* ---------- Flash messages ---------- */

.site-flash {
    display: grid;
    gap: 8px;
    padding-top: 16px;
}

.site-flash__item {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: var(--color-brand-light);
    color: var(--color-brand-darker);
    font-weight: 600;
    cursor: pointer;
}

.site-flash__item--error {
    background: var(--color-danger-light);
    color: #A33B37;
}

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

.site-footer {
    background: var(--color-dark);
    color: var(--site-on-dark);
}

.site-footer__top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 40px;
}

.site-footer__brand {
    display: flex;
    flex: 1 1 280px;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.site-footer__brand img {
    align-self: flex-start;
    width: auto;
    height: 26px;
}

.site-footer__brand p {
    max-width: 320px;
    color: var(--site-on-dark-muted);
    font-size: 14px;
    line-height: 1.6;
}

.site-footer__columns {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
}

.site-footer__columns div {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-footer h6 {
    color: #7F8C85;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.site-footer a {
    color: var(--site-on-dark-muted);
    font-size: 14px;
}

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

.site-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding-top: 18px;
    padding-bottom: 28px;
    border-top: 1px solid var(--site-dark-line);
    color: #7F8C85;
    font-size: 13px;
}

.site-footer__bottom a {
    font-size: 13px;
}
