/* ==========================================================================
   Code & Craft Techie - Ultra-Premium Modern Design System
   ========================================================================== */

:root {
    /* Core Palette */
    --bg-main: #0B0F19;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.65);
    --bg-glass: rgba(11, 15, 25, 0.82);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(56, 189, 248, 0.35);
    --border-gold: rgba(245, 158, 11, 0.35);
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dim: #64748B;
    
    --primary-blue: #2563EB;
    --primary-sky: #38BDF8;
    --accent-cyan: #06B6D4;
    --accent-teal: #14B8A6;
    --accent-purple: #7C3AED;
    --accent-gold: #F59E0B;
    
    --gradient-hero: radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.15) 0%, rgba(11, 15, 25, 1) 75%);
    --gradient-primary: linear-gradient(135deg, #2563EB 0%, #38BDF8 100%);
    --gradient-accent: linear-gradient(135deg, #06B6D4 0%, #7C3AED 100%);
    --gradient-gold: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);

    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-glass: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.2);
    --shadow-gold: 0 0 30px rgba(245, 158, 11, 0.2);
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-main: #F8FAFC;
    --bg-secondary: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-glass: rgba(248, 250, 252, 0.88);
    --border-color: rgba(15, 23, 42, 0.09);
    --border-glow: rgba(37, 99, 235, 0.25);
    
    --text-main: #0F172A;
    --text-muted: #475569;
    --text-dim: #64748B;
    
    --gradient-hero: radial-gradient(circle at 50% 0%, rgba(56, 189, 248, 0.2) 0%, rgba(248, 250, 252, 1) 75%);
    --gradient-glass: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.7) 100%);
    --shadow-glass: 0 20px 40px -15px rgba(0, 0, 0, 0.07);
    --shadow-glow: 0 0 30px rgba(37, 99, 235, 0.15);
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    transition: background-color 0.4s ease, color 0.4s ease;
    background-image: 
        radial-gradient(rgba(56, 189, 248, 0.05) 1px, transparent 1px),
        radial-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #38BDF8 0%, #6366F1 45%, #A855F7 80%, #38BDF8 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shine 8s linear infinite;
    filter: drop-shadow(0 0 25px rgba(99, 102, 241, 0.25));
}

.hero-badge {
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    letter-spacing: 0.08em;
    transition: var(--transition-smooth);
}

.hero-badge:hover {
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow: 0 0 35px rgba(56, 189, 248, 0.25);
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.25;
}

.hero-marquee-text {
    background: linear-gradient(90deg, #38BDF8 0%, #6366F1 33%, #C084FC 66%, #38BDF8 100%);
    background-size: 300% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: marqueeShine 6s linear infinite;
    position: relative;
    display: inline-block;
    filter: drop-shadow(0 0 25px rgba(99, 102, 241, 0.35));
}

.hero-marquee-pill {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: var(--transition-smooth);
}

.hero-marquee-pill:hover {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 45px rgba(56, 189, 248, 0.35);
}

@keyframes marqueeShine {
    0% { background-position: 0% center; }
    100% { background-position: 300% center; }
}

.text-gradient-gold {
    background: linear-gradient(135deg, #FBBF24 0%, #F59E0B 50%, #D97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes shine {
    to { background-position: 200% center; }
}

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

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to right, #2563EB, #38BDF8, #7C3AED);
    width: 0%;
    z-index: 1000;
    transition: width 0.1s ease-out;
}

/* Header & Glass Nav */
.glass-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}

.glass-header.scrolled {
    box-shadow: var(--shadow-glass);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    border-bottom-color: rgba(56, 189, 248, 0.2);
}

/* Glassmorphism Cards with Spotlight Effect */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-glass);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(56, 189, 248, 0.08), transparent 40%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.glass-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.glass-card-gold {
    border-color: var(--border-gold);
}

.glass-card-gold:hover {
    border-color: var(--accent-gold);
    box-shadow: var(--shadow-gold);
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: var(--gradient-primary);
    color: #FFFFFF;
    font-weight: 600;
    padding: 0.9rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: var(--transition-smooth);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: rotate(30deg);
    transition: transform 0.8s ease;
}

.btn-primary:hover::after {
    transform: rotate(30deg) translate(100%, 100%);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(56, 189, 248, 0.5);
    color: #FFFFFF;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    font-weight: 600;
    padding: 0.9rem 2rem;
    border-radius: 9999px;
    text-decoration: none;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-sky);
    transform: translateY(-2px);
}

/* Section Layouts */
.section-padding {
    padding: 7rem 0;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    text-align: center;
    max-width: 680px;
    margin: 0 auto 4rem auto;
    font-weight: 400;
}

/* Hero Section */
.hero-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 6rem;
    background: var(--gradient-hero);
    overflow: hidden;
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.ambient-blob {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    animation: float 12s ease-in-out infinite alternate;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.1); }
}

.ambient-blob-1 { top: -15%; left: -10%; background: var(--primary-blue); }
.ambient-blob-2 { bottom: -15%; right: -10%; background: var(--accent-purple); }
.ambient-blob-3 { top: 40%; left: 50%; transform: translate(-50%, -50%); background: var(--accent-cyan); }

/* Service Icon Badge */
.service-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12) 0%, rgba(56, 189, 248, 0.12) 100%);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-sky);
    margin-bottom: 1.5rem;
    transition: var(--transition-smooth);
}

.glass-card:hover .service-card-icon {
    transform: scale(1.1) rotate(4deg);
    background: var(--gradient-primary);
    color: #FFFFFF;
}

/* Marquee */
.marquee-container {
    overflow: hidden;
    user-select: none;
    display: flex;
    gap: 2rem;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
    flex-shrink: 0;
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    min-width: 100%;
    animation: marquee 35s linear infinite;
}

@keyframes marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); }
}

.tech-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.tech-chip:hover {
    border-color: var(--primary-sky);
    transform: translateY(-2px);
}

/* Timeline Track */
.timeline-track {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-blue), var(--primary-sky), var(--accent-purple));
    transform: translateX(-50%);
}

.timeline-step {
    position: relative;
    margin-bottom: 3.5rem;
    width: 50%;
    padding: 0 2.5rem;
}

.timeline-step.left { left: 0; text-align: right; }
.timeline-step.right { left: 50%; text-align: left; }

.timeline-dot {
    position: absolute;
    top: 1.25rem;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary-sky);
    border: 4px solid var(--bg-main);
    box-shadow: 0 0 15px var(--primary-sky);
    z-index: 2;
}

.timeline-step.left .timeline-dot { right: -11px; }
.timeline-step.right .timeline-dot { left: -11px; }

/* Accordion */
.accordion-item {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 0;
}

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    padding: 0.5rem 0;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease;
    opacity: 0;
    color: var(--text-muted);
    font-size: 0.98rem;
    line-height: 1.7;
}

.accordion-item.active .accordion-content {
    max-height: 300px;
    opacity: 1;
    padding-top: 0.75rem;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

/* Inputs */
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    padding: 0.9rem 1.15rem;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-sky);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
    background: rgba(255, 255, 255, 0.06);
}

/* Responsive Rules */
@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
    .timeline-track::before { left: 20px; }
    .timeline-step {
        width: 100%;
        left: 0 !important;
        padding-left: 3.5rem;
        padding-right: 0;
        text-align: left !important;
    }
    .timeline-step .timeline-dot { left: 9px !important; }
}
