/* =====================================================
   JEOS DESIGN TOKENS
   Derived from the logo (white wordmark, blue-to-silver
   swoosh) - update these if the brand evolves, everything
   else references these variables.
   ===================================================== */
:root {
    --ink: #0A1424;
    --ink-deep: #060B15;
    --panel: #101E36;
    --panel-raised: #16283F;
    --border-subtle: rgba(143, 163, 189, 0.16);

    --signal-blue: #2E8BE0;
    --signal-blue-bright: #5AAEF0;
    --signal-blue-deep: #123C6B;
    --mist: #8FA3BD;
    --mist-dim: #5C6E85;
    --flag-amber: #E8A33D;
    --flag-amber-bright: #F4B860;

    --text-high: #F3F6FA;
    --text-body: #C3CEDD;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Kept for backward compatibility with any inline references */
    --brand-primary: var(--signal-blue);
    --brand-primary-dark: var(--signal-blue-deep);
}

* {
    box-sizing: border-box;
}

html {
    font-size: 15px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-bottom: 0;
    background: var(--ink);
    color: var(--text-body);
    font-family: var(--font-body);
    line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--text-high);
    font-weight: 600;
    letter-spacing: -0.01em;
}

a {
    color: var(--signal-blue-bright);
    text-decoration: none;
}

a:hover {
    color: var(--flag-amber-bright);
}

.text-muted {
    color: var(--mist) !important;
}

/* =====================================================
   FOCUS STATES - kept visible, just recoloured for dark bg
   ===================================================== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--ink), 0 0 0 0.25rem var(--signal-blue-bright);
}

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
    background: var(--ink-deep) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
}

.navbar .logo {
    height: 42px;
    width: auto;
    margin-right: 4px;
    vertical-align: middle;
}

.navbar .navbar-brand {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-high) !important;
}

.navbar-nav .nav-link {
    color: var(--text-body) !important;
    font-weight: 500;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    transition: color 0.15s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--signal-blue-bright) !important;
}

.navbar-toggler {
    border-color: var(--border-subtle);
}

.navbar-toggler-icon {
    filter: invert(1);
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn-primary {
    background: linear-gradient(135deg, var(--signal-blue) 0%, var(--signal-blue-deep) 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(46, 139, 224, 0.25);
}

.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--signal-blue-bright) 0%, var(--signal-blue) 100%);
    color: #fff;
    box-shadow: 0 6px 24px rgba(46, 139, 224, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--flag-amber-bright) 0%, var(--flag-amber) 100%);
    border: none;
    color: var(--ink);
    font-weight: 600;
}

.btn-warning:hover, .btn-warning:focus {
    background: linear-gradient(135deg, var(--flag-amber-bright) 0%, var(--flag-amber-bright) 100%);
    color: var(--ink);
}

.btn-outline-secondary {
    color: var(--text-body);
    border-color: var(--border-subtle);
}

.btn-outline-secondary:hover {
    background: var(--panel-raised);
    border-color: var(--mist);
    color: var(--text-high);
}

.text-primary {
    color: var(--signal-blue-bright) !important;
}

/* =====================================================
   CARDS / PANELS
   ===================================================== */
.card {
    background: var(--panel);
    border: 1px solid var(--border-subtle);
    color: var(--text-body);
}

.card .fw-bold, .card h1, .card h2, .card h3, .card h4, .card h5 {
    color: var(--text-high);
}

.badge.bg-light {
    background: var(--panel-raised) !important;
    color: var(--text-body) !important;
    border-color: var(--border-subtle) !important;
    font-family: var(--font-mono);
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Form controls on dark backgrounds */
.form-control, .form-select {
    background: var(--ink-deep);
    border: 1px solid var(--border-subtle);
    color: var(--text-high);
}

.form-control:focus, .form-select:focus {
    background: var(--ink-deep);
    color: var(--text-high);
    border-color: var(--signal-blue);
}

.form-control::placeholder {
    color: var(--mist-dim);
}

.form-label {
    color: var(--text-high);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.form-text {
    color: var(--mist);
}

.list-group-item {
    background: var(--panel-raised);
    border-color: var(--border-subtle);
    color: var(--text-body);
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
    background: radial-gradient(ellipse 80% 60% at 50% -10%, var(--signal-blue-deep) 0%, var(--ink) 55%);
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--signal-blue-bright);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--flag-amber-bright);
    box-shadow: 0 0 8px var(--flag-amber-bright);
}

/* =====================================================
   SCAN SIGNATURE VISUAL
   ===================================================== */
.scan-visual {
    background: var(--ink-deep);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 28px 24px;
    position: relative;
    overflow: hidden;
}

.scan-line {
    height: 10px;
    border-radius: 5px;
    background: rgba(143, 163, 189, 0.18);
    margin-bottom: 12px;
}

.scan-line:nth-child(1) { width: 88%; }
.scan-line:nth-child(2) { width: 96%; }
.scan-line:nth-child(3) { width: 70%; }
.scan-line.flagged {
    background: rgba(232, 163, 61, 0.28);
    outline: 1px solid var(--flag-amber);
    position: relative;
}
.scan-line.flagged::after {
    content: "risk flagged";
    position: absolute;
    right: 10px;
    top: -2px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--flag-amber-bright);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.scan-line:nth-child(5) { width: 92%; }
.scan-line:nth-child(6) { width: 60%; }

.scan-beam {
    position: absolute;
    top: -40%;
    left: -20%;
    width: 45%;
    height: 180%;
    background: linear-gradient(
        100deg,
        rgba(46, 139, 224, 0) 0%,
        rgba(90, 174, 240, 0.35) 45%,
        rgba(199, 210, 222, 0.5) 50%,
        rgba(46, 139, 224, 0.35) 55%,
        rgba(46, 139, 224, 0) 100%
    );
    transform: rotate(12deg);
    animation: sweep 5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sweep {
    0%   { left: -30%; }
    45%  { left: 110%; }
    100% { left: 110%; }
}

@media (prefers-reduced-motion: reduce) {
    .scan-beam { animation: none; display: none; }
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    background: var(--ink-deep);
    border-top: 1px solid var(--border-subtle) !important;
    color: var(--mist);
    padding: 1.5rem 0;
}

.footer a {
    color: var(--mist);
}

.footer a:hover {
    color: var(--signal-blue-bright);
}

/* =====================================================
   ACCORDION (FAQ page)
   ===================================================== */
.accordion-item {
    background: var(--panel);
    border-color: var(--border-subtle);
}

.accordion-button {
    background: var(--panel);
    color: var(--text-high);
    font-weight: 600;
    font-family: var(--font-display);
}

.accordion-button:not(.collapsed) {
    background: var(--panel-raised);
    color: var(--signal-blue-bright);
    box-shadow: none;
}

.accordion-button::after {
    filter: invert(0.7) brightness(1.5);
}

.accordion-body {
    color: var(--text-body);
}

/* =====================================================
   MISC
   ===================================================== */
.border-bottom {
    border-color: var(--border-subtle) !important;
}

.border-top {
    border-color: var(--border-subtle) !important;
}

#progressLog {
    color: var(--mist) !important;
}

#progressLog div {
    border-bottom-color: var(--border-subtle) !important;
}

.analysis-result h2 {
    border-bottom-color: var(--border-subtle) !important;
    color: var(--text-high);
}
