/* ── Threat Intelligence Carousel ────────────────────────────────────────────
   Unique component: vertical "scan reveal" flip + terminal aesthetic.
   Completely separate from the featured-tools carousel.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Section wrapper ─────────────────────────────────────────────────────── */
.thr-section {
    position: relative;
    padding: 72px 0 80px;
    overflow: hidden;
}
.thr-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% 0%,   rgba(200,20,20,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 60% 40% at 50% 100%, rgba(180,10,10,0.05) 0%, transparent 70%);
    pointer-events: none;
}

.thr-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.thr-header {
    text-align: center;
    margin-bottom: 48px;
}
.thr-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #e03030;
    background: rgba(200,20,20,0.10);
    border: 1px solid rgba(200,20,20,0.25);
    border-radius: 4px;
    padding: 4px 12px;
    margin-bottom: 16px;
}
.thr-eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e03030;
    box-shadow: 0 0 6px rgba(220,30,30,0.9);
    animation: thr-pulse 1.8s ease-in-out infinite;
}
@keyframes thr-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 6px rgba(220,30,30,0.9); }
    50%       { opacity: 0.4; box-shadow: 0 0 2px rgba(220,30,30,0.3); }
}
.thr-title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    color: var(--pdf-text);
    margin: 0 0 12px;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.thr-title em {
    font-style: normal;
    color: #e87070;
}
.thr-sub {
    font-size: 0.95rem;
    color: var(--pdf-text-dim);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Stage: the visible frame ─────────────────────────────────────────────── */
.thr-stage {
    position: relative;
    background: #06090f;
    border: 1px solid rgba(200,20,20,0.20);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 0 0 1px rgba(200,20,20,0.08) inset,
        0 24px 60px rgba(0,0,0,0.70),
        0 0 40px rgba(200,20,20,0.06);
}

/* Terminal top bar */
.thr-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(200,20,20,0.12);
    font-size: 0.72rem;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace;
}
.thr-topbar-dots {
    display: flex;
    gap: 6px;
}
.thr-topbar-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.thr-topbar-dot:nth-child(1) { background: #ff5f57; }
.thr-topbar-dot:nth-child(2) { background: #febc2e; }
.thr-topbar-dot:nth-child(3) { background: #28c840; }
.thr-topbar-label {
    flex: 1;
    text-align: center;
    color: rgba(255,255,255,0.28);
    letter-spacing: 0.08em;
}
.thr-topbar-status {
    color: #e03030;
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ── Card viewport ───────────────────────────────────────────────────────── */
.thr-viewport {
    position: relative;
    min-height: 320px;
}

/* scan-line sweep overlay — moves top to bottom on slide change */
.thr-scanline {
    position: absolute;
    left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, rgba(220,40,40,0.5) 30%, rgba(255,100,100,0.9) 50%, rgba(220,40,40,0.5) 70%, transparent 100%);
    box-shadow: 0 0 12px rgba(220,40,40,0.6), 0 0 4px rgba(255,100,100,0.8);
    top: 0;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: none;
}
.thr-scanline.scanning {
    opacity: 1;
    animation: thr-scan 0.55s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}
@keyframes thr-scan {
    0%   { top: 0%;   opacity: 1; }
    100% { top: 100%; opacity: 0.3; }
}

/* ── Individual cards ────────────────────────────────────────────────────── */
.thr-card {
    display: none;
    padding: 28px 32px 24px;
    position: relative;
    animation: thr-reveal 0.4s ease forwards;
}
.thr-card.is-active {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 0 32px;
}
@keyframes thr-reveal {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Noise texture overlay per card */
.thr-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.4;
    pointer-events: none;
    border-radius: 0;
}

/* left meta column */
.thr-card-meta {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}
.thr-card-number-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.thr-card-index {
    font-size: 0.68rem;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    color: rgba(200,20,20,0.6);
    letter-spacing: 0.1em;
    font-weight: 700;
}
.thr-card-severity {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 3px;
    border: 1px solid;
}
.thr-card-severity[data-level="critical"] {
    color: #ff4444;
    background: rgba(255,40,40,0.10);
    border-color: rgba(255,40,40,0.30);
}
.thr-card-severity[data-level="high"] {
    color: #ff8c00;
    background: rgba(255,140,0,0.10);
    border-color: rgba(255,140,0,0.30);
}
.thr-card-actor {
    font-size: 0.72rem;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    color: rgba(200,20,20,0.75);
    letter-spacing: 0.06em;
}
.thr-card-title {
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    font-weight: 800;
    color: var(--pdf-text);
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0;
}
.thr-card-period {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.28);
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    letter-spacing: 0.05em;
}

/* right stat block */
.thr-card-stat-block {
    grid-column: 2;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 10px;
    min-width: 130px;
    padding-top: 2px;
}
.thr-cost-label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.25);
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    text-align: right;
}
.thr-cost-value {
    font-size: clamp(1.2rem, 2.5vw, 1.7rem);
    font-weight: 900;
    color: #e03030;
    text-align: right;
    line-height: 1;
    letter-spacing: -0.03em;
    text-shadow: 0 0 20px rgba(220,30,30,0.4);
}
.thr-cost-note {
    font-size: 0.62rem;
    color: rgba(255,255,255,0.22);
    text-align: right;
    line-height: 1.4;
    max-width: 120px;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
}

