/* ==========================================================================
   SPEAKAI - AI VOICE SYNTHESIS PLATFORM
   Premium Template - Audio-Focused Design
   ========================================================================== */

/* ==========================================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ========================================================================== */

:root {
    /* Primary Colors - Orange Spectrum */
    --color-primary-50: #FFF7ED;
    --color-primary-100: #FFEDD5;
    --color-primary-200: #FED7AA;
    --color-primary-300: #FDBA74;
    --color-primary-400: #FB923C;
    --color-primary-500: #F97316;
    --color-primary-600: #EA580C;
    --color-primary-700: #C2410C;
    --color-primary-800: #9A3412;
    --color-primary-900: #7C2D12;

    /* Secondary - Warm Gray */
    --color-secondary-50: #FAFAF9;
    --color-secondary-100: #F5F5F4;
    --color-secondary-200: #E7E5E4;
    --color-secondary-300: #D6D3D1;
    --color-secondary-400: #A8A29E;
    --color-secondary-500: #78716C;
    --color-secondary-600: #57534E;
    --color-secondary-700: #44403C;
    --color-secondary-800: #292524;
    --color-secondary-900: #1C1917;

    /* Accent - Electric Blue (for contrast) */
    --color-accent-400: #60A5FA;
    --color-accent-500: #3B82F6;
    --color-accent-600: #2563EB;

    /* Success/Error States */
    --color-success: #22C55E;
    --color-warning: #EAB308;
    --color-error: #EF4444;

    /* Neutral Scale */
    --color-neutral-50: #FAFAFA;
    --color-neutral-100: #F5F5F5;
    --color-neutral-200: #E5E5E5;
    --color-neutral-300: #D4D4D4;
    --color-neutral-400: #A3A3A3;
    --color-neutral-500: #737373;
    --color-neutral-600: #525252;
    --color-neutral-700: #404040;
    --color-neutral-800: #262626;
    --color-neutral-900: #171717;
    --color-neutral-950: #0A0A0A;

    /* Light Theme */
    --bg-primary: #FFFFFF;
    --bg-secondary: var(--color-neutral-50);
    --bg-tertiary: var(--color-neutral-100);
    --text-primary: var(--color-neutral-900);
    --text-secondary: var(--color-neutral-600);
    --text-tertiary: var(--color-neutral-400);
    --border-color: var(--color-neutral-200);
    --border-subtle: var(--color-neutral-100);

    /* Typography Scale (Responsive) */
    --text-hero: clamp(3rem, 8vw, 5rem);
    --text-display: clamp(2.5rem, 6vw, 4rem);
    --text-h1: clamp(2rem, 4vw, 3rem);
    --text-h2: clamp(1.75rem, 3vw, 2.5rem);
    --text-h3: clamp(1.25rem, 2.5vw, 1.75rem);
    --text-h4: clamp(1.125rem, 2vw, 1.25rem);
    --text-body: 1rem;
    --text-body-lg: 1.125rem;
    --text-small: 0.875rem;
    --text-xs: 0.75rem;

    /* Font Families */
    --font-display: 'Outfit', system-ui, sans-serif;
    --font-body: 'Outfit', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    --font-extrabold: 800;

    /* Line Heights */
    --leading-tight: 1.1;
    --leading-snug: 1.25;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;

    /* Letter Spacing */
    --tracking-tight: -0.025em;
    --tracking-normal: 0;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;

    /* Spacing Scale (8px base) */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
    --space-40: 10rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 32px 64px rgba(0, 0, 0, 0.12), 0 16px 32px rgba(0, 0, 0, 0.1);

    /* Glow Effects */
    --glow-primary: 0 0 40px rgba(249, 115, 22, 0.3);
    --glow-primary-lg: 0 0 80px rgba(249, 115, 22, 0.4);
    --glow-accent: 0 0 40px rgba(59, 130, 246, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    --transition-slower: 500ms ease;
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-bounce: 600ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Z-Index Scale */
    --z-base: 0;
    --z-dropdown: 10;
    --z-sticky: 20;
    --z-fixed: 30;
    --z-modal-backdrop: 40;
    --z-modal: 50;
    --z-tooltip: 60;
    --z-toast: 70;
}

/* Dark Theme */
.dark {
    --bg-primary: #0D0D0D;
    --bg-secondary: #141414;
    --bg-tertiary: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #A3A3A3;
    --text-tertiary: #525252;
    --border-color: #262626;
    --border-subtle: #1F1F1F;

    /* Adjusted shadows for dark mode */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.5), 0 4px 8px rgba(0, 0, 0, 0.6);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-2xl: 0 32px 64px rgba(0, 0, 0, 0.7), 0 16px 32px rgba(0, 0, 0, 0.5);

    /* Enhanced glows for dark mode */
    --glow-primary: 0 0 60px rgba(249, 115, 22, 0.4);
    --glow-primary-lg: 0 0 120px rgba(249, 115, 22, 0.5);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    line-height: var(--leading-normal);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: var(--color-primary-500);
    color: white;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-neutral-400);
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-500);
}

