/* CyberOne. Static site, no external fonts or frameworks. */

:root {
    --bg:          #080e1a;
    --bg-alt:      #0d1525;
    --surface:     #16233d;
    --surface-2:   #111d35;
    --border:      rgba(255, 255, 255, 0.10);
    --cyan:        #17c3e8;
    --cyan-ink:    #061018;
    --cyan-dim:    rgba(23, 195, 232, 0.12);
    --text-1:      #f0f4ff;
    --text-2:      #b4c2d8;
    --text-3:      #8ea2bf;
    --amber:       #f5b544;
    --red:         #f08a8a;
    --focus:       #7de8ff;

    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

    --radius: 10px;
    --max: 1200px;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-1);
    background: var(--bg);
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
h1, h2, h3 { line-height: 1.2; color: var(--text-1); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); font-weight: 750; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 650; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--text-1); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }

[hidden] { display: none !important; }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-alt { background: var(--bg-alt); }

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 300;
    background: var(--cyan); color: var(--cyan-ink); padding: 10px 16px; border-radius: 6px; font-weight: 600;
    transition: top 0.2s var(--ease-out);
}
.skip-link:focus { top: 12px; }

.eyebrow {
    font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan);
    text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px;
}
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head h2 { margin-bottom: 14px; }
.section-sub { color: var(--text-2); font-size: 1.05rem; }
.placeholder, .placeholder-inline {
    color: var(--amber);
    background: rgba(245, 181, 68, 0.12);
    border: 1px dashed rgba(245, 181, 68, 0.5);
    border-radius: 4px;
    padding: 0 6px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}

/* ─── Header ───────────────────────────────── */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(8, 14, 26, 0.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
}
.nav {
    max-width: var(--max); margin: 0 auto; padding: 0 20px;
    min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
    position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-1); min-height: 44px; }
.brand img { width: 36px; height: 36px; }
.brand-name { font-weight: 800; letter-spacing: 0.05em; font-size: 1.1rem; }
.brand-name span { color: var(--cyan); }
.nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: transparent; border: 1px solid var(--border);
    border-radius: 8px; color: var(--text-1); cursor: pointer;
}
.nav-list { display: none; list-style: none; margin: 0; padding: 0; }
.nav-list.open {
    display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 20px 20px; list-style: none; gap: 4px;
}
.nav-list a {
    display: flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 8px;
    color: var(--text-2); text-decoration: none; font-weight: 500;
}
.nav-list a:hover { color: var(--text-1); background: var(--border); }
.nav-list .nav-cta { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(23, 195, 232, 0.3); }

/* ─── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 48px; padding: 0 22px; border-radius: 8px; font: inherit; font-weight: 600;
    text-decoration: none; cursor: pointer; border: 1px solid transparent;
    transition: background-color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), color 0.2s var(--ease-out), transform 0.16s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--cyan); color: var(--cyan-ink); }
.btn-primary:hover { background: #4fd6f0; color: var(--cyan-ink); }
.btn-ghost { background: transparent; color: var(--text-1); border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-small { min-height: 44px; padding: 0 16px; font-size: 0.95rem; }
.icon-btn {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: 1px solid var(--border); border-radius: 8px; color: var(--text-1); cursor: pointer;
}
.icon-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* ─── Hero ─────────────────────────────────── */
.hero { padding: 72px 0 64px; }
.hero-inner { display: grid; gap: 48px; align-items: center; grid-template-columns: minmax(0, 1fr); }
.lead { margin: 20px 0 32px; font-size: 1.15rem; color: var(--text-2); max-width: 600px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--text-2); font-size: 0.95rem; }
.hero-facts li { position: relative; padding-left: 18px; }
.hero-facts li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); }

.hero-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 28px;
}
.card-title { font-size: 1.15rem; margin-bottom: 16px; }
.question-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.question-list li {
    padding: 12px 14px; border-radius: 8px; background: rgba(255, 255, 255, 0.04); color: var(--text-2);
    border: 1px solid transparent;
}
.card-note { margin-top: 16px; font-size: 0.95rem; color: var(--text-3); }

/* ─── Stats ────────────────────────────────── */
.stat-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.stat-card {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
}
.stat-value { font-size: 1.8rem; font-weight: 750; color: var(--cyan); margin-bottom: 8px; overflow-wrap: anywhere; }
.stat-card p:not(.stat-value):not(.source) { color: var(--text-2); }
.source { margin-top: 14px; font-size: 0.85rem; color: var(--text-3); }

/* ─── Services ─────────────────────────────── */
.service-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.service-card {
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
    transition: border-color 0.2s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
    .service-card:hover { border-color: rgba(23, 195, 232, 0.4); }
}
.service-icon {
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; background: var(--cyan-dim); color: var(--cyan); margin-bottom: 16px;
}
.service-card h3 { margin-bottom: 8px; }
.service-card > p { color: var(--text-2); font-size: 0.97rem; margin-bottom: 16px; }

