/* ===== CSS Custom Properties ===== */
:root {
    /* Color Palette - Dark (default) */
    --bg-base: #06060b;
    --bg-surface: #0c0c14;
    --bg-glass: rgba(15, 15, 25, 0.45);
    --border-glass: rgba(255, 255, 255, 0.06);
    --border-glass-hover: rgba(255, 255, 255, 0.14);

    --text-primary: #f0f0f5;
    --text-secondary: #8a8f9e;

    --accent-teal: #0ea5a5;
    --accent-warm: #c06040;

    --gradient-primary: linear-gradient(135deg, #0ea5a5, #14d4d4);
    --gradient-text: linear-gradient(90deg, #a0f0e8, #0ea5a5, #c06040, #e8a080);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.35);
    --glow: 0 0 60px rgba(14, 165, 165, 0.1);

    --transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);

    --bg-how-it-works: #08080e;
    --bg-use-cases: #070710;
    --bg-footer: #030308;
    --bg-trust: rgba(10, 10, 18, 0.6);
    --bg-input: rgba(255, 255, 255, 0.03);
    --bg-input-focus: rgba(255, 255, 255, 0.06);
    --bg-form-container: rgba(0, 0, 0, 0.25);
    --bg-step: rgba(255, 255, 255, 0.02);
    --bg-step-hover: rgba(255, 255, 255, 0.04);
    --bg-nav-scrolled: rgba(6, 6, 11, 0.85);
    --bg-nav-mobile: rgba(6, 6, 11, 0.98);
    --stat-bar-bg: #1a1a24;
    --chat-bubble-bg: #1a1a24;
    --portfolio-media-bg: #0e0e16;
    --select-option-bg: #0e0e16;
    --noise-opacity: 0.25;
    --orb-opacity: 0.4;
}

/* Light Theme */
[data-theme="light"] {
    --bg-base: #f7f7fa;
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --border-glass: rgba(0, 0, 0, 0.07);
    --border-glass-hover: rgba(0, 0, 0, 0.14);

    --text-primary: #1a1a2e;
    --text-secondary: #5a5f6d;

    --accent-teal: #0a8f8f;
    --accent-warm: #a04830;

    --gradient-text: linear-gradient(90deg, #087070, #0a8f8f, #a04830, #c07060);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 16px 48px rgba(0, 0, 0, 0.07);
    --glow: 0 0 60px rgba(14, 165, 165, 0.06);

    --bg-how-it-works: #eef0f4;
    --bg-use-cases: #e8eaef;
    --bg-footer: #1a1a2e;
    --bg-trust: rgba(240, 240, 248, 0.8);
    --bg-input: rgba(0, 0, 0, 0.03);
    --bg-input-focus: rgba(0, 0, 0, 0.05);
    --bg-form-container: rgba(0, 0, 0, 0.02);
    --bg-step: rgba(0, 0, 0, 0.02);
    --bg-step-hover: rgba(0, 0, 0, 0.04);
    --bg-nav-scrolled: rgba(247, 247, 250, 0.88);
    --bg-nav-mobile: rgba(247, 247, 250, 0.98);
    --stat-bar-bg: #dde;
    --chat-bubble-bg: #e8e8ee;
    --portfolio-media-bg: #e8eaef;
    --select-option-bg: #fff;
    --noise-opacity: 0.1;
    --orb-opacity: 0.18;
}

/* ===== Global Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle noise texture overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
    opacity: var(--noise-opacity);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.1;
    color: var(--text-primary);
    font-weight: 500;
    letter-spacing: -0.02em;
}

p { color: var(--text-secondary); }

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol { list-style: none; }

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 4vw, 2rem);
}

/* ===== Background Effects ===== */
.bg-gradient-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(14, 165, 165, 0.05) 0%, rgba(192, 96, 64, 0.02) 30%, transparent 55%);
    z-index: -1;
    pointer-events: none;
    animation: rotateGlow 120s linear infinite;
    filter: blur(100px);
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ambient-orbs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: var(--orb-opacity);
    animation: drift 45s infinite alternate ease-in-out;
    will-change: transform;
}

