/* ============================================
   BRIGHTSHIFT - NIGHT TO SUNRISE SCROLL
   ============================================ */

:root {
    /* Night palette (start) */
    --bg: #06060b;
    --bg-elevated: #0c0c14;
    --bg-card: #0f0f1a;
    --surface: #14142a;
    --border: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(0, 240, 255, 0.15);
    --text: #e8e8f0;
    --text-muted: #8888a0;
    --text-dim: #55556a;

    /* Dynamic accent (set by JS) */
    --accent: #00f0ff;
    --accent-secondary: #7b61ff;
    --gradient: linear-gradient(135deg, var(--accent), var(--accent-secondary));
    --gradient-subtle: linear-gradient(135deg, rgba(0,240,255,0.1), rgba(123,97,255,0.1));

    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --max-width: 1200px;

    --scroll-progress: 0;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* ============================================
   SKY SYSTEM - Night to Sunrise
   ============================================ */
#sky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

#starfield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    transition: opacity 0.1s;
}

#sky-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.1s;
}

/* Sun */
#sun {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: -400px;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    transition: bottom 0.1s;
}

.sun-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, #fff8e1, #ffb300, #ff6f00);
    border-radius: 50%;
    box-shadow: 0 0 60px 20px rgba(255, 179, 0, 0.4),
                0 0 120px 60px rgba(255, 111, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s;
}

.sun-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 179, 0, 0.15), transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s;
}

.sun-rays {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: conic-gradient(from 0deg,
        transparent 0deg, rgba(255, 200, 50, 0.06) 10deg, transparent 20deg,
        transparent 30deg, rgba(255, 200, 50, 0.04) 40deg, transparent 50deg,
        transparent 60deg, rgba(255, 200, 50, 0.06) 70deg, transparent 80deg,
        transparent 90deg, rgba(255, 200, 50, 0.04) 100deg, transparent 110deg,
        transparent 120deg, rgba(255, 200, 50, 0.06) 130deg, transparent 140deg,
        transparent 150deg, rgba(255, 200, 50, 0.04) 160deg, transparent 170deg,
        transparent 180deg, rgba(255, 200, 50, 0.06) 190deg, transparent 200deg,
        transparent 210deg, rgba(255, 200, 50, 0.04) 220deg, transparent 230deg,
        transparent 240deg, rgba(255, 200, 50, 0.06) 250deg, transparent 260deg,
        transparent 270deg, rgba(255, 200, 50, 0.04) 280deg, transparent 290deg,
        transparent 300deg, rgba(255, 200, 50, 0.06) 310deg, transparent 320deg,
        transparent 330deg, rgba(255, 200, 50, 0.04) 340deg, transparent 360deg
    );
    border-radius: 50%;
    opacity: 0;
    animation: rotate-rays 30s linear infinite;
}

@keyframes rotate-rays {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

#horizon {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    z-index: 4;
    transition: background 0.3s;
}

/* Scroll-driven sky elements */
.sky-element {
    position: absolute;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

.shooting-star {
    width: 3px;
    height: 3px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 8px 3px rgba(255, 255, 255, 0.8);
}

.shooting-star::after {
    content: '';
    position: absolute;
    top: 0;
    left: 100%;
    width: 80px;
    height: 1.5px;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8), transparent);
    transform: rotate(180deg);
    transform-origin: left center;
}

.satellite {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(255, 255, 255, 0.4);
}

.bird {
    color: rgba(255, 255, 255, 0.5);
}

.bird .wing-l {
    transform-origin: 12px 10px;
    animation: flap-left 0.8s ease-in-out infinite;
}

.bird .wing-r {
    transform-origin: 12px 10px;
    animation: flap-right 0.8s ease-in-out infinite;
}

.bird-2 .wing-l, .bird-2 .wing-r { animation-duration: 0.7s; }
.bird-3 .wing-l, .bird-3 .wing-r { animation-duration: 0.9s; }

