:root {
    /* Color Palette - Premium Dark Theme */
    --bg-primary: #0a0a0c;
    --bg-secondary: #121217;
    --bg-tertiary: #1a1a24;
    --text-primary: #f0f0f5;
    --text-secondary: #a0a0b0;
    --accent-primary: #3b82f6; /* Modern Blue */
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.3);
    --accent-secondary: #10b981;
    --accent-warning: #f59e0b;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Instrument Serif', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    
    /* Spacing & Sizes */
    --container-max: 1200px;
    --section-pad: 100px 0;
    --border-radius: 8px;
    --border-radius-lg: 8px;
    
    /* Transitions */
    --transition-fast: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    --transition-smooth: color 0.4s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    color-scheme: dark;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-tap-highlight-color: rgba(16, 185, 129, 0.22);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
    touch-action: manipulation;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.accordion-header:focus-visible {
    outline: 3px solid var(--accent-secondary);
    outline-offset: 3px;
}

ul {
    list-style: none;
}

[id] {
    scroll-margin-top: 96px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    transform: translateY(-150%);
    padding: 10px 14px;
    background: #fff;
    color: #050508;
    border-radius: 8px;
    font-weight: 700;
}

.skip-link:focus-visible {
    transform: translateY(0);
}

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

.section-padding {
    padding: var(--section-pad);
}

.bg-alt {
    background-color: var(--bg-secondary);
}

.bg-dark {
    background-color: #050508;
}

.text-center {
    text-align: center;
}

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

/* --- Typography --- */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
    text-wrap: balance;
}

p, li {
    overflow-wrap: anywhere;
    text-wrap: pretty;
}

.section-title {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #a0a0b0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-desc {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 3rem;
}

/* --- Buttons --- */
.btn-primary, .btn-secondary, .btn-primary-small, .btn-primary-full, .btn-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    border-radius: 8px;
    font-weight: 500;
    border-radius: 8px;
    transition: var(--transition-smooth);
    cursor: pointer;
    border: none;
    touch-action: manipulation;
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #fff;
    padding: 14px 28px;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

/* Shimmer sweep effect */
.btn-primary::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.18) 50%, transparent 60%);
    transform: translateX(-100%);
    transition: transform 0.55s ease;
    pointer-events: none;
}

.btn-primary:hover::after {
    transform: translateX(100%);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 35px rgba(59, 130, 246, 0.5), 0 0 0 1px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 14px 28px;
    font-size: 1.1rem;
}

.btn-secondary:hover {
    background-color: var(--glass-bg);
    border-color: var(--text-secondary);
}

.btn-text {
    color: var(--text-secondary);
    padding: 12px 4px;
    font-size: 1rem;
}

.btn-text:hover {
    color: #fff;
}

.btn-primary-small {
    background-color: var(--accent-primary);
    color: #fff;
    padding: 10px 20px;
    font-size: 0.95rem;
}

.btn-primary-small:hover {
    background-color: var(--accent-hover);
}

.btn-primary-full {
    width: 100%;
    background-color: var(--accent-primary);
    color: #fff;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.btn-primary-full:hover {
    background-color: var(--accent-hover);
}

/* --- Topbar --- */
.topbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(10, 10, 12, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000;
    transition: var(--transition-fast);
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 400;
    letter-spacing: 0;
    color: #fff;
}

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

.nav-links a:not(.btn-primary-small) {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
}

.nav-links a:not(.btn-primary-small):hover {
    color: #fff;
}

/* --- Hero --- */
.hero {
    display: flex;
    align-items: flex-start;
    padding: 72px 0 0;
    position: relative;
    overflow: hidden;
}

.hero-focused {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr);
    align-items: start;
    gap: clamp(24px, 4vw, 56px);
}

.eyebrow {
    font-family: var(--font-mono);
    color: var(--accent-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0;
}

/* Background glow effect */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 62%;
    transform: translateX(-50%);
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    z-index: 0;
    opacity: 0.55;
    pointer-events: none;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    max-width: 680px;
    margin: 0;
    padding-top: clamp(8px, 2vh, 28px);
}

.hero-split .hero-text {
    justify-self: center;
    align-self: center;
    text-align: left;
}

.hero-text h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(3.15rem, 4vw, 4.65rem);
    line-height: 1.02;
    margin-bottom: 1.35rem;
    color: #fff;
}

.hero-highlight {
    font-style: italic;
    color: #007c99;
}

.hero-text .subtitle {
    font-size: 1.08rem;
    color: #aab0c0;
    line-height: 1.55;
    max-width: 650px;
    margin: 0 0 1.75rem;
}

