/* Custom Styling for Aphantos Website */

/* Reset & Variables */

:root {
    --bg-dark: #070a13;
    --bg-card: rgba(13, 19, 35, 0.65);
    --bg-card-highlight: rgba(22, 28, 48, 0.75);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-hover: rgba(139, 92, 246, 0.3);
    --text-primary: #f3f4f6;
    --text-secondary: #c3c7db;
    --text-muted: #8a92b2;
    --color-violet: #8b5cf6;
    --color-cyan: #06b6d4;
    --color-emerald: #10b981;
    --color-blue: #3b82f6;
    --color-yellow: #f59e0b;
    --color-red: #ef4444;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --container-width: 1200px;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Background Canvas */

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.75;
}

/* Background Glow Elements */

.glow-bg {
    position: absolute;
    width: 100vw;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: -2;
    pointer-events: none;
}

.glow-sphere {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.15;
    mix-blend-mode: screen;
}

.glow-sphere-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-violet) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    animation: floatGlow 15s infinite alternate;
}

.glow-sphere-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--color-cyan) 0%, transparent 70%);
    top: 300px;
    left: -200px;
    animation: floatGlow 18s infinite alternate-reverse;
}

.glow-sphere-3 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, var(--color-emerald) 0%, transparent 70%);
    bottom: 10%;
    right: -150px;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 40px) scale(1.1); }
}

/* Typography & Layout Utilities */

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.bg-card-dark {
    background-color: rgba(9, 13, 24, 0.4);
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 60px auto;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-title.text-left {
    text-align: left;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-violet) 0%, var(--color-cyan) 50%, var(--color-emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mono {
    font-family: var(--font-mono);
}

.hidden {
    display: none !important;
}

/* Header & Navigation */

.header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(7, 10, 19, 0.7);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-primary);
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-violet) 0%, var(--color-cyan) 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(139, 92, 246, 0.45);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Section */

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--header-height) + 40px) 0 80px 0;
    text-align: center;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.hero-container {
    max-width: var(--container-width);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 99px;
    color: #c084fc;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 36px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -0.03em;
    margin-bottom: 36px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 56px;
    line-height: 1.5;
    max-width: 820px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Interactive Graph Showcase */

.graph-showcase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.graph-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background: rgba(9, 13, 24, 0.5);
}

.graph-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 18px 24px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid var(--border-color);
}

.graph-tab:last-child {
    border-right: none;
}

/* (Old graph-tab :hover / .active rules removed — fully superseded by the
   AQL-style tab block lower in this file.) */

/* Graph Scenario Banner */
.graph-scenario-banner {
    border-bottom: 1px solid var(--border-color);
    padding: 14px 20px;
    background: rgba(13, 19, 35, 0.25);
    font-size: 0.86rem;
    line-height: 1.5;
}

.scenario-content-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.scenario-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.scenario-line {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.scenario-line.why-line {
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    padding-top: 4px;
    margin-top: 2px;
}

.graph-workspace {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    height: 480px;
}

.graph-viewport {
    background: #090c15;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

.graph-svg {
    width: 100%;
    height: 100%;
}

.graph-status-badge {
    position: absolute;
    bottom: 16px;
    left: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(7, 10, 19, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background-color: var(--color-emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--color-emerald);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.4; }
    100% { transform: scale(1); opacity: 1; }
}

/* Graph Nodes Styling */

.node {
    cursor: pointer;
}

.node circle {
    transition: r 0.25s cubic-bezier(0.4, 0, 0.2, 1), stroke-width 0.2s ease;
}

.node:hover .node-base {
    r: 28; /* scale up base circle from 24 (internals keep their size) */
}

.node text {
    pointer-events: none;
    user-select: none;
}

.node-label {
    font-family: var(--font-body);
    font-weight: 500;
    pointer-events: none;
}

.edge {
    stroke-dasharray: 4;
    animation: dash 30s linear infinite;
}

@keyframes dash {
    to { stroke-dashoffset: -1000; }
}

/* Sidebar Inspector (Vertical Layout) */

.graph-details-sidebar {
    border-left: 1px solid var(--border-color);
    border-top: none;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: rgba(13, 19, 35, 0.4);
    height: 100%;
    box-sizing: border-box;
}

.inspector-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
}

.inspector-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 12px;
}