.orb-1 {
    width: min(500px, 60vw);
    height: min(500px, 60vw);
    background: rgba(14, 165, 165, 0.25);
    top: -150px;
    left: -150px;
}

.orb-2 {
    width: min(600px, 70vw);
    height: min(600px, 70vw);
    background: rgba(192, 96, 64, 0.15);
    top: 35%;
    right: -250px;
    animation-delay: -8s;
    animation-duration: 50s;
}

.orb-3 {
    width: min(350px, 45vw);
    height: min(350px, 45vw);
    background: rgba(14, 200, 200, 0.12);
    bottom: -80px;
    left: 25%;
    animation-delay: -15s;
    animation-duration: 40s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(80px, 60px) scale(1.08); }
    100% { transform: translate(50px, 90px) scale(0.95); }
}

/* ===== Typography Utilities ===== */
.gradient-text {
    background: var(--gradient-text);
    background-size: 400% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: gradientShift 30s linear infinite;
    position: relative;
    display: inline-block;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 400% 50%; }
}

.section-header {
    margin-bottom: clamp(2rem, 5vw, 4rem);
    max-width: 700px;
}

.section-header.center {
    text-align: center;
    margin: 0 auto clamp(2rem, 5vw, 4rem);
}

.section-header h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.section-header p {
    font-size: clamp(1rem, 2vw, 1.125rem);
}

/* ===== Glassmorphism ===== */
.glass-panel {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.glass-panel:hover {
    border-color: var(--border-glass-hover);
    transform: translateY(-4px);
    box-shadow: var(--glow), var(--shadow-md);
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-body);
    font-size: 1rem;
    min-height: 44px; /* touch target */
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
}

.btn-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(14, 165, 165, 0.25);
    letter-spacing: 0.01em;
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(14, 165, 165, 0.4);
    transform: translateY(-2px);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-primary);
}

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: var(--bg-nav-scrolled);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-glass);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.logo-mark {
    width: 30px;
    height: 30px;
    background: var(--gradient-primary);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.logo-mark::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-base);
    border-radius: 6px;
}

.logo-mark::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: var(--accent-teal);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px var(--accent-teal);
    z-index: 1;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

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

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 1px;
    background: var(--accent-teal);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-links a:hover { color: var(--text-primary); }
.nav-links a.active-link { color: var(--accent-teal); }
.nav-links a.active-link::after,
.nav-links a:hover::after { width: 100%; }

.nav-cta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    margin-bottom: 5px;
    transition: var(--transition);
}

.mobile-menu-btn span:last-child { margin-bottom: 0; }

/* Theme Toggle */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.theme-toggle:hover {
    background: rgba(14, 165, 165, 0.1);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

.theme-icon-sun,
.theme-icon-moon {
    position: absolute;
    transition: var(--transition);
}

.theme-icon-sun {
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

.theme-icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="light"] .theme-icon-moon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 100px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1.1rem;
    background: rgba(14, 165, 165, 0.08);
    border: 1px solid rgba(14, 165, 165, 0.18);
    border-radius: 100px;
    color: #5ee0d0;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: -0.035em;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.08;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.15rem);
    font-weight: 300;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 500px;
    color: var(--text-secondary);
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Neural Network Canvas */
.neural-network-mockup {
    width: min(480px, 100%);
    aspect-ratio: 1;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(14, 165, 165, 0.08) 0%, transparent 65%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: floatNetwork 8s ease-in-out infinite;
}

#neural-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    border-radius: 50%;
}

.nn-overlay-content {
    position: relative;
    z-index: 2;
    background: rgba(10, 10, 18, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(14, 165, 165, 0.3);
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(14, 165, 165, 0.15);
}

.nn-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--accent-teal);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-teal), 0 0 20px var(--accent-teal);
    animation: statusPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

[data-theme="light"] .neural-network-mockup {
    background: radial-gradient(circle at center, rgba(14, 165, 165, 0.12) 0%, transparent 65%);
}

