@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@300;400;500&display=swap');

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

:root {
    --primary: #ef4444;
    --primary-dark: #dc2626;
    --primary-glow: rgba(239, 68, 68, 0.4);
    
    --bg-main: #ffffff;
    --bg-secondary: #fafafa;
    --bg-dark: #0a0a0a;
    --bg-card: #f8f8f8;
    
    --text-primary: #0a0a0a;
    --text-secondary: #525252;
    --text-tertiary: #a3a3a3;
    
    --border: #e5e5e5;
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] {
    --bg-main: #0a0a0a;
    --bg-secondary: #121212;
    --bg-dark: #000000;
    --bg-card: #1a1a1a;
    
    --text-primary: #fafafa;
    --text-secondary: #a3a3a3;
    --text-tertiary: #525252;
    
    --border: #262626;
    --glass: rgba(10, 10, 10, 0.8);
    --glass-border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================
   GLASSMORPHISM NAVIGATION
   ========================================== */
.header {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 4rem);
    max-width: 1200px;
}

.nav-container {
    background: var(--glass);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-mark {
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.25rem;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-link {
    padding: 0.625rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 100px;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

[data-theme="dark"] .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
    background: var(--text-primary);
    color: var(--bg-main);
    padding: 0.625rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s;
}

.nav-cta:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Theme Toggle */
#theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--glass);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

#theme-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
    stroke: var(--text-primary);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 8rem;
    overflow: hidden;
    background: var(--bg-main);
}

/* Animated Grid Background */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
    mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 80% 50% at 50% 50%, black, transparent);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.hero-label {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2rem;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.05em;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
    max-width: 1100px;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.6;
}

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

.btn-primary {
    padding: 1rem 2.5rem;
    background: var(--text-primary);
    color: var(--bg-main);
    border-radius: 100px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.btn-secondary:hover {
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

/* Floating Elements */
.hero-visual {
    position: absolute;
    right: -10%;
    top: 50%;
    transform: translateY(-50%);
    width: 50%;
    height: 80%;
    opacity: 0.6;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    background: var(--glass);
    backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    animation: float 6s ease-in-out infinite;
}

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

.card-1 {
    top: 10%;
    right: 20%;
    width: 280px;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 5%;
    width: 240px;
    animation-delay: 2s;
}

.card-3 {
    bottom: 15%;
    right: 25%;
    width: 200px;
    animation-delay: 4s;
}

.card-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
}

.card-value {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Star Trail Canvas */
#star-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

[data-theme="dark"] #star-canvas {
    opacity: 1;
}

/* Tree Canvas for Light Theme */
#tree-canvas {
    position: absolute;
    bottom: 0;
    right: 20%;
    width: 300px;
    height: 300px;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

[data-theme="light"] #tree-canvas {
    opacity: 1;
}

[data-theme="dark"] #tree-canvas {
    opacity: 0;
}

/* ==========================================
   SERVICES SECTION
   ========================================== */
.services {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.section-header {
    max-width: 800px;
    margin-bottom: 5rem;
}

.section-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

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

.section-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s;
}

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

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

/* Solution Icon Styles */
.solution-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.solution-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.service-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 1.5rem;
}

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

.service-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

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

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

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

/* ==========================================
   INTEGRATIONS (MARQUEE)
   ========================================== */
.integrations-section {
    padding: 8rem 0;
    background: var(--bg-main);
}

.integrations-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.integrations-content {
    display: grid;
    grid-template-columns: 400px 1.5fr;
    gap: 6rem;
    align-items: center;
}

.integrations-text {
    width: 100%;
    min-width: 0;
}

.integrations-text h2 {
    font-size: clamp(1.5rem, 5vw, 3rem);  
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    overflow-wrap: break-word;
}

.integrations-text p {
    font-size: clamp(0.95rem, 2.5vw, 1.125rem);  
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-wrap: break-word;
}

.integrations-logos {
    position: relative;
}