.dark ::-webkit-scrollbar-thumb {
    background: var(--color-neutral-600);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: var(--color-neutral-500);
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--color-primary-500);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-3) var(--space-6);
    background: var(--color-primary-500);
    color: white;
    font-weight: var(--font-medium);
    border-radius: var(--radius-lg);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    color: var(--text-primary);
}

.text-hero {
    font-size: var(--text-hero);
    font-weight: var(--font-extrabold);
    line-height: 1;
    letter-spacing: -0.03em;
}

.text-display {
    font-size: var(--text-display);
    font-weight: var(--font-bold);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-warm {
    background: linear-gradient(135deg, #FCD34D, var(--color-primary-500), #EC4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.container-narrow {
    max-width: 768px;
}

.container-wide {
    max-width: 1536px;
}

.section {
    padding: var(--space-20) 0;
}

.section-lg {
    padding: var(--space-32) 0;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-base);
}

.dark .nav {
    background: rgba(13, 13, 13, 0.8);
}

.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
}

.dark .nav-scrolled {
    background: rgba(13, 13, 13, 0.95);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

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

.nav-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--glow-primary);
}

.nav-logo-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    list-style: none;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-small);
    font-weight: var(--font-medium);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link.active {
    color: var(--color-primary-500);
    background: var(--color-primary-50);
}

.dark .nav-link.active {
    background: rgba(249, 115, 22, 0.1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

/* Mobile Menu */
.nav-toggle {
    display: none;
    padding: var(--space-2);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
}

@media (max-width: 1024px) {
    .nav-menu {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: column;
        padding: var(--space-6);
        background: var(--bg-primary);
        transform: translateX(100%);
        transition: transform var(--transition-slow);
    }

    .nav-menu.open {
        transform: translateX(0);
    }

    .nav-toggle {
        display: block;
    }

    .nav-link {
        width: 100%;
        padding: var(--space-4);
        font-size: var(--text-body);
    }
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-body);
    font-size: var(--text-small);
    font-weight: var(--font-semibold);
    text-decoration: none;
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-body);
    border-radius: var(--radius-2xl);
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    color: white;
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-icon {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: var(--radius-full);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    transition: all var(--transition-slow);
}

.card:hover {
    border-color: var(--color-primary-500);
    box-shadow: var(--shadow-lg);
}

.card-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dark .card-glass {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   VOICE CARD COMPONENT (SIGNATURE)
   ========================================================================== */

.voice-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
    overflow: hidden;
    transition: all var(--transition-slow);
}

.voice-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary-400), var(--color-primary-600));
    opacity: 0;
    transition: opacity var(--transition-base);
}

.voice-card:hover {
    border-color: var(--color-primary-500);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

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

.voice-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.voice-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary-100), var(--color-primary-200));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--color-primary-600);
}

.dark .voice-avatar {
    background: linear-gradient(135deg, var(--color-primary-900), var(--color-primary-800));
    color: var(--color-primary-400);
}

.voice-info h3 {
    font-size: var(--text-h4);
    margin-bottom: var(--space-1);
}

.voice-info p {
    color: var(--text-secondary);
    font-size: var(--text-small);
}

.voice-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.voice-tag {
    padding: var(--space-1) var(--space-3);
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--text-secondary);
}

.voice-tag.premium {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    color: white;
}