.hero-ctas {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-note {
    max-width: 600px;
    margin: 18px 0 0;
    color: #858595;
    font-size: 0.95rem;
}

.hero .btn-primary {
    background-color: #fff;
    color: #050508;
    box-shadow: none;
}

.hero .btn-primary:hover {
    background-color: #f3f4f6;
    color: #050508;
}

.hero .btn-text {
    min-height: 54px;
    padding: 14px 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    background: rgba(0, 0, 0, 0.18);
}

.hero .btn-text:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.04);
}

.hero-portrait {
    position: relative;
    display: flex;
    justify-content: center;
    align-self: end;
    min-height: 600px;
    margin-right: 0;
}

.hero-portrait-frame {
    position: relative;
    width: min(42vw, 560px);
    min-height: 600px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.hero-portrait-frame::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 82%;
    height: 22%;
    transform: translateX(-50%);
    background: radial-gradient(ellipse, rgba(16, 185, 129, 0.16), transparent 68%);
    filter: blur(18px);
}

.hero-portrait-img {
    position: relative;
    z-index: 1;
    width: min(42vw, 560px);
    height: auto;
    max-height: 650px;
    object-fit: contain;
    object-position: bottom center;
    transform: translateY(19px);
    filter: drop-shadow(0 34px 56px rgba(0, 0, 0, 0.52));
}

/* --- Motion Diagram (3D Hub & Spoke) --- */
.diagram-section {
    background: var(--bg-primary);
}

.motion-diagram {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: #06080d;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 60px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 600px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.05);
    overflow: hidden;
    transform: scale(0.94);
    transform-origin: center;
    transition: box-shadow 0.6s ease;
}