.gradient-left,
.gradient-right {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.gradient-left {
    left: 0;
    background: linear-gradient(to right, var(--bg-main), transparent);
}

.gradient-right {
    right: 0;
    background: linear-gradient(to left, var(--bg-main), transparent);
}

.logo-marquee {
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.marquee-track {
    display: flex;
    gap: 1.5rem;
}

.marquee-content {
    display: flex;
    gap: 1.5rem;
    animation: scroll 30s linear infinite;
}

.logo-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    width: 100px;
    height: 100px;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.logo-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.logo-box img {
    width: 60%;
    height: 60%;
    object-fit: contain;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.marquee-ltr .marquee-content {
    animation: scroll 30s linear infinite;
}

.marquee-rtl .marquee-content {
    animation: scroll-reverse 30s linear infinite;
}

@keyframes scroll-reverse {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Integrations Responsive */
@media (max-width: 968px) {
    .integrations-section {
        padding: 4rem 0;
        overflow-x: hidden;
    }
    
    .integrations-container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    .integrations-content {
        display: grid;
        grid-template-columns: 1fr;
        gap: 4rem;
        width: 100%;
    }
    
    .integrations-text {
        width: 100%;
        max-width: 100%;
    }
    
    .integrations-text h2,
    .integrations-text p {
        max-width: 100%;
        word-break: break-word;
    }
    
    .logo-box {
        width: 80px;
        height: 80px;
        min-width: 80px;
    }
    
    .marquee-track {
        gap: 1rem;
    }
    
    .marquee-content {
        gap: 1rem;
    }
    
    .gradient-left,
    .gradient-right {
        width: 50px;
    }
}

/* ==========================================
   CONTACT & SIGNUP PAGE
   ========================================== */
.contact-section {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

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

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 2rem;
}

.contact-card h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

.contact-card a {
    color: var(--primary);
    text-decoration: none;
}

.contact-form {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 1.5rem;
    padding: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

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

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

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

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

.form-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: var(--text-primary);
    color: var(--bg-main);
    border: none;
    border-radius: 100px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Contact Responsive */
@media (max-width: 968px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   SIGNUP PAGE SPECIFIC STYLES
   ========================================== */
.signup-wrapper {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
    animation: fadeInUp 0.6s ease-out;
    max-width: 930px;
    margin: 0 auto;
}

.form-section {
    flex: 1;
    padding: 56px 40px;
    max-width: 480px;
}

.form-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.form-section > p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 32px 0 24px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border);
}

.divider span {
    padding: 0 16px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Social Buttons */
.social-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.social-btn {
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-btn:hover {
    transform: translateY(-2px);
    border-color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

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

/* Image Section */
.image-section {
    flex: 1;
    max-width: 450px;
    padding: 16px;
    display: flex;
    align-items: center;
}

.image-section img {
    width: 100%;
    height: 100%;
    min-height: 600px;
    object-fit: cover;
    border-radius: 16px;
}

/* Login Link */
.login-link {
    text-align: center;
    margin-top: 24px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.login-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Signup Responsive */
@media (max-width: 1024px) {
    .image-section {
        display: none;
    }

    .signup-wrapper {
        border-radius: 20px;
    }

    .form-section {
        max-width: 100%;
        padding: 48px 32px;
    }
}

@media (max-width: 768px) {
    .form-section {
        padding: 40px 24px;
    }

    .form-section h1 {
        font-size: 1.75rem;
    }

    .social-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 640px) {
    .signup-wrapper {
        margin: 0 1rem;
    }
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--bg-dark);
    color: var(--bg-main);
    padding: 6rem 0 3rem;
    position: relative;
}

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

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 2rem;
}

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

.social-link {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.social-link svg {
    width: 1.125rem;
    height: 1.125rem;
    fill: white;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

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

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

.footer-col a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.875rem;
}

/* Footer Responsive */
@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-visual {
        display: none;
    }
}

/* ==========================================
   GLOBAL RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hero {
        padding-top: 7rem;
    }
    
    .services,
    .integrations-section,
    .contact-section {
        padding: 5rem 0;
    }
    
    /* MOBILE: Fix integrations grid */
    .integrations-container {
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    .integrations-content {
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
    }
    
    .integrations-text {
        max-width: calc(100vw - 2rem) !important;
        width: 100% !important;
    }
    
    .integrations-text p {
        max-width: 100% !important;
        width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* MOBILE: Hide tree animation */
    #tree-canvas {
        display: none !important;
    }
}