/* ========================================
   NanoCell - MOSIP-Inspired Design
   Smooth Animations & Timeline
======================================== */

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

:root {
    --primary: #0a0a0f;
    --secondary: #141419;
    --accent: #3b82f6;
    --accent-light: #60a5fa;
    --accent-dark: #1d4ed8;
    --purple: #8b5cf6;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: #27272a;
    --surface: #18181b;
    --surface-elevated: #1f1f23;
    --gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --glow: 0 0 40px rgba(59, 130, 246, 0.3);
    /* Additional variables for demo compatibility */
    --success: #22c55e;
    --warning: #f59e0b;
    --error: #ef4444;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ========== NAVBAR ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-icon-wrapper {
    position: relative;
    width: 40px;
    height: 40px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--accent);
    transition: transform 0.5s ease;
}

.logo:hover .logo-icon {
    transform: rotate(180deg);
}

/* Orbiting dots - positioned on the outer ring */
.orbit-dot {
    position: absolute;
    width: 5.5px;
    height: 5.5px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.9;
    transition: none;
    transform-origin: center;
    top: 50%;
    left: 50%;
    margin-left: -2.75px;
    margin-top: -2.75px;
}

/* Top dot - on outer ring, animate on hover */
.orbit-dot.dot-1 {
    margin-top: -22.75px;
}

/* Right side dot - on outer ring, animate on hover */
.orbit-dot.dot-2 {
    margin-left: 17.25px;
}

/* Bottom dot - on outer ring, animate on hover */
.orbit-dot.dot-3 {
    margin-top: 17.25px;
}

/* Animate only on hover */
.logo:hover .orbit-dot.dot-1 {
    animation: orbit1 2s linear infinite;
}

.logo:hover .orbit-dot.dot-2 {
    animation: orbit2 2s linear infinite;
}

.logo:hover .orbit-dot.dot-3 {
    animation: orbit3 2s linear infinite;
}

@keyframes orbit1 {
    0% {
        transform: rotate(-90deg) translateX(20px);
    }

    100% {
        transform: rotate(270deg) translateX(20px);
    }
}

@keyframes orbit2 {
    0% {
        transform: rotate(0deg) translateX(20px);
    }

    100% {
        transform: rotate(360deg) translateX(20px);
    }
}

@keyframes orbit3 {
    0% {
        transform: rotate(90deg) translateX(20px);
    }

    100% {
        transform: rotate(450deg) translateX(20px);
    }
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient);
    transition: width 0.3s ease;
}

.nav-menu a:not(.nav-cta):hover {
    color: var(--text-primary);
}

.nav-menu a:not(.nav-cta):hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--gradient);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

/* ========== HERO ========== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 120px 0 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.4) 0%, transparent 70%);
    top: -20%;
    right: -10%;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    bottom: 10%;
    left: -5%;
    animation-delay: -7s;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    top: 40%;
    left: 30%;
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--accent-light);
    margin-bottom: 2rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero-title .line {
    display: block;
}

.typewriter {
    display: inline-block;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    min-width: 8ch;
    text-align: left;
}

.typewriter::after {
    content: '|';
    position: relative;
    margin-left: 2px;
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
    animation: blink 1s step-end infinite;
    font-weight: 300;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-subtitle strong {
    color: var(--text-primary);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-3px);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

.scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid var(--text-muted);
    border-radius: 13px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s ease-in-out infinite;
}

@keyframes scroll {

    0%,
    100% {
        top: 8px;
        opacity: 1;
    }

    50% {
        top: 20px;
        opacity: 0.3;
    }
}

/* ========== STATS BANNER ========== */
.stats-banner {
    background: var(--gradient);
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.stats-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-number .suffix {
    font-size: 2rem;
    opacity: 0.9;
}

.stat-label {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* ========== SECTIONS ========== */
.section-tag {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-light);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ========== ABOUT SECTION ========== */
.about-section {
    padding: 8rem 0;
    background: var(--primary);
}

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

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-content strong {
    color: var(--text-primary);
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    transition: gap 0.3s ease;
}

.link-arrow svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.link-arrow:hover {
    gap: 0.75rem;
}

.link-arrow:hover svg {
    transform: translateX(4px);
}

.about-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateX(10px);
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.card-icon {
    font-size: 2rem;
    line-height: 1;
}

.feature-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ========== PRINCIPLES SECTION ========== */
.principles-section {
    padding: 6rem 0;
    background: var(--secondary);
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
}

.principle-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem 1rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.principle-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.principle-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem;
    color: var(--accent);
}

.principle-icon svg {
    width: 100%;
    height: 100%;
}

.principle-card span {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

/* ========== TECHNOLOGY SECTION ========== */
.tech-section {
    padding: 8rem 0;
    background: var(--primary);
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.tech-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tech-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.tech-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--glow);
    border-color: var(--accent);
}

.tech-card:hover::before {
    transform: scaleX(1);
}

.tech-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
}