@keyframes flap-left {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(18deg); }
}

@keyframes flap-right {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-18deg); }
}

/* Grid canvas */
#grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.4;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon {
    color: var(--accent);
    font-size: 1.2rem;
    transition: color 0.3s;
}

.brand-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--text);
}

.brand-text .accent {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: color 0.3s;
}

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

.nav-cta {
    padding: 0.5rem 1.2rem !important;
    border: 1px solid var(--border-glow);
    border-radius: 6px;
    transition: all 0.3s !important;
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent);
    color: var(--accent) !important;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-muted);
    transition: 0.3s;
}

/* ============================================
   HERO - NIGHT / THE GRIND
   ============================================ */
.hero {
    position: relative;
    z-index: 2;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6rem 2rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    gap: 3rem;
}

.hero-content {
    flex: 1;
    max-width: 640px;
    opacity: 0;
    transform: translateY(20px);
    animation: hero-enter 1s ease-out 0.3s forwards;
}

.hero-visual {
    flex: 0 0 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: hero-enter 1s ease-out 0.6s forwards;
}

@keyframes hero-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge,
.night-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: rgba(255, 80, 80, 0.08);
    border: 1px solid rgba(255, 80, 80, 0.2);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #ff6b6b;
    margin-bottom: 2rem;
}

.night-badge .pulse-dot {
    background: #ff6b6b;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(255, 107, 107, 0); }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.hero-sub em {
    color: #ff6b6b;
    font-style: italic;
}

/* Scroll hint */
.scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    animation: bob 2s ease-in-out infinite;
}

.scroll-arrow {
    color: var(--accent);
    animation: bounce-down 1.5s ease-in-out infinite;
}

@keyframes bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(4px); }
}

@keyframes bounce-down {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(6px); opacity: 1; }
}

/* Hero visual - Orbits */

.orbit-system {
    position: relative;
    width: 300px;
    height: 300px;
}

.orbit {
    position: absolute;
    border: 1px solid var(--border);
    border-radius: 50%;
    animation: spin linear infinite;
}

.orbit-1 {
    width: 100%; height: 100%;
    top: 0; left: 0;
    animation-duration: 20s;
}

.orbit-2 {
    width: 70%; height: 70%;
    top: 15%; left: 15%;
    animation-duration: 15s;
    animation-direction: reverse;
    border-color: rgba(123, 97, 255, 0.15);
}

.orbit-3 {
    width: 40%; height: 40%;
    top: 30%; left: 30%;
    animation-duration: 10s;
    border-color: rgba(0, 240, 255, 0.15);
}

.orbit-dot {
    position: absolute;
    top: -4px; left: 50%;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--accent);
}

.orbit-2 .orbit-dot {
    background: var(--accent-secondary);
    box-shadow: 0 0 12px var(--accent-secondary);
}

.orbit-3 .orbit-dot {
    background: #4d7cff;
    box-shadow: 0 0 12px #4d7cff;
}

.orbit-core {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    animation: core-pulse 3s ease-in-out infinite;
}

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

