/* =========================================================
   RunHooks — AI Security Dashboard
   Premium Dark-Mode Glassmorphism Design System
   ========================================================= */

/* ── CSS Custom Properties ── */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1424;
    --bg-tertiary: #141a2e;
    --bg-card: rgba(15, 20, 40, 0.6);

    --text-primary: #e8ecf4;
    --text-secondary: #8892a8;
    --text-muted: #556078;

    --accent-cyan: #00d4ff;
    --accent-blue: #4c7cf5;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;

    --danger-red: #ff3b5c;
    --danger-orange: #ff6b35;
    --warning-yellow: #fbbf24;
    --safe-green: #10b981;
    --safe-teal: #06d6a0;

    --glass-bg: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-hover: rgba(255, 255, 255, 0.08);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --font-body: 'Inter', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --shadow-glow-cyan: 0 0 30px rgba(0, 212, 255, 0.15);
    --shadow-glow-red: 0 0 30px rgba(255, 59, 92, 0.2);
    --shadow-glow-green: 0 0 30px rgba(16, 185, 129, 0.15);
}

/* ── Reset & Base ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
}

::selection {
    background: rgba(0, 212, 255, 0.3);
    color: white;
}

a { color: var(--accent-cyan); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--accent-blue); }

/* ── Ambient Background ── */
.ambient-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.35;
    animation: blobFloat 20s ease-in-out infinite alternate;
}

.blob-1 {
    width: 600px; height: 600px;
    background: radial-gradient(circle, var(--accent-cyan), transparent 70%);
    top: -200px; left: -100px;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, var(--accent-purple), transparent 70%);
    bottom: -150px; right: -100px;
    animation-delay: -7s;
}

.blob-3 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, var(--danger-red), transparent 70%);
    top: 40%; left: 50%;
    animation-delay: -14s;
    opacity: 0.2;
}

@keyframes blobFloat {
    0%   { transform: translate(0, 0) scale(1); }
    33%  { transform: translate(60px, -40px) scale(1.1); }
    66%  { transform: translate(-40px, 60px) scale(0.9); }
    100% { transform: translate(30px, -30px) scale(1.05); }
}

/* ── Glass Utility ── */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 48px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    padding: 10px 48px;
    background: rgba(10, 14, 26, 0.85);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo span { color: var(--accent-cyan); }

.logo-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: white;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--glass-hover);
}

/* ── Hero Section ── */
.hero {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 80px;
    padding: 120px 60px 60px;
}

.hero-content {
    max-width: 600px;
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-cyan);
    margin-bottom: 24px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.hero h1 {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text.gradient-danger {
    background: linear-gradient(135deg, var(--danger-red), var(--danger-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text.gradient-safe {
    background: linear-gradient(135deg, var(--safe-green), var(--safe-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-danger { color: var(--danger-red); }

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero-desc strong { color: var(--accent-cyan); }

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    font-family: var(--font-body);
}

.primary-glow {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: white;
    box-shadow: 0 4px 25px rgba(0, 212, 255, 0.3);
}

.primary-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 40px rgba(0, 212, 255, 0.5);
    color: white;
}

.secondary-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    padding: 14px 28px;
}

.secondary-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.05);
}

/* ── Hero Visual — AI Core ── */
.hero-visual {
    position: relative;
    flex-shrink: 0;
}

.ai-core-container {
    position: relative;
    width: 360px;
    height: 360px;
}

.orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.12);
}

.orbit-1 {
    inset: 20px;
    animation: orbitSpin 12s linear infinite;
}

.orbit-2 {
    inset: 50px;
    animation: orbitSpin 18s linear infinite reverse;
    border-color: rgba(168, 85, 247, 0.12);
}

.orbit-3 {
    inset: 80px;
    animation: orbitSpin 25s linear infinite;
    border-color: rgba(255, 59, 92, 0.12);
}

.orbit-dot {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    box-shadow: 0 0 15px var(--accent-cyan);
}

.orbit-2 .orbit-dot { background: var(--accent-purple); box-shadow: 0 0 15px var(--accent-purple); }
.orbit-3 .orbit-dot { background: var(--danger-red); box-shadow: 0 0 15px var(--danger-red); }

@keyframes orbitSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.core-pulse {
    position: absolute;
    inset: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15), transparent 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: corePulse 3s ease-in-out infinite;
}

.core-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-cyan);
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.6);
}

.warning-ring {
    position: absolute;
    inset: 100px;
    border-radius: 50%;
    border: 2px solid transparent;
    animation: warningPulse 4s ease-in-out infinite;
}

@keyframes corePulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.1); opacity: 0.8; }
}