.tech-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.tech-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.card-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: var(--accent-light);
}

/* ========== TIMELINE SECTION ========== */
.timeline-section {
    padding: 8rem 0;
    background: var(--secondary);
    overflow: hidden;
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border);
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-progress {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--gradient);
    border-radius: 2px;
    transition: height 2s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding-right: calc(50% + 40px);
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item.right {
    justify-content: flex-start;
    padding-right: 0;
    padding-left: calc(50% + 40px);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    z-index: 2;
}

.dot-inner {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: white;
    position: relative;
    z-index: 2;
    box-shadow: var(--glow);
}

.dot-pulse {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    opacity: 0;
    animation: dotPulse 2s ease-out infinite;
}

@keyframes dotPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.timeline-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    max-width: 400px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content:hover {
    transform: scale(1.02);
    border-color: var(--accent);
    box-shadow: var(--glow);
}

.timeline-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.timeline-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.timeline-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.timeline-meta span {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-light);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ========== CTA SECTION ========== */
.cta-section {
    padding: 6rem 0;
    background: var(--gradient);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.cta-content {
    text-align: center;
    position: relative;
}

.cta-content h2 {
    color: white;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-section .btn-primary {
    background: white;
    color: var(--accent-dark);
}

.cta-section .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* ========== FAQ SECTION ========== */
.faq-section {
    padding: 8rem 0;
    background: var(--primary);
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover,
.faq-item.active {
    border-color: var(--accent);
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    font-family: inherit;
}

.faq-icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}

.faq-icon span {
    position: absolute;
    background: var(--accent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.faq-icon span:first-child {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.faq-icon span:last-child {
    width: 2px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.faq-item.active .faq-icon span:last-child {
    transform: translateX(-50%) rotate(90deg);
    opacity: 0;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

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

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== ANIMATIONS ========== */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: 0.8s;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

[data-aos="fade-up"] {
    transform: translateY(40px);
}

[data-aos="fade-down"] {
    transform: translateY(-40px);
}

[data-aos="fade-right"] {
    transform: translateX(-40px);
}

[data-aos="fade-left"] {
    transform: translateX(40px);
}

[data-aos="zoom-in"] {
    transform: scale(0.9);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Staggered animation delays */
[data-aos-delay="100"] {
    transition-delay: 0.1s;
}

[data-aos-delay="200"] {
    transition-delay: 0.2s;
}

[data-aos-delay="300"] {
    transition-delay: 0.3s;
}

[data-aos-delay="400"] {
    transition-delay: 0.4s;
}

[data-aos-delay="500"] {
    transition-delay: 0.5s;
}

[data-aos-delay="600"] {
    transition-delay: 0.6s;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .principles-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline-item,
    .timeline-item.right {
        padding: 0 0 0 80px;
        justify-content: flex-start;
    }

    .timeline-line {
        left: 25px;
    }

    .timeline-dot {
        left: 25px;
    }

    .timeline-content {
        max-width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--surface);
        flex-direction: column;
        padding: 6rem 2rem 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease;
        border-left: 1px solid var(--border);
    }

    .nav-menu.active {
        right: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .principles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .tech-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ========== DEMO PAGE COMPATIBILITY ========== */
.demo-section {
    background: linear-gradient(180deg, var(--primary) 0%, var(--surface) 100%);
    border-radius: 24px;
    padding: 3rem;
    margin: 3rem 0;
    border: 1px solid var(--border);
}

.demo-title-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    background: var(--gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.content-article {
    padding: 8rem 0 4rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 2rem;
    text-decoration: none;
}

.back-link::before {
    content: '←';
}

/* ========== PAGE HERO (Demo/Subpages) ========== */
.page-hero {
    padding: 140px 0 60px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.page-label {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-light);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
}

/* ========== PAGE CONTENT (Demo/Subpages) ========== */
.page-content {
    padding: 4rem 0;
    background: var(--primary);
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.content-main {
    max-width: 900px;
    margin: 0 auto;
}

.content-article h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.content-article h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
}

.content-article p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-article ul,
.content-article ol {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.content-article li {
    margin-bottom: 0.5rem;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

/* Content Image/Visual */
.content-image {
    margin: 2rem 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
}

.placeholder-visual {
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 200px;
}

.electro-visual {
    background: linear-gradient(135deg, var(--surface) 0%, var(--primary) 100%);
    min-height: 180px;
}

.targeting-icon {
    font-size: 4rem;
    margin-bottom: 0.5rem;
}

.pulse-ring {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: pulseRing 2s ease-out infinite;
}

.pulse-ring.delay-1 {
    animation-delay: 0.5s;
}

.pulse-ring.delay-2 {
    animation-delay: 1s;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.5);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.center-dot {
    width: 20px;
    height: 20px;
    background: var(--gradient);
    border-radius: 50%;
    box-shadow: 0 0 30px var(--accent);
    z-index: 1;
}

.visual-label {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Info Box */
.info-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.info-box h4 {
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.info-box p {
    margin-bottom: 0.5rem;
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* Mode Cards */
.mode-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.mode-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.mode-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.mode-card h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.mode-card p {
    font-size: 0.9rem;
    margin: 0;
}

/* Process Steps */
.process-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.process-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.step-num {
    background: var(--gradient);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.9rem;
    margin: 0;
}

/* Nav Brand (alternate navbar structure) */
.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
}

.nav-brand .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
}

/* Demo button in nav */
.btn-nav {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.demo-btn-nav {
    background: var(--gradient) !important;
    color: white !important;
}

/* Footer for subpages */
.page-footer {
    background: var(--secondary);
    padding: 3rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
}

.page-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ========== SMOOTH ANIMATION FIX ========== */
/* Prevent FOUC (Flash of Unstyled Content) */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Fix for mobile animation jank */
@media (prefers-reduced-motion: reduce) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Timeline animation smoothness */
.timeline-progress {
    will-change: height;
}

.timeline-item {
    will-change: transform, opacity;
}

/* Counter animation fix */
.counter {
    display: inline-block;
    min-width: 2ch;
}

/* Typewriter cursor blink fix */
.typewriter {
    white-space: nowrap;
}

/* Navbar transition fix */
.navbar {
    will-change: background-color, padding;
}

/* Card hover animations - GPU accelerated */
.feature-card,
.principle-card,
.tech-card,
.timeline-content {
    will-change: transform;
    backface-visibility: hidden;
}

/* Fix orb animations for performance */
.gradient-orb {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Scroll hint mouse animation fix */
.scroll-hint {
    animation: fadeIn 1s ease-out 0.5s both;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* FAQ smooth expand */
.faq-answer {
    will-change: max-height;
}

/* ========== LOADING STATE ========== */
body.loading [data-aos] {
    opacity: 0 !important;
}