[data-theme="light"] .nn-overlay-content {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(14, 165, 165, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes floatNetwork {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-15px) scale(1.02); }
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== Trust Bar ===== */
.trust-bar {
    padding: clamp(2rem, 4vw, 4rem) 0;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
    background: var(--bg-trust);
}

.trust-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: center;
}

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

.trust-value {
    display: block;
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
}

.trust-label {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
}

/* ===== Services ===== */
.services {
    padding: clamp(4rem, 8vw, 8rem) 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1.5rem;
}

.service-card {
    padding: clamp(1.5rem, 3vw, 2.5rem);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-teal), transparent);
    opacity: 0;
    transition: var(--transition);
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(14, 165, 165, 0.06), transparent 70%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

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

.service-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: rgba(14, 165, 165, 0.06);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(14, 165, 165, 0.12);
}

.service-card h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    margin-bottom: 1rem;
}

/* ===== How It Works ===== */
.how-it-works {
    padding: clamp(4rem, 8vw, 8rem) 0;
    background: var(--bg-how-it-works);
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.step {
    display: flex;
    gap: clamp(1rem, 3vw, 2rem);
    background: var(--bg-step);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    align-items: flex-start;
}

.step:hover { background: var(--bg-step-hover); }

.step-num {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1px rgba(14, 165, 165, 0.4);
    line-height: 1;
    min-width: 50px;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 0.5rem;
    color: var(--accent-teal);
}

.step-line {
    width: 1px;
    height: 24px;
    background: linear-gradient(180deg, rgba(14, 165, 165, 0.2), transparent);
    margin-left: 3rem;
    list-style: none;
}

/* ===== Portfolio ===== */
.glass-background {
    background: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(10px);
}

.portfolio {
    padding: clamp(4rem, 8vw, 8rem) 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 1.5rem;
}

.portfolio-item {
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-surface);
    border: 1px solid var(--border-glass);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-4px);
    border-color: rgba(14, 165, 165, 0.3);
    box-shadow: 0 12px 40px rgba(14, 165, 165, 0.08);
}

.portfolio-media {
    width: 100%;
    aspect-ratio: 16/10;
    background: var(--portfolio-media-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid var(--border-glass);
    overflow: hidden;
}

.chat-bubble {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    max-width: 80%;
    font-size: 0.875rem;
}

.chat-bubble.left {
    background: var(--chat-bubble-bg);
    align-self: flex-start;
    margin-left: 1rem;
    border-bottom-left-radius: 2px;
}

.chat-bubble.right {
    background: var(--accent-teal);
    color: #fff;
    align-self: flex-end;
    margin-right: 1rem;
    margin-top: 1rem;
    border-bottom-right-radius: 2px;
}

.chat-mock {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    padding: 1rem;
}

.audio-waves {
    display: flex;
    align-items: center;
    gap: 3px;
}

.audio-waves span {
    display: inline-block;
    width: 6px;
    height: 30px;
    background: var(--accent-teal);
    border-radius: 3px;
    animation: audioWaveAnim 1.2s infinite ease-in-out alternate;
}

.audio-waves span:nth-child(2) { animation-delay: 0.2s; height: 50px; }
.audio-waves span:nth-child(3) { animation-delay: 0.4s; height: 70px; }
.audio-waves span:nth-child(4) { animation-delay: 0.6s; height: 40px; }

@keyframes audioWaveAnim {
    0% { transform: scaleY(0.4); }
    100% { transform: scaleY(1); }
}

.portfolio-info {
    padding: clamp(1.25rem, 3vw, 2rem);
}

.portfolio-info h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Avatar Demo */
.avatar-mock { overflow: hidden; }

.avatar-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    height: 100%;
    padding: 1.5rem;
}

.avatar-silhouette {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.avatar-head {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    position: relative;
    z-index: 1;
}

.avatar-body {
    width: 64px;
    height: 36px;
    background: var(--gradient-primary);
    border-radius: 32px 32px 0 0;
    margin-top: -8px;
    opacity: 0.7;
}

.avatar-glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(0, 128, 128, 0.3), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 3s ease-in-out infinite;
    border-radius: 50%;
}

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