/* body text */
.thr-card-body {
    grid-column: 1;
    grid-row: 2;
    font-size: 0.88rem;
    line-height: 1.65;
    color: rgba(220,210,200,0.75);
    margin-bottom: 18px;
}

/* engine tags */
.thr-card-engines {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 16px;
    border-top: 1px solid rgba(200,20,20,0.10);
}
.thr-engine-tag {
    font-size: 0.64rem;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    color: rgba(200,20,20,0.75);
    background: rgba(200,20,20,0.07);
    border: 1px solid rgba(200,20,20,0.18);
    border-radius: 3px;
    padding: 2px 7px;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.thr-engine-tag.is-verdict {
    color: #e87070;
    background: rgba(200,20,20,0.13);
    border-color: rgba(200,20,20,0.32);
    font-weight: 700;
}

/* ── Controls row ────────────────────────────────────────────────────────── */
.thr-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 14px;
    border-top: 1px solid rgba(200,20,20,0.10);
    background: rgba(0,0,0,0.20);
}

/* progress bar */
.thr-progress-wrap {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 16px;
}
.thr-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, rgba(220,30,30,0.6), #e03030);
    border-radius: 2px;
    transition: width 0.1s linear;
    width: 0%;
    box-shadow: 0 0 6px rgba(220,30,30,0.5);
}

/* nav buttons */
.thr-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(200,20,20,0.20);
    background: rgba(200,20,20,0.07);
    color: rgba(200,80,80,0.85);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}
.thr-btn:hover {
    background: rgba(200,20,20,0.16);
    border-color: rgba(200,20,20,0.45);
    color: #e87070;
}
.thr-btn:focus-visible {
    outline: 2px solid rgba(200,20,20,0.55);
    outline-offset: 2px;
}

/* counter */
.thr-counter {
    font-size: 0.68rem;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    color: rgba(200,80,80,0.55);
    letter-spacing: 0.1em;
    flex-shrink: 0;
    min-width: 40px;
    text-align: center;
}

/* ── Verdict stamp ───────────────────────────────────────────────────────── */
.thr-verdict-stamp {
    position: absolute;
    top: 22px;
    right: 28px;
    font-size: 0.58rem;
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-weight: 900;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(0,230,118,0.75);
    border: 1.5px solid rgba(0,230,118,0.30);
    border-radius: 3px;
    padding: 3px 8px;
    background: rgba(0,230,118,0.06);
    transform: rotate(-2deg);
    pointer-events: none;
    white-space: nowrap;
    /* only show on active card */
    display: none;
}
.thr-card.is-active .thr-verdict-stamp {
    display: block;
    animation: thr-stamp 0.35s 0.3s ease both;
}
@keyframes thr-stamp {
    from { opacity: 0; transform: rotate(-2deg) scale(0.8); }
    to   { opacity: 1; transform: rotate(-2deg) scale(1); }
}

/* ── Dot nav ─────────────────────────────────────────────────────────────── */
.thr-dots {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}
.thr-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(200,20,20,0.22);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.thr-dot.is-active {
    background: #e03030;
    transform: scale(1.4);
    box-shadow: 0 0 4px rgba(220,30,30,0.7);
}

/* ── Footer CTA ──────────────────────────────────────────────────────────── */
.thr-footer {
    margin-top: 28px;
    text-align: center;
}
.thr-footer-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #e87070;
    border: 1px solid rgba(200,20,20,0.30);
    background: rgba(200,20,20,0.07);
    border-radius: 8px;
    padding: 10px 22px;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
    letter-spacing: 0.01em;
}
.thr-footer-cta:hover {
    background: rgba(200,20,20,0.14);
    border-color: rgba(200,20,20,0.55);
    color: #ff9090;
    box-shadow: 0 0 18px rgba(200,20,20,0.18);
}
.thr-footer-note {
    margin-top: 10px;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.22);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .thr-card.is-active {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }
    .thr-card-stat-block {
        grid-column: 1;
        grid-row: auto;
        flex-direction: row;
        align-items: baseline;
        justify-content: flex-start;
        gap: 8px;
        min-width: unset;
        padding-top: 0;
        margin-bottom: 12px;
    }
    .thr-cost-label, .thr-cost-note { display: none; }
    .thr-cost-value { font-size: 1.1rem; }
    .thr-card { padding: 20px 18px 18px; }
    .thr-verdict-stamp { top: 14px; right: 14px; }
    .thr-card-stat-block { justify-content: flex-end; }
}
