/* CyberToolGuardian — SOC console shell */
:root {
    --bg0: #07090d;
    --bg1: #0d1118;
    --bg2: #141b26;
    --bg3: #1a2332;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.14);
    --text: #e8edf4;
    --muted: #8b9cb3;
    --faint: #5c6b80;
    --teal: #2ee6c6;
    --teal-dim: rgba(46, 230, 198, 0.14);
    --amber: #f7b955;
    --amber-dim: rgba(247, 185, 85, 0.14);
    --violet: #a78bfa;
    --violet-dim: rgba(167, 139, 250, 0.14);
    --danger: #fb7185;
    --font-sans: "Outfit", system-ui, sans-serif;
    --font-mono: "IBM Plex Mono", ui-monospace, monospace;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --max: 1120px;
    --gutter: clamp(1.25rem, 4vw, 2rem);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg0);
    background-image:
        radial-gradient(ellipse 120% 80% at 50% -30%, rgba(46, 230, 198, 0.09), transparent 55%),
        linear-gradient(180deg, var(--bg0) 0%, var(--bg1) 35%, var(--bg0) 100%);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--teal);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

a:hover {
    color: #5ff5dc;
}

.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;
}

.skip-link {
    position: absolute;
    left: var(--gutter);
    top: -100px;
    z-index: 200;
    padding: 0.6rem 1rem;
    background: var(--teal);
    color: var(--bg0);
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0.75rem;
    outline: 2px solid var(--text);
    outline-offset: 2px;
}

/* ——— Top bar ——— */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 9, 13, 0.82);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.topbar__inner {
    position: relative;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0.85rem var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text);
    text-decoration: none;
}

.brand:hover {
    color: var(--text);
}

.brand__glyph {
    color: var(--teal);
    flex-shrink: 0;
}

.brand__text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.15;
}

.brand__title {
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.brand__tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg2);
    color: var(--text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-toggle:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

.nav-toggle__bars {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    position: relative;
    border-radius: 1px;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}

.nav-toggle__bars::before {
    top: -7px;
}

.nav-toggle__bars::after {
    top: 7px;
}

.topbar.is-open .nav-toggle__bars {
    background: transparent;
}

.topbar.is-open .nav-toggle__bars::before {
    top: 0;
    transform: rotate(45deg);
}

.topbar.is-open .nav-toggle__bars::after {
    top: 0;
    transform: rotate(-45deg);
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 1.25rem;
}

.nav__link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav__link:hover {
    color: var(--text);
}

.nav__link--active {
    color: var(--teal);
    border-bottom-color: var(--teal);
}

.nav__cta {
    white-space: nowrap;
}

/* ——— Buttons ——— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    font-family: var(--font-sans);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: linear-gradient(145deg, #1ff0d0, #0fb89c);
    color: #04221c;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn--primary:hover {
    color: #021510;
    filter: brightness(1.06);
}

.btn--ghost {
    background: transparent;
    color: var(--text);
    border-color: var(--line-strong);
}

.btn--ghost:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.btn--wide {
    min-width: 11rem;
}

/* ——— Hero ——— */
.hero {
    padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: start;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted);
    margin: 0 0 1rem;
}

.eyebrow__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--teal);
    box-shadow: 0 0 12px var(--teal);
}

.hero__title {
    margin: 0 0 1.25rem;
    font-size: clamp(2rem, 4.5vw, 2.85rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.12;
}

.hero__hl {
    color: var(--teal);
    font-family: var(--font-mono);
    font-weight: 600;
}

.hero__lead {
    margin: 0 0 1.75rem;
    color: var(--muted);
    max-width: 38rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 1.25rem 0 0;
    border-top: 1px solid var(--line);
}

.hero__stat dt {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--faint);
    margin-bottom: 0.35rem;
}

.hero__stat dd {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

/* Console panel */
.console {
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
    background: var(--bg2);
    box-shadow: var(--shadow);
    overflow: hidden;
    font-family: var(--font-mono);
}

.console__chrome {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1rem;
    background: var(--bg3);
    border-bottom: 1px solid var(--line);
}

.console__dots::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fb7185;
    box-shadow: 16px 0 0 #f7b955, 32px 0 0 #4ade80;
}

.console__title {
    font-size: 0.75rem;
    color: var(--muted);
    margin-left: 2.5rem;
}

.console__body {
    margin: 0;
    padding: 1.15rem 1.15rem 1.35rem;
    font-size: 0.78rem;
    line-height: 1.65;
    color: var(--muted);
    overflow-x: auto;
}

.console__body code {
    font-family: inherit;
    white-space: pre;
}

.console__prompt {
    color: var(--amber);
}

.console__cmd {
    color: var(--text);
}

.console__ok {
    color: var(--teal);
}

.console__warn {
    color: var(--amber);
}

/* ——— Sections ——— */
.section {
    padding: clamp(3rem, 8vw, 5rem) var(--gutter);
    max-width: calc(var(--max) + 2 * var(--gutter));
    margin: 0 auto;
}

.section--tight {
    padding-top: 0;
}

.section--alt {
    background: var(--bg1);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    max-width: none;
}

.section--alt .section__head,
.section--alt .intel-grid,
.section--alt .section__foot {
    max-width: var(--max);
    margin-left: auto;
    margin-right: auto;
}

.section__head {
    margin-bottom: 2.25rem;
}

.section__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section__desc {
    margin: 0;
    color: var(--muted);
    max-width: 40rem;
}

.section__foot {
    margin: 2rem 0 0;
    text-align: center;
}

.section__hint {
    max-width: var(--max);
    margin: 1rem auto 0;
    padding: 0 var(--gutter);
    font-size: 0.9rem;
    color: var(--faint);
    text-align: center;
}

.page-hero__hint {
    text-align: left;
    padding-left: 0;
    padding-right: 0;
}

.section__foot--left {
    text-align: left;
    max-width: var(--max);
    margin-left: auto;
    margin-right: auto;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--teal);
    text-decoration: none;
}

.text-link:hover {
    color: #7ff7e4;
}

.text-link i {
    font-size: 0.85em;
    transition: transform 0.15s ease;
}

.text-link:hover i {
    transform: translateX(4px);
}

/* Pills */
.pill {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    margin-bottom: 0.65rem;
}

.pill--teal {
    color: var(--teal);
    background: var(--teal-dim);
    border-color: rgba(46, 230, 198, 0.35);
}

.pill--amber {
    color: var(--amber);
    background: var(--amber-dim);
    border-color: rgba(247, 185, 85, 0.35);
}

.pill--violet {
    color: var(--violet);
    background: var(--violet-dim);
    border-color: rgba(167, 139, 250, 0.35);
}

.pill--muted {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
}

/* Video cards (home) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.v-card {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.v-card:hover {
    border-color: rgba(46, 230, 198, 0.35);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.v-card__media {
    aspect-ratio: 16 / 9;
    background: #000;
    position: relative;
}

.v-card__media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.v-card__body {
    padding: 1.15rem 1.2rem 1.35rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.v-card__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.45rem;
    margin-bottom: 0.55rem;
}

.v-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.v-card__text {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
    flex: 1;
}

/* Intel cards */
.intel-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.15rem;
}

.intel-card {
    padding: 1.35rem 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg2);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: border-color 0.2s ease;
}

.intel-card:hover {
    border-color: var(--line-strong);
}

.intel-card__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.45rem;
    margin-bottom: 0.55rem;
}

.intel-card__head .pill {
    margin-bottom: 0;
}

.intel-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.25;
}

.intel-card__title a {
    color: inherit;
    text-decoration: none;
}

.intel-card__title a:hover {
    color: var(--teal);
}

.intel-card__text {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
    flex: 1;
}

.intel-card__code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    color: var(--text);
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
}

.intel-card__link {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--amber);
}

.intel-card__link:hover {
    color: #ffd18a;
}

/* Page hero (youtube) */
.page-hero {
    max-width: var(--max);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 3rem) var(--gutter) 0;
}

.breadcrumb {
    margin-bottom: 1rem;
}

.breadcrumb__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--faint);
}

.breadcrumb__list li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    opacity: 0.5;
}

.breadcrumb__list a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb__list a:hover {
    color: var(--teal);
}

.page-hero__title {
    margin: 0 0 0.75rem;
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.page-hero__lead {
    margin: 0;
    max-width: 42rem;
    color: var(--muted);
}

.section--catalog {
    padding-top: clamp(2rem, 5vw, 3rem);
}

.catalog {
    max-width: var(--max);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.25rem);
}

.lab-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: center;
    padding: clamp(1.15rem, 2.5vw, 1.5rem);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg2);
}

.lab-row--flip .lab-row__media {
    order: 2;
}

.lab-row--flip .lab-row__body {
    order: 1;
}

.lab-row__media {
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.lab-row__media iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.lab-row__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.45rem;
    margin-bottom: 0.55rem;
}

.lab-row__title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.lab-row__text {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* CTA panel */
.cta-panel {
    padding: clamp(3rem, 7vw, 4.5rem) var(--gutter);
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%);
}

.cta-panel__inner {
    max-width: 36rem;
    margin: 0 auto;
    text-align: center;
}

.cta-panel__title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.cta-panel__text {
    margin: 0 0 1.75rem;
    color: var(--muted);
}

.cta-panel__actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* Footer */
.site-footer {
    padding: 2.5rem var(--gutter) 2rem;
    border-top: 1px solid var(--line);
    background: var(--bg0);
}

.site-footer__grid {
    max-width: var(--max);
    margin: 0 auto 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.site-footer__name {
    font-weight: 700;
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.5rem;
}

.site-footer__blurb {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 22rem;
}

.site-footer__heading {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--faint);
    font-weight: 600;
}

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

.site-footer__links li {
    margin-bottom: 0.4rem;
}

.site-footer__links a {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.95rem;
}

.site-footer__links a:hover {
    color: var(--teal);
}

.site-footer__legal {
    max-width: var(--max);
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--line);
    text-align: center;
    font-size: 0.8rem;
    color: var(--faint);
    font-family: var(--font-mono);
}

/* ——— Responsive ——— */
@media (max-width: 960px) {
    .hero__grid {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .intel-grid {
        grid-template-columns: 1fr;
    }

    .hero__stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 840px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav {
        position: absolute;
        right: 0;
        top: calc(100% + 0.5rem);
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        min-width: min(320px, calc(100vw - 2 * var(--gutter)));
        background: var(--bg2);
        border: 1px solid var(--line-strong);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    }

    .topbar.is-open .nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .nav__link--active {
        border-bottom-color: transparent;
    }

    .nav__cta {
        justify-content: center;
        margin-top: 0.5rem;
    }

    .lab-row,
    .lab-row.lab-row--flip {
        grid-template-columns: 1fr;
    }

    .lab-row--flip .lab-row__media,
    .lab-row--flip .lab-row__body {
        order: unset;
    }

    .site-footer__grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}
