/* ---------- Design tokens (palette derived from the Cyberyard shield) ---------- */
:root {
    --navy-900: #071B2C;
    --navy-800: #0B2A45;
    --navy-700: #143A5C;
    --graphite: #42505E;
    --graphite-soft: #66727F;
    --paper: #FFFFFF;
    --paper-alt: #F4F6F8;
    --line: #DCE2E8;
    --line-strong: #C3CCD6;
    --accent: #C8181F;
    --accent-dark: #A0121A;

    /* Focus ring. Deliberately blue, never the red accent, so it never
       reads as an error state. Dark surfaces override it below. */
    --focus: #125FA8;

    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 'Helvetica Neue', Arial, sans-serif;

    /* Header scales with the viewport like the rest of the type. Capped at
       80px, the maximum the interface guidelines allow for desktop nav. */
    --header-h: clamp(63px, 4.5vw, 79px);

    --measure: 68ch;
    --radius: 4px;
}

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

html {
    color-scheme: light;
    scroll-behavior: smooth;
    /* Removes the 300ms double-tap zoom delay on touch devices */
    touch-action: manipulation;
    /* Derived from the header so the two can never drift apart. */
    scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--graphite);
    font-family: var(--font-body);
    font-size: clamp(1.0625rem, 0.96rem + 0.3vw, 1.25rem);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    text-wrap: balance;
    color: var(--navy-800);
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -0.015em;
    margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.15rem, 1rem + 3.4vw, 4.25rem); line-height: 1.08; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.6vw, 2.75rem); }
h3 { font-size: clamp(1.2rem, 1.1rem + 0.3vw, 1.35rem); }
h4 { font-size: 1rem; }

p { margin: 0 0 1rem; max-width: var(--measure); }

a { color: var(--navy-700); }

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

/* Dark surfaces need a lighter focus ring to stay visible */
.hero,
.credibility,
.contact,
.site-footer {
    --focus: #7CBAFF;
}

/* ---------- Layout ---------- */
.container {
    width: 100%;
    /* Structural width, not prose width. Paragraphs stay capped by --measure,
       so the frame can run wide without hurting line length. */
    max-width: 1760px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 3vw, 3.5rem);
}

.section { padding: 5rem 0; }
.section--alt { background: var(--paper-alt); border-block: 1px solid var(--line); }

.section-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.6rem;
}

.lede { font-size: clamp(1.18rem, 1.05rem + 0.42vw, 1.45rem); color: var(--graphite); }

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -100px;
    z-index: 200;
    background: var(--navy-800);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    text-decoration: none;
    /* No transition: a skip link should appear instantly, which also means
       no layout property is ever animated. */
}

.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--navy-800);
    font-weight: 700;
    font-size: clamp(1.15rem, 1.02rem + 0.42vw, 1.5rem);
    letter-spacing: -0.02em;
}