.inspector-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

.inspector-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.inspector-tag {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    font-size: 0.65rem;
    font-family: var(--font-mono);
    font-weight: 700;
}

.inspector-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.inspector-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.inspector-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.field-label {
    color: var(--text-secondary);
}

.field-value {
    font-weight: 500;
}

.field-value.mono {
    font-family: var(--font-mono);
    color: #e5e7eb;
}

.badge-risk {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}
.risk-low { background: rgba(16, 185, 129, 0.1); color: var(--color-emerald); }
.risk-medium { background: rgba(245, 158, 11, 0.1); color: var(--color-yellow); }
.risk-high { background: rgba(239, 68, 68, 0.1); color: var(--color-red); }

.badge-verify {
    color: var(--color-emerald);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.badge-verify svg {
    width: 14px;
    height: 14px;
}

/* Product Cards Grid */

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(350px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(139, 92, 246, 0.12), transparent 80%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}

.product-card.highlight::before {
    background: radial-gradient(350px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(6, 182, 212, 0.12), transparent 80%);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card > * {
    position: relative;
    z-index: 2;
}

.product-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.08);
}

.product-card.highlight {
    background: var(--bg-card-highlight);
    border-color: rgba(6, 182, 212, 0.2);
}

.product-card.highlight:hover {
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.08);
}

/* Status Dot in Playground */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
}
.status-dot.green {
    background-color: var(--color-emerald);
    box-shadow: 0 0 8px var(--color-emerald);
}
.status-dot.pulse {
    animation: statusPulse 1.5s infinite alternate;
}
@keyframes statusPulse {
    0% { opacity: 0.4; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1.2); }
}

.product-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    color: white;
}