/* Waveform in voice card */
.voice-waveform {
    height: 48px;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.voice-waveform-bar {
    width: 3px;
    height: 100%;
    background: var(--color-neutral-300);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.dark .voice-waveform-bar {
    background: var(--color-neutral-600);
}

.voice-card:hover .voice-waveform-bar {
    background: var(--color-primary-500);
}

.voice-card.playing .voice-waveform-bar {
    animation: waveform 0.8s ease-in-out infinite;
}

.voice-waveform-bar:nth-child(1) { height: 30%; animation-delay: 0s; }
.voice-waveform-bar:nth-child(2) { height: 50%; animation-delay: 0.1s; }
.voice-waveform-bar:nth-child(3) { height: 70%; animation-delay: 0.2s; }
.voice-waveform-bar:nth-child(4) { height: 90%; animation-delay: 0.15s; }
.voice-waveform-bar:nth-child(5) { height: 100%; animation-delay: 0.25s; }
.voice-waveform-bar:nth-child(6) { height: 80%; animation-delay: 0.1s; }
.voice-waveform-bar:nth-child(7) { height: 60%; animation-delay: 0.3s; }
.voice-waveform-bar:nth-child(8) { height: 40%; animation-delay: 0.2s; }
.voice-waveform-bar:nth-child(9) { height: 55%; animation-delay: 0.05s; }
.voice-waveform-bar:nth-child(10) { height: 75%; animation-delay: 0.25s; }
.voice-waveform-bar:nth-child(11) { height: 95%; animation-delay: 0.15s; }
.voice-waveform-bar:nth-child(12) { height: 65%; animation-delay: 0.35s; }
.voice-waveform-bar:nth-child(13) { height: 45%; animation-delay: 0.1s; }
.voice-waveform-bar:nth-child(14) { height: 35%; animation-delay: 0.2s; }
.voice-waveform-bar:nth-child(15) { height: 25%; animation-delay: 0.05s; }

@keyframes waveform {
    0%, 100% { transform: scaleY(0.5); }
    50% { transform: scaleY(1); }
}

.voice-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.voice-play-btn {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition-base);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.voice-play-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.4);
}

.voice-play-btn svg {
    width: 20px;
    height: 20px;
}

.voice-actions {
    display: flex;
    gap: var(--space-2);
}

/* ==========================================================================
   WAVEFORM VISUALIZATION (HERO SIGNATURE)
   ========================================================================== */

.waveform-container {
    position: relative;
    width: 100%;
    height: 160px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 100%;
    padding: var(--space-8);
}

.waveform-bar {
    width: 4px;
    background: linear-gradient(180deg, var(--color-primary-400), var(--color-primary-600));
    border-radius: var(--radius-full);
    transition: all var(--transition-fast);
}

.waveform.playing .waveform-bar {
    animation: waveform-dance 0.6s ease-in-out infinite;
}

@keyframes waveform-dance {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

/* Staggered delays for waveform bars */
.waveform-bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.waveform-bar:nth-child(2) { height: 60%; animation-delay: 0.05s; }
.waveform-bar:nth-child(3) { height: 80%; animation-delay: 0.1s; }
.waveform-bar:nth-child(4) { height: 100%; animation-delay: 0.15s; }
.waveform-bar:nth-child(5) { height: 90%; animation-delay: 0.2s; }
.waveform-bar:nth-child(6) { height: 70%; animation-delay: 0.25s; }
.waveform-bar:nth-child(7) { height: 85%; animation-delay: 0.1s; }
.waveform-bar:nth-child(8) { height: 95%; animation-delay: 0.15s; }
.waveform-bar:nth-child(9) { height: 75%; animation-delay: 0.2s; }
.waveform-bar:nth-child(10) { height: 55%; animation-delay: 0.25s; }
.waveform-bar:nth-child(11) { height: 65%; animation-delay: 0.3s; }
.waveform-bar:nth-child(12) { height: 85%; animation-delay: 0.15s; }
.waveform-bar:nth-child(13) { height: 100%; animation-delay: 0.2s; }
.waveform-bar:nth-child(14) { height: 80%; animation-delay: 0.25s; }
.waveform-bar:nth-child(15) { height: 60%; animation-delay: 0.3s; }
.waveform-bar:nth-child(16) { height: 45%; animation-delay: 0.35s; }
.waveform-bar:nth-child(17) { height: 55%; animation-delay: 0.2s; }
.waveform-bar:nth-child(18) { height: 75%; animation-delay: 0.25s; }
.waveform-bar:nth-child(19) { height: 90%; animation-delay: 0.3s; }
.waveform-bar:nth-child(20) { height: 70%; animation-delay: 0.35s; }
.waveform-bar:nth-child(21) { height: 50%; animation-delay: 0.4s; }
.waveform-bar:nth-child(22) { height: 35%; animation-delay: 0.45s; }
.waveform-bar:nth-child(23) { height: 45%; animation-delay: 0.3s; }
.waveform-bar:nth-child(24) { height: 65%; animation-delay: 0.35s; }
.waveform-bar:nth-child(25) { height: 85%; animation-delay: 0.4s; }
.waveform-bar:nth-child(26) { height: 100%; animation-delay: 0.25s; }
.waveform-bar:nth-child(27) { height: 80%; animation-delay: 0.3s; }
.waveform-bar:nth-child(28) { height: 60%; animation-delay: 0.35s; }
.waveform-bar:nth-child(29) { height: 40%; animation-delay: 0.4s; }
.waveform-bar:nth-child(30) { height: 25%; animation-delay: 0.45s; }

/* Playback controls overlay */
.waveform-controls {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
}

.waveform-time {
    font-size: var(--text-small);
    color: white;
    font-family: var(--font-mono);
}

/* ==========================================================================
   TEXT TO SPEECH DEMO (HERO)
   ========================================================================== */

.tts-demo {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-3xl);
    padding: var(--space-8);
    max-width: 700px;
    margin: 0 auto;
}

