/* ==============================================
   MAS WEBSITE — STYLES & ANIMATIONS
   ============================================== */

/* ---- RESET & VARIABLES ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #0f1521;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(100, 255, 218, 0.3);
    --text-primary: #e8edf5;
    --text-secondary: #8892a4;
    --text-muted: #5a6478;
    --accent: #64ffda;
    --accent-dim: rgba(100, 255, 218, 0.15);
    --accent2: #7c4dff;
    --accent2-dim: rgba(124, 77, 255, 0.15);
    --gradient: linear-gradient(135deg, #64ffda, #7c4dff);
    --gradient-text: linear-gradient(135deg, #64ffda 0%, #00b4d8 50%, #7c4dff 100%);
    --code-bg: #0d1117;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(100, 255, 218, 0.1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--bg-primary);
    overflow-x: hidden;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

canvas,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- SCROLL REVEAL ---- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.reveal.visible .pipeline-step,
.reveal.visible .arch-card,
.reveal.visible .bento-item,
.reveal.visible .maws-step,
.reveal.visible .qs-step {
    opacity: 1;
    transform: translateY(0);
}

.pipeline-step,
.arch-card,
.bento-item,
.maws-step,
.qs-step {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.pipeline-step:nth-child(1), .arch-card:nth-child(1), .bento-item:nth-child(1), .maws-step:nth-child(1) { transition-delay: 0.1s; }
.pipeline-step:nth-child(2), .arch-card:nth-child(2), .bento-item:nth-child(2), .maws-step:nth-child(2) { transition-delay: 0.2s; }
.pipeline-step:nth-child(3), .arch-card:nth-child(3), .bento-item:nth-child(3), .maws-step:nth-child(3) { transition-delay: 0.3s; }
.pipeline-step:nth-child(4), .arch-card:nth-child(4), .bento-item:nth-child(4) { transition-delay: 0.4s; }
.pipeline-step:nth-child(5), .arch-card:nth-child(5), .bento-item:nth-child(5) { transition-delay: 0.5s; }
.bento-item:nth-child(6) { transition-delay: 0.3s; }
.bento-item:nth-child(7) { transition-delay: 0.4s; }
.bento-item:nth-child(8) { transition-delay: 0.5s; }

/* ---- NAVBAR ---- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 0;
    border-bottom-color: var(--border);
    background: rgba(10, 14, 23, 0.95);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}

.logo img {
    height: 36px;
    width: 36px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-github-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--bg-primary);
    background: var(--text-primary);
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.nav-github-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
    border-radius: 2px;
}

/* ---- HERO ---- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

#heroCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(100, 255, 218, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(100, 255, 218, 0); }
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

/* Buttons */
.btn-glow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--gradient);
    color: var(--bg-primary);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 100px;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(100, 255, 218, 0.3), 0 0 60px rgba(100, 255, 218, 0.1);
}

.btn-glow:hover::before {
    opacity: 1;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 100px;
    text-decoration: none;
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    transform: translateY(-3px);
}

/* Install box */
.hero-install {
    margin-bottom: 40px;
}

.install-box {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
    max-width: 100%;
    overflow-x: auto;
    transition: var(--transition);
}

.install-box:hover {
    border-color: var(--border-hover);
}

.install-prompt {
    color: var(--accent);
    font-weight: 600;
}

.install-box code {
    color: var(--text-primary);
    white-space: nowrap;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    transition: var(--transition);
    flex-shrink: 0;
}

.copy-btn:hover {
    color: var(--accent);
    background: var(--accent-dim);
}

.copy-btn.copied {
    color: var(--accent);
}

/* Hero stats */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    letter-spacing: -0.03em;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 6px;
    display: block;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    animation: float-up 2s ease infinite;
    z-index: 1;
    pointer-events: none;
}

.mouse {
    width: 24px;
    height: 38px;
    border: 2px solid var(--text-muted);
    border-radius: 12px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--text-muted);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-wheel 2s ease infinite;
}