.product-icon-wrap svg {
    width: 24px;
    height: 24px;
}
.bg-violet { background: rgba(139, 92, 246, 0.2); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.bg-cyan { background: rgba(6, 182, 212, 0.2); color: #22d3ee; border: 1px solid rgba(6, 182, 212, 0.3); }
.bg-emerald { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.bg-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.bg-yellow { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.bg-gradient { background: linear-gradient(135deg, var(--color-cyan), var(--color-emerald)); border: none; }

.product-category {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-cyan);
    margin-bottom: 12px;
    display: inline-block;
}

.product-category.module {
    color: var(--color-blue);
}

.product-category.engine {
    color: var(--color-emerald);
}

.product-card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.product-card-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.product-card-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.product-card-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.product-card-features svg {
    width: 16px;
    height: 16px;
    color: var(--color-emerald);
}

/* Cryptography Section Grid */

.cryptography-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge-tech {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.crypto-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

.crypto-feature {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.crypto-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: rgba(139, 92, 246, 0.1);
    color: #c084fc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.crypto-feature-icon svg {
    width: 18px;
    height: 18px;
}

.crypto-feature h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.crypto-feature p {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

/* Cryptography Prover Terminal */

.crypto-terminal {
    background: #07090e;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    height: 380px;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background: #0d0f15;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot.red { background-color: #ef4444; }
.dot.yellow { background-color: #f59e0b; }
.dot.green { background-color: #10b981; }

.terminal-title {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    flex: 1;
    padding: 20px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    overflow-y: auto;
    color: #a7f3d0;
}

.terminal-body .line {
    margin-bottom: 6px;
    white-space: pre-wrap;
}

.terminal-body .line.comment {
    color: #4b5563;
}

.terminal-body .line .prompt {
    color: var(--color-cyan);
}

.terminal-body .line .typed {
    color: var(--text-primary);
}
.terminal-body .text-cyan { color: var(--color-cyan); }
.terminal-body .text-emerald { color: var(--color-emerald); }
.terminal-body .text-violet { color: #a78bfa; }

.terminal-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: #090b10;
    display: flex;
    justify-content: flex-end;
}

/* AQL Playground */

.aql-playground {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(12px);
}

.aql-controls {
    display: flex;
    background: rgba(9, 13, 24, 0.6);
    border-bottom: 1px solid var(--border-color);
}

.aql-query-btn {
    flex: 1;
    padding: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-right: 1px solid var(--border-color);
}

.aql-query-btn:last-child {
    border-right: none;
}

.aql-query-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02);
}

.aql-query-btn.active {
    color: var(--text-primary);
    background: var(--bg-dark);
    box-shadow: inset 0 -2px 0 var(--color-cyan);
}

.aql-panels {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    height: 320px;
}

.aql-panel-editor {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.aql-panel-results {
    display: flex;
    flex-direction: column;
    background: #090c14;
}

.panel-header {
    background: rgba(9, 13, 24, 0.4);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 18px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
}

.panel-body {
    flex: 1;
    padding: 18px;
    overflow: auto;
}

.panel-body pre {
    margin: 0;
}

.panel-body code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.language-aql {
    color: #a78bfa;
}

.language-json {
    color: #67e8f9;
}

/* Academic Paper Card */

.paper-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 99px;
    color: #c084fc;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

/* LaTeX Page Container */

.latex-container {
    background: #0d111a;
    color: #e5e7eb;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    max-width: 650px;
    margin: 0 auto 40px auto;
    padding: 40px;
    text-align: left;
    font-family: 'Times New Roman', Times, serif;
    position: relative;
}

.latex-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
    margin-bottom: 24px;
    text-align: center;
}

.latex-doc-type {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: #9ca3af;
    font-weight: 700;
}

.latex-title {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    line-height: 1.2;
}

.latex-authors {
    text-align: center;
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 24px;
    color: #d1d5db;
}

.latex-abstract {
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: justify;
    margin-bottom: 24px;
    color: #9ca3af;
}

.latex-formula {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: bold;
    padding-left: 20px;
}

.math-eq {
    flex: 1;
    text-align: center;
}

.math-label {
    font-size: 0.9rem;
    font-weight: normal;
    color: #9ca3af;
}

/* Benchmarks Section Styling */

.benchmarks-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.benchmark-info h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.benchmark-info p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 20px;
}

.benchmark-highlights {
    display: flex;
    gap: 20px;
    margin-top: 32px;
}

.b-highlight-card {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.b-h-num {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
}

.b-h-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.benchmark-chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
}

.chart-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.chart-container {
    width: 100%;
}

.benchmark-svg {
    width: 100%;
    height: auto;
}

.chart-bar {
    transform-origin: left;
    transition: transform 1s ease-out;
}

.benchmark-note {
    margin-top: 1.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    border-top: 1px dashed var(--border-color);
    padding-top: 1rem;
}

/* CTA & Footer */

.cta-section {
    padding: 120px 0;
    text-align: center;
}

.cta-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 60px 40px;
    max-width: 900px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-desc {
    color: var(--text-secondary);
    font-size: 1.15rem;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    justify-content: center;
}

.cta-subtext {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.footer {
    background: #05060b;
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 320px;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column: span 2;
    gap: 40px;
}

.links-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.links-column h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.links-column a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.links-column a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-meta {
    font-family: var(--font-mono);
}

/* Responsive Styles */

/* Mobile nav toggle (hamburger) + horizontal-overflow guards */
.nav-toggle { display: none; align-items: center; justify-content: center; width: 42px; height: 42px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-color); border-radius: 8px; color: var(--text-primary); cursor: pointer; padding: 0; }
.nav-toggle .icon-close { display: none; }
.nav-cta-mobile { display: none; }
.aql-panel-editor, .aql-panel-results, .panel-body { min-width: 0; }
.latex-formula { overflow-x: auto; }
.math-eq { min-width: 0; }

@media (max-width: 1024px) {
    .hero-title { font-size: 3.5rem; }
    .cryptography-grid { grid-template-columns: 1fr; gap: 40px; }
    .benchmarks-grid { grid-template-columns: 1fr; gap: 40px; }
    .paper-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-container { grid-template-columns: 1fr 1fr; }
    .footer-links { grid-column: span 1; }
}

@media (max-width: 768px) {
    .nav-toggle { display: inline-flex; }
    .header-btn-app { display: none; }
    .nav-cta-mobile { display: flex; }
    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(7, 10, 19, 0.98);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
        padding: 6px 0;
    }
    .header.nav-open .nav { display: flex; }
    .header.nav-open .nav-toggle .icon-menu { display: none; }
    .header.nav-open .nav-toggle .icon-close { display: inline-flex; }
    .nav .nav-link { padding: 14px 24px; width: 100%; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
    .nav .nav-link:last-child { border-bottom: none; }
    .graph-tabs { flex-direction: column; }
    .graph-tab { justify-content: flex-start; border-right: none; border-bottom: 1px solid var(--border-color); padding: 13px 18px; font-size: 0.85rem; gap: 10px; }
    .graph-tab:last-child { border-bottom: none; }
    .hero-title { font-size: 2.6rem; }
    .graph-workspace { grid-template-columns: 1fr; height: auto; }
    .graph-viewport { height: 340px; }
    .graph-details-sidebar { border-left: none; border-top: 1px solid var(--border-color); height: auto; padding: 20px; }
    .aql-panels { grid-template-columns: 1fr; height: auto; }
    .aql-panel-editor { border-right: none; border-bottom: 1px solid var(--border-color); height: 200px; }
    .aql-panel-results { height: 200px; }
    .latex-container { padding: 20px; }
    .footer-container { grid-template-columns: 1fr; }
    .footer-links { grid-template-columns: 1fr; }
    .footer-bottom-container { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.2rem; }
    .hero-tagline { font-size: 1.2rem; }
    .section-title { font-size: 1.8rem; }
}

/* Hero tagline/subtext spacing + Paper grid layout */

.hero-tagline {
    display: block;
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.hero-subtext {
    display: block;
    font-size: 1.08rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.paper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 48px;
    align-items: center;
}

/* Lang Switcher */

.lang-switcher {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-heading);
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--text-primary);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Card Hover top-edge glow line */

.product-card {
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

.product-card.highlight::before {
    background: linear-gradient(90deg, transparent, rgba(6, 182, 212, 0.7), transparent);
}

.product-card:hover {
    border-color: rgba(139, 92, 246, 0.45) !important;
    transform: translateY(-6px) !important;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.15), 0 0 15px rgba(139, 92, 246, 0.08) !important;
}

.product-card.highlight:hover {
    border-color: rgba(6, 182, 212, 0.5) !important;
    box-shadow: 0 15px 40px rgba(6, 182, 212, 0.15), 0 0 15px rgba(6, 182, 212, 0.08) !important;
}

/* Active tab underlines with gradients */

.aql-query-btn.active {
    border-bottom: 2px solid transparent !important;
    border-image: linear-gradient(90deg, var(--color-cyan), var(--color-emerald)) 1 !important;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

/* Interactive SVG edge flows */

.edge {
    animation: flow-pulse 1.2s infinite linear;
}

.edge-violation {
    stroke-dasharray: 6, 4;
    animation: flow-violation 1.2s infinite linear;
}

@keyframes flow-violation {
    to { stroke-dashoffset: -20; }
}

@keyframes flow-pulse {
    0% { stroke-opacity: 0.6; }
    50% { stroke-opacity: 1; }
    100% { stroke-opacity: 0.6; }
}

.inspector-field.flex-col {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}
.text-xs {
    font-size: 0.78rem;
}
.break-all {
    word-break: break-all;
}

/* --- Translucent Node Internals & Animations --- */

/* Node hover & border highlights */
.node {
    cursor: pointer;
}

.node circle {
    transition: stroke-width 0.2s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.2s ease, fill 0.2s ease;
}

.node:hover .node-base {
    stroke-width: 3.5px !important;
}

/* Minimalist Vector Internals Styling */
.internals-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.45;
    transition: opacity 0.2s ease, stroke-width 0.2s ease;
}

.internals-shape {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.75;
    transition: opacity 0.2s ease, stroke-width 0.2s ease, fill 0.2s ease;
}

.internals-dot {
    opacity: 0.85;
    transition: r 0.2s ease, opacity 0.2s ease, fill 0.2s ease;
}

/* Hover highlights for internals */
.node:hover .internals-line {
    opacity: 0.85;
    stroke-width: 1.5px;
}

.node:hover .internals-shape {
    opacity: 0.95;
    stroke-width: 1.8px;
}

.node:hover .internals-dot {
    opacity: 1;
}

/* Click Pulse flash animations (completely avoids scale-based rendering bugs) */
.node.clicked-pulse .internals-shape {
    animation: shape-flash 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.node.clicked-pulse .internals-line {
    animation: line-flash 0.65s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes shape-flash {
    0%, 100% { opacity: 0.75; }
    35% { opacity: 1; stroke: #ffffff; stroke-width: 2.2px; }
}

@keyframes line-flash {
    0%, 100% { opacity: 0.45; }
    35% { opacity: 1; stroke: #ffffff; stroke-width: 1.8px; }
}

/* Merkle Tree Cascading Glow */
.node.clicked-pulse .merkle-leaf-dot {
    animation: dot-flash 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.node.clicked-pulse .merkle-mid-dot {
    animation: dot-flash 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) 0.16s;
}

.node.clicked-pulse .merkle-root-dot {
    animation: dot-flash 0.6s cubic-bezier(0.25, 0.8, 0.25, 1) 0.32s;
}

@keyframes dot-flash {
    0%, 100% { filter: brightness(1); }
    35% { filter: brightness(2.5); fill: #ffffff; }
}

/* GDPR Bit Register animation */
.node.clicked-pulse .gdpr-bit-rect {
    animation: bit-rect-flash 0.6s ease-out;
}

@keyframes bit-rect-flash {
    0%, 100% { fill: #090d16; }
    35% { fill: rgba(255, 255, 255, 0.35); }
}

/* Warning node blinking alert */
.zk-warning-node {
    animation: warning-alert-blink 0.9s infinite alternate ease-in-out;
}

@keyframes warning-alert-blink {
    from { opacity: 0.3; fill: rgba(239, 68, 68, 0.3); }
    to { opacity: 1; fill: #ef4444; filter: drop-shadow(0 0 3px #ef4444); }
}

/* Cascading verified ripple glow */
.node.verified-glow {
    animation: verified-shadow-glow 2.2s ease-in-out;
}

.node.verified-glow circle {
    stroke: var(--color-emerald) !important;
    stroke-width: 4px !important;
}

.node.verified-glow .internals-shape,
.node.verified-glow .internals-line {
    stroke: var(--color-emerald) !important;
    opacity: 0.95 !important;
}

.node.verified-glow .internals-dot {
    fill: var(--color-emerald) !important;
    opacity: 1 !important;
}

@keyframes verified-shadow-glow {
    0% { filter: drop-shadow(0 0 0px var(--color-emerald)); }
    20% { filter: drop-shadow(0 0 10px var(--color-emerald)); }
    100% { filter: drop-shadow(0 0 0px var(--color-emerald)); }
}

/* =====================================================================
   Visual upgrade: graph tabs, clickable nodes, section differentiation
   ===================================================================== */

/* --- Graph tabs: lift on hover, gradient-filled active with glow accent --- */
.graph-tab {
    position: relative;
    transition: color 0.2s ease, background 0.25s ease, transform 0.15s ease;
}
.graph-tab i {
    width: 17px; height: 17px;
    opacity: 0.65;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease;
}
.graph-tab:hover {
    transform: translateY(-1px);
    background: rgba(139, 92, 246, 0.06);
}
.graph-tab:hover i { opacity: 1; color: var(--color-violet); transform: scale(1.1); }
.graph-tab.active {
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.14), rgba(6, 182, 212, 0.05)) !important;
}
.graph-tab.active i { opacity: 1; color: var(--color-violet); }
.graph-tab.active span {
    background: linear-gradient(90deg, var(--color-violet), var(--color-cyan));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.graph-tab.active::after {
    content: ""; position: absolute; left: 14%; right: 14%; bottom: 0; height: 2px;
    background: linear-gradient(90deg, var(--color-violet), var(--color-cyan));
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.55);
}

/* --- Clickable nodes: colored glow, gentle breathe, richer hover/selected --- */
.node .node-base {
    filter: drop-shadow(0 0 4px var(--node-color, rgba(139, 92, 246, 0.6)));
    animation: nodeBreathe 3.6s ease-in-out infinite;
}
@keyframes nodeBreathe {
    0%, 100% { filter: drop-shadow(0 0 3px var(--node-color, rgba(139, 92, 246, 0.5))); }
    50%      { filter: drop-shadow(0 0 8px var(--node-color, rgba(139, 92, 246, 0.85))); }
}
.node:hover .node-base {
    animation: none;
    filter: drop-shadow(0 0 14px var(--node-color, rgba(139, 92, 246, 0.95))) brightness(1.35);
    stroke-width: 3.5px !important;
}
.node.selected .node-base {
    animation: none;
    filter: drop-shadow(0 0 16px var(--node-color, rgba(139, 92, 246, 1))) brightness(1.3);
    stroke-width: 4px !important;
}
.node-label { transition: fill 0.2s ease; }
.node:hover .node-label,
.node.selected .node-label { fill: var(--text-primary); }

@media (prefers-reduced-motion: reduce) {
    .node .node-base { animation: none; }
}

/* --- Section differentiation: Security (emerald) vs Benchmarks vs CTA --- */
#security {
    background:
        radial-gradient(120% 80% at 50% 0%, rgba(16, 185, 129, 0.07), transparent 62%),
        rgba(9, 13, 24, 0.4);
}
#security::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.55), transparent);
}
.cta-card {
    position: relative;
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.14), inset 0 0 0 1px rgba(139, 92, 246, 0.08);
    overflow: hidden;
}
.cta-card::before {
    content: ""; position: absolute; inset: 0; border-radius: 16px; padding: 1px;
    background: linear-gradient(120deg, rgba(139, 92, 246, 0.55), rgba(6, 182, 212, 0.3), rgba(16, 185, 129, 0.45));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor; mask-composite: exclude;
    pointer-events: none; opacity: 0.7;
}

/* =====================================================================
   Graph tabs — identical to the AQL tab style (plain text + gradient
   underline). Per-tab accent colour (violet / cyan / emerald) on the
   underline, set via --tab-accent by updateTabIndicator().
   ===================================================================== */
.graph-showcase-card { --tab-accent: 139, 92, 246; }
.graph-tabs {
    display: flex;
    background: rgba(9, 13, 24, 0.6);
    border-bottom: 1px solid var(--border-color);
}
.graph-tab-indicator { display: none; }
.graph-tab {
    flex: 1;
    padding: 16px;
    background: transparent !important;
    border: none;
    border-right: 1px solid var(--border-color);
    border-radius: 0;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
}
.graph-tab:last-child { border-right: none; }
.graph-tab i, .graph-tab svg { display: none; }
.graph-tab::after { display: none !important; }
.graph-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.02) !important;
}
.graph-tab.active {
    color: var(--text-primary) !important;
    background: var(--bg-dark) !important;
    border-bottom: 2px solid transparent !important;
    border-image: linear-gradient(90deg, rgba(var(--tab-accent), 0.45), rgb(var(--tab-accent))) 1 !important;
    box-shadow: inset 0 -2px 0 rgb(var(--tab-accent));
}
.graph-tab.active span {
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    background: none;
}
@media (max-width: 768px) {
    .graph-tabs { flex-direction: column; }
    .graph-tab { border-right: none; border-bottom: 1px solid var(--border-color); }
    .graph-tab:last-child { border-bottom: none; }
}

/* --- Node glyph crispness + scan-ring on hover/selection --- */
.internals-line { opacity: 0.7; }
.internals-shape { opacity: 0.92; }
.internals-dot { opacity: 0.95; }

.scan-ring {
    opacity: 0;
    transition: opacity 0.25s ease;
}
.node:hover .scan-ring,
.node.selected .scan-ring {
    opacity: 0.75;
    animation: scanMarch 1.1s linear infinite;
}
@keyframes scanMarch {
    to { stroke-dashoffset: -20; }
}
@media (prefers-reduced-motion: reduce) {
    .node:hover .scan-ring,
    .node.selected .scan-ring { animation: none; }
}

/* =====================================================================
   Scenario banner (S1-S3) + Node Inspector (I1-I5)
   ===================================================================== */
@keyframes graphFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Banner: left accent bar in the active-tab colour + WHAT/WHY mono chips */
.graph-scenario-banner {
    position: relative;
    border-left: 3px solid rgb(var(--tab-accent, 139, 92, 246));
}
.scenario-line strong {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
}
.scenario-line.why-line strong {
    background: rgba(var(--tab-accent, 139, 92, 246), 0.14);
    color: rgb(var(--tab-accent, 139, 92, 246));
}
.banner-animate { animation: graphFadeIn 0.4s ease; }

/* Inspector: type-coloured header accent + tag, verify pill, hash chip, fade */
#node-inspector-content.inspector-animate { animation: graphFadeIn 0.32s ease; }
.inspector-header {
    border-left: 3px solid rgb(var(--node-accent, 139, 92, 246));
    padding-left: 12px;
}
.inspector-tag {
    background: rgba(var(--node-accent, 139, 92, 246), 0.16);
    color: rgb(var(--node-accent, 139, 92, 246));
}
.badge-verify {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
}
.field-value.mono.hash-chip {
    cursor: pointer;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.field-value.mono.hash-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}
.field-value.mono.hash-chip.copied {
    color: var(--color-emerald);
    border-color: rgba(16, 185, 129, 0.4);
}
#inspector-action-btn.verifying { opacity: 0.85; pointer-events: none; }
#inspector-action-btn.verified {
    background: linear-gradient(135deg, var(--color-emerald), var(--color-cyan)) !important;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3) !important;
}
.panel-verified { animation: panelVerifiedFlash 1.4s ease; }
@keyframes panelVerifiedFlash {
    0% { box-shadow: inset 0 0 0 0 rgba(16, 185, 129, 0); }
    25% { box-shadow: inset 0 0 26px 0 rgba(16, 185, 129, 0.18); }
    100% { box-shadow: inset 0 0 0 0 rgba(16, 185, 129, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .banner-animate,
    #node-inspector-content.inspector-animate,
    .panel-verified { animation: none; }
}

/* =====================================================================
   Page-wide polish — scroll reveal (P1), benchmark bars (P5),
   nav scroll-spy (P6), button focus/active (P2)
   ===================================================================== */
body.js-reveal .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}
body.js-reveal .reveal.reveal-visible {
    opacity: 1;
    transform: none;
}

body.js-reveal .chart-bar {
    transform: scaleX(0);
    transform-origin: left center;
    transform-box: fill-box;
    transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
body.js-reveal .benchmark-chart-card.bars-animate .chart-bar { transform: scaleX(1); }
body.js-reveal .benchmark-chart-card.bars-animate .bar-neo { transition-delay: 0.12s; }
body.js-reveal .benchmark-chart-card.bars-animate .bar-aphantos { transition-delay: 0.24s; }

.nav-link { position: relative; }
.nav-link.active { color: var(--text-primary); }
.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--color-violet), var(--color-cyan));
}

.btn:focus-visible {
    outline: 2px solid rgba(139, 92, 246, 0.6);
    outline-offset: 2px;
}
.btn:active { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    body.js-reveal .reveal,
    body.js-reveal .chart-bar {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* =====================================================================
   P3 — product cards: gradient border ring on hover (corners preserved)
   P4 — AQL syntax highlight
   ===================================================================== */
.product-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(6, 182, 212, 0.3));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}
.product-card:hover::after { opacity: 1; }
.product-card.highlight::after {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.5), rgba(16, 185, 129, 0.3));
}

#aql-code-box .aql-kw { color: #c4b5fd; font-weight: 600; }
#aql-code-box .aql-fn { color: #67e8f9; }
#aql-code-box .aql-str { color: #6ee7b7; }
#aql-code-box .aql-com { color: var(--text-muted); font-style: italic; }

/* A11y — keyboard focus mirrors the hover state on graph nodes */
.node:focus { outline: none; }
.node:focus-visible { outline: none; }
.node:focus-visible .node-base {
    animation: none;
    filter: drop-shadow(0 0 14px var(--node-color, rgba(139, 92, 246, 0.95))) brightness(1.35);
    stroke-width: 3.5px !important;
    r: 28;
}
.node:focus-visible .scan-ring {
    opacity: 0.75;
    animation: scanMarch 1.1s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
    .node:focus-visible .scan-ring { animation: none; }
}