.avatar-chat-feed {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.avatar-line {
    padding: 0.4rem 0.75rem;
    background: rgba(0, 128, 128, 0.1);
    border: 1px solid rgba(0, 128, 128, 0.2);
    border-radius: 8px;
    font-size: 0.75rem;
    color: var(--accent-teal);
    font-family: var(--font-body);
    white-space: nowrap;
    opacity: 0;
    animation: fadeInLine 0.5s ease forwards;
    overflow: hidden;
    text-overflow: ellipsis;
}

.avatar-line.line-1 { animation-delay: 0.3s; }
.avatar-line.line-2 { animation-delay: 0.9s; }
.avatar-line.line-3 { animation-delay: 1.5s; }

@keyframes fadeInLine {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ===== Use Cases ===== */
.use-cases {
    padding: clamp(4rem, 8vw, 8rem) 0;
    background: var(--bg-use-cases);
}

.use-case-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: center;
}

.use-case-text h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
}

.industry-list li {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.industry-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-teal);
}

.industry-list strong {
    color: var(--text-primary);
    font-family: var(--font-heading);
}

.use-case-image {
    padding: clamp(1.5rem, 3vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: center;
}

.metrics-ui {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat-row { width: 100%; }

.stat-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-bar {
    width: 100%;
    height: 8px;
    background: var(--stat-bar-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.stat-bar .fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-bar .fill.negative { background: var(--accent-warm); }

.stat-val {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
}

/* ===== FAQ ===== */
.faq-section {
    padding: clamp(4rem, 8vw, 8rem) 0;
}

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

.faq-item {
    border-bottom: 1px solid var(--border-glass);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem 0;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
}

.faq-question .icon {
    font-weight: 300;
    font-size: 1.5rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.4s ease;
    display: inline-block;
    flex-shrink: 0;
}

.faq-question.active .icon {
    transform: rotate(90deg);
    color: var(--accent-teal);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-answer p { padding-bottom: 1.5rem; }

/* ===== Contact Form ===== */
.contact {
    padding: clamp(4rem, 8vw, 8rem) 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    padding: clamp(2rem, 4vw, 4rem);
}

.contact-info { align-self: center; }

.contact-info h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.contact-info p {
    margin-bottom: 2rem;
    font-size: clamp(1rem, 2vw, 1.125rem);
}

.perk {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.perk-check {
    width: 24px;
    height: 24px;
    background: rgba(14, 165, 165, 0.12);
    border: 1px solid rgba(14, 165, 165, 0.25);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--accent-teal);
    flex-shrink: 0;
}

.contact-form-container {
    background: var(--bg-form-container);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border-radius: 16px;
    border: 1px solid var(--border-glass);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-glass);
    padding: 0.875rem 1rem;
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    min-height: 44px;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--accent-teal);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 2px rgba(0, 128, 128, 0.2);
}

.input-group select option {
    background: var(--select-option-bg);
    color: var(--text-primary);
}

.btn-block { width: 100%; }

.submit-btn {
    position: relative;
    overflow: hidden;
}

.loader-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s linear infinite;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

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

.submit-btn.loading .btn-text { visibility: hidden; }
.submit-btn.loading .loader-spinner { display: block; }

.form-success-msg {
    text-align: center;
    padding: 2rem;
    background: rgba(39, 201, 63, 0.1);
    border: 1px solid rgba(39, 201, 63, 0.3);
    border-radius: 8px;
    margin-top: 1rem;
}

.form-success-msg.hidden { display: none; }

.success-icon {
    width: 48px;
    height: 48px;
    background: #27c93f;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-footer);
    padding: clamp(3rem, 6vw, 6rem) 0 2rem;
    border-top: 1px solid var(--border-glass);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    margin-bottom: 4rem;
}

.footer-bio {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

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

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    background: rgba(14, 165, 165, 0.1);
    border-color: var(--accent-teal);
    color: var(--accent-teal);
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 0;
    visibility: hidden;
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    visibility: visible;
}

.slide-up {
    transform: translateY(24px);
    transition: opacity 0.9s ease-out, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.slide-up.active { transform: translateY(0); }

.fade-in { transition: opacity 1.2s ease-out; }

/* ===== Focus & Accessibility ===== */
:focus-visible {
    outline: 2px solid var(--accent-teal);
    outline-offset: 2px;
}

::selection {
    background: rgba(0, 128, 128, 0.3);
    color: #fff;
}

/* Skip to content (screen reader) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

/* ===== Responsive: Tablet ===== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .neural-network-mockup {
        width: min(360px, 80vw);
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .use-case-flex {
        grid-template-columns: 1fr;
    }

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

/* ===== Responsive: Mobile ===== */
@media (max-width: 768px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

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

    .mobile-menu-btn.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-links.mobile-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--bg-nav-mobile);
        backdrop-filter: blur(24px) saturate(160%);
        -webkit-backdrop-filter: blur(24px) saturate(160%);
        justify-content: center;
        align-items: center;
        gap: 2rem;
        z-index: 1000;
        padding: 2rem;
    }

    .nav-links.mobile-active li {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .nav-links.mobile-active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.mobile-active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.mobile-active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.mobile-active li:nth-child(4) { transition-delay: 0.25s; }

    .nav-links.mobile-active.reveal-items li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.mobile-active a {
        font-size: 1.5rem;
        font-family: var(--font-heading);
        font-weight: 600;
        letter-spacing: -0.02em;
    }

    .nav-links.mobile-active + .nav-cta {
        display: flex;
        position: fixed;
        bottom: 3rem;
        left: 50%;
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
        transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
        transition-delay: 0.4s;
        z-index: 1001;
    }

    .nav-links.mobile-active.reveal-items + .nav-cta {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .trust-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

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

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

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

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

    .footer-bio {
        margin: 1.5rem auto 0;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .step-line {
        margin-left: 2rem;
    }
}

/* ===== Responsive: Small Mobile ===== */
@media (max-width: 480px) {
    .trust-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .avatar-demo {
        flex-direction: column;
        gap: 1rem;
    }

    .avatar-line {
        font-size: 0.65rem;
    }

    .hero {
        padding-top: 80px;
    }

    .neural-network-mockup {
        width: min(280px, 90vw);
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    html { scroll-behavior: auto; }
}

/* ===== Light Theme Overrides ===== */
[data-theme="light"] .glass-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.4) 100%);
    border: 1px solid var(--border-glass);
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-left: 1px solid rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .glass-panel:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 0 rgba(255, 255, 255, 0.8);
}

[data-theme="light"] .glass-background {
    background: rgba(235, 237, 240, 0.6);
}

[data-theme="light"] .badge {
    background: rgba(10, 143, 143, 0.06);
    border-color: rgba(10, 143, 143, 0.18);
    color: #0a8f8f;
}

[data-theme="light"] .btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .service-icon {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .faq-question {
    color: var(--text-primary);
}

[data-theme="light"] .mobile-menu-btn span {
    background: var(--text-primary);
}

[data-theme="light"] .logo-mark::after {
    background: var(--bg-base);
}

[data-theme="light"] .step {
    border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .industry-list strong {
    color: var(--text-primary);
}

[data-theme="light"] .stat-label {
    color: var(--text-secondary);
}

[data-theme="light"] .perk {
    color: var(--text-primary);
}

[data-theme="light"] .input-group label {
    color: var(--text-secondary);
}

[data-theme="light"] .footer .logo-mark::after {
    background: #1a1a2e;
}

[data-theme="light"] .footer {
    color: #ccc;
}

[data-theme="light"] .footer p,
[data-theme="light"] .footer-bio,
[data-theme="light"] .footer-links a,
[data-theme="light"] .footer-bottom {
    color: #9ea3ac;
}

[data-theme="light"] .footer h4,
[data-theme="light"] .footer .logo-text {
    color: #fff;
}

[data-theme="light"] ::-webkit-scrollbar-track {
    background: var(--bg-base);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}