.motion-diagram-wrapper.visible .motion-diagram {
    animation: diagramZoomImpact 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.motion-diagram-wrapper.visible .motion-diagram:hover {
    box-shadow: 0 40px 80px rgba(0,0,0,0.8), 0 0 60px rgba(59, 130, 246, 0.1), inset 0 1px 0 rgba(255,255,255,0.05);
}

.md-header {
    position: absolute;
    top: 30px;
    left: 40px; right: 40px;
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    letter-spacing: 0;
    color: rgba(255,255,255,0.4);
    z-index: 10;
}

.md-footer {
    position: absolute;
    bottom: 30px;
    left: 40px;
    font-size: 0.8rem;
    letter-spacing: 0;
    color: rgba(255,255,255,0.6);
    z-index: 10;
}

.md-label,
.md-footer,
.timeline-number,
.role-number {
    font-family: var(--font-mono);
}

/* Neural Network Background */
.md-neural-bg {
    position: absolute;
    top: 50%; left: 50%;
    width: 1000px; height: 600px;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    opacity: 0.8;
}

.neural-path {
    fill: none;
    stroke: rgba(59, 130, 246, 0.1);
    stroke-width: 1px;
    stroke-dasharray: 4 8;
    animation: neuralDash 30s linear infinite;
}

.neural-node {
    fill: rgba(59, 130, 246, 0.3);
    animation: pulseNeuralNode 4s infinite alternate;
}

@keyframes neuralDash {
    to { stroke-dashoffset: -200; }
}

@keyframes pulseNeuralNode {
    0% { r: 1.5; opacity: 0.2; }
    100% { r: 3; opacity: 0.8; box-shadow: 0 0 10px #3b82f6; }
}

/* Node Columns */
.md-col {
    display: flex;
    flex-direction: column;
    gap: 30px;
    z-index: 2;
    position: relative;
    padding: 0 10px;
}

.md-node {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 230px;
    min-height: 70px;
    font-size: 0.88rem;
    color: #fff;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    position: relative;
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    /* Start hidden for zoom-in animation */
    opacity: 0;
    transform: scale(0.75);
}
.md-node i { color: #fff; width: 20px; height: 20px; flex-shrink: 0; }

/* Zoom-in revealed state */
.motion-diagram-wrapper.visible .md-node {
    opacity: 1;
    transform: scale(1);
}

/* Staggered zoom-in — orbit nodes */
.motion-diagram-wrapper.visible .orbit-node:nth-child(2)  .md-node { transition-delay: 0.10s; }
.motion-diagram-wrapper.visible .orbit-node:nth-child(3)  .md-node { transition-delay: 0.20s; }
.motion-diagram-wrapper.visible .orbit-node:nth-child(4)  .md-node { transition-delay: 0.30s; }
.motion-diagram-wrapper.visible .orbit-node:nth-child(5)  .md-node { transition-delay: 0.40s; }
.motion-diagram-wrapper.visible .orbit-node:nth-child(6)  .md-node { transition-delay: 0.50s; }
.motion-diagram-wrapper.visible .orbit-node:nth-child(7)  .md-node { transition-delay: 0.60s; }
.motion-diagram-wrapper.visible .orbit-node:nth-child(8)  .md-node { transition-delay: 0.70s; }
.motion-diagram-wrapper.visible .orbit-node:nth-child(9)  .md-node { transition-delay: 0.80s; }
.motion-diagram-wrapper.visible .orbit-node:nth-child(10) .md-node { transition-delay: 0.90s; }

/* Hover: glow */
.md-node:hover {
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.25), 0 10px 20px rgba(0,0,0,0.5);
    transform: scale(1.06);
}

/* =====================================================
   ORBIT DIAGRAM
   ===================================================== */
.orbit-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 720px;
    padding: 40px;
}

.orbit-system {
    position: relative;
    width: 660px;
    height: 660px;
    flex-shrink: 0;
}

/* Decorative track rings */
.orbit-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.orbit-track {
    fill: none;
    stroke: rgba(59, 130, 246, 0.1);
    stroke-width: 1;
    stroke-dasharray: 5 9;
    animation: neuralDash 40s linear infinite reverse;
}

.orbit-track-inner {
    fill: none;
    stroke: rgba(59, 130, 246, 0.05);
    stroke-width: 1;
    stroke-dasharray: 3 14;
}

/* Rotating ring container */
.orbit-ring {
    position: absolute;
    inset: 0;
    animation: orbit-cw 28s linear infinite;
}

/* Pause on hover for readability */
.orbit-ring:hover,
.orbit-ring:hover .orbit-counter {
    animation-play-state: paused;
}

@keyframes orbit-cw {
    to { transform: rotate(360deg); }
}

/* SVG spokes inside ring (rotate with it) */
.orbit-spokes-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.orbit-spokes-svg line {
    stroke: rgba(59, 130, 246, 0.2);
    stroke-width: 1;
    stroke-dasharray: 4 7;
    fill: none;
}

/* Node positioning: rotate(A) translateY(-R) rotate(-A) keeps element upright */
.orbit-node {
    position: absolute;
    top: 50%;
    left: 50%;
    --node-angle: calc(var(--i) * 40deg);
    transform:
        translate(-50%, -50%)
        rotate(var(--node-angle))
        translateY(-270px)
        rotate(calc(-1 * var(--node-angle)));
}

/* Counter-rotation: cancels the ring animation to keep text upright */
.orbit-counter {
    animation: orbit-ccw 28s linear infinite;
}

@keyframes orbit-ccw {
    to { transform: rotate(-360deg); }
}

/* Orbit md-node overrides: smaller, no transform conflict */
.orbit-layout .md-node {
    width: 150px;
    min-height: 60px;
    font-size: 0.8rem;
    padding: 10px 14px;
    gap: 6px;
    /* entrance animation via opacity only; transform handled by orbit-counter */
    opacity: 0;
    transform: scale(0.75);
    transition: opacity 0.5s ease, transform 0.5s ease,
                border-color 0.3s, box-shadow 0.3s;
}

.motion-diagram-wrapper.visible .orbit-layout .md-node {
    opacity: 1;
    transform: scale(1);
}

/* Fixed center */
.orbit-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
}

/* Responsive */
@media (max-width: 768px) {
    .orbit-layout { min-height: unset; padding: 16px 0; overflow: hidden; }
    .orbit-system {
        /* container = vw - 48px padding; nodes reach radius+half_node from center */
        /* radius 100px + half 38px = 138px; system half must be >= 142px → 284px min */
        width: min(calc(100vw - 64px), 310px);
        height: min(calc(100vw - 64px), 310px);
        max-width: unset;
    }
    .orbit-node {
        transform:
            translate(-50%, -50%)
            rotate(var(--node-angle))
            translateY(-100px)
            rotate(calc(-1 * var(--node-angle)));
    }
    .orbit-layout .md-node {
        width: 76px;
        min-height: 46px;
        font-size: 0.6rem;
        padding: 5px 7px;
        gap: 3px;
    }
    .orbit-layout .md-node svg,
    .orbit-layout .md-node [data-lucide] { width: 13px; height: 13px; }
    /* Center card — proportional to desktop (150px → 80px = 53%) */
    .orbit-layout .md-core {
        width: 80px;
        height: 80px;
        border-radius: 20px;
    }
    .orbit-layout .md-core svg { width: 30px; height: 30px; }
    .orbit-layout .md-core-label { font-size: 0.7rem; margin-top: 2px; }
}

