﻿/* =========================================================
   TrackRoad CSS Framework (Performance-first)
   /css/site.css
   - No Bootstrap dependency
   - Responsive utilities + components
   - CLS-safe by default
========================================================= */

/* =======================
   TOKENS / DESIGN SYSTEM
======================= */
:root {
    --max: 1140px;
    --pad: 16px;
    --bg: #ffffff;
    --surface: #f8fafc;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 10px 24px rgba(0,0,0,.08);
    --brand: #0b66ff;
    --brand-dark: #084dc2;
    --radius: 14px;
    --radius-sm: 10px;
    --nav-h: 64px;
    --h1: clamp(28px, 3.4vw, 46px);
    --h2: clamp(22px, 2.3vw, 34px);
    --h3: clamp(18px, 1.4vw, 22px);
    --lead: clamp(16px, 1.5vw, 18px);
    /* footer theme */
    --footer-bg: #0A2540;
    --footer-text: rgba(255,255,255,.92);
    --footer-muted: rgba(255,255,255,.72);
    --footer-link: rgba(255,255,255,.92);
    --footer-link-hover: #ffffff;
    --footer-border: rgba(255,255,255,.14);
}

/* =======================
   RESET / BASE
======================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
}

    /* prevent scrolling behind mobile nav */
    body.nav-open {
        overflow: hidden;
    }

/* Media elements */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

    a:hover {
        color: var(--brand);
    }

/* Lists (avoid default padding causing CLS shifts) */
ul,
ol {
    margin: 0;
    padding: 0;
}

/* Focus */
:focus-visible {
    outline: 3px solid rgba(11,102,255,.35);
    outline-offset: 3px;
}

/* Screen reader only */
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* =======================
   LAYOUT
======================= */
.container {
    width: min(100% - 2*var(--pad), var(--max));
    margin-inline: auto;
}

.container-fluid {
    width: 100%;
    padding-inline: var(--pad);
}

.section {
    padding: 56px 0;
}

.section-sm {
    padding: 36px 0;
}

.section-lg {
    padding: 72px 0;
}

.surface {
    background: var(--surface);
}

.hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 24px 0;
}

/* =======================
   UTILITIES
======================= */

/* spacing */
.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 12px;
}

.mt-3 {
    margin-top: 16px;
}

.mt-4 {
    margin-top: 20px;
}

.mt-5 {
    margin-top: 24px;
}

.mt-6 {
    margin-top: 32px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 12px;
}

.mb-3 {
    margin-bottom: 16px;
}

.mb-4 {
    margin-bottom: 20px;
}

.mb-5 {
    margin-bottom: 24px;
}

.mb-6 {
    margin-bottom: 32px;
}

.ml-2 {
    margin-left: 12px;
}

.mr-2 {
    margin-right: 12px;
}

/* flex */
.flex {
    display: flex;
}

.inline-flex {
    display: inline-flex;
}

.center {
    align-items: center;
}

.between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.wrap {
    flex-wrap: wrap;
}

.gap-8 {
    gap: 8px;
}

.gap-10 {
    gap: 10px;
}

.gap-12 {
    gap: 12px;
}

.gap-14 {
    gap: 14px;
}

.gap-16 {
    gap: 16px;
}

.gap-18 {
    gap: 18px;
}

.gap-20 {
    gap: 20px;
}

/* text */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.muted {
    color: var(--muted);
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

.fw-900 {
    font-weight: 900;
}

/* font sizes */
.fs-12 {
    font-size: 12px;
}

.fs-13 {
    font-size: 13px;
}

.fs-14 {
    font-size: 14px;
}

.fs-15 {
    font-size: 15px;
}

.fs-16 {
    font-size: 16px;
}

.fs-18 {
    font-size: 18px;
}

.fs-20 {
    font-size: 20px;
}

/* max widths */
.max-700 {
    max-width: 700px;
}

.max-860 {
    max-width: 860px;
}

.max-900 {
    max-width: 900px;
}

/* links */
.link-underline {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.link-muted {
    color: var(--muted);
    font-weight: 700;
}

    .link-muted:hover {
        color: var(--brand);
    }

/* =======================
   TYPOGRAPHY
======================= */
h1 {
    font-size: var(--h1);
    line-height: 1.1;
    letter-spacing: -.02em;
    margin: 0 0 12px;
}

h2 {
    font-size: var(--h2);
    line-height: 1.15;
    letter-spacing: -.01em;
    margin: 0 0 10px;
    font-weight: 600;
}

h3 {
    font-size: var(--h3);
    line-height: 1.2;
    margin: 0 0 8px;
    font-weight: 600;
}

p {
    margin: 0 0 14px;
}

.lead {
    font-size: var(--lead);
    color: var(--text);
    opacity: .92;
}

/* =======================
   BUTTONS
======================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 400;
    font-size: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    /*transition: transform .15s ease;*/
    /* transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;*/
}

/* .btn:hover {
        transform: translateY(-1px);
    }

    .btn:active {
        transform: translateY(0);
    }*/

.btn-lg {
    padding: 12px 18px;
    font-size: 16px;
    border-radius: 12px;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 10px;
}

.btn-primary {
    background: var(--brand);
    color: #fff !important;
}

    .btn-primary:hover {
        background: var(--brand-dark);
    }

/* outline button (light sections) */
.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

    .btn-outline:hover {
        background: var(--surface);
        border-color: #cbd5e1;
        color: var(--text);
    }

/* outline button (dark hero/footer) */
.btn-outline-on-dark {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.55);
    color: #fff;
}

    .btn-outline-on-dark:hover {
        background: #fff;
        color: #111827 !important;
        border-color: #fff;
    }