@keyframes core-pulse {
    0%, 100% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* ============================================
   TRANSITION SECTION
   ============================================ */
.transition-section {
    position: relative;
    z-index: 2;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.transition-content {
    text-align: center;
    max-width: 700px;
}

.transition-text {
    font-size: clamp(1.5rem, 3.5vw, 2.8rem);
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: -0.02em;
    color: rgba(255, 255, 255, 0.9);
}

.fade-line {
    display: inline;
    transition: opacity 0.6s ease, filter 0.6s ease;
}

.fade-line.revealed {
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.2);
}

.fade-line em {
    font-style: normal;
    color: var(--accent);
}

/* ============================================
   COMMON - Buttons, sections, cards
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-primary {
    background: var(--gradient);
    color: #000;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 179, 0, 0.3);
}

.btn-ghost {
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

/* Section headers */
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    transition: color 0.3s;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Stats */
.stats-bar {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 3rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto 1.5rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    border-radius: 12px;
}

.stat { text-align: center; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    letter-spacing: 0.05em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* ============================================
   EXAMPLES CAROUSEL
   ============================================ */
.examples-wrapper {
    position: relative;
    z-index: 2;
    padding: 4rem 0;
    max-width: var(--max-width);
    margin: 0 auto 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 16px;
}

.examples-wrapper .section-header {
    padding: 0 2rem;
}

.examples-carousel {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    will-change: transform;
}

.example-slide {
    min-width: 100%;
    flex-shrink: 0;
    padding: 0 2rem;
}

.slide-title {
    text-align: center;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.slide-desc {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Carousel arrows */
.carousel-arrow {
    position: absolute;
    top: 55%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.carousel-prev { left: 1rem; }
.carousel-next {
    right: 1rem;
    animation: nudge-right 2s ease-in-out infinite;
}

@keyframes nudge-right {
    0%, 60%, 100% { transform: translateY(-50%) translateX(0); }
    70% { transform: translateY(-50%) translateX(5px); }
    80% { transform: translateY(-50%) translateX(0); }
    90% { transform: translateY(-50%) translateX(3px); }
}

.carousel-next:disabled {
    animation: none;
}

.carousel-arrow:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(10, 10, 20, 0.8);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.1);
}

.carousel-arrow:disabled {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 640px) {
    .carousel-arrow { display: none; }
}

/* Carousel dots */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 0 0;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.carousel-dot.active {
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 8px var(--accent);
}

.carousel-dot:hover {
    border-color: var(--accent);
}

.flow-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    min-height: 280px;
    padding: 2rem 0;
}

/* Data sources (left column) */
.flow-sources {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    z-index: 2;
    flex-shrink: 0;
}

.flow-source {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: rgba(10, 10, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    opacity: 0;
    transform: translateX(-20px);
    animation: source-appear 0.5s ease forwards;
}

.flow-source[data-delay="0"] { animation-delay: 0.2s; }
.flow-source[data-delay="1"] { animation-delay: 0.4s; }
.flow-source[data-delay="2"] { animation-delay: 0.6s; }
.flow-source[data-delay="3"] { animation-delay: 0.8s; }

@keyframes source-appear {
    to { opacity: 1; transform: translateX(0); }
}

.source-icon {
    color: var(--accent);
    opacity: 0.7;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.source-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* Flow canvas (connection particles) */
#flow-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* AI Hub (center) */
.flow-hub {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0 3rem;
    flex-shrink: 0;
}

.hub-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--accent);
}

.hub-ring-outer {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 12px));
    opacity: 0.15;
    animation: hub-pulse-outer 3s ease-in-out infinite;
}

.hub-ring-inner {
    width: 70px;
    height: 70px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 12px));
    opacity: 0.25;
    animation: hub-pulse-inner 3s ease-in-out infinite 0.5s;
}

@keyframes hub-pulse-outer {
    0%, 100% { opacity: 0.1; transform: translate(-50%, calc(-50% - 12px)) scale(1); }
    50% { opacity: 0.25; transform: translate(-50%, calc(-50% - 12px)) scale(1.1); }
}

@keyframes hub-pulse-inner {
    0%, 100% { opacity: 0.2; transform: translate(-50%, calc(-50% - 12px)) scale(1); }
    50% { opacity: 0.35; transform: translate(-50%, calc(-50% - 12px)) scale(1.08); }
}

.hub-core {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
}

.hub-label {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--accent);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 0.25rem;
}

/* Output report (right) */
.flow-output {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
    flex-shrink: 0;
}

.report-card {
    width: 180px;
    background: rgba(10, 10, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: report-glow 3s ease-in-out infinite;
}

@keyframes report-glow {
    0%, 100% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
    50% { box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 179, 0, 0.08); }
}