.md-node:active {
    transform: scale(0.97);
}

/* Center Core - Brain Processing */
.md-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 3;
    position: relative;
}

.md-core {
    background: #111827; /* Darker blueish gray */
    width: 150px; height: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 30px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 0 40px rgba(59, 130, 246, 0.15), inset 0 0 30px rgba(59, 130, 246, 0.05);
    color: #fff;
    /* Zoom-in animation for the center core */
    opacity: 0;
    transform: scale(0.5) rotate(-10deg);
    transition: opacity 0.65s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.motion-diagram-wrapper.visible .md-core {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    transition-delay: 0.05s;
}

.core-text {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0;
    background: linear-gradient(to right, #fff, #93c5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.core-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
}

.md-core.process-glow {
    animation: processPulse 3s linear infinite;
}

@keyframes processPulse {
    0%, 40% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.15), inset 0 0 30px rgba(59, 130, 246, 0.05); border-color: rgba(59, 130, 246, 0.3); transform: scale(1); }
    50% { box-shadow: 0 0 80px rgba(59, 130, 246, 0.6), inset 0 0 50px rgba(59, 130, 246, 0.4); border-color: rgba(59, 130, 246, 1); transform: scale(1.02); } /* Data processing impact */
    60%, 100% { box-shadow: 0 0 40px rgba(59, 130, 246, 0.15), inset 0 0 30px rgba(59, 130, 246, 0.05); border-color: rgba(59, 130, 246, 0.3); transform: scale(1); }
}

/* SVG Connections */
.md-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}
.md-path {
    fill: none;
    stroke: rgba(59, 130, 246, 0.15);
    stroke-width: 2px;
}

.md-path.md-network {
    stroke: rgba(59, 130, 246, 0.1);
    stroke-dasharray: 8 12;
}

.md-path.active-path {
    stroke: rgba(59, 130, 246, 0.4);
}
.md-path-anim {
    fill: none;
    stroke: #3b82f6;
    stroke-width: 2px;
    stroke-dasharray: 20 200;
    animation: dashFlow 3s linear infinite;
    filter: drop-shadow(0 0 5px #3b82f6);
}

.md-path-anim.md-feed {
    stroke-dasharray: 28 180;
}

.md-path-anim.md-network-flow {
    stroke: rgba(16, 185, 129, 0.85);
    stroke-dasharray: 18 220;
    animation-duration: 4.5s;
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.55));
}

@keyframes dashFlow {
    from { stroke-dashoffset: 220; }
    to { stroke-dashoffset: 0; }
}

@keyframes diagramZoomImpact {
    0% { transform: scale(0.94); }
    55% { transform: scale(1.035); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .motion-diagram {
        flex-direction: column;
        gap: 40px;
        padding: 80px 20px 40px;
    }
    .md-col { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 20px; }
    .md-node { width: 140px; font-size: 0.85rem; }
    .md-svg { display: none; } /* Hide complex SVG paths on mobile stacked layout */
    .md-sphere { width: 300px; height: 300px; }
}

/* --- Layout Grids --- */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

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

/* --- Cards --- */
.card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

/* Glow sweep on hover to guide eyes */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(59, 130, 246, 0.06), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
    z-index: 0;
}

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

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

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.25);
    background: #1e1e2a;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.card-icon {
    color: var(--accent-primary);
    width: 32px;
    height: 32px;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Staggered Grid Effect */
.staggered-grid .card:nth-child(3n+2) {
    transform: translateY(20px);
}
.staggered-grid .card:nth-child(3n+3) {
    transform: translateY(40px);
}
.staggered-grid .card:hover {
    transform: translateY(-5px) scale(1.02);
}

/* Services Grid — grid limpo sem deslocamento vertical */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap, 24px);
}

/* stagger suave usando o sistema fade-in-up existente */
.services-grid .fade-in-up:nth-child(1) { --reveal-delay: 0ms; }
.services-grid .fade-in-up:nth-child(2) { --reveal-delay: 80ms; }
.services-grid .fade-in-up:nth-child(3) { --reveal-delay: 160ms; }
.services-grid .fade-in-up:nth-child(4) { --reveal-delay: 240ms; }
.services-grid .fade-in-up:nth-child(5) { --reveal-delay: 320ms; }
.services-grid .fade-in-up:nth-child(6) { --reveal-delay: 400ms; }
.services-grid .fade-in-up:nth-child(7) { --reveal-delay: 480ms; }
.services-grid .fade-in-up:nth-child(8) { --reveal-delay: 560ms; }
.services-grid .fade-in-up:nth-child(9) { --reveal-delay: 640ms; }