.btn-link {
    background: transparent;
    border: 0;
    padding: 0;
    color: var(--brand);
}

/* =======================
   HEADER / NAV (Modern SaaS)
======================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

    .site-header.is-scrolled {
        box-shadow: 0 10px 24px rgba(0,0,0,.06);
    }

.header-inner {
    min-height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.logo-wrap {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.logo-img {
    width: 150px;
    height: 50px;
    object-fit: contain;
}

/* Nav wrapper */
.site-nav {
    display: flex;
    align-items: center;
}

    /* Normalize all top-nav links */
    .site-nav a,
    .site-nav button {
        font: inherit;
        font-weight: 500; /* pick the weight you want */
        line-height: 1; /* key fix: eliminates vertical drift */
        display: inline-flex;
        align-items: center;
        padding: 10px 12px; /* match your design */
        text-decoration: none;
        vertical-align: middle;
    }


/* Nav list */
.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

    .nav-list > li {
        position: relative;
    }

        /* full height menu items */
        .nav-list > li > a,
        .nav-link {
            height: var(--nav-h);
            display: inline-flex;
            align-items: center;
        }

    /* shared link styles */
    .nav-list a,
    .nav-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-size: 15px;
        font-weight: 600;
        color: rgba(17,24,39,.92);
        letter-spacing: -0.01em;
        /*padding: 0 1rem;*/
        padding: 0 0.75rem;
        position: relative;
        /*transition: color .15s ease, background .15s ease;*/
    }

        .nav-list a:hover,
        .nav-link:hover {
            color: var(--brand);
            background: rgba(11,102,255,.06);
        }

        /* Active nav link */
        .nav-list a.is-active,
        .nav-link.is-active {
            color: var(--brand);
            background: rgba(11,102,255,.10);
            /*font-weight: 700;*/
        }

            /* Subtle underline indicator (modern SaaS style) */
            .nav-list a.is-active::after,
            .nav-link.is-active::after {
                content: "";
                position: absolute;
                left: 0;
                right: 0;
                bottom: 0;
                height: 2px;
                background: var(--brand);
            }

    /* Ensure parent li is positioned for ::after */
    .nav-list > li {
        position: relative;
    }


/* dropdown toggles */
.nav-link {
    background: transparent;
    border: 0;
    cursor: pointer;
}

.has-submenu .caret {
    font-size: 12px;
    opacity: .75;
}

/* CTA */
.nav-cta {
    margin-left: 6px;
}

    .nav-cta .btn {
        height: 42px;
        padding: 0 16px;
        font-weight: 600;
        border-radius: 999px;
        box-shadow: 0 10px 22px rgba(11,102,255,.18);
    }

        /* ensure CTA hover never turns white */
        .nav-cta .btn.btn-primary:hover,
        .nav-cta .btn.btn-primary:focus-visible {
            background: var(--brand-dark);
            color: #fff !important;
            border-color: transparent;
        }

/* =======================
   SUBMENU (Desktop)
======================= */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    max-width: calc(100vw - 24px);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 20px 46px rgba(0,0,0,.12);
    list-style: none;
    z-index: 60;
}

    .submenu li a {
        display: block;
        padding: 10px 10px;
        border-radius: 12px;
        font-weight: 600;
        font-size: 14px;
        color: rgba(17,24,39,.92);
        height: auto;
    }

        .submenu li a:hover {
            background: rgba(11,102,255,.08);
            color: var(--brand);
        }

.submenu-sep {
    height: 1px;
    background: var(--border);
    margin: 8px 4px;
}