.tts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-6);
}

.tts-header h3 {
    font-size: var(--text-h4);
}

.voice-selector {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.voice-selector:hover {
    border-color: var(--color-primary-500);
}

.voice-selector-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--color-primary-400), var(--color-primary-600));
}

.voice-selector span {
    font-size: var(--text-small);
    font-weight: var(--font-medium);
}

.voice-selector svg {
    width: 16px;
    height: 16px;
    color: var(--text-tertiary);
}

.tts-input-wrapper {
    position: relative;
    margin-bottom: var(--space-6);
}

.tts-input {
    width: 100%;
    min-height: 120px;
    padding: var(--space-4);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-primary);
    resize: none;
    transition: border-color var(--transition-base);
}

.tts-input:focus {
    outline: none;
    border-color: var(--color-primary-500);
}

.tts-input::placeholder {
    color: var(--text-tertiary);
}

.tts-char-count {
    position: absolute;
    bottom: var(--space-3);
    right: var(--space-3);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}

.tts-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
}

.tts-settings {
    display: flex;
    gap: var(--space-4);
}

.tts-setting {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.tts-setting-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

.tts-setting-value {
    font-size: var(--text-small);
    font-weight: var(--font-medium);
}

.tts-generate-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    color: white;
    border: none;
    border-radius: var(--radius-xl);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.3);
}

.tts-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.4);
}

.tts-generate-btn svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   VOICE CLONING PROGRESS (SIGNATURE)
   ========================================================================== */

.clone-progress {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--space-6);
}

.clone-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.clone-progress-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.clone-progress-title h4 {
    font-size: var(--text-h4);
}

.clone-status {
    padding: var(--space-1) var(--space-3);
    background: var(--color-primary-100);
    color: var(--color-primary-700);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
}

.dark .clone-status {
    background: rgba(249, 115, 22, 0.15);
    color: var(--color-primary-400);
}

.clone-progress-bar {
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.clone-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary-400), var(--color-primary-600));
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
    position: relative;
}

.clone-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.clone-steps {
    display: flex;
    justify-content: space-between;
}

.clone-step {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-small);
    color: var(--text-tertiary);
}

.clone-step.completed {
    color: var(--color-success);
}

.clone-step.active {
    color: var(--color-primary-500);
}

.clone-step-icon {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.clone-step.completed .clone-step-icon {
    background: var(--color-success);
    color: white;
}

.clone-step.active .clone-step-icon {
    background: var(--color-primary-500);
    color: white;
    animation: pulse 2s infinite;
}

/* ==========================================================================
   PRICING CARDS
   ========================================================================== */

.pricing-card {
    position: relative;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    text-align: center;
    transition: all var(--transition-slow);
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.pricing-card.popular {
    border-color: var(--color-primary-500);
    box-shadow: var(--glow-primary);
}

.pricing-card.popular::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-1) var(--space-4);
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-600));
    color: white;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
}

.pricing-header {
    margin-bottom: var(--space-6);
}

.pricing-name {
    font-size: var(--text-h4);
    margin-bottom: var(--space-2);
}

.pricing-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: var(--space-1);
    margin-bottom: var(--space-2);
}

.pricing-amount {
    font-size: var(--text-display);
    font-weight: var(--font-bold);
}

.pricing-period {
    color: var(--text-secondary);
}

.pricing-characters {
    font-size: var(--text-small);
    color: var(--text-secondary);
}

.pricing-features {
    list-style: none;
    margin-bottom: var(--space-8);
    text-align: left;
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: var(--text-small);
}

.pricing-feature:last-child {
    border-bottom: none;
}

.pricing-feature svg {
    width: 18px;
    height: 18px;
    color: var(--color-success);
    flex-shrink: 0;
}