@keyframes warningPulse {
    0%, 100% { border-color: transparent; transform: scale(1); }
    50%      { border-color: rgba(255, 59, 92, 0.4); transform: scale(1.15); }
}

.particle-system {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    border-radius: 50%;
    animation: particleFloat linear infinite;
    opacity: 0;
}

@keyframes particleFloat {
    0%   { opacity: 0; transform: translate(0, 0) scale(0); }
    20%  { opacity: 1; }
    80%  { opacity: 0.6; }
    100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1); }
}

/* ── Stats Bar ── */
.stats-bar {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 40px;
    margin: 0 60px;
    border-radius: var(--radius-lg);
}

.stat-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent-cyan);
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-cyan);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ── Sections ── */
.section {
    position: relative;
    z-index: 1;
    padding: 100px 60px;
}

.dark-section {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.15);
    margin-bottom: 16px;
}

.section-title {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ── Section Reveal Animation ── */
.reveal-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ── Window Glass ── */
.window-glass {
    background: rgba(10, 14, 30, 0.7);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.window-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.02);
}

.window-controls {
    display: flex;
    gap: 6px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red    { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green  { background: #28c840; }

.window-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* ── Risk Section ── */
.risk-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.terminal-body {
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
    min-height: 320px;
    position: relative;
}

.cursor-blink {
    display: inline-block;
    color: var(--accent-cyan);
    animation: cursorBlink 1s step-end infinite;
    font-family: var(--font-mono);
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.term-line { margin-bottom: 2px; white-space: pre-wrap; }
.term-prompt { color: var(--safe-green); }
.term-cmd { color: var(--text-primary); }
.term-danger { color: var(--danger-red); font-weight: 700; }
.term-warning { color: var(--warning-yellow); }
.term-info { color: var(--accent-cyan); }
.term-success { color: var(--safe-green); }
.term-comment { color: var(--text-muted); font-style: italic; }

/* Risk Illustration */
.risk-illustration {
    padding: 24px;
}

.illustration-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: center;
}

.server-rack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.server-node {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    transition: all 0.6s ease;
}

.server-node.destroyed {
    background: rgba(255, 59, 92, 0.08);
    border-color: rgba(255, 59, 92, 0.3);
    animation: nodeShake 0.5s ease;
}

@keyframes nodeShake {
    0%, 100% { transform: translateX(0); }
    25%      { transform: translateX(-8px); }
    75%      { transform: translateX(8px); }
}

.node-name {
    font-size: 0.9rem;
    font-weight: 500;
}

.status-indicator {
    font-size: 0.8rem;
    font-weight: 600;
}

.glow-green { color: var(--safe-green); }
.glow-red   { color: var(--danger-red); }

/* Risk Meter */
.risk-meter {
    margin-top: 16px;
}

.meter-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.meter-track {
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--safe-green), var(--warning-yellow), var(--danger-red));
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ── Concept Section — Comparison ── */
.comparison-row {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto 60px;
}

.comparison-card {
    flex: 1;
    max-width: 500px;
}

.comparison-card .window-body {
    padding: 20px;
}

.comparison-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--accent-cyan);
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 80px;
}

.comparison-arrow svg {
    animation: arrowPulse 2s ease-in-out infinite;
}

@keyframes arrowPulse {
    0%, 100% { opacity: 0.5; transform: translateX(0); }
    50%      { opacity: 1; transform: translateX(5px); }
}

/* Code Block */
.code-block {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    line-height: 1.9;
    color: var(--text-secondary);
    white-space: pre;
}

.code-keyword { color: var(--accent-purple); }
.code-string  { color: var(--safe-green); }
.code-comment { color: var(--text-muted); font-style: italic; }
.code-number  { color: var(--danger-orange); }

/* ── Hooks Grid ── */
.hooks-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.hook-card {
    position: relative;
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.hook-card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.hook-card[data-layer="app"] .hook-card-glow { background: linear-gradient(90deg, transparent, var(--accent-purple), transparent); }
.hook-card[data-layer="access"] .hook-card-glow { background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent); }
.hook-card[data-layer="net"] .hook-card-glow { background: linear-gradient(90deg, transparent, var(--safe-green), transparent); }

.hook-card:hover .hook-card-glow { opacity: 1; }

.hover-lift:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.app-icon    { background: rgba(168, 85, 247, 0.12); color: var(--accent-purple); }
.access-icon { background: rgba(0, 212, 255, 0.12); color: var(--accent-cyan); }
.net-icon    { background: rgba(16, 185, 129, 0.12); color: var(--safe-green); }

.feature-icon { width: 28px; height: 28px; }

.hook-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hook-tag {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tag-app    { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }
.tag-access { background: rgba(0, 212, 255, 0.15); color: var(--accent-cyan); }
.tag-net    { background: rgba(16, 185, 129, 0.15); color: var(--safe-green); }

.hook-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

.hook-detail {
    margin-bottom: 16px;
}

.detail-title {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.hook-detail ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hook-detail code {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    padding: 2px 8px;
    border-radius: 4px;
}

.code-snippet {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.06);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 212, 255, 0.1);
}

/* ── Pipeline Flow Section ── */
.pipeline-flow-section {
    max-width: 900px;
    margin: 0 auto;
}

.pipeline-flow {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
}

.flow-stage {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px 28px;
    border-radius: var(--radius-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    position: relative;
    transition: all 0.5s ease;
    opacity: 0.5;
}

.flow-stage.active {
    opacity: 1;
    border-color: var(--accent-cyan);
    background: rgba(0, 212, 255, 0.04);
    box-shadow: var(--shadow-glow-cyan);
}

.flow-stage.blocked {
    border-color: var(--danger-red);
    background: rgba(255, 59, 92, 0.04);
    box-shadow: var(--shadow-glow-red);
    opacity: 1;
}

.flow-stage.passed {
    border-color: var(--safe-green);
    background: rgba(16, 185, 129, 0.04);
    box-shadow: var(--shadow-glow-green);
    opacity: 1;
}

.stage-icon {
    font-size: 2rem;
    flex-shrink: 0;
    width: 50px;
    text-align: center;
}

.shield-animate {
    animation: shieldBounce 2s ease-in-out infinite;
}

@keyframes shieldBounce {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.1); }
}

.stage-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stage-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.check-item {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
}

.check-item .check-icon {
    color: var(--text-muted);
    font-weight: 700;
    transition: color 0.3s;
}

.flow-stage.passed .check-item { color: var(--text-secondary); }
.flow-stage.passed .check-item .check-icon { color: var(--safe-green); }
.flow-stage.blocked .check-item .check-icon { color: var(--danger-red); }

.stage-connector {
    position: absolute;
    bottom: -28px;
    left: 45px;
    width: 4px;
    height: 28px;
    z-index: 2;
}

.connector-line {
    width: 100%;
    height: 100%;
    background: var(--glass-border);
    border-radius: 2px;
    transition: background 0.4s;
}

.flow-stage.passed .connector-line { background: var(--safe-green); }
.flow-stage.blocked .connector-line { background: var(--danger-red); }

.connector-pulse {
    position: absolute;
    top: 0;
    left: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-cyan);
    opacity: 0;
    transition: all 0.3s;
}

.flow-stage.active .connector-pulse {
    opacity: 1;
    animation: connectorPulseAnim 1s ease-in-out infinite;
}

@keyframes connectorPulseAnim {
    0%, 100% { top: 0; opacity: 0; }
    50%      { top: 18px; opacity: 1; }
}

.pipeline-auto-btn-wrap {
    text-align: center;
    margin-top: 40px;
}

/* ── Interactive Demo Section ── */
.demo-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto auto;
    gap: 24px;
}

.demo-controls {
    grid-row: 1 / 3;
    padding: 28px;
    border-radius: var(--radius-lg);
}

.control-group h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.3s;
    text-align: left;
    margin-bottom: 10px;
}

.action-btn:hover {
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

.action-btn:active {
    transform: translateX(2px) scale(0.98);
}

.action-btn:disabled {
    opacity: 0.4;
    pointer-events: none;
}

.btn-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.btn-text {
    display: flex;
    flex-direction: column;
}

.btn-main {
    font-size: 0.85rem;
    font-weight: 600;
}

.btn-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.btn-app:hover    { border-color: rgba(168, 85, 247, 0.4); background: rgba(168, 85, 247, 0.06); }
.btn-access:hover { border-color: rgba(0, 212, 255, 0.4); background: rgba(0, 212, 255, 0.06); }
.btn-net:hover    { border-color: rgba(16, 185, 129, 0.4); background: rgba(16, 185, 129, 0.06); }

.reset-wrapper { margin-top: 20px; }

.reset-btn {
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.85rem;
    transition: all 0.3s;
}

.reset-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

/* ── Demo Visuals — Pipeline ── */
.demo-visuals {
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.pipeline-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    position: relative;
}

.node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 3;
    flex-shrink: 0;
}

.node-icon {
    font-size: 2.2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
}

.ai-node .node-icon {
    border-color: rgba(0, 212, 255, 0.3);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1);
}

.target-node .node-icon {
    border-color: rgba(255, 59, 92, 0.3);
    box-shadow: 0 0 20px rgba(255, 59, 92, 0.1);
}