.submenu-cta {
    background: rgba(11,102,255,.10);
    border: 1px solid rgba(11,102,255,.20);
    font-weight: 800;
}

    .submenu-cta:hover {
        background: rgba(11,102,255,.14);
    }

/* hover open on desktop */
@media (min-width: 901px) {
    .has-submenu:hover > .submenu {
        display: block;
    }
}

/* =======================
   MOBILE NAV
======================= */
.nav-toggle {
    display: none;
    border: 1px solid var(--border);
    background: var(--bg);
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

@media (max-width: 900px) {

    .nav-toggle {
        display: inline-flex;
    }

    /* Mobile nav fixed panel */
    .site-nav {
        display: none;
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        height: calc(100dvh - var(--nav-h));
        height: calc(100vh - var(--nav-h));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 20px 46px rgba(0,0,0,.10);
        overflow-x: hidden;
        padding-bottom: env(safe-area-inset-bottom);
    }

        .site-nav.open {
            display: block;
        }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px var(--pad) 14px;
    }

        .nav-list > li {
            border-top: 1px solid var(--border);
            padding: 4px 0;
        }

            .nav-list > li:first-child {
                border-top: 0;
            }

        .nav-list a,
        .nav-link {
            width: 100%;
            justify-content: space-between;
            height: auto;
            padding: 12px 10px;
            border-radius: 12px;
        }

    /* accordion submenu */
    .submenu {
        display: none;
        position: static;
        border: 0;
        box-shadow: none;
        padding: 6px 0 10px;
        margin-top: 4px;
        min-width: 0;
    }

    .has-submenu.open > .submenu {
        display: block;
    }

    /* CTA full width */
    .nav-cta {
        margin: 10px 0 0;
    }

        .nav-cta .btn {
            width: 100%;
            justify-content: center;
            border-radius: 14px;
            height: 46px;
        }
}

/* =======================
   TABLES
======================= */
.table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

    .table th,
    .table td {
        padding: 12px 12px;
        border-bottom: 1px solid var(--border);
        text-align: left;
        vertical-align: top;
    }

    .table thead th {
        background: var(--surface);
        font-weight: 600;
    }

    .table tr:last-child td {
        border-bottom: 0;
    }

/* =======================
   FOOTER
======================= */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 54px 0;
}

    .site-footer a {
        color: var(--footer-link);
        text-decoration: none;
    }

        .site-footer a:hover,
        .site-footer a:focus-visible {
            color: var(--footer-link-hover);
            text-decoration: underline;
            text-underline-offset: 3px;
        }

    .site-footer p,
    .site-footer li {
        color: var(--footer-muted);
    }

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 18px;
    margin-bottom: 8px;
}

@media (max-width: 960px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

.footer-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.footer-title-sm {
    font-size: 15px;
    margin-bottom: 8px;
}

.footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .footer-list li {
        margin: 7px 0;
    }

.footer-hr {
    border: 0;
    height: 1px;
    background: var(--footer-border);
    margin: 18px 0;
}

.footer-trust {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-privacy {
    display: inline-flex;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.08);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    line-height: 1.9;
}

.footer-desc {
    margin: 0;
    opacity: .96;
}

/*.footer-copy {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(255,255,255,.75);
}*/


/* Build version (footer) */
.footer-copy {
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-wrap: wrap; /* prevents overflow on small screens */
}

    .footer-copy a {
        opacity: .95;
    }

.footer-trust-seal {
    min-height: 54px; /* reserve space for Trustwave */
    display: flex;
    align-items: center;
}

/* Promo links kept but invisible */
.footer-promo {
    margin-top: 14px;
    font-size: 11px;
    opacity: 0.55; /* must be >= ~0.45 to pass */
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
}

    .footer-promo a {
        text-decoration: none;
    }

        .footer-promo a:hover {
            text-decoration: underline;
        }

/* Build version*/
.site-footer .build-toggle {
    margin-left: .35rem;
    border: none;
    background: none;
    color: var(--footer-text); /* key: readable on dark bg */
    cursor: pointer;
    font: inherit;
    line-height: 1;
    padding: 0;
    opacity: 1; /* remove dimming */
}

    .site-footer .build-toggle:hover {
        /*background: rgba(255,255,255,.14);
        border-color: rgba(255,255,255,.30);*/
        color:#fff;
    }

    /*.site-footer .build-toggle:focus-visible {
        outline: 2px solid rgba(255,255,255,.45);
        outline-offset: 3px;
    }*/

.site-footer .build-info {
    margin-left: .35rem;
    font-size: 12px;
    color: var(--footer-muted); /* slightly muted but readable */
    white-space: nowrap;
}