.services-grid .card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-primary);
}

@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* --- Problem Section --- */
.problem-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.problem-text .highlight {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    margin-top: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid #ef4444; /* Red accent for problem */
}

.problem-list ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.problem-list ul li i {
    color: #ef4444;
    flex-shrink: 0;
}

/* --- Process Flow (Solution) --- */
.process-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 4rem;
}

.process-flow .step {
    background: var(--bg-tertiary);
    padding: 12px 24px;
    border-radius: 30px;
    transition: background 0.35s ease, border-color 0.35s ease,
                box-shadow 0.35s ease, color 0.35s ease;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    font-weight: 500;
}

.process-flow .highlight-step,
.process-flow .step.flow-active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
    box-shadow: 0 0 20px var(--accent-glow), 0 0 48px rgba(91, 141, 239, 0.25);
}

.process-flow i {
    color: var(--text-secondary);
    transition: color 0.35s ease, filter 0.35s ease;
}

.process-flow i.flow-active {
    color: var(--accent-primary);
    filter: drop-shadow(0 0 5px var(--accent-primary));
}

/* steps que já foram "percorridos" ficam com borda sutil */
.process-flow .step.flow-visited {
    border-color: rgba(91, 141, 239, 0.35);
}

/* --- Examples Rows --- */
.examples-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 900px;
    margin: 0 auto;
}

.example-row {
    display: flex;
    align-items: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    gap: 24px;
    transition: var(--transition-fast);
}

.example-row:hover {
    border-color: var(--accent-primary);
    background: #1e1e2a;
}

.example-row .situation {
    flex: 1;
    color: var(--text-secondary);
}

.example-row i {
    color: var(--accent-primary);
}

.example-row .solution-text {
    flex: 1;
    color: #fff;
}

/* --- FAQ Accordion --- */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid var(--border-color);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    cursor: pointer;
}

.accordion-header h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

.accordion-header i {
    transition: transform var(--transition-fast);
    color: var(--text-secondary);
}

.accordion-header.active i {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-smooth);
}

.accordion-content p {
    padding-bottom: 24px;
    color: var(--text-secondary);
}

