/* ============================================
   LINGSPEAK LANDING PAGE - MAIN STYLES
   ============================================ */

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    /* Colors - Lingspeak Brand */
    --brand-primary: #2909a6;
    --brand-primary-light: #3d1cc4;
    --brand-primary-dark: #1e0780;
    --primary-gradient: linear-gradient(135deg, #2909a6 0%, #3d1cc4 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --accent-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    --primary-purple: #2909a6;
    --primary-violet: #3d1cc4;
    --accent-blue: #4facfe;
    --accent-cyan: #00f2fe;
    --accent-pink: #f093fb;
    --accent-coral: #f5576c;

    /* Neutral Colors - Light Theme */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;

    /* Typography */
    --font-primary: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 0.75rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

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

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 30px rgba(102, 126, 234, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Hero Background */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-color: #f8f9fa;
    overflow: hidden;
}

/* 1. Geometric Grid Pattern (Subtle technical feel) */
.hero-background::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(45, 55, 72, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 55, 72, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* 2. Noise Texture (Premium feel, reduces banding) */
.hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 0.4;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
    pointer-events: none;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8) 0%, rgba(248, 249, 250, 0) 70%);
    z-index: 2;
}

/* Animated Shapes */
.animated-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    filter: blur(80px);
    opacity: 0.6;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 25s infinite ease-in-out;
    mix-blend-mode: multiply;
}

.shape-1 {
    width: 60vw;
    height: 60vw;
    max-width: 600px;
    max-height: 600px;
    background: radial-gradient(circle, rgba(41, 9, 166, 0.3) 0%, rgba(41, 9, 166, 0) 70%);
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 50vw;
    height: 50vw;
    max-width: 500px;
    max-height: 500px;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.25) 0%, rgba(79, 172, 254, 0) 70%);
    bottom: -10%;
    right: -10%;
    animation-delay: -5s;
    animation-duration: 30s;
}

.shape-3 {
    width: 40vw;
    height: 40vw;
    max-width: 400px;
    max-height: 400px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.2) 0%, rgba(240, 147, 251, 0) 70%);
    top: 40%;
    right: 20%;
    animation-delay: -10s;
    animation-duration: 35s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* Responsive Adjusments */
@media (max-width: 768px) {
    .animated-shapes {
        filter: blur(60px);
        opacity: 0.4;
    }

    .shape-1 {
        top: -10%;
        left: -20%;
        opacity: 0.8;
    }

    .shape-2 {
        bottom: 0%;
        right: -20%;
        opacity: 0.8;
    }

    .shape-3 {
        display: none;
    }

    .hero-background::before {
        background-size: 30px 30px;
    }
}

/* ============================================
   HERO LOGO
   ============================================ */
.hero-logo {
    position: relative;
    z-index: 100;
    padding: var(--space-2xl) 0;
}

.top-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    padding: var(--space-md) 0;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: var(--space-sm) 0;
}

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



/* Logo */
/* Logo */
/* Logo */
.logo-link {
    display: inline-flex;
    align-items: center;
    /* Back to center for better control with transform */
    gap: 0;
    text-decoration: none;
    z-index: 1002;
    transition: transform 0.3s ease;
    height: 100%;
    /* Ensure it takes full height if helpful */
}

.logo-link:hover {
    transform: scale(1.02);
}

.logo-text-part {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--brand-primary);
    line-height: 1;
    letter-spacing: -0.02em;
    /* Removed padding-top for cleaner alignment logic */
}

.logo-img-inline {
    height: 2.5em;
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 -12px 0 -9px;
    /* Right: -12px (keep p close), Left: -9px (move g away by 3px) */
    transform: translateY(-7px);
    /* Lowered 5px from -12px */
}

@media (max-width: 768px) {
    .logo-text-part {
        font-size: var(--text-base);
    }

    .logo-img-inline {
        height: 2em;
        margin: 0 -6px;
    }
}

/* Desktop Navigation */
.nav-menu {
    display: none;
}

@media (min-width: 992px) {
    .nav-menu {
        display: block;
    }
}

.nav-list {
    display: flex;
    gap: var(--space-lg);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--brand-primary);
    transition: width 0.3s ease;
}

.nav-item:hover {
    color: var(--brand-primary);
}

.nav-item:hover::after {
    width: 100%;
}

/* Right Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    z-index: 1002;
}

/* Header Language Selector */
.header-lang-selector {
    position: relative;
    cursor: pointer;
    font-weight: 700;
    font-size: var(--text-sm);
    color: var(--brand-primary);
}

.current-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid rgba(41, 9, 166, 0.2);
    border-radius: var(--radius-full);
    transition: all 0.3s ease;
}

.current-lang::after {
    content: '▼';
    font-size: 0.6em;
    margin-left: 4px;
}

.current-lang:hover {
    background: rgba(41, 9, 166, 0.05);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 100px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.header-lang-selector:hover .lang-dropdown,
.header-lang-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    transition: background 0.2s;
}

