/*
 * MEO NextGen — shared candidate site shell (DEV USER)
 * Header, footer, DEV bar, buttons and utilities shared by the Homepage,
 * Free Trial entry/setup pages and the Trial exam flow.
 * Requires meo-theme.css (design tokens). Presentation only.
 */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.meo-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--meo-bg);
    color: var(--meo-ink);
    font-family: var(--meo-font);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.meo-page > main {
    flex: 1 0 auto;
}

.meo-page a {
    color: inherit;
    text-decoration: none;
}

.meo-page img,
.meo-page svg {
    max-width: 100%;
}

.meo-page :focus-visible {
    outline: 3px solid var(--meo-brand);
    outline-offset: 2px;
}

.meo-wrap {
    width: min(calc(100% - 48px), var(--meo-content-width));
    margin-inline: auto;
}

.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.meo-skip {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: var(--meo-radius-sm);
    background: var(--meo-brand);
    color: #fff !important;
    font-weight: 700;
}

.meo-skip:focus {
    top: 12px;
}

/* ===== DEV BAR ===== */

.meo-devbar {
    background: #132038;
    color: #fff;
    font-size: 12px;
}

.meo-devbar .meo-wrap {
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.meo-devbar strong {
    font-weight: 800;
    letter-spacing: .07em;
}

.meo-devbar a {
    color: #cfe0f5 !important;
}

.meo-devbar a:hover {
    color: #fff !important;
}

/* ===== BRAND ===== */

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
    min-width: 0;
    color: var(--meo-ink) !important;
}

.site-logo-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 10px;
    background: var(--meo-brand);
    color: #fff;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
}

.site-logo-text {
    min-width: 0;
}

.site-logo-text strong {
    display: block;
    font-size: 16px;
    line-height: 1.1;
    white-space: nowrap;
}

.site-logo-text small {
    display: block;
    margin-top: 3px;
    color: var(--meo-brand);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
    white-space: nowrap;
}

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

.site-header {
    position: relative;
    z-index: 20;
    background: var(--meo-surface);
    border-bottom: 1px solid var(--meo-line);
}

.site-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
}

.site-nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--meo-ink-muted);
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--meo-brand);
}

.site-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: none;
}

.site-auth {
    font-size: 14px;
    font-weight: 600;
    color: var(--meo-ink-muted);
}

a.site-auth:hover {
    color: var(--meo-brand);
}

.site-auth.is-pending {
    color: var(--meo-ink-faint);
    cursor: default;
}

.site-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--meo-brand);
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    transition: background-color .15s ease;
}

.site-cta:hover {
    background: var(--meo-brand-dark);
}

.site-cta-short {
    display: none;
}

/* Compact menu (tablet / mobile) */

.site-menu {
    display: none;
    position: relative;
    flex: none;
}

.site-menu summary {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--meo-line-strong);
    border-radius: var(--meo-radius-sm);
    background: var(--meo-surface);
    color: var(--meo-ink);
    font-size: 18px;
    line-height: 1;
    list-style: none;
    cursor: pointer;
}

.site-menu summary::-webkit-details-marker {
    display: none;
}

.site-menu[open] summary {
    border-color: var(--meo-brand);
    color: var(--meo-brand);
}

.site-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    width: min(240px, calc(100vw - 32px));
    display: grid;
    padding: 8px;
    border: 1px solid var(--meo-line);
    border-radius: 12px;
    background: var(--meo-surface);
    box-shadow: var(--meo-shadow-lg);
}