.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
    font-size: 0.85rem; padding: 4px 10px; border-radius: 999px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border); color: var(--text-2);
}
.tags-plain { margin-top: 24px; }

/* ─── Live feed ────────────────────────────── */
.feed-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.feed-status { color: var(--text-2); font-size: 0.95rem; }
.feed {
    position: relative; overflow: hidden; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface-2); min-height: 120px;
}
.feed-track {
    display: flex; gap: 16px; padding: 18px; width: max-content;
    animation: feed-scroll 120s linear infinite;
}
.feed-track.is-paused { animation-play-state: paused; }
.feed-track.is-static, .feed-track:empty { animation: none; }
.feed-note { margin-top: 12px; font-size: 0.85rem; color: var(--text-3); }
.feed-message { padding: 28px; color: var(--text-2); width: 100%; }
.feed-message a { color: var(--cyan); }

@keyframes feed-scroll {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

.cve-card {
    flex: 0 0 300px; width: 300px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 8px;
}
.cve-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cve-id { font-family: var(--font-mono); font-size: 0.9rem; color: var(--cyan); }
.cve-badge {
    font-size: 0.75rem; font-weight: 600; padding: 3px 8px; border-radius: 4px;
    background: rgba(240, 138, 138, 0.14); color: var(--red); border: 1px solid rgba(240, 138, 138, 0.35);
}
.cve-vendor { font-size: 0.85rem; color: var(--text-3); }
.cve-desc { font-size: 0.95rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cve-meta { font-size: 0.8rem; color: var(--text-3); margin-top: auto; }
.cve-link { font-size: 0.9rem; font-weight: 600; }

/* ─── Resources ────────────────────────────── */
.resources { margin-top: 48px; }
.resources-title { font-size: 1rem; color: var(--text-3); font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.resource-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.resource-link {
    display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 14px 16px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none;
    transition: border-color 0.2s var(--ease-out);
}
.resource-link:hover { border-color: var(--cyan); }
.resource-name { color: var(--text-1); font-weight: 600; }
.resource-desc { color: var(--text-3); font-size: 0.9rem; }

/* ─── Threats ──────────────────────────────── */
.threat-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.threat-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.threat-card h3 { margin-bottom: 8px; }
.threat-card p:not(.threat-level) { color: var(--text-2); font-size: 0.97rem; }
.threat-level {
    margin-top: 16px; font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-3);
}
.threat-level-high { color: var(--amber); }
.cta-band {
    margin-top: 40px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
    padding: 24px; border-radius: var(--radius); background: var(--cyan-dim); border: 1px solid rgba(23, 195, 232, 0.25);
}

/* ─── Approach ─────────────────────────────── */
.approach-grid { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); }
.steps { list-style: none; padding: 0; margin: 28px 0 0; counter-reset: step; }
.steps li {
    position: relative; padding: 0 0 28px 56px; counter-increment: step;
}
.steps li::before {
    content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0;
    font-family: var(--font-mono); font-size: 0.85rem; color: var(--cyan);
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(23, 195, 232, 0.35); border-radius: 50%;
}
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--text-2); }
.approach-aside { display: flex; flex-direction: column; gap: 16px; }
.aside-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; border-left: 3px solid var(--cyan);
}
.aside-card h3 { margin-bottom: 6px; }
.aside-card p { color: var(--text-2); font-size: 0.97rem; }

/* ─── Contact ──────────────────────────────── */
.contact-grid { display: grid; gap: 48px; grid-template-columns: minmax(0, 1fr); }


