/* ============================================================
   Nexda Co - Integrated Solutions design system
   Loaded after styles.css; overrides the legacy palette so
   catalog/demo pages inherit the same brand.
   ============================================================ */

:root {
    --navy-900: #08182c;
    --navy-800: #0b1f3a;
    --navy-700: #123055;
    --navy-600: #1b4171;

    --slate-700: #33475f;
    --slate-600: #4a5a70;
    --slate-400: #7b8ca1;
    --slate-200: #dde5ee;
    --slate-100: #eef3f8;
    --slate-50:  #f7fafc;

    --teal-700: #0a6f7d;
    --teal-600: #0d8b9c;
    --teal-100: #e4f4f6;
    --gold-700: #8a6414;
    --gold-500: #b8862b;

    --ok-700: #1c6b45;

    /* Legacy variables remapped so existing pages rebrand too. */
    --bg-dark: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: var(--slate-50);
    --border-color: var(--slate-200);
    --text-primary: #0f1b2d;
    --text-secondary: var(--slate-600);
    --accent-red: var(--teal-700);
    --accent-red-dark: var(--navy-700);
    --accent-cyan: var(--teal-700);
    --accent-blue: var(--navy-700);
    --accent-purple: var(--navy-800);
    --gradient-primary: linear-gradient(135deg, var(--navy-700), var(--navy-800));
    --gradient-text: linear-gradient(to right, var(--teal-700), var(--navy-700));

    --radius: 10px;
    --shadow-sm: 0 1px 2px rgba(8, 24, 44, .07);
    --shadow-md: 0 6px 20px rgba(8, 24, 44, .09);
    --maxw: 1180px;
}

