/* ===================================
   ClearSignal Intelligence - Styles
   =================================== */

/* Self-hosted Inter variable font — eliminates external Google Fonts requests */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #06b6d4;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --gradient-dark: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-300);
    background-color: var(--dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

ul {
    list-style: none;
}

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

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--white);
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

.section-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-xl);
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray-400);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 1px solid var(--gray-600);
}

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

.btn-nav {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

.logo-icon {
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-highlight {
    color: var(--primary-light);
}

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

.nav-links a {
    color: var(--gray-300);
    font-weight: 500;
    font-size: 0.9375rem;
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 1.5rem 4rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: var(--gradient-dark);
    z-index: -2;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 50% 0%, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
}

.hero-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse at 100% 100%, rgba(6, 182, 212, 0.1) 0%, transparent 60%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-xl);
    color: var(--primary-light);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero h1 {
    max-width: 800px;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-400);
    max-width: 600px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
}

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

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    z-index: -1;
    opacity: 0.6;
}

.neural-network {
    position: relative;
    width: 100%;
    height: 100%;
}

.node {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    animation: pulse 3s ease-in-out infinite;
}

.node-1 { top: 20%; left: 30%; animation-delay: 0s; }
.node-2 { top: 40%; left: 60%; animation-delay: 0.5s; }
.node-3 { top: 60%; left: 25%; animation-delay: 1s; }
.node-4 { top: 30%; left: 80%; animation-delay: 1.5s; }
.node-5 { top: 70%; left: 70%; animation-delay: 2s; }
.node-6 { top: 50%; left: 45%; animation-delay: 2.5s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

/* Services Section */
.services {
    padding: 8rem 0;
    background: var(--dark);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
}

.service-card {
    position: relative;
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card.featured {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-color: rgba(99, 102, 241, 0.3);
}

.service-badge {
    position: absolute;
    top: -0.75rem;
    right: 1.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--gradient-primary);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

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

.service-card h3 {
    margin-bottom: 0.75rem;
}

.service-card > p {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-300);
    font-size: 0.9375rem;
}

.service-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 600;
}

/* Expertise Section */
.expertise {
    padding: 8rem 0;
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.expertise-category {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.expertise-category h3 {
    margin-bottom: 1.25rem;
    font-size: 1.125rem;
    color: var(--gray-200);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius);
    color: var(--gray-300);
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.tech-tag:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    color: var(--white);
}

/* Process Section */
.process {
    padding: 8rem 0;
    background: var(--dark-light);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.process-step {
    position: relative;
    padding: 2rem;
    text-align: center;
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: transparent;
    -webkit-text-stroke: 1px rgba(99, 102, 241, 0.3);
    line-height: 1;
    margin-bottom: 1rem;
}

.process-step h3 {
    margin-bottom: 0.75rem;
}

.process-step p {
    color: var(--gray-400);
    font-size: 0.9375rem;
}

/* About Section */
.about {
    padding: 8rem 0;
    background: var(--dark);
}

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

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text > p {
    margin-bottom: 1.25rem;
    color: var(--gray-400);
    line-height: 1.8;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.value {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.value-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.value h4 {
    margin-bottom: 0.25rem;
}

.value p {
    color: var(--gray-400);
    font-size: 0.9375rem;
}

.about-image {
    display: flex;
    justify-content: center;
}

.image-placeholder {
    position: relative;
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    overflow: hidden;
}

.abstract-shape {
    position: absolute;
    inset: 20%;
    background: var(--gradient-primary);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.3;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; }
}

/* Contact Section */
.contact {
    padding: 8rem 0;
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-light) 100%);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    margin-bottom: 1rem;
}

.contact-info > p {
    color: var(--gray-400);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-300);
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary-light);
    flex-shrink: 0;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    background: var(--dark);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-300);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    background: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-500);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpolyline points='6,9 12,15 18,9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group select option {
    background: var(--dark-light);
}

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

.btn-submit {
    grid-column: 1 / -1;
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    background: var(--gray-900);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 3rem;
}

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

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

.footer-brand p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.footer-column h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-column a {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.footer-column a:hover {
    color: var(--white);
}

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

.footer-bottom p {
    color: var(--gray-600);
    font-size: 0.875rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .hero-visual {
        display: none;
    }
    
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--dark-light);
        flex-direction: column;
        justify-content: center;
        gap: 2rem;
        padding: 2rem;
        transition: var(--transition);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }
    
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .hero {
        padding: 7rem 1.5rem 4rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
    
    .footer-links {
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
    }
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Form submission states */
.contact-form.submitting {
    opacity: 0.7;
    pointer-events: none;
}

.contact-form .success-message {
    grid-column: 1 / -1;
    padding: 1rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: var(--radius);
    color: #22c55e;
    text-align: center;
}