/* ─── Footer ───────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding: 28px 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.footer-inner p { color: var(--text-3); font-size: 0.9rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--text-1); }

/* ─── Checklist dialog ─────────────────────── */
.checklist {
    width: min(760px, calc(100% - 24px)); max-height: calc(100dvh - 32px); padding: 0;
    background: var(--bg-alt); color: var(--text-1); border: 1px solid rgba(23, 195, 232, 0.25);
    border-radius: 16px;
}
/* Only show as a flex column when open. Without the [open] guard the closed dialog stays visible. */
.checklist[open] { display: flex; flex-direction: column; }
.checklist::backdrop { background: rgba(4, 8, 18, 0.85); }
.checklist-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; gap: 12px; }
.checklist-head h2 { font-size: 1.35rem; }
.checklist-intro { padding: 12px 24px 0; color: var(--text-2); font-size: 0.97rem; }
.score { padding: 16px 24px; display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--border); }
.score-track { height: 8px; background: rgba(255, 255, 255, 0.1); border-radius: 4px; overflow: hidden; }
.score-fill { height: 100%; width: 0; background: var(--cyan); border-radius: 4px; transition: width 0.3s var(--ease-out), background-color 0.3s var(--ease-out); }
.score-text { font-size: 0.95rem; color: var(--text-2); }
.checklist-body { overflow-y: auto; padding: 8px 24px 16px; flex: 1; min-height: 0; }
.cl-group { border: 0; margin: 16px 0 0; padding: 0; min-width: 0; }
.cl-group legend {
    font-family: var(--font-mono); font-size: 0.8rem; color: var(--cyan); text-transform: uppercase;
    letter-spacing: 0.08em; padding: 0; margin-bottom: 6px;
}
.cl-item {
    display: flex; align-items: flex-start; gap: 12px; padding: 12px; min-height: 44px;
    border-radius: 8px; border: 1px solid transparent; cursor: pointer;
    transition: background-color 0.15s var(--ease-out), border-color 0.15s var(--ease-out);
}
.cl-item:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--border); }
.cl-item input[type="checkbox"] {
    appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 1px 0 0; flex-shrink: 0;
    border: 1.5px solid var(--text-3); border-radius: 5px; background: transparent; cursor: pointer; display: grid; place-content: center;
}
.cl-item input[type="checkbox"]::before {
    content: ""; width: 11px; height: 6px; border-left: 2.5px solid var(--cyan-ink); border-bottom: 2.5px solid var(--cyan-ink);
    transform: rotate(-45deg) scale(0); transition: transform 0.15s var(--ease-out);
}
.cl-item input[type="checkbox"]:checked { background: var(--cyan); border-color: var(--cyan); }
.cl-item input[type="checkbox"]:checked::before { transform: rotate(-45deg) scale(1); }
.cl-item:has(input:checked) { background: rgba(23, 195, 232, 0.07); border-color: rgba(23, 195, 232, 0.25); }
.cl-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.cl-text strong { font-weight: 600; font-size: 0.95rem; }
.cl-text small { color: var(--text-3); font-size: 0.85rem; line-height: 1.45; }
.pri { font-family: var(--font-mono); font-size: 0.7rem; padding: 3px 7px; border-radius: 4px; text-transform: uppercase; flex-shrink: 0; align-self: flex-start; margin-top: 2px; }
.pri-critical { background: rgba(240, 138, 138, 0.15); color: var(--red); }
.pri-high { background: rgba(245, 181, 68, 0.15); color: var(--amber); }
.pri-medium { background: var(--cyan-dim); color: var(--cyan); }
.checklist-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 24px 20px; border-top: 1px solid var(--border);
}
.checklist-foot p { color: var(--text-2); font-size: 0.95rem; }
.checklist-actions { display: flex; gap: 10px; }

/* ─── Reveal on scroll (only when JS runs and motion is allowed) ── */
.js .reveal { opacity: 0; transform: translate3d(0, 16px, 0); transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ─── Responsive ───────────────────────────── */
@media (min-width: 720px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .service-grid, .threat-grid { grid-template-columns: repeat(2, 1fr); }
    .resource-grid { grid-template-columns: repeat(2, 1fr); }
    .checklist-body { padding-left: 28px; padding-right: 28px; }
}
@media (min-width: 900px) {
    .nav-toggle { display: none; }
    .nav-list, .nav-list.open {
        display: flex; position: static; background: transparent; border: 0; padding: 0; flex-direction: row; gap: 4px;
    }
    .nav-list a { min-height: 40px; }
    .hero-inner { grid-template-columns: 1.2fr 0.8fr; }
    .approach-grid { grid-template-columns: 1.1fr 0.9fr; align-items: start; }
    .contact-grid { grid-template-columns: 1fr 1.1fr; align-items: start; }
    .service-grid { grid-template-columns: repeat(3, 1fr); }
    .threat-grid { grid-template-columns: repeat(3, 1fr); }
    .resource-grid { grid-template-columns: repeat(5, 1fr); }
    .cta-band { flex-direction: row; align-items: center; justify-content: space-between; }
}
@media (min-width: 1280px) {
    .section { padding: 96px 0; }
}

/* ─── Reduced motion: no movement, static feed ─ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .feed-track { animation: none; }
    .feed { overflow-x: auto; }
    .js .reveal { opacity: 1; transform: none; transition: none; }
    .btn:active { transform: none; }
    .score-fill, .cl-item input[type="checkbox"]::before, .skip-link { transition: none; }
}

/* ─── Print: checklist results only ────────── */
@media print {
    /* Only when the checklist is open, so printing the page normally still works. */
    body:has(dialog.checklist[open]) > *:not(dialog.checklist) { display: none !important; }
    dialog.checklist[open] {
        display: block !important; position: static; max-height: none; width: 100%;
        background: #fff; color: #000; border: 0; box-shadow: none;
    }
    .checklist-head .icon-btn, .checklist-foot, .checklist::backdrop { display: none !important; }
    .checklist-body { overflow: visible; }
    .checklist-intro, .cl-text small, .score-text { color: #333; }
    .cl-text strong, .checklist-head h2, .cl-group legend { color: #000; }
    .cl-item { break-inside: avoid; border-color: #ddd; }
    .cl-item:has(input:checked) { background: #f1fbfe; }
    .score-track { background: #ddd; }
    .score-fill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .pri, .cl-item input[type="checkbox"]:checked { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