body {
    background: #fff;
    color: var(--text-primary);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Remove the legacy decorative blobs and grid overlay. */
.bg-gradient-1, .bg-gradient-2, .grid-overlay { display: none !important; }

h1, h2, h3, h4 { font-family: 'Outfit', 'Inter', system-ui, sans-serif; color: var(--navy-800); line-height: 1.2; }

/* --- Accessibility primitives ---------------------------- */
.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 999;
    background: var(--navy-800); color: #fff; padding: .75rem 1.25rem;
    border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 3px solid var(--teal-600);
    outline-offset: 2px;
    border-radius: 3px;
}

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Layout ---------------------------------------------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 4.5rem 0; }
.section--tint { background: var(--slate-50); border-block: 1px solid var(--slate-200); }
.section--navy { background: var(--navy-800); color: #fff; }
.section--navy h2, .section--navy h3, .section--navy h4 { color: #fff; }

.eyebrow {
    display: inline-block; font-size: .74rem; font-weight: 700;
    letter-spacing: .13em; text-transform: uppercase;
    color: var(--teal-700); margin-bottom: .85rem;
}
.section--navy .eyebrow { color: #7fd3de; }

.section-head { max-width: 720px; margin-bottom: 2.75rem; }
.section-head h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); margin-bottom: .9rem; }
.section-head p { color: var(--slate-600); font-size: 1.06rem; }
.section--navy .section-head p { color: #c3d2e4; }

/* --- Header / nav ---------------------------------------- */
.gov-header {
    position: sticky; top: 0; z-index: 100;
    background: #fff; border-bottom: 1px solid var(--slate-200);
}

.gov-nav .wrap {
    display: flex; align-items: center; justify-content: space-between;
    gap: 1.5rem; padding-block: .85rem;
}
.gov-brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; }
.gov-brand img { height: 42px; width: auto; border-radius: 6px; }
.gov-brand-name { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.3rem; color: var(--navy-800); letter-spacing: .02em; line-height: 1; }
.gov-brand-sub { display: block; font-size: .66rem; font-weight: 600; letter-spacing: .16em; color: var(--slate-400); text-transform: uppercase; margin-top: 3px; }

.gov-menu { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.gov-menu a {
    display: block; padding: .55rem .7rem; border-radius: 6px;
    color: var(--slate-700); text-decoration: none;
    font-size: .9rem; font-weight: 600;
}
.gov-menu a:hover { background: var(--slate-100); color: var(--navy-800); }
.gov-menu a[aria-current="page"] { color: var(--teal-700); box-shadow: inset 0 -2px 0 var(--teal-700); }

.nav-toggle {
    display: none; background: none; border: 1px solid var(--slate-200);
    border-radius: 6px; padding: .5rem .7rem; cursor: pointer;
    font-size: .85rem; font-weight: 600; color: var(--navy-800);
}

/* --- Buttons --------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .72rem 1.4rem; border-radius: 6px; border: 1.5px solid transparent;
    font-size: .93rem; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.btn--primary { background: var(--navy-800); color: #fff; }
.btn--primary:hover { background: var(--navy-600); }
.btn--accent { background: var(--teal-700); color: #fff; }
.btn--accent:hover { background: #085a66; }
.btn--ghost { background: #fff; color: var(--navy-800); border-color: var(--slate-200); }
.btn--ghost:hover { border-color: var(--navy-700); background: var(--slate-50); }
.btn--onnavy { background: #fff; color: var(--navy-800); }
.btn--onnavy:hover { background: var(--slate-100); }
.btn--outline-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--outline-light:hover { background: rgba(255,255,255,.12); }
.btn--sm { padding: .5rem 1rem; font-size: .85rem; }

/* --- Hero ------------------------------------------------ */
.gov-hero { background: var(--navy-800); color: #fff; padding: 4.5rem 0 0; }
.gov-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.gov-hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.1rem); margin-bottom: 1.25rem; }
.gov-hero .lede { color: #c3d2e4; font-size: 1.1rem; max-width: 46ch; margin-bottom: 1.1rem; }
.gov-hero .value-prop {
    display: inline-block; color: #fff; font-weight: 600; font-size: 1rem;
    border-left: 3px solid var(--teal-600); padding-left: .9rem; margin-bottom: 1.9rem;
}
.gov-hero-actions { display: flex; gap: .85rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.gov-hero-secondary a { color: #9fd8e2; font-weight: 600; font-size: .93rem; }
.gov-hero-media img { width: 100%; border-radius: var(--radius); display: block; }

.cred-strip { background: var(--navy-900); margin-top: 3rem; }
.cred-strip ul {
    display: grid; grid-template-columns: repeat(4, 1fr);
    list-style: none; margin: 0; padding: 0;
}
.cred-strip li {
    padding: 1.1rem 1.25rem; color: #d7e2ee;
    font-size: .92rem; font-weight: 600; text-align: center;
    border-left: 1px solid rgba(255,255,255,.1);
}
.cred-strip li:first-child { border-left: 0; }

/* --- Cards ----------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: #fff; border: 1px solid var(--slate-200);
    border-radius: var(--radius); padding: 1.75rem;
    box-shadow: var(--shadow-sm);
}
.card h3 { font-size: 1.2rem; margin-bottom: .7rem; }
.card p { color: var(--slate-600); font-size: .96rem; }
.card--division { display: flex; flex-direction: column; }
.card--division .card-top { border-top: 3px solid var(--teal-700); margin: -1.75rem -1.75rem 1.5rem; padding: 1.4rem 1.75rem 0; }
.card--division ul { margin: 1rem 0 1.5rem; padding-left: 1.1rem; color: var(--slate-600); font-size: .93rem; }
.card--division ul li { margin-bottom: .4rem; }
.card--division .card-cta { margin-top: auto; }

.card-media { border-radius: 8px; overflow: hidden; margin-bottom: 1.25rem; aspect-ratio: 16/9; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* --- Process steps --------------------------------------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem 2rem; }
.step { counter-increment: step; padding-top: .5rem; border-top: 2px solid rgba(255,255,255,.18); }
.step::before {
    content: "0" counter(step);
    display: block; font-family: 'Outfit', sans-serif; font-weight: 700;
    font-size: .95rem; color: #7fd3de; margin-bottom: .5rem;
}
.step h3 { font-size: 1.02rem; margin-bottom: .4rem; }
.step p { color: #c3d2e4; font-size: .9rem; }

/* --- Identifier table ------------------------------------ */
.id-table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.id-table caption { text-align: left; font-weight: 700; color: var(--navy-800); padding-bottom: .75rem; }
.id-table th, .id-table td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--slate-200); }
.id-table th { width: 40%; color: var(--slate-700); font-weight: 600; background: var(--slate-50); }
.id-table td { font-variant-numeric: tabular-nums; }

/* --- Notices --------------------------------------------- */
.notice {
    border-left: 4px solid var(--slate-400); background: var(--slate-50);
    padding: 1.1rem 1.4rem; border-radius: 0 var(--radius) var(--radius) 0;
    font-size: .93rem; color: var(--slate-700);
}
.notice--compliance { border-left-color: var(--gold-500); }
.notice--ok { border-left-color: var(--ok-700); background: #f0f8f4; }
.notice strong { color: var(--navy-800); }
.illustrative {
    font-size: .82rem; color: var(--slate-600); font-style: italic;
    border-top: 1px solid var(--slate-200); padding-top: .7rem; margin-top: 1rem;
}

/* --- Forms ----------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: .9rem; color: var(--navy-800); }
.field .hint { font-size: .82rem; color: var(--slate-600); }
.field input, .field select, .field textarea {
    font: inherit; font-size: .95rem; padding: .68rem .85rem;
    border: 1.5px solid var(--slate-200); border-radius: 6px;
    background: #fff; color: var(--text-primary); width: 100%;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--slate-400); }
.field textarea { min-height: 150px; resize: vertical; }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-color: #b3261e; }
.field-error { color: #b3261e; font-size: .85rem; font-weight: 600; }
.form-summary {
    border-left: 4px solid #b3261e; background: #fdf0ef;
    padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1.5rem;
}
.form-summary h2 { font-size: 1rem; color: #b3261e; margin-bottom: .5rem; }
.form-summary ul { margin: 0; padding-left: 1.2rem; font-size: .9rem; color: var(--slate-700); }
.hp-field { position: absolute; left: -9999px; }

/* --- Footer ---------------------------------------------- */
.gov-footer { background: var(--navy-900); color: #b9c8d9; padding: 3.5rem 0 0; }
.gov-footer h4 { color: #fff; font-size: .8rem; letter-spacing: .13em; text-transform: uppercase; margin-bottom: 1rem; }
.gov-footer a { color: #d7e2ee; text-decoration: none; font-size: .92rem; }
.gov-footer a:hover { color: #fff; text-decoration: underline; }
.gov-footer ul { list-style: none; margin: 0; padding: 0; }
.gov-footer li { margin-bottom: .55rem; }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-cols p { font-size: .92rem; line-height: 1.65; }
.footer-ids { font-size: .85rem; margin-top: 1rem; color: #8ea3bb; }
.footer-bottom-bar {
    border-top: 1px solid rgba(255,255,255,.12); padding-block: 1.25rem;
    display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    font-size: .85rem; color: #8ea3bb;
}
.footer-bottom-bar nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

/* --- Prose (policy pages) -------------------------------- */
.prose { max-width: 74ch; }
.prose h2 { font-size: 1.4rem; margin: 2.25rem 0 .8rem; }
.prose h3 { font-size: 1.1rem; margin: 1.6rem 0 .6rem; }
.prose p, .prose li { color: var(--slate-700); font-size: 1rem; line-height: 1.75; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 0 0 1.25rem 1.25rem; }
.prose li { margin-bottom: .5rem; }

.page-head { background: var(--navy-800); color: #fff; padding: 3.5rem 0; }
.page-head h1 { color: #fff; font-size: clamp(1.9rem, 3.8vw, 2.7rem); margin-bottom: .9rem; }
.page-head p { color: #c3d2e4; max-width: 62ch; font-size: 1.05rem; }

.breadcrumbs { font-size: .85rem; color: #9fb3c8; margin-bottom: 1rem; }
.breadcrumbs a { color: #cfdcea; }

/* --- Responsive ------------------------------------------ */
@media (max-width: 960px) {
    .gov-hero-grid { grid-template-columns: 1fr; }
    .gov-hero-media { display: none; }
    .grid--3, .grid--2, .steps { grid-template-columns: 1fr; }
    .cred-strip ul { grid-template-columns: repeat(2, 1fr); }
    .cred-strip li:nth-child(odd) { border-left: 0; }
    .footer-cols { grid-template-columns: 1fr 1fr; }
    .nav-toggle { display: block; }
    .gov-menu {
        display: none; position: absolute; left: 0; right: 0; top: 100%;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--slate-200);
        padding: .5rem 1.5rem 1.25rem; box-shadow: var(--shadow-md);
    }
    .gov-menu.is-open { display: flex; }
    .gov-menu a { padding: .8rem .25rem; border-bottom: 1px solid var(--slate-100); }
    .gov-menu li:last-child { margin-top: .75rem; }
    .gov-menu li:last-child a { background: var(--teal-700); color: #fff; text-align: center; border-radius: 6px; border-bottom: 0; }
    .gov-nav .wrap { position: relative; }
}

@media (max-width: 620px) {
    .form-grid { grid-template-columns: 1fr; }
    .footer-cols { grid-template-columns: 1fr; }
    .cred-strip ul { grid-template-columns: 1fr; }
    .cred-strip li { border-left: 0; border-top: 1px solid rgba(255,255,255,.1); }
}

/* ============================================================
   Legacy page reconciliation
   Catalog, product, diagnostic, demo, and account views still
   use the older .glass-card / .card-dark components. Re-skin
   them onto the navy brand rather than rewriting every view,
   and force single-column at mobile where those views use
   inline multi-column grids.
   ============================================================ */

.glass-card,
.card-dark {
    background: var(--navy-800) !important;
    border: 1px solid rgba(255, 255, 255, .12) !important;
    color: #e4edf6;
    border-radius: var(--radius);
}
.glass-card h1, .glass-card h2, .glass-card h3, .glass-card h4,
.card-dark h1, .card-dark h2, .card-dark h3, .card-dark h4 { color: #fff; }
.glass-card p, .card-dark p { color: #c3d2e4; }
.glass-card a, .card-dark a { color: #9fd8e2; }

/* Inside a navy card the muted token must lighten, or it drops
   below AA against the navy ground. */
.glass-card, .card-dark { --text-secondary: #c3d2e4; --text-primary: #ffffff; }

.badge {
    background: rgba(255, 255, 255, .12);
    color: #e4edf6;
    border: 1px solid rgba(255, 255, 255, .2);
}

.btn-primary, .btn-primary-sm, .btn-pill-solid {
    background: var(--teal-700) !important;
    background-image: none !important;
    color: #fff !important;
    border-color: var(--teal-700) !important;
}
.btn-outline, .btn-pill-outline {
    border-color: var(--navy-700) !important;
    color: var(--navy-800) !important;
}

.text-gradient {
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: currentColor;
    color: var(--teal-600);
}
.card-dark .text-gradient, .glass-card .text-gradient { color: #7fd3de; }

/* --- Responsive rescue for inline grid layouts -------------- */
@media (max-width: 760px) {
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    [style*="padding: 0 5%"], [style*="padding: 0 5% 6rem"] {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }
}

/* --- Contrast corrections ---------------------------------- */
.gov-brand-sub { color: var(--slate-600); }

/* The hero and page headers paint navy but are not .section--navy. */
.gov-hero .eyebrow, .page-head .eyebrow { color: #7fd3de; }

/* Legacy views set link colour inline via var(--accent-cyan). On a navy
   card the dark teal drops to ~2.8:1, so remap the token inside the card. */
.glass-card, .card-dark {
    --accent-cyan: #7fd3de;
    --accent-red: #7fd3de;
    --accent-blue: #9fd8e2;
}

.glass-card .btn-outline, .card-dark .btn-outline,
.glass-card .btn-pill-outline, .card-dark .btn-pill-outline {
    color: #fff !important;
    border-color: rgba(255, 255, 255, .55) !important;
}

/* .badge appears both on white page ground and inside navy cards, so give
   it its own solid ground rather than a translucent tint. */
.badge {
    display: inline-block;
    background: var(--navy-800);
    color: #fff;
    border: 1px solid var(--navy-700);
    border-radius: 50px;
    padding: .3rem 1rem;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.glass-card .badge, .card-dark .badge {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .28);
}