.site-menu-panel a {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.site-menu-panel a:hover {
    background: var(--meo-brand-tint);
    color: var(--meo-brand-dark);
}

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

.site-footer {
    margin-top: 64px;
    padding: 52px 0 24px;
    background: #132038;
    color: #9aa6bc;
}

.site-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 12px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.site-footer p {
    max-width: 300px;
    margin: 0;
    font-size: 13px;
    line-height: 1.65;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.site-footer a {
    font-size: 13px;
    color: #9aa6bc !important;
}

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

.site-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    padding-top: 20px;
    font-size: 12px;
}

/* ===== BUTTON EXTENSIONS (base .meo-btn lives in meo-theme.css) ===== */

/* Link-styled buttons must not inherit the generic link colour. */
.meo-page a.meo-btn-primary,
.meo-page a.meo-btn-primary:hover {
    color: #fff;
}

.meo-page a.meo-btn-secondary {
    color: var(--meo-ink);
}

.meo-page a.meo-btn-secondary:hover {
    color: var(--meo-brand);
}

.meo-btn-secondary:hover {
    border-color: var(--meo-brand);
    color: var(--meo-brand);
}

.meo-btn-lg {
    min-height: 52px;
    padding: 12px 24px;
    font-size: 1rem;
}

.meo-btn-block {
    width: 100%;
}

.meo-btn[disabled] {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

/* ===== RESPONSIVE ===== */

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

    .site-actions {
        margin-left: auto;
    }

    .site-menu {
        display: block;
    }

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

@media (max-width: 640px) {
    .meo-wrap {
        width: calc(100% - 32px);
    }

    .site-header-inner {
        min-height: 62px;
        gap: 10px;
    }

    .site-logo-mark {
        width: 32px;
        height: 32px;
        font-size: 18px;
    }

    .site-logo-text strong {
        font-size: 14px;
    }

    .site-logo-text small {
        display: none;
    }

    .site-actions {
        gap: 8px;
    }

    .site-auth {
        display: none;
    }

    .site-cta {
        min-height: 40px;
        padding: 8px 14px;
        font-size: 13px;
    }

    .site-cta-long {
        display: none;
    }

    .site-cta-short {
        display: inline;
    }

    .site-menu summary {
        width: 40px;
        height: 40px;
    }

    .site-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .site-footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 360px) {
    .site-header-inner {
        gap: 8px;
    }

    .site-logo {
        flex: 0 1 auto;
        gap: 8px;
    }

    .site-logo-text strong {
        overflow: hidden;
        font-size: 13px;
        text-overflow: ellipsis;
    }

    .site-cta {
        padding: 8px 11px;
    }

    .meo-devbar {
        font-size: 11px;
    }
}

/* ============================================================
   VISUAL REFINEMENT LAYER — 2026-10-03
   Blue/teal gradient architecture, technical grid texture,
   heartbeat brand mark, elevated surfaces. Presentation only.
   ============================================================ */

:root {
    --meo-teal: #0B8A99;
    --meo-deep: #2C4FA3;
    --meo-brand-2: #2A7DC9;

    /* Signature MEO band: teal → MEO blue → deep blue */
    --meo-gradient: linear-gradient(115deg, #0B8A99 0%, #1868B4 50%, #2C4FA3 100%);
    --meo-gradient-soft: linear-gradient(135deg, #E3F3F5 0%, #E8F1FB 55%, #ECEFFA 100%);

    --meo-heartbeat: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 12'%3E%3Cpolyline points='1 6 4 6 6 11 10 1 12 6 15 6' fill='none' stroke='%23ffffff' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");

    --meo-elev-1: 0 1px 2px rgba(19, 32, 56, .04), 0 4px 14px rgba(19, 32, 56, .06);
    --meo-elev-2: 0 2px 6px rgba(19, 32, 56, .05), 0 18px 40px rgba(19, 32, 56, .10);
    --meo-elev-3: 0 30px 70px rgba(14, 37, 84, .28), 0 8px 24px rgba(14, 37, 84, .14);
}

/* Heartbeat brand mark (replaces the text glyph, which stays as a hidden fallback). */
.site-logo-mark {
    font-size: 0;
    color: transparent;
    background:
        var(--meo-heartbeat) center / 64% auto no-repeat,
        var(--meo-gradient);
    box-shadow: 0 4px 12px rgba(24, 104, 180, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* Gradient band: coloured section with technical grid texture. */
.meo-band {
    position: relative;
    isolation: isolate;
    color: #fff;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .16), transparent 38%),
        radial-gradient(circle at 88% 8%, rgba(120, 214, 226, .22), transparent 42%),
        var(--meo-gradient);
}

.meo-band::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 32px 32px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 70%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .55) 70%, transparent 100%);
    pointer-events: none;
}

/* Header: sticky, near-opaque (no backdrop blur, to keep scrolling cheap). */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 1px 0 rgba(19, 32, 56, .04), 0 6px 18px rgba(19, 32, 56, .05);
}

.site-cta {
    background: var(--meo-gradient);
    box-shadow: 0 6px 16px rgba(24, 104, 180, .25);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.site-cta:hover {
    background: var(--meo-gradient);
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(24, 104, 180, .3);
}

/* Primary buttons: restrained gradient, lift on hover. */
.meo-btn-primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--meo-brand) 0%, var(--meo-brand-2) 100%);
    box-shadow: 0 6px 16px rgba(30, 99, 174, .22);
}

.meo-btn-primary:hover {
    border-color: transparent;
    background: linear-gradient(135deg, var(--meo-brand-dark) 0%, var(--meo-brand) 100%);
    box-shadow: 0 10px 22px rgba(30, 99, 174, .28);
}

.meo-btn-secondary {
    box-shadow: var(--meo-shadow-sm);
}

.site-footer {
    position: relative;
    background:
        linear-gradient(180deg, rgba(11, 138, 153, .10), transparent 120px),
        #0F1B30;
}

.site-footer::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 3px;
    background: var(--meo-gradient);
}

@media (prefers-reduced-motion: reduce) {
    .site-cta,
    .meo-btn {
        transition: none;
    }

    .site-cta:hover,
    .meo-btn:hover {
        transform: none;
    }
}
/* Inactive (future) navigation item, e.g. Help & Support — 2026-10-04.
   Matches the navigation typography, muted like the pending Sign in. */
.site-nav-pending {
    font-size: 14px;
    font-weight: 600;
    color: var(--meo-ink-faint);
    white-space: nowrap;
    cursor: default;
}

.site-menu-panel .site-nav-pending {
    padding: 10px 12px;
    border-radius: 8px;
}