.brand img {
    width: clamp(34px, 2.3vw, 46px);
    height: clamp(34px, 2.3vw, 46px);
    display: block;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: clamp(1.5rem, 1.1rem + 1.2vw, 2.75rem);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list a {
    color: var(--graphite);
    text-decoration: none;
    font-size: clamp(0.94rem, 0.86rem + 0.3vw, 1.15rem);
    font-weight: 550;
    padding: 0.4rem 0;
    border-bottom: 2px solid transparent;
}

.nav-list a:hover,
.nav-list a.is-active {
    color: var(--navy-800);
    border-bottom-color: var(--accent);
}

.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.8rem 1.6rem;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

/* On dark surfaces: off-white primary, outlined secondary */
.btn--primary {
    background: #F2F5F8;
    border-color: #F2F5F8;
    color: var(--navy-900);
}
.btn--primary:hover { background: #DDE6EF; border-color: #DDE6EF; }
.btn--primary:active { background: #C8D5E2; border-color: #C8D5E2; }

.btn--ghost-light {
    border-color: rgba(255, 255, 255, 0.55);
    color: #fff;
}
.btn--ghost-light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.12); }
.btn--ghost-light:active { background: rgba(255, 255, 255, 0.2); }

/* On light surfaces: navy primary, navy-outlined secondary */
.btn--solid {
    background: var(--navy-800);
    border-color: var(--navy-800);
    color: #fff;
}
.btn--solid:hover { background: var(--navy-700); border-color: var(--navy-700); }
.btn--solid:active { background: #1B4A72; border-color: #1B4A72; }

.btn--ghost {
    background: #fff;
    border-color: var(--navy-700);
    color: var(--navy-800);
}
.btn--ghost:hover { background: var(--paper-alt); }
.btn--ghost:active { background: #E7ECF1; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2rem; }

/* ---------- Hero ---------- */
.hero {
    background: var(--navy-900);
    color: #E8EDF2;
    padding: 6rem 0 5rem;
    position: relative;
    overflow: hidden;
}

/* Restrained structural grid, purely decorative */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    -webkit-mask-image: linear-gradient(115deg, transparent 32%, #000 100%);
    mask-image: linear-gradient(115deg, transparent 32%, #000 100%);
    pointer-events: none;
}

.hero .container { position: relative; z-index: 1; }

.hero-inner {
    display: grid;
    /* Copy takes the space; the mark column sizes to the logo */
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 4.5rem;
    row-gap: 2.5rem;
    align-items: center;
}

.hero-inner h1 { color: #FFFFFF; max-width: 26ch; }

/* The mark centres against the headline and tagline together, so it reads
   as paired with the copy rather than floating over the whole stack. */
.hero-copy { grid-column: 1; grid-row: 1; }

.hero-mark {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    /* The mark is drawn for a light background, so it gets one. A hard white
       rectangle reads as a pasted sticker, so this is a struck emblem: round,
       a soft top-lit gradient for dimension, a hairline rim, and an ambient
       shadow tinted toward the hero navy rather than pure black. */
    display: grid;
    place-items: center;
    width: clamp(220px, 25vw, 400px);
    aspect-ratio: 1;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 34%, #FFFFFF 0%, var(--paper) 45%, #E9EEF3 100%);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        0 22px 50px rgba(3, 12, 22, 0.45),
        0 2px 6px rgba(3, 12, 22, 0.3);
}

.hero-inner .btn-row { grid-column: 1 / -1; grid-row: 2; margin-top: 0; }

.hero-mark img {
    display: block;
    width: 66%;
    height: auto;
}

.hero p {
    color: #B9C6D3;
    font-size: clamp(1.12rem, 1rem + 0.45vw, 1.4rem);
    max-width: 52ch;
    margin: 0;
}

.hero .btn-row { margin-top: 2.25rem; }

.hero-rule {
    width: 56px;
    height: 3px;
    background: var(--accent);
    margin-bottom: 2rem;
}

/* ---------- Credibility strip ---------- */
.credibility { background: var(--navy-800); color: #C9D6E2; padding: 2rem 0; }
.credibility p { max-width: 78ch; margin: 0 0 1.25rem; }

.trust-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.94rem;
}

.trust-list li { position: relative; padding-left: 1.1rem; }

.trust-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 5px;
    height: 5px;
    background: var(--accent);
}

/* ---------- Service cards ---------- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-top: 3px solid var(--navy-800);
    border-radius: var(--radius);
    padding: 1.75rem;
}

.section--alt .card { background: #fff; }

.card h3 { margin-bottom: 0.6rem; }
.card p { font-size: 1rem; margin-bottom: 0; }

.card-index {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--graphite-soft);
    margin-bottom: 0.75rem;
}

/* ---------- Two-column detail blocks ---------- */
.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

.capability-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.capability-list li {
    padding: 0.7rem 0 0.7rem 1.6rem;
    border-bottom: 1px solid var(--line);
    position: relative;
    font-size: 1rem;
}

.capability-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.25em;
    width: 8px;
    height: 2px;
    background: var(--accent);
}

.capability-list li:first-child { border-top: 1px solid var(--line); }

/* ---------- Callout / disclaimer ---------- */
.callout {
    border: 1px solid var(--line-strong);
    border-left: 3px solid var(--accent);
    background: #fff;
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius);
    margin-top: 1.75rem;
}

.callout p { margin: 0; font-size: 0.98rem; }
.callout strong { color: var(--navy-800); }

.qualifiers {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
    font-size: 0.98rem;
    color: var(--graphite-soft);
}

.qualifiers li { padding: 0.3rem 0 0.3rem 1.4rem; position: relative; }

.qualifiers li::before {
    content: '';
    position: absolute;
    left: 0.15rem;
    top: 0.85em;
    width: 6px;
    height: 6px;
    border: 1px solid var(--line-strong);
}

/* ---------- Process steps ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
    list-style: none;
    padding: 0;
}

.steps li { border-top: 2px solid var(--line-strong); padding-top: 1.1rem; }

.steps .step-num {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 0.4rem;
}

.steps h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.steps p { font-size: 0.96rem; margin: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--navy-800); color: #D3DEE8; }
.contact h2 { color: #fff; }
.contact p { color: #C0CEDA; }

.contact-email {
    display: inline-block;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.notice {
    margin-top: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-left: 3px solid rgba(255, 255, 255, 0.4);
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.16);
}

.notice p { margin: 0; font-size: 0.96rem; color: #C9D6E2; max-width: 76ch; }

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy-900);
    color: #93A4B4;
    padding: 2.25rem 0;
    font-size: 0.92rem;
}

/* Single row: mark and legal line on the left, navigation on the right */
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2.5rem;
}

.footer-legal {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin: 0;
    max-width: none;
}

.footer-legal img {
    width: 26px;
    height: 26px;
    flex: none;
}

.footer-nav { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-footer a { color: #B4C2CF; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
    .hero-inner { grid-template-columns: 1fr; gap: 1.75rem; align-items: start; }
    .hero h1 { max-width: 20ch; }
    .hero p { max-width: 60ch; }
    /* The header already carries the mark at this width */
    .hero-mark { display: none; }
}

@media (max-width: 860px) {
    .split { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 760px) {
    .section { padding: 3.5rem 0; }
    .hero { padding: 4rem 0 3.5rem; }

    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        min-height: 44px;
        padding: 0.5rem 0.9rem;
        background: none;
        border: 1px solid var(--line-strong);
        border-radius: var(--radius);
        color: var(--navy-800);
        font: inherit;
        font-size: 0.92rem;
        font-weight: 600;
        cursor: pointer;
    }

    .nav-toggle-bars { display: block; width: 18px; height: 2px; background: currentColor; position: relative; }
    .nav-toggle-bars::before,
    .nav-toggle-bars::after { content: ''; position: absolute; left: 0; width: 18px; height: 2px; background: currentColor; }
    .nav-toggle-bars::before { top: -6px; }
    .nav-toggle-bars::after { top: 6px; }

    .header-inner { flex-wrap: wrap; }

    .site-header nav { width: 100%; }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
        padding-bottom: 0.75rem;
    }

    .nav-list a {
        display: block;
        padding: 0.85rem 0.25rem;
        border-bottom: 1px solid var(--line);
        border-left: 3px solid transparent;
    }

    .nav-list a:hover,
    .nav-list a.is-active { border-bottom-color: var(--line); border-left-color: var(--accent); }

    /* With JS the list becomes a disclosure. Without JS it stays visible and usable. */
    .js .nav-list { display: none; }
    .js .nav-list.is-open { display: flex; }

    .btn { width: 100%; }
    .btn-row { flex-direction: column; }
}

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

/* ---------- Legal / long-form pages ---------- */
.legal { padding: 4rem 0 5rem; }
.legal .container { max-width: 760px; }
.legal h1 { margin-bottom: 0.5rem; }
.legal h2 { font-size: 1.3rem; margin-top: 2.5rem; }
.legal ul { padding-left: 1.25rem; max-width: var(--measure); }
.legal li { margin-bottom: 0.4rem; }
.legal .updated { color: var(--graphite-soft); font-size: 0.94rem; margin-bottom: 2rem; }
.legal .back { display: inline-block; margin-top: 3rem; }