.pricing-feature.disabled {
    color: var(--text-tertiary);
}

.pricing-feature.disabled svg {
    color: var(--text-tertiary);
}

/* ==========================================================================
   FEATURE CARDS
   ========================================================================== */

.feature-card {
    padding: var(--space-8);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    transition: all var(--transition-slow);
}

.feature-card:hover {
    border-color: var(--color-primary-500);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--color-primary-100), var(--color-primary-200));
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
}

.dark .feature-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(249, 115, 22, 0.1));
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-primary-600);
}

.dark .feature-icon svg {
    color: var(--color-primary-400);
}

.feature-card h3 {
    font-size: var(--text-h4);
    margin-bottom: var(--space-3);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
}

/* ==========================================================================
   USE CASE CARDS
   ========================================================================== */

.usecase-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-2xl);
    aspect-ratio: 16/10;
    cursor: pointer;
}

.usecase-card-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform var(--transition-slower);
}

.usecase-card:hover .usecase-card-bg {
    transform: scale(1.05);
}

.usecase-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.3));
}

.usecase-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-6);
    color: white;
}

.usecase-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}

.usecase-card-icon svg {
    width: 24px;
    height: 24px;
}

.usecase-card h3 {
    font-size: var(--text-h3);
    margin-bottom: var(--space-2);
}

.usecase-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-small);
}

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */

.testimonial-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
}

.testimonial-rating {
    display: flex;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
}

.testimonial-rating svg {
    width: 20px;
    height: 20px;
    color: #FCD34D;
    fill: #FCD34D;
}

.testimonial-text {
    font-size: var(--text-body-lg);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.testimonial-info h4 {
    font-size: var(--text-body);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-1);
}

.testimonial-info p {
    font-size: var(--text-small);
    color: var(--text-secondary);
}

/* ==========================================================================
   STATS
   ========================================================================== */

.stat {
    text-align: center;
}

.stat-value {
    font-size: var(--text-display);
    font-weight: var(--font-bold);
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--space-2);
}

.stat-label {
    font-size: var(--text-small);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-size: var(--text-small);
    font-weight: var(--font-medium);
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    font-family: var(--font-body);
    font-size: var(--text-body);
    color: var(--text-primary);
    transition: all var(--transition-base);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.1);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

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

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

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--text-primary);
    text-decoration: none;
    margin-bottom: var(--space-4);
}

.footer-description {
    color: var(--text-secondary);
    font-size: var(--text-small);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-6);
}

.footer-social {
    display: flex;
    gap: var(--space-3);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--color-primary-500);
    color: white;
}

.footer-column h4 {
    font-size: var(--text-small);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    margin-bottom: var(--space-4);
}

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

.footer-links li {
    margin-bottom: var(--space-3);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-small);
    transition: color var(--transition-fast);
}

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

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

.footer-bottom-links {
    display: flex;
    gap: var(--space-6);
}

.footer-bottom-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

@media (max-width: 640px) {
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.active {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* ==========================================================================
   HOVER EFFECTS
   ========================================================================== */

.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.hover-glow {
    transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
    box-shadow: var(--glow-primary);
}

/* ==========================================================================
   CONTINUOUS ANIMATIONS
   ========================================================================== */

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Sound wave rings animation */
@keyframes sound-ring {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}

.sound-ring {
    position: absolute;
    border: 2px solid var(--color-primary-500);
    border-radius: var(--radius-full);
    animation: sound-ring 2s ease-out infinite;
}

.sound-ring:nth-child(2) { animation-delay: 0.5s; }
.sound-ring:nth-child(3) { animation-delay: 1s; }
.sound-ring:nth-child(4) { animation-delay: 1.5s; }

/* ==========================================================================
   DECORATIVE ELEMENTS
   ========================================================================== */

.bg-gradient-radial {
    background: radial-gradient(ellipse at center, var(--color-primary-500) 0%, transparent 70%);
    opacity: 0.1;
}

.bg-grid {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.dark .bg-grid {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

.bg-noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.015;
    z-index: 9999;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal, .reveal-left, .reveal-right, .reveal-scale {
        opacity: 1;
        transform: none;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.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;
}

.text-balance {
    text-wrap: balance;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

section {
    content-visibility: auto;
    contain-intrinsic-size: 0 500px;
}

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

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .nav,
    .footer,
    .btn,
    .waveform,
    .tts-demo {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    a {
        color: black;
        text-decoration: underline;
    }
}