.node-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Pathway */
.pathway {
    flex: 1;
    height: 6px;
    position: relative;
    margin: 0 10px;
}

.path-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.15), rgba(255, 59, 92, 0.15));
    transform: translateY(-50%);
    border-radius: 2px;
}

/* Data Packet */
.packet {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    z-index: 5;
    transition: left 0.06s linear;
}

.packet.hidden { display: none; }

.packet-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, var(--danger-red), var(--danger-orange));
    box-shadow: 0 0 20px var(--danger-red), 0 0 40px rgba(255, 59, 92, 0.3);
    animation: packetGlow 0.5s ease-in-out infinite alternate;
}

@keyframes packetGlow {
    from { transform: scale(0.9); box-shadow: 0 0 15px var(--danger-red); }
    to   { transform: scale(1.1); box-shadow: 0 0 30px var(--danger-red), 0 0 60px rgba(255, 59, 92, 0.3); }
}

/* Hook Stations */
.hook-station {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 4;
}

.station-core {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s;
}

.station-core.activated {
    background: var(--safe-green);
    border-color: var(--safe-green);
    box-shadow: 0 0 20px var(--safe-green);
    animation: stationPulse 1s ease-in-out;
}

@keyframes stationPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.6); }
    100% { transform: scale(1); }
}

.shield-icon {
    font-size: 1.6rem;
    margin-bottom: 4px;
    animation: shieldAppear 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shield-icon.hidden { display: none; }

@keyframes shieldAppear {
    0%   { transform: scale(0) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.station-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 8px;
    white-space: nowrap;
}

/* Explosion */
#explosion-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.explosion-particle {
    position: absolute;
    border-radius: 50%;
    animation: explode 0.8s ease-out forwards;
}

@keyframes explode {
    0%   { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--ex), var(--ey)) scale(0); }
}

.shockwave {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--danger-red);
    animation: shockwaveExpand 0.6s ease-out forwards;
}

@keyframes shockwaveExpand {
    0%   { width: 0; height: 0; opacity: 1; }
    100% { width: 120px; height: 120px; opacity: 0; transform: translate(-50%, -50%); }
}

/* ── Demo Logs ── */
.demo-logs {
    grid-column: 2;
}

.logs-body {
    max-height: 250px;
    overflow-y: auto;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    line-height: 1.8;
}

.logs-body::-webkit-scrollbar {
    width: 4px;
}

.logs-body::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 2px;
}

.log-entry {
    display: flex;
    gap: 10px;
    animation: logFadeIn 0.4s ease;
    padding: 3px 0;
}

@keyframes logFadeIn {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

.log-time {
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 70px;
}

.log-msg { color: var(--text-secondary); }

.log-entry.danger-log .log-time { color: var(--danger-red); }
.log-entry.danger-log .log-msg  { color: var(--danger-red); }
.log-entry.success-log .log-time { color: var(--safe-green); }
.log-entry.success-log .log-msg  { color: var(--safe-green); }
.log-entry.warning-log .log-time { color: var(--warning-yellow); }
.log-entry.warning-log .log-msg  { color: var(--warning-yellow); }
.log-entry.system-log .log-time { color: var(--accent-cyan); }
.log-entry.system-log .log-msg  { color: var(--text-muted); }

/* ── Footer ── */
footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid var(--glass-border);
    padding: 50px 60px;
    background: var(--bg-primary);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.footer-logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-logo span { color: var(--accent-cyan); }
.footer-logo svg { color: var(--accent-cyan); }

.footer-content > p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--accent-cyan); }

.footer-copy {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 50px;
        padding: 120px 30px 60px;
    }
    .hero-actions { justify-content: center; }
    .hooks-grid { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
    .risk-container { grid-template-columns: 1fr; }
    .comparison-row { flex-direction: column; align-items: center; }
    .comparison-arrow { transform: rotate(90deg); margin: 10px 0; }
    .demo-dashboard { grid-template-columns: 1fr; }
    .demo-controls { grid-row: auto; }
    .demo-logs { grid-column: 1; }
    .stats-bar { flex-wrap: wrap; gap: 30px; margin: 0 20px; }
    .section { padding: 60px 20px; }
}

@media (max-width: 640px) {
    .hero h1 { font-size: 2.4rem; }
    .section-title { font-size: 1.8rem; }
    .ai-core-container { width: 250px; height: 250px; }
    .core-pulse { inset: 70px; }
    .warning-ring { inset: 60px; }
    .navbar { padding: 12px 20px; }
    .nav-links { display: none; }
    .stat-number { font-size: 2rem; }
}