/* --- Method Timeline --- */
.timeline {
    max-width: 600px;
    margin: 4rem auto 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-number {
    width: 50px;
    height: 50px;
    background: var(--bg-tertiary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-primary);
    z-index: 1;
    flex-shrink: 0;
}

.timeline-content {
    text-align: left;
    padding-top: 10px;
}

.timeline-content h3 {
    margin-bottom: 8px;
    color: #fff;
}

.timeline-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Audience Checklists --- */
.check-list li, .check-list-light li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.check-list i { color: var(--accent-primary); }
.check-list-light i { color: #10b981; } /* Emerald Green */

.warning-box {
    display: flex;
    gap: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 20px;
    border-radius: var(--border-radius);
    align-items: center;
}

.warning-box i { color: #ef4444; flex-shrink: 0; }

/* --- Diagnostic Form --- */
.glass-form {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: var(--border-radius-lg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: #8b8ba0;
    font-size: 0.82rem;
}

.form-group input, .form-group select {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 14px 16px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.form-trust {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 18px;
    color: var(--text-secondary);
    font-size: 0.86rem;
}

.form-feedback {
    min-height: 20px;
    margin-top: 12px;
    color: #fca5a5;
    font-size: 0.86rem;
}

.form-trust i {
    width: 16px;
    height: 16px;
    color: var(--accent-secondary);
    flex-shrink: 0;
}

/* --- Diagnostic Deliverables --- */
.diagnostic-deliverables {
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.deliverables-header {
    max-width: 820px;
    margin: 0 auto 48px;
    text-align: center;
}

.deliverables-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.deliverable-item {
    padding: 30px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #14141a;
}

.deliverable-item i {
    width: 30px;
    height: 30px;
    color: var(--accent-secondary);
    margin-bottom: 18px;
}

.deliverable-item h3 {
    margin-bottom: 12px;
}

.deliverable-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.diagnostic-mini-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 32px;
    padding: 18px 20px;
    border: 1px solid rgba(16, 185, 129, 0.24);
    border-radius: 8px;
    background: rgba(16, 185, 129, 0.08);
    color: #fff;
}

/* --- Footer --- */
.footer {
    background: #050508;
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

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

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    max-width: 300px;
}

.footer-links h3, .footer-contact h3 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.footer-links a {
    display: block;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

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

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a:hover {
    color: var(--accent-primary);
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: #fff;
    height: 54px;
    border-radius: 27px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 0 16px;
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.45);
    z-index: 1000;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.whatsapp-float i {
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.whatsapp-label {
    font-size: 0.9rem;
    font-weight: 600;
}

.whatsapp-float:hover {
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.6);
    transform: translateY(-2px);
}



/* --- Ticker / Marquee --- */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--accent-primary);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: relative;
    z-index: 10;
}
.ticker {
    display: flex;
    white-space: nowrap;
    animation: ticker 25s linear infinite;
}
.ticker-item {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    letter-spacing: 0;
}
.ticker-separator {
    color: rgba(255,255,255,0.5);
    margin: 0 30px;
}
@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* --- Comparison Grid --- */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}
.comparison-card {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-lg);
    padding: 40px;
    border: 1px solid var(--border-color);
}
.comparison-card.bad {
    border-top: 4px solid #ef4444;
}
.comparison-card.good {
    border-top: 4px solid #10b981;
    background: linear-gradient(to bottom, rgba(16,185,129,0.05) 0%, var(--bg-tertiary) 100%);
    box-shadow: 0 10px 30px rgba(16,185,129,0.1);
    transform: scale(1.05);
}
.comp-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}
.comp-header h3 {
    font-size: 1.5rem;
    margin: 0;
}
.comparison-card.bad .comp-header i { color: #ef4444; width: 32px; height: 32px; }
.comparison-card.good .comp-header i { color: #10b981; width: 32px; height: 32px; }
.comparison-card ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 1.05rem;
}
.comparison-card.bad ul li i { color: #ef4444; flex-shrink: 0; }
.comparison-card.good ul li i { color: #10b981; flex-shrink: 0; }
.comparison-card.good ul li { color: #fff; }

/* --- Role Cards (For Whom) --- */
.role-card {
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}
.role-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
}
.role-number {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255,255,255,0.03);
    position: absolute;
    top: -10px;
    right: 10px;
    line-height: 1;
}
.role-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #fff;
    position: relative;
    z-index: 1;
}
.role-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

/* --- Warning Box Large --- */
.warning-box-large {
    display: flex;
    gap: 20px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    padding: 30px;
    border-radius: var(--border-radius-lg);
    align-items: flex-start;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.warning-icon {
    background: rgba(239, 68, 68, 0.2);
    padding: 15px;
    border-radius: 50%;
}
.warning-icon i { color: #ef4444; width: 28px; height: 28px; }
.warning-text h3 {
    color: #ef4444;
    margin-bottom: 10px;
}
.warning-text p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}


/* --- Animations (Scroll Reveal) --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(36px) scale(0.985);
    filter: blur(6px);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

.reading-sequence > .fade-in-up {
    will-change: opacity, transform, filter;
}

.reading-sequence > .fade-in-up.visible {
    will-change: auto;
}

.delay-1 { --reveal-delay: 150ms; }
.delay-2 { --reveal-delay: 300ms; }
.delay-3 { --reveal-delay: 450ms; }
.delay-4 { --reveal-delay: 600ms; }

/* --- Section glow separators (eye guide) --- */
.section-padding {
    position: relative;
}

/* Subtle top border glow on sections */
.authority::before,
.solution::before,
.services::before,
.examples::before,
.method::before,
.differentials::before,
.audience::before,
.diagnostic-deliverables::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(600px, 80%);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.35), transparent);
    pointer-events: none;
}

/* Glow on the CTA / diagnostic section */
.diagnostic {
    position: relative;
    overflow: hidden;
}

.diagnostic::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.diagnostic .container {
    position: relative;
    z-index: 1;
}

/* Enhanced deliverable items */
.deliverable-item {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.deliverable-item:hover {
    transform: translateY(-4px) scale(1.02);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 0 1px rgba(16, 185, 129, 0.12);
}

/* Eye-guide pulse on the primary CTA section */
@keyframes ctaGlowPulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3); }
    50% { box-shadow: 0 4px 40px rgba(59, 130, 246, 0.6), 0 0 80px rgba(59, 130, 246, 0.2); }
}

.btn-primary-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    animation: ctaGlowPulse 3s ease-in-out infinite;
}

.btn-primary-full:hover {
    animation: none;
    background-color: var(--accent-hover);
    box-shadow: 0 8px 35px rgba(59, 130, 246, 0.55);
    transform: translateY(-2px);
}

/* Timeline glow on visible */
.timeline-number {
    transition: box-shadow 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.timeline-item.visible .timeline-number {
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

/* Process step highlight glow handled by JS flow animation */

/* Example rows eye-guide border animation */
.example-row {
    position: relative;
    overflow: hidden;
}

.example-row::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.example-row:hover::after {
    opacity: 1;
}

/* Comparison cards glow on hover */
.comparison-card.good {
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.comparison-card.good:hover {
    box-shadow: 0 10px 40px rgba(16, 185, 129, 0.2), 0 0 0 1px rgba(16, 185, 129, 0.25);
    transform: scale(1.06) translateY(-3px);
}

.comparison-card.bad:hover {
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.1);
}

/* Role cards glow */
.role-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.role-card:hover::after {
    transform: scaleX(1);
}

/* Form input glow on focus */
.form-group input:focus, .form-group select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2), 0 0 20px rgba(59, 130, 246, 0.1);
}

/* Success feedback color */
.form-feedback.success {
    color: #6ee7b7;
}

.form-feedback.error {
    color: #fca5a5;
}

/* --- Responsive Media Queries --- */
.desktop-hide { display: none; }

@media (max-width: 992px) {
    .hero-content, .problem-content, .grid-2-cols, .comparison-grid {
        grid-template-columns: 1fr;
    }
    .hero-split {
        grid-template-columns: 1fr minmax(0, 42%);
        gap: 16px;
        align-items: center;
    }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .deliverables-grid { grid-template-columns: 1fr; }
    .staggered-grid .card { transform: none !important; }

    .hero-split .hero-text { text-align: left; }
    .hero-ctas { justify-content: flex-start; }
    .hero-portrait {
        align-self: stretch;
        min-height: unset;
        margin-right: 0;
    }
    .hero-portrait-frame {
        width: 100%;
        min-height: unset;
        height: 100%;
    }
    .hero-portrait-img {
        width: 100%;
        max-height: unset;
        height: 100%;
        object-fit: cover;
        object-position: top center;
    }
    
    .example-row { flex-direction: column; text-align: center; gap: 12px; }
    .mobile-hide { display: none; }
    .desktop-hide { display: block; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
    .hero-text .eyebrow { font-size: 0.55rem; letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .hero-text h1 { font-size: 1.45rem; line-height: 1.2; }
    .hero-text .subtitle { font-size: 0.78rem; line-height: 1.45; }
    .hero-note { display: none; }
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .hero-ctas, .final-cta .hero-ctas { flex-direction: column; gap: 8px; }
    .hero-ctas .btn-primary, .hero-ctas .btn-text { min-height: 44px; padding: 10px 16px; font-size: 0.85rem; }
    .hero { min-height: auto; padding: 90px 0 0; }
    .hero-text { padding-top: 0; }
    /* Process flow: vertical stack on mobile */
    .process-flow { flex-direction: column; align-items: center; gap: 4px; margin-top: 2rem; }
    .process-flow .step { width: 100%; max-width: 260px; text-align: center; }
    .process-flow i[data-lucide="arrow-right"] { transform: rotate(90deg); }
    .hero-portrait { min-height: unset; }
    .hero-portrait-frame { min-height: unset; width: 100%; }
    .hero-portrait-img { width: 100%; max-height: unset; }
    .diagnostic-mini-cta { flex-direction: column; align-items: stretch; text-align: center; }
    .nav-links { display: none; } /* Simplified for mobile, could add hamburger */
    .timeline::before { left: 20px; }
    .timeline-number { width: 40px; height: 40px; font-size: 1rem; }
}

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

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .motion-diagram-wrapper.visible .motion-diagram {
        animation: none;
        transform: scale(1);
    }
}

/* =====================================================
   SCROLL PROGRESS BAR
   ===================================================== */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #10b981, #3b82f6);
    background-size: 200% 100%;
    animation: progressShimmer 3s linear infinite;
    z-index: 9999;
    transition: width 0.1s ease-out;
    pointer-events: none;
}