@keyframes scroll-wheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes float-up {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* ---- SECTIONS ---- */
.section {
    padding: 120px 0;
    position: relative;
}

.section-dark {
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px;
}

.section-tag {
    display: inline-block;
    padding: 4px 14px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

/* ---- HOW IT WORKS — PIPELINE ---- */
.pipeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.pipeline-step {
    flex: 1;
    min-width: 240px;
    max-width: 320px;
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: var(--transition);
    position: relative;
}

.pipeline-step:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-8px);
}

.pipeline-step.active {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
    background: var(--bg-card-hover);
}

.pipeline-step.active .step-icon {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.2);
}

.step-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: var(--accent);
    position: relative;
}

.step-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    animation: pulse-ring 2s ease infinite;
}

.pipeline-step:hover .step-pulse {
    animation-play-state: running;
}

@keyframes pulse-ring {
    0% { opacity: 0.6; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.4); }
}

.pipeline-step h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.pipeline-step p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.step-code {
    text-align: left;
    background: var(--code-bg);
    border-radius: var(--radius-xs);
    padding: 12px 16px;
    overflow-x: auto;
}

.step-code pre {
    margin: 0;
}

.step-code code {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pipeline-arrow {
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 64px;
}

.pipeline-arrow svg {
    width: 48px;
    height: 24px;
}

/* Pipeline progress bar */
.pipeline-progress {
    margin-top: 40px;
}

.pipeline-track {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.data-packet {
    width: 60px;
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    position: absolute;
    left: -60px;
    animation: packet-travel 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.5);
}

@keyframes packet-travel {
    0% { left: -60px; }
    100% { left: 100%; }
}

/* ---- ARCHITECTURE ---- */
.arch-diagram {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.arch-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.arch-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.arch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.arch-card:hover::before,
.arch-card.active::before {
    transform: scaleX(1);
}

.arch-card:hover,
.arch-card.active {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-6px);
}

.arch-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.agent-icon { background: rgba(100, 255, 218, 0.15); color: #64ffda; }
.tool-icon { background: rgba(255, 171, 64, 0.15); color: #ffab40; }
.process-icon { background: rgba(124, 77, 255, 0.15); color: #7c4dff; }
.automation-icon { background: rgba(0, 176, 255, 0.15); color: #00b0ff; }

.arch-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.arch-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 12px;
}

.arch-card-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.detail-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-card);
    border-radius: var(--radius-xs);
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--accent);
    margin-right: 6px;
}

/* Architecture Flow Demo */
.arch-flow-demo {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    position: relative;
    overflow: hidden;
    margin-top: 16px;
}

.arch-flow-demo .flow-node {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.arch-flow-demo .flow-node:hover {
    transform: scale(1.15);
    box-shadow: 0 0 20px rgba(100, 255, 218, 0.15);
}

.arch-flow-title {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
}

/* Constrained Workflow Simulation */
.workflow-sim {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}

.workflow-head h4 {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.workflow-head p {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.workflow-body {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 28px;
    align-items: start;
}

.workflow-graph {
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
}

.wf-row {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.wf-node {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--code-bg);
    color: var(--text-secondary);
    transition: var(--transition);
    text-align: center;
    min-width: 110px;
}

.wf-node.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    box-shadow: 0 0 16px rgba(100, 255, 218, 0.2);
}

.wf-input {
    border-color: rgba(100, 255, 218, 0.3);
    color: var(--accent);
}

.wf-decision {
    border-color: rgba(124, 77, 255, 0.4);
    color: #7c4dff;
    background: rgba(124, 77, 255, 0.08);
}

.wf-tool {
    border-color: rgba(255, 171, 64, 0.4);
    color: #ffab40;
}

.wf-process {
    border-color: rgba(0, 176, 255, 0.4);
    color: #00b0ff;
}

.wf-edge {
    width: 28px;
    height: 2px;
    background: var(--border);
}

.wf-edge.vertical {
    width: 2px;
    height: 18px;
}

.wf-lanes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.wf-lane {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    transition: var(--transition);
}

.wf-lane.active {
    border-color: var(--accent);
    box-shadow: 0 0 18px rgba(100, 255, 218, 0.15);
}

.wf-lane-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 10px;
}

.wf-lane-steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.workflow-log-panel {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wf-log-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wf-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wf-resume-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: var(--transition);
}

.wf-resume-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.wf-resume-btn:not(:disabled):hover {
    border-color: var(--accent);
    color: var(--accent);
}

.wf-loop {
    color: var(--accent);
    font-weight: 600;
}

.wf-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 280px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.wf-log-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: start;
    font-size: 0.78rem;
    line-height: 1.5;
}

.wf-badge {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wf-badge.user { background: rgba(100, 255, 218, 0.15); color: #64ffda; }
.wf-badge.agent { background: rgba(124, 77, 255, 0.15); color: #7c4dff; }
.wf-badge.tool { background: rgba(255, 171, 64, 0.15); color: #ffab40; }
.wf-badge.process { background: rgba(0, 176, 255, 0.15); color: #00b0ff; }
.wf-badge.system { background: rgba(255, 255, 255, 0.12); color: var(--text-secondary); }

.wf-msg {
    color: var(--text-secondary);
    word-break: break-word;
}

.wf-constraint {
    background: rgba(100, 255, 218, 0.08);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.wf-constraint strong {
    color: var(--text-primary);
}

.flow-animation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    padding: 16px 0;
}

.flow-node {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.flow-node::after {
    content: attr(data-label);
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.fn-input, .fn-output {
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 0.7rem;
    width: 70px;
    height: 70px;
}

.fn-agent {
    background: rgba(100, 255, 218, 0.1);
    border: 2px solid rgba(100, 255, 218, 0.3);
    color: #64ffda;
    font-size: 1.2rem;
}

.fn-tool {
    background: rgba(255, 171, 64, 0.1);
    border: 2px solid rgba(255, 171, 64, 0.3);
    color: #ffab40;
    font-size: 1.2rem;
}

.flow-edge {
    width: 40px;
    height: 2px;
    background: var(--border);
    position: relative;
    flex-shrink: 0;
}

.flow-edge::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 0;
    height: 0;
    border-left: 6px solid var(--border);
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

/* Flow packet animation */
.flow-packet-track {
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin-top: 32px;
    position: relative;
    overflow: hidden;
}

.flow-packet {
    width: 40px;
    height: 100%;
    background: var(--gradient);
    border-radius: 2px;
    position: absolute;
    left: -40px;
    animation: packet-travel 4s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(100, 255, 218, 0.4);
}

/* ---- BLOCK SYSTEM ---- */
.blocks-demo {
    max-width: 1000px;
    margin: 0 auto;
}

.block-flow {
    display: flex;
    align-items: stretch;
    gap: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.block-source,
.block-output,
.block-db {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    flex: 1;
    min-width: 200px;
    min-width: 0;
}

.block-source h4,
.block-output h4,
.block-db h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.input-types {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.input-type-btn {
    padding: 8px 14px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--font);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.input-type-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.input-type-btn:hover {
    border-color: var(--accent);
}

.input-preview > div {
    display: none;
    padding: 12px 16px;
    background: var(--code-bg);
    border-radius: var(--radius-xs);
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    animation: fadeIn 0.3s ease;
    white-space: normal;
    overflow-wrap: anywhere;
    max-width: 100%;
}

.input-preview > div.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.flow-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    min-width: 80px;
    position: relative;
}

.flow-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: var(--mono);
    margin-top: 8px;
}

.flow-particles {
    display: flex;
    gap: 6px;
}

.particle {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: particle-flow 1.5s ease infinite;
}

.particle:nth-child(2) { animation-delay: 0.3s; }
.particle:nth-child(3) { animation-delay: 0.6s; }

@keyframes particle-flow {
    0% { opacity: 0; transform: translateX(-10px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: translateX(10px); }
}

/* Block JSON */
.block-json pre {
    margin: 0;
    white-space: pre-wrap;
}

.block-json code {
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.json-key { color: #7c4dff; }
.json-str { color: #64ffda; }

/* DB Visual */
.db-visual {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.db-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 12px;
    background: var(--code-bg);
    border-radius: var(--radius-xs);
    font-family: var(--mono);
    font-size: 0.75rem;
    transition: var(--transition);
}

.db-row.new-row {
    animation: slide-in-row 0.5s ease;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

@keyframes slide-in-row {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.db-role {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 44px;
    text-align: center;
}

.db-role.user { background: rgba(100, 255, 218, 0.15); color: #64ffda; }
.db-role.assistant { background: rgba(124, 77, 255, 0.15); color: #7c4dff; }
.db-role.tool-role { background: rgba(255, 171, 64, 0.15); color: #ffab40; }

.db-msg {
    color: var(--text-secondary);
    overflow-wrap: anywhere;
}

/* ---- CONTROL FLOW ---- */
.flow-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.flow-visualization {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.flow-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.flow-btn {
    padding: 8px 18px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font);
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.flow-btn.active {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.flow-btn:hover {
    border-color: var(--accent);
}

/* Flow chart nodes */
.flow-chart {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    animation: fadeIn 0.4s ease;
}

.flow-chart.active {
    display: flex;
}

.fc-node {
    padding: 10px 20px;
    border-radius: var(--radius-xs);
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    min-width: 100px;
    transition: var(--transition);
}

.fc-start, .fc-end {
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    color: var(--accent);
    border-radius: 100px;
}

.fc-agent {
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.3);
    color: var(--accent);
}

.fc-tool {
    background: rgba(255, 171, 64, 0.1);
    border: 1px solid rgba(255, 171, 64, 0.3);
    color: #ffab40;
}

.fc-decision {
    background: rgba(124, 77, 255, 0.1);
    border: 1px solid rgba(124, 77, 255, 0.3);
    color: #7c4dff;
    transform: rotate(0deg);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fc-line {
    width: 2px;
    height: 20px;
    background: var(--border);
}

.fc-branches {
    display: flex;
    gap: 40px;
    position: relative;
}

.fc-branches::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background: var(--border);
}

.fc-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.fc-branch-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--mono);
    padding: 2px 8px;
    background: var(--code-bg);
    border-radius: var(--radius-xs);
}

.fc-multi {
    gap: 24px;
}

/* Loop container */
.fc-loop-container {
    border: 2px dashed rgba(124, 77, 255, 0.3);
    border-radius: var(--radius);
    padding: 20px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
}

.fc-loop-label {
    position: absolute;
    top: -12px;
    left: 16px;
    background: var(--bg-primary);
    padding: 2px 12px;
    font-size: 0.72rem;
    color: #7c4dff;
    font-family: var(--mono);
    border-radius: var(--radius-xs);
}

.section-dark .fc-loop-label {
    background: var(--bg-secondary);
}

/* Flow code panel */
.flow-code-panel {
    position: sticky;
    top: 100px;
}

.flow-code {
    display: none;
    animation: fadeIn 0.3s ease;
}

.flow-code.active {
    display: block;
}

/* ---- CODE FRAME ---- */
.code-frame {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.code-frame-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f57; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #28c840; }

.code-filename {
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: var(--mono);
}

.code-frame pre {
    padding: 20px;
    margin: 0;
    overflow-x: auto;
}

.code-frame code {
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.flow-code-body {
    padding: 20px;
}

.flow-code-body pre {
    margin: 0;
}

.flow-code-body code {
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.6;
}

/* Code syntax colors */
.kw { color: #ff79c6; }
.str { color: #64ffda; }
.comment { color: #5a6478; font-style: italic; }
.prompt { color: var(--accent); font-weight: 600; }
.json-key { color: #7c4dff; }
.json-str { color: #64ffda; }

/* ---- PROVIDERS ---- */
.provider-swap-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.swap-code .code-frame {
    margin-bottom: 20px;
}

.swap-code pre {
    padding: 24px;
    margin: 0;
}

.swap-code code {
    font-family: var(--mono);
    font-size: 0.9rem;
    line-height: 2;
}

.provider-line {
    display: inline-block;
    transition: var(--transition);
    padding: 2px 0;
}

.provider-line.highlight {
    background: var(--accent-dim);
    border-radius: 4px;
    padding: 2px 6px;
}

.swap-explanation {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 20px;
    background: var(--accent-dim);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.swap-explanation i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
}

.swap-explanation strong {
    color: var(--text-primary);
}

/* Provider orbit */
.provider-orbit {
    position: relative;
    width: 340px;
    height: 340px;
    margin: 0 auto;
}

.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    box-shadow: 0 0 30px rgba(100, 255, 218, 0.2);
}

.orbit-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed var(--border);
    animation: orbit-spin 30s linear infinite;
}

.orbit-item {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    top: 50%;
    left: 50%;
    margin: -30px;
    transform: rotate(calc(var(--i) * 60deg)) translateX(150px) rotate(calc(var(--i) * -60deg));
    transition: var(--transition);
}

.orbit-item span {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-secondary);
    animation: orbit-counter-spin 30s linear infinite;
}

.orbit-item:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
    transform: rotate(calc(var(--i) * 60deg)) translateX(150px) rotate(calc(var(--i) * -60deg)) scale(1.15);
}

@keyframes orbit-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes orbit-counter-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(-360deg); }
}

/* ---- FEATURES BENTO GRID ---- */
.features-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.bento-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(100, 255, 218, 0.06), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.bento-item:hover::after {
    opacity: 1;
}

.bento-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
    padding: 36px 32px;
}

.bento-wide {
    grid-column: span 2;
}

.bento-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.bento-item h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.bento-item p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.bento-item code {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Multimodal visual */
.bento-visual {
    margin-top: 24px;
}

.modal-blocks {
    display: flex;
    gap: 16px;
}

.m-block {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    animation: float-block 3s ease infinite;
}

.m-block:nth-child(2) { animation-delay: 0.5s; }
.m-block:nth-child(3) { animation-delay: 1s; }

.text-block { background: rgba(100, 255, 218, 0.1); color: #64ffda; border: 1px solid rgba(100, 255, 218, 0.2); }
.image-block { background: rgba(124, 77, 255, 0.1); color: #7c4dff; border: 1px solid rgba(124, 77, 255, 0.2); }
.audio-block { background: rgba(255, 171, 64, 0.1); color: #ffab40; border: 1px solid rgba(255, 171, 64, 0.2); }

@keyframes float-block {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Standard tools scroll */
.std-tools-scroll {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.std-tool {
    flex-shrink: 0;
    padding: 8px 16px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

.std-tool:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.std-tool i {
    color: var(--accent);
}

/* ---- AUTO-MAS / ZERO CONFIG ---- */
.auto-mas-demo {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.typewriter-container {
    text-align: center;
}

.typewriter-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.typewriter-box {
    display: inline-block;
    padding: 16px 24px;
    background: var(--code-bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--mono);
    font-size: 1rem;
    color: var(--accent);
    min-height: 56px;
    min-width: 0;
    width: min(100%, 560px);
    text-align: left;
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tw-cursor {
    animation: blink 1s step-end infinite;
    color: var(--accent);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.auto-mas-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.auto-mas-arrow span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.magic-sparkles {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent);
    animation: sparkle-pulse 2s ease infinite;
}

@keyframes sparkle-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(100, 255, 218, 0.3); }
    50% { box-shadow: 0 0 20px 10px rgba(100, 255, 218, 0.1); }
}

.auto-mas-output {
    width: 100%;
}

.generated-files {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gen-file {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gen-file.visible {
    opacity: 1;
    transform: translateY(0);
}

.gen-file-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.gen-badge {
    margin-left: auto;
    padding: 2px 10px;
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.7rem;
    border-radius: 100px;
    font-weight: 600;
}

.gen-file-body {
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
}

.gen-file-body pre {
    margin: 0;
}

.gen-file-body code {
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.auto-mas-code .code-frame pre {
    padding: 20px;
}

/* ---- QUICK START ---- */
.quickstart {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    align-items: start;
}

.qs-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.qs-step {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.qs-step:hover {
    background: var(--bg-card-hover);
}

.qs-step.active {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.qs-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--code-bg);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: var(--transition);
}

.qs-step.active .qs-step-num {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.qs-step-text h4 {
    font-size: 0.95rem;
    font-weight: 700;
}

.qs-step-text p {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.qs-code-body {
    padding: 0;
}

.qs-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.qs-pane.active {
    display: block;
}

.qs-pane pre {
    padding: 24px;
    margin: 0;
}

.qs-pane code {
    font-family: var(--mono);
    font-size: 0.82rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ---- MAWS ---- */
.maws-demo {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.maws-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
}

.maws-step {
    text-align: center;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-width: 180px;
    transition: var(--transition);
}

.maws-step:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
}

.maws-step-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--accent);
    margin: 0 auto 16px;
}

.maws-step h4 {
    margin-bottom: 8px;
    font-size: 1rem;
}

.maws-step code {
    font-family: var(--mono);
    font-size: 0.85rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 4px 12px;
    border-radius: var(--radius-xs);
}

.maws-connector {
    display: flex;
    align-items: center;
    padding: 0 8px;
    position: relative;
}

.connector-line {
    width: 48px;
    height: 2px;
    background: var(--border);
    position: relative;
}

.connector-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    position: absolute;
    left: 0;
    animation: dot-travel 2s ease-in-out infinite;
}

@keyframes dot-travel {
    0% { left: 8px; }
    100% { left: calc(100% - 16px); }
}

.maws-infra {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.infra-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.infra-layer {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.infra-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 100px;
    transition: var(--transition);
}

.infra-node:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

.infra-node i {
    font-size: 1.3rem;
    color: var(--accent);
}

.lambda-node {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.lambda-node span {
    color: var(--accent);
    font-weight: 600;
}

.infra-arrow-down {
    color: var(--text-muted);
    font-size: 1rem;
    animation: arrow-bounce 1.5s ease infinite;
}

@keyframes arrow-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

.maws-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 16px;
}

.maws-feature {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.maws-feature i {
    color: var(--accent);
    margin-top: 3px;
    flex-shrink: 0;
}

/* ---- SUCCESS CASES ---- */
.examples-showcase {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.example-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.example-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.example-card-body {
    padding: 28px;
}

.example-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.example-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--code-bg);
}

.example-name {
    font-size: 1.15rem;
    font-weight: 700;
}

.example-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* Example screenshot overlay */
.example-screenshot {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: top center;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 2;
    border-radius: var(--radius);
}

.example-card:hover .example-screenshot {
    opacity: 0.12;
}

.example-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(100, 255, 218, 0.05), transparent 50%);
    border-radius: var(--radius);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.example-card:hover::before {
    opacity: 1;
}

/* Image modal */
.image-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.image-modal.open {
    display: flex;
}

.image-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
}

.image-modal-content {
    position: relative;
    max-width: min(960px, 90vw);
    max-height: 90vh;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.image-modal-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.image-modal-caption {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.image-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: var(--transition);
}

.image-modal-close:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---- CTA ---- */
.cta-section {
    background: radial-gradient(ellipse at center, rgba(100, 255, 218, 0.08) 0%, transparent 70%);
}

.cta-content {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
}

.cta-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 36px;
}

.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---- FOOTER ---- */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-brand a {
    color: var(--accent);
    text-decoration: none;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col h4 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .arch-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-large {
        grid-column: span 2;
        grid-row: span 1;
    }

    .provider-swap-demo {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .provider-orbit {
        width: 280px;
        height: 280px;
    }

    .orbit-item {
        transform: rotate(calc(var(--i) * 60deg)) translateX(120px) rotate(calc(var(--i) * -60deg));
    }

    .orbit-item:hover {
        transform: rotate(calc(var(--i) * 60deg)) translateX(120px) rotate(calc(var(--i) * -60deg)) scale(1.15);
    }

    .maws-infra {
        grid-template-columns: 1fr;
    }

    .flow-demo {
        grid-template-columns: 1fr;
    }

    .flow-code-panel {
        position: static;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .nav-github-btn span {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border);
        padding: 16px 24px;
        gap: 4px;
    }

    .pipeline {
        flex-direction: column;
        align-items: center;
    }

    .pipeline-arrow {
        transform: rotate(90deg);
        margin: 8px 0;
    }

    .pipeline-step {
        max-width: 100%;
    }

    .arch-cards {
        grid-template-columns: 1fr;
    }

    .features-bento {
        grid-template-columns: 1fr;
    }

    .bento-large, .bento-wide {
        grid-column: span 1;
    }

    .quickstart {
        grid-template-columns: 1fr;
    }

    .qs-steps {
        flex-direction: column;
        overflow: visible;
    }

    .qs-step {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
    }

    .qs-step-text {
        text-align: left;
        flex: 1 1 auto;
        min-width: 0;
    }

    .qs-step-text h4,
    .qs-step-text p {
        white-space: normal;
    }

    .examples-showcase {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        gap: 24px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .typewriter-box {
        width: 100%;
        height: 56px;
        padding: 14px 18px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .maws-flow {
        flex-direction: column;
        gap: 24px;
    }

    .maws-connector {
        transform: rotate(90deg);
        margin: 12px 0;
    }

    .maws-step {
        width: 100%;
        max-width: 340px;
    }

    .infra-diagram {
        padding: 20px;
    }

    .infra-layer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .infra-node {
        min-width: 88px;
        flex: 1 1 110px;
        padding: 12px 10px;
    }

    .infra-node span {
        font-size: 0.72rem;
        text-align: center;
    }

    .block-flow {
        flex-direction: column;
    }

    .flow-arrow {
        flex-direction: row;
        padding: 12px 0;
    }

    .flow-animation {
        gap: 4px;
    }

    .flow-node {
        width: 50px;
        height: 50px;
        font-size: 0.6rem;
    }

    .fn-input, .fn-output {
        width: 45px;
        height: 45px;
    }

    .flow-edge {
        width: 20px;
    }

    .fc-branches {
        gap: 16px;
    }

    .fc-node {
        padding: 8px 12px;
        font-size: 0.7rem;
        min-width: 70px;
    }

    .fc-decision {
        width: 70px;
        height: 70px;
    }

    .scroll-indicator {
        bottom: 6px;
    }

    .workflow-body {
        grid-template-columns: 1fr;
    }

    .wf-log {
        height: 220px;
        max-height: 220px;
    }

    .wf-lanes {
        grid-template-columns: 1fr;
    }

    .wf-row {
        justify-content: flex-start;
    }

    .step-code,
    .workflow-log-panel,
    .flow-code-panel,
    .code-frame {
        max-width: 100%;
        overflow-x: auto;
    }

    .step-code pre,
    .workflow-log-panel pre,
    .flow-code-panel pre,
    .code-frame pre {
        white-space: pre-wrap;
        word-break: break-word;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .section {
        padding: 80px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .install-box {
        font-size: 0.72rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .install-box code {
        white-space: normal;
        word-break: break-word;
    }
}