.report-header {
    display: flex;
    gap: 4px;
    padding: 0.5rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.report-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.report-body {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.report-title-bar {
    height: 8px;
    width: 60%;
    background: var(--accent);
    opacity: 0.4;
    border-radius: 4px;
}

.report-line {
    height: 4px;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.report-line.short {
    width: 65%;
}

.report-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 50px;
    padding: 4px 0;
}

.chart-bar {
    flex: 1;
    height: var(--h);
    background: var(--accent);
    opacity: 0.3;
    border-radius: 2px 2px 0 0;
    animation: bar-live 3s ease-in-out infinite;
}

.chart-bar:nth-child(1) { animation-delay: 0s; }
.chart-bar:nth-child(2) { animation-delay: 0.5s; }
.chart-bar:nth-child(3) { animation-delay: 1.0s; }
.chart-bar:nth-child(4) { animation-delay: 1.5s; }
.chart-bar:nth-child(5) { animation-delay: 2.0s; }

@keyframes bar-live {
    0%, 100% { height: var(--h); }
    50% { height: var(--h2, var(--h)); }
}

.output-label {
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.03em;
}

/* ---- Knowledge Base Demo ---- */
#kb-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.kb-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    min-height: 280px;
    padding: 2rem 0;
}

.kb-docs {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    z-index: 2;
    flex-shrink: 0;
}

.kb-doc {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    background: rgba(10, 10, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    color: var(--accent);
    opacity: 0;
    transform: translateX(-15px);
    animation: source-appear 0.4s ease forwards;
}

.kb-doc span {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.kb-doc[data-delay="0"] { animation-delay: 0.1s; }
.kb-doc[data-delay="1"] { animation-delay: 0.25s; }
.kb-doc[data-delay="2"] { animation-delay: 0.4s; }
.kb-doc[data-delay="3"] { animation-delay: 0.55s; }
.kb-doc[data-delay="4"] { animation-delay: 0.7s; }

/* Brain hub */
.kb-brain {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin: 0 2.5rem;
    flex-shrink: 0;
}

.brain-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid var(--accent);
}

.brain-ring-outer {
    width: 90px;
    height: 90px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 12px));
    opacity: 0.12;
    animation: hub-pulse-outer 3s ease-in-out infinite;
}

.brain-ring-inner {
    width: 65px;
    height: 65px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% - 12px));
    opacity: 0.2;
    animation: hub-pulse-inner 3s ease-in-out infinite 0.5s;
}

.brain-core {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 20, 0.8);
    border: 1px solid var(--accent);
    border-radius: 50%;
    color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.08);
}

.brain-label {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
    white-space: nowrap;
}

/* Chat output */
.kb-chat {
    z-index: 2;
    flex-shrink: 0;
}

.chat-window {
    width: 260px;
    background: rgba(10, 10, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 0.7rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-title {
    font-family: var(--mono);
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-left: 0.4rem;
}

.chat-body {
    padding: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 120px;
}

.chat-msg {
    max-width: 90%;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    font-size: 0.75rem;
    line-height: 1.5;
}

.chat-msg.user {
    align-self: flex-end;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-bottom-right-radius: 2px;
}

.chat-msg.ai {
    align-self: flex-start;
    background: rgba(var(--accent), 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border-bottom-left-radius: 2px;
}

.chat-answer-text {
    display: none;
}

.chat-typing {
    display: flex;
    gap: 3px;
    padding: 2px 0;
}

.chat-typing.hidden {
    display: none;
}

.chat-typing span {
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.4;
    animation: typing-dot 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot {
    0%, 60%, 100% { opacity: 0.2; transform: translateY(0); }
    30% { opacity: 0.8; transform: translateY(-3px); }
}

/* ---- Bespoke Web App Demo ---- */
.webapp-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
    min-height: 260px;
    padding: 1.5rem 0;
}

.webapp-reqs {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    z-index: 2;
    flex-shrink: 0;
}

.req-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
    background: rgba(10, 10, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-15px);
    animation: source-appear 0.4s ease forwards;
}

.req-card[data-delay="0"] { animation-delay: 0.1s; }
.req-card[data-delay="1"] { animation-delay: 0.25s; }
.req-card[data-delay="2"] { animation-delay: 0.4s; }
.req-card[data-delay="3"] { animation-delay: 0.55s; }

.req-check {
    color: var(--accent);
    font-size: 0.8rem;
}

.webapp-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    margin: 0 2rem;
    color: var(--accent);
    opacity: 0.5;
    flex-shrink: 0;
}

.webapp-arrow-label {
    font-family: var(--mono);
    font-size: 0.6rem;
    color: var(--accent);
    letter-spacing: 0.05em;
    opacity: 0.7;
}

/* App mockup */
.webapp-mockup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    z-index: 2;
    flex-shrink: 0;
}