@keyframes progressShimmer {
    0%   { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* =====================================================
   CUSTOM CURSOR
   ===================================================== */
@media (pointer: fine) {
    body { cursor: none; }
    a, button, .accordion-header, .md-node, .card, .role-card, select, input {
        cursor: none;
    }
}

#cursor-dot {
    position: fixed;
    top: 0; left: 0;
    width: 8px; height: 8px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: transform 0.06s ease, background 0.2s ease, width 0.2s ease, height 0.2s ease;
    will-change: transform;
}

#cursor-ring {
    position: fixed;
    top: 0; left: 0;
    width: 36px; height: 36px;
    border: 1.5px solid rgba(59, 130, 246, 0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9997;
    transform: translate(-50%, -50%);
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                width 0.25s ease, height 0.25s ease,
                border-color 0.25s ease, opacity 0.25s ease;
    will-change: transform;
}

/* Cursor states */
body.cursor-hovering #cursor-dot {
    width: 6px; height: 6px;
    background: #3b82f6;
}
body.cursor-hovering #cursor-ring {
    width: 52px; height: 52px;
    border-color: rgba(59, 130, 246, 0.9);
    background: rgba(59, 130, 246, 0.05);
}

body.cursor-clicking #cursor-dot {
    width: 5px; height: 5px;
    background: #10b981;
}
body.cursor-clicking #cursor-ring {
    width: 28px; height: 28px;
    border-color: rgba(16, 185, 129, 0.9);
}

/* =====================================================
   SOUND TOGGLE BUTTON
   ===================================================== */
#sound-toggle {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(20, 20, 30, 0.85);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(12px);
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: none;
    transition: all 0.3s ease;
    font-size: 17px;
}

#sound-toggle:hover {
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
    box-shadow: 0 0 16px rgba(59, 130, 246, 0.25);
}

#sound-toggle.sound-on {
    border-color: rgba(16, 185, 129, 0.5);
    color: #10b981;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.2);
}

/* =====================================================
   MAGNETIC BUTTON WRAPPER
   ===================================================== */
.magnetic-wrap {
    display: inline-block;
    position: relative;
}

/* =====================================================
   PARALLAX DIAGRAM
   ===================================================== */
.motion-diagram {
    will-change: transform;
}

/* =====================================================
   NODE HOVER GLOW RIPPLE
   ===================================================== */
.md-node-ripple {
    position: absolute;
    inset: -4px;
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0);
    pointer-events: none;
    animation: nodeRipple 0.6s ease-out forwards;
}

@keyframes nodeRipple {
    0%   { inset: -2px; border-color: rgba(59, 130, 246, 0.7); opacity: 1; }
    100% { inset: -14px; border-color: rgba(59, 130, 246, 0); opacity: 0; }
}

/* =====================================================
   RESPONSIVE — disable custom cursor on touch devices
   ===================================================== */
@media (pointer: coarse) {
    #cursor-dot, #cursor-ring { display: none; }
    #sound-toggle { cursor: pointer; }
}

/* =====================================================
   STANDALONE ANIMATION DEMOS (RAG Flow / Sistema Interno)
   ===================================================== */

/* MOBILE FIRST — ocupa toda a largura disponível */
.standalone-demo {
    width: 100%;
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
}

.standalone-iframe {
    display: block;
    width: 100%;
    height: 340px;          /* altura fixa confortável no mobile */
    border: 0;
    border-radius: 12px;
    background: #faf9f5;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.05);
}

/* TABLET ≥ 640px — mais espaço, ratio proporcional */
@media (min-width: 640px) {
    .standalone-iframe {
        height: auto;
        aspect-ratio: 4 / 3;
        border-radius: 16px;
    }
}

/* DESKTOP ≥ 1024px — full-bleed + máxima largura */
@media (min-width: 1024px) {
    .standalone-demo {
        position: relative;
        left: 50%;
        margin-left: -50vw;
        width: 100vw;
        margin-top: 2.5rem;
        margin-bottom: 2.5rem;
    }
    .standalone-iframe {
        width: calc(100vw - 64px);
        max-width: 1600px;
        aspect-ratio: 16 / 10;
        border-radius: 20px;
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.05);
    }
}

/* Divisor estético entre as animações */
.standalone-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    margin: 3rem auto;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 20%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0.06) 80%,
        transparent 100%);
    position: relative;
}

.standalone-divider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-primary, #5b8def);
    box-shadow: 0 0 16px var(--accent-primary, #5b8def),
                0 0 0 4px rgba(0, 0, 0, 0.6);
    position: relative;
}

.standalone-divider-dot::before,
.standalone-divider-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 32px;
    height: 1px;
    background: linear-gradient(90deg, var(--accent-primary, #5b8def), transparent);
    transform: translateY(-50%);
}

.standalone-divider-dot::before {
    right: 100%;
    margin-right: 8px;
    background: linear-gradient(90deg, transparent, var(--accent-primary, #5b8def));
}

.standalone-divider-dot::after {
    left: 100%;
    margin-left: 8px;
}

@media (max-width: 768px) {
    .standalone-divider {
        margin: 2rem auto;
    }
}