.lang-option:hover {
    background: var(--bg-primary);
    color: var(--brand-primary);
}

.lang-option.active {
    font-weight: 700;
    color: var(--brand-primary);
}

/* Mobile Toggle */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.mobile-toggle .bar {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

.mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (min-width: 992px) {
    .mobile-toggle {
        display: none;
    }
}

/* Mobile Menu Overlay */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 1001;
    padding-top: 80px;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav-list {
    list-style: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.mobile-nav-item {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.mobile-nav-item:hover {
    color: var(--brand-primary);
}

/* ============================================
   HERO CONTENT
   ============================================ */
.hero-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    padding: var(--space-4xl) 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

/* Hero Text */
.hero-text {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    width: fit-content;
    animation: slideUp 0.6s ease forwards;
    opacity: 0;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge-icon {
    font-size: var(--text-lg);
}

.badge-text {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--white);
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--text-7xl);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    animation: slideUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.title-line {
    display: block;
}

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

.hero-description {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 540px;
    animation: slideUp 1s ease 0.4s forwards;
    opacity: 0;
}

/* Hero CTA */
.hero-cta {
    display: flex;
    gap: var(--space-lg);
    animation: slideUp 1.2s ease 0.6s forwards;
    opacity: 0;
}

.primary-button,
.secondary-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 14px 28px;
    font-size: var(--text-base);
    font-weight: 700;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    border: none;
    overflow: hidden;
}

.primary-button {
    background: var(--primary-gradient);
    color: #ffffff;
    /* Explicit white for contrast */
    box-shadow: 0 4px 15px rgba(41, 9, 166, 0.3);
    z-index: 1;
}

.primary-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3d1cc4 0%, #2909a6 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(41, 9, 166, 0.4);
    color: #ffffff;
}

.primary-button:hover::before {
    opacity: 1;
}

/* Shine effect */
.primary-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to bottom right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 40%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.1) 60%,
            rgba(255, 255, 255, 0) 100%);
    transform: rotate(30deg) translateY(100%);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    pointer-events: none;
}

.primary-button:hover::after {
    transform: rotate(30deg) translateY(-100%);
}

.primary-button .button-arrow {
    transition: transform 0.3s ease;
}

.primary-button:hover .button-arrow {
    transform: translateX(4px);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    /* Dark text for visibility on light bg, or check context */
}

/* Fix secondary button color if it's on dark background usually? 
   No, usually on hero it's on image, but here it might be used on white. 
   Assuming standard usage. If on light background, it needs dark text/border. 
   Actually, usually secondary buttons in this design system were white/transparent.
   Let's check usage. In hero it was on image.
   In Services page, buttons are on white/light grey content.
   So secondary button (if used there) should be visible.
   BUT, the services page only uses .primary-button so far.
   I will keep .secondary-button adaptable or safe.
   For now, I'll leave secondary-button mostly as is but ensure high contrast if used.
*/
.secondary-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.play-icon {
    opacity: 0.8;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    padding-top: var(--space-xl);
    animation: slideUp 1.4s ease 0.8s forwards;
    opacity: 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.stat-number {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   HERO IMAGE
   ============================================ */
.hero-image {
    position: relative;
    animation: fadeIn 1s ease 0.6s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.image-container {
    position: relative;
    width: 100%;
    height: 600px;
}

.main-image {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-2xl);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

/* Floating Cards */
.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    animation: floatCard 3s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 20%;
    left: -15%;
    animation-delay: -1s;
}

.card-3 {
    top: 5%;
    right: -10%;
    animation-delay: -2s;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

.card-icon {
    font-size: var(--text-3xl);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.card-title {
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--dark-90);
}

.card-subtitle {
    font-size: var(--text-xs);
    color: var(--gray-60);
}

.progress-bar {
    width: 100px;
    height: 6px;
    background: rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin: var(--space-xs) 0;
}

.progress-fill {
    height: 100%;
    width: 85%;
    background: var(--primary-gradient);
    animation: progressGrow 2s ease forwards;
}

@keyframes progressGrow {
    from {
        width: 0;
    }

    to {
        width: 85%;
    }
}

/* ============================================
   SCROLL INDICATOR
   ============================================ */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    animation: bounce 2s ease infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.scroll-text {
    font-size: var(--text-sm);
    color: var(--gray-40);
    font-weight: 500;
}

.scroll-arrow {
    color: var(--gray-40);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .hero-title {
        font-size: var(--text-6xl);
    }

    .image-container {
        height: 500px;
    }

    .floating-card {
        display: none;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero-title {
        font-size: var(--text-5xl);
    }

    .hero-description {
        font-size: var(--text-lg);
    }

    .hero-cta {
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: var(--space-lg);
    }

    .stat-divider {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: var(--text-4xl);
    }

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

    .image-container {
        height: 400px;
    }
}