.mockup-window {
    width: 300px;
    background: rgba(10, 10, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0.4rem 0.6rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-url {
    font-family: var(--mono);
    font-size: 0.55rem;
    color: var(--text-dim);
    margin-left: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}

.mockup-body {
    display: flex;
    min-height: 160px;
}

.mockup-sidebar {
    width: 36px;
    background: rgba(255, 255, 255, 0.02);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    padding: 0.5rem 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
}

.sidebar-item {
    width: 20px;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.sidebar-item.active {
    background: var(--accent);
    opacity: 0.5;
    box-shadow: 0 0 6px var(--accent);
}

.mockup-content {
    flex: 1;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mockup-title-bar {
    height: 6px;
    width: 45%;
    background: var(--accent);
    opacity: 0.35;
    border-radius: 3px;
}

.mockup-cards-row {
    display: flex;
    gap: 0.4rem;
}

.mockup-mini-card {
    flex: 1;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    text-align: center;
}

.mini-card-num {
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    opacity: 0.7;
}

.mini-card-label {
    height: 3px;
    width: 70%;
    margin: 0.2rem auto 0;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.mockup-table {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.table-row {
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
}

.table-row.header {
    background: rgba(255, 255, 255, 0.1);
    height: 5px;
}

/* Build animation parts */
.build-part {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.build-part.built {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Notification element */
.mockup-notification {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.5rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 5px;
    position: relative;
}

.notif-icon {
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.6;
}

.notif-lines {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notif-line {
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
}

.notif-line.short { width: 60%; }

.notif-badge {
    font-family: var(--mono);
    font-size: 0.55rem;
    font-weight: 700;
    color: #fff;
    background: #ff6b6b;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* Req card glow when its part builds */
.req-card.active-build {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.1);
}

.req-card.active-build .req-check {
    text-shadow: 0 0 8px var(--accent);
}

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

/* Flow, KB & Webapp demo responsive */
@media (max-width: 750px) {
    .flow-demo, .kb-demo, .webapp-demo {
        flex-direction: column;
        gap: 2rem;
        min-height: auto;
    }
    .flow-sources, .kb-docs, .webapp-reqs {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    .flow-hub, .kb-brain, .webapp-arrow { margin: 0; }
    #flow-canvas, #kb-canvas { display: none; }
    .chat-window { width: 100%; max-width: 280px; }
    .mockup-window { width: 100%; max-width: 280px; }
}

/* Services */
.services {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 16px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.service-card {
    background: rgba(10, 10, 20, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient);
    opacity: 0;
    transition: opacity 0.4s;
}

.service-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(255, 179, 0, 0.03);
}

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

.service-icon {
    color: var(--accent);
    margin-bottom: 1.5rem;
    opacity: 0.8;
    transition: color 0.3s;
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--accent-secondary);
    padding: 0.3rem 0.6rem;
    background: rgba(123, 97, 255, 0.1);
    border-radius: 4px;
    letter-spacing: 0.05em;
    transition: color 0.3s, background 0.3s;
}

/* Process */
.process {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 16px;
}

.process-step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    padding-bottom: 2rem;
    position: relative;
}

.step-number {
    font-family: var(--mono);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex-shrink: 0;
    width: 60px;
}

.step-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.step-line {
    position: absolute;
    left: 30px;
    top: 3rem;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--border-glow), transparent);
}

/* About */
.about {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem;
    max-width: var(--max-width);
    margin: 0 auto 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 16px;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.about-text p {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.tech-tag {
    font-family: var(--mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    transition: all 0.3s;
}

.tech-tag:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(255, 179, 0, 0.1);
}

/* Terminal */
.terminal {
    background: rgba(8, 8, 16, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}

.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
    margin-left: 0.5rem;
    font-family: var(--mono);
    font-size: 0.75rem;
    color: var(--text-dim);
}

.terminal-body {
    padding: 1.2rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    min-height: 200px;
}

.terminal-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.t-prompt { color: var(--accent); }
.t-command { color: var(--text); }
.t-cursor { color: var(--accent); animation: blink 1s step-end infinite; }

@keyframes blink { 50% { opacity: 0; } }

.terminal-output { margin-top: 0.5rem; color: var(--text-muted); line-height: 1.8; }
.terminal-output .t-success { color: #28c840; }
.terminal-output .t-info { color: var(--accent); }
.terminal-output .t-purple { color: var(--accent-secondary); }

/* Contact */
.contact {
    position: relative;
    z-index: 2;
    padding: 4rem 2rem;
    text-align: center;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 16px;
}

.contact-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.contact h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.contact-content > p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem 2.5rem;
    background: rgba(10, 10, 20, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 200px;
}

.contact-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.contact-icon { color: var(--accent); transition: color 0.3s; }

.contact-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.contact-value {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

/* Footer */
.footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding: 2rem;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */
.service-card,
.process-step,
.about-text,
.about-visual,
.stat,
.contact-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card.visible,
.process-step.visible,
.about-text.visible,
.about-visual.visible,
.stat.visible,
.contact-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.3s; }
.service-card:nth-child(5) { transition-delay: 0.4s; }
.service-card:nth-child(6) { transition-delay: 0.5s; }

.process-step:nth-child(2) { transition-delay: 0.15s; }
.process-step:nth-child(3) { transition-delay: 0.3s; }
.process-step:nth-child(4) { transition-delay: 0.45s; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 7rem;
    }
    .hero-sub { margin: 0 auto 2.5rem; }
    .hero-actions, .scroll-hint { justify-content: center; }
    .hero-visual { flex: none; }
    .services-grid { grid-template-columns: 1fr; }
    .about-grid { grid-template-columns: 1fr; gap: 3rem; }
    .stats-bar { gap: 2rem; flex-wrap: wrap; }
}

@media (max-width: 640px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 1rem 2rem;
        background: rgba(6, 6, 11, 0.95);
        backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        gap: 1rem;
    }
    .nav-links.active { display: flex; }
    .mobile-toggle { display: flex; }
    .services-grid { grid-template-columns: 1fr; }
    .contact-methods { flex-direction: column; align-items: center; }
    .hero h1 { font-size: 2rem; }
    .stat-number { font-size: 2rem; }
    .process-step { flex-direction: column; gap: 0.75rem; }
    .step-line { display: none; }
    .stats-bar { flex-direction: column; gap: 1.5rem; }
    .stat-divider { width: 40px; height: 1px; }
    .orbit-system { width: 200px; height: 200px; }
    .example-slide { padding: 0 1rem; }
    .slide-title { font-size: 1.2rem; }
    .slide-desc { font-size: 0.85rem; }
    .carousel-track { overflow: visible; }
    .report-card { width: 150px; }
    .transition-section { min-height: 40vh; }
    .transition-text { font-size: 1.3rem; }
}

/* Selection & Scrollbar */
::selection { background: rgba(255, 179, 0, 0.2); color: var(--text); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--surface); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }
