/* =====================================================
   aidesign.com.sg — STYLE.CSS (FINAL PRODUCTION BUILD)
   
   TABLE OF CONTENTS:
   01. Theme Variables & Reset
   02. Scrollbar
   03. Background (FIXED: Click-through enabled)
   04. Navigation (FIXED: High Z-Index & Domain Branding)
   05. Mobile Navigation (FIXED: Strict Desktop Hiding)
   06. Buttons
   07. Reveal Animations (FIXED: Mobile Jitter)
   08. Hero Section
   09. What We Do Section
   10. Services Section
   11. Features Section
   12. Process Section (FIXED SPACING)
   13. Contact Section
   14. Footer (FIXED: Domain Branding)
   15. Floating Action Buttons
   16. Keyframe Animations
   17. Responsive / Media Queries (FIXED OVERLAP & STACKING)
   ===================================================== */


/* =====================================================
   01. THEME VARIABLES & RESET
   ===================================================== */
:root {
    /* Core Palette */
    --bg-dark:        #020617;     
    --bg-section:     #040d26;     
    --accent-teal:    #2dd4bf;     
    --accent-blue:    #3b82f6;     
    --accent-green:   #22d3a5;     

    /* Glass / Frosted UI Elements */
    --glass:          rgba(255, 255, 255, 0.04);
    --glass-hover:    rgba(255, 255, 255, 0.08);
    --glass-border:   rgba(255, 255, 255, 0.1);
    --glass-border-hover: rgba(45, 212, 191, 0.5);

    /* Typography */
    --text-main:      #f8fafc;
    --text-dim:       #94a3b8;
    --text-muted:     #64748b;

    /* Layout */
    --max-width:      1280px;
    --section-pad:    120px 10%;
    --radius-lg:      24px;
    --radius-md:      16px;
    --radius-sm:      10px;

    /* Transitions */
    --ease-bounce:    cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --ease-smooth:    cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Syne', sans-serif;
    overflow-x: hidden;
    line-height: 1.7;
}

h1, h2, h3, h4 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

img { display: block; max-width: 100%; height: auto; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }


/* =====================================================
   02. SCROLLBAR
   ===================================================== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent-teal), var(--accent-blue));
    border-radius: 3px;
}


/* =====================================================
   03. BACKGROUND (FIXED: Disabled pointer-events)
   ===================================================== */
#particle-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -2;
    pointer-events: none !important; /* FIXED: Clicks pass through */
}

.background-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none !important;
}

.blob {
    position: absolute;
    width: 700px; height: 700px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
    transition: transform 0.1s linear;
    will-change: transform;
    pointer-events: none;
}

#blob1 { background: radial-gradient(circle, var(--accent-blue), transparent 70%); top: -15%; left: -15%; }
#blob2 { background: radial-gradient(circle, var(--accent-teal), transparent 70%); bottom: -15%; right: -15%; }
#blob3 { background: radial-gradient(circle, var(--accent-green), transparent 70%); top: 40%; left: 40%; width: 400px; height: 400px; opacity: 0.07; }

.scanlines {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; /* Above blobs, below Nav */
    pointer-events: none !important; /* FIXED: Clicks pass through */
    background: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 2px,
        rgba(0, 0, 0, 0.06) 2px,
        rgba(0, 0, 0, 0.06) 4px
    );
}


/* =====================================================
   04. NAVIGATION (FIXED: High Z-Index & Branding)
   ===================================================== */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 8%;
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 9999; /* Stay above scanlines */
    pointer-events: auto; 
    transition: padding 0.3s var(--ease-smooth), background 0.3s var(--ease-smooth);
}

nav.scrolled {
    padding: 10px 8%; 
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    z-index: 10001;
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px var(--accent-teal));
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: var(--text-main);
    text-transform: lowercase; /* Matches domain style */
}

.logo-accent { color: var(--accent-teal); font-weight: 700; }

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-link {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: color 0.25s, background 0.25s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 12px;
    width: 0; height: 1px;
    background: var(--accent-teal);
    transition: width 0.3s var(--ease-smooth);
}

.nav-link:hover { color: var(--accent-teal); }
.nav-link:hover::after { width: calc(100% - 24px); }

.btn-nav {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--bg-dark);
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
    position: relative; 
    z-index: 10001;      
    pointer-events: auto !important; 
}

.btn-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.5);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 10001;
}

.hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* =====================================================
   05. MOBILE NAVIGATION
   ===================================================== */
.mobile-nav {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}


/* =====================================================
   06. BUTTONS
   ===================================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    color: var(--bg-dark);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 16px 32px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: transform 0.25s var(--ease-bounce), box-shadow 0.25s;
}

.btn-primary svg {
    width: 16px; height: 16px;
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(45, 212, 191, 0.5);
}

.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    color: var(--text-main);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 15px 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s, transform 0.25s;
}

.btn-ghost:hover {
    border-color: var(--accent-teal);
    color: var(--accent-teal);
    transform: translateY(-3px);
}

.btn-large { padding: 20px 48px; font-size: 0.9rem; }

.gradient-text {
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}


/* =====================================================
   07. REVEAL ANIMATIONS (FIXED: Mobile Jitter)
   ===================================================== */
.reveal-up, .reveal-left, .reveal-right {
    opacity: 0;
    transition: opacity 0.8s var(--ease-smooth), transform 0.8s var(--ease-smooth);
    will-change: transform, opacity;
}
.reveal-up    { transform: translateY(40px); }
.reveal-left  { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }

.reveal-up[style] { transition-delay: var(--delay, 0s); }

.visible {
    opacity: 1 !important;
    transform: translate(0,0) !important;
}

/* Tablet & Mobile reveal fix: Slide up instead of left/right */
@media (max-width: 1024px) {
    .reveal-left, .reveal-right { transform: translateY(30px); }
}


/* =====================================================
   SHARED SECTION TYPOGRAPHY
   ===================================================== */
.section-eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent-teal);
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    margin-bottom: 20px;
    line-height: 1.15;
}

.section-desc {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 560px;
    line-height: 1.8;
}

.section-header { text-align: center; margin-bottom: 70px; }
.section-header .section-desc { margin: 0 auto; }

.section-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}


/* =====================================================
   08. HERO SECTION
   ===================================================== */
.hero {
    min-height: 100vh;
    padding: 120px 8% 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    overflow: hidden;
}

.hero-corner {
    position: absolute;
    width: 40px; height: 40px;
    opacity: 0.4;
}
.hero-corner.tl { top: 80px;  left: 5%;  border-top: 2px solid var(--accent-teal); border-left: 2px solid var(--accent-teal); }
.hero-corner.tr { top: 80px;  right: 5%; border-top: 2px solid var(--accent-teal); border-right: 2px solid var(--accent-teal); }
.hero-corner.bl { bottom: 40px; left: 5%;  border-bottom: 2px solid var(--accent-teal); border-left: 2px solid var(--accent-teal); }
.hero-corner.br { bottom: 40px; right: 5%; border-bottom: 2px solid var(--accent-teal); border-right: 2px solid var(--accent-teal); }

.hero-content { flex: 1; max-width: 600px; z-index: 1; }

.eyebrow {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--accent-teal);
    margin-bottom: 20px;
    display: block;
}

.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-main);
}

.cursor-blink { color: var(--accent-teal); animation: blink 0.9s infinite; }

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-dim);
    max-width: 480px;
    margin-bottom: 40px;
    line-height: 1.9;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    padding: 24px 28px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    width: fit-content;
}

.stat-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num { font-family: 'Orbitron', sans-serif; font-size: 2rem; font-weight: 900; color: var(--accent-teal); line-height: 1; }
.stat-plus { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; color: var(--accent-teal); font-weight: 900; }
.stat-label { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); }
.stat-divider { width: 1px; height: 40px; background: var(--glass-border); }

.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 500px;
    z-index: 1;
}

.hero-glow-ring {
    position: absolute;
    width: 420px; height: 420px;
    border-radius: 50%;
    border: 1px solid rgba(45, 212, 191, 0.2);
    animation: pulse-ring 3s infinite ease-in-out;
}
.hero-glow-ring.ring2 {
    width: 540px; height: 540px;
    border-color: rgba(59, 130, 246, 0.12);
    animation-delay: 1.5s;
}

.hero-img { width: clamp(280px, 45vw, 480px); filter: drop-shadow(0 0 40px rgba(45, 212, 191, 0.35)); z-index: 2; position: relative; }

.chip {
    position: absolute;
    background: rgba(4, 13, 38, 0.85);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 1px;
    padding: 8px 14px;
    border-radius: 30px;
    white-space: nowrap;
    z-index: 3;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.chip-1 { top: 10%;  left: -5%;  animation: float-chip 4s infinite ease-in-out; }
.chip-2 { top: 20%;  right: -8%; animation: float-chip 4s 1s infinite ease-in-out; }
.chip-3 { bottom: 25%; left: -8%; animation: float-chip 4s 0.5s infinite ease-in-out; }
.chip-4 { bottom: 15%; right: -5%; animation: float-chip 4s 1.5s infinite ease-in-out; }

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.4;
    animation: fade-pulse 2s infinite;
}
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, transparent, var(--accent-teal)); animation: grow-line 2s infinite; }
.scroll-label { font-family: 'JetBrains Mono', monospace; font-size: 0.6rem; letter-spacing: 4px; color: var(--text-muted); }


/* =====================================================
   09. WHAT WE DO SECTION
   ===================================================== */
.what-we-do { padding: var(--section-pad); background: var(--bg-section); position: relative; overflow: hidden; }
.what-we-do::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, var(--accent-teal), transparent); }

.check-list { display: flex; flex-direction: column; gap: 20px; margin: 32px 0 40px; }
.check-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    transition: border-color 0.3s, background 0.3s;
}
.check-item:hover { border-color: var(--glass-border-hover); background: var(--glass-hover); }
.check-icon {
    flex-shrink: 0; width: 28px; height: 28px;
    background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue));
    color: var(--bg-dark); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700;
}
.check-item strong { display: block; font-family: 'Orbitron', sans-serif; font-size: 0.85rem; font-weight: 700; color: var(--text-main); margin-bottom: 4px; }
.check-item p { font-size: 0.9rem; color: var(--text-dim); margin: 0; }

.wwd-visual { display: flex; justify-content: center; align-items: center; }
.wwd-img-wrapper { position: relative; display: flex; justify-content: center; align-items: center; }
.wwd-glow { position: absolute; width: 350px; height: 350px; background: radial-gradient(circle, rgba(45,212,191,0.15), transparent 70%); border-radius: 50%; filter: blur(40px); }
.wwd-img { width: clamp(240px, 38vw, 420px); filter: drop-shadow(0 0 30px rgba(45, 212, 191, 0.25)); position: relative; z-index: 1; }


/* =====================================================
   10. SERVICES SECTION
   ===================================================== */
.services { padding: var(--section-pad); position: relative; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; max-width: var(--max-width); margin: 0 auto; }

.service-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px 30px;
    text-align: center;
    backdrop-filter: blur(12px);
    transition: transform 0.4s var(--ease-bounce), border-color 0.3s, box-shadow 0.4s;
    position: relative;
    overflow: hidden;
    cursor: default;
}
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(to right, transparent, var(--accent-teal), transparent); opacity: 0; transition: opacity 0.3s; }
.service-card:hover { transform: translateY(-16px); border-color: rgba(45, 212, 191, 0.4); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(45, 212, 191, 0.1); }
.service-card:hover::before { opacity: 1; }

.card-icon-wrap { position: relative; display: inline-flex; justify-content: center; align-items: center; margin-bottom: 24px; }
.card-icon { width: 80px; height: 80px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(45, 212, 191, 0.3)); transition: filter 0.3s; }
.service-card:hover .card-icon { filter: drop-shadow(0 0 20px rgba(45, 212, 191, 0.6)); }
.card-icon-glow { position: absolute; width: 100px; height: 100px; background: radial-gradient(circle, rgba(45,212,191,0.15), transparent 70%); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); transition: opacity 0.3s; opacity: 0; }
.service-card:hover .card-icon-glow { opacity: 1; }

.card-rotate:hover .card-icon { animation: spin 4s linear infinite; }

.service-card h3 { font-size: 1rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 14px; color: var(--text-main); }
.service-card p { font-size: 0.88rem; color: var(--text-dim); line-height: 1.8; margin-bottom: 20px; }

.card-link { font-family: 'Orbitron', sans-serif; font-size: 0.72rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent-teal); transition: letter-spacing 0.2s, opacity 0.2s; }
.card-link:hover { letter-spacing: 3px; opacity: 0.8; }

.card-border-glow { position: absolute; bottom: 0; left: 20%; right: 20%; height: 1px; background: linear-gradient(to right, transparent, var(--accent-teal), transparent); opacity: 0; transition: opacity 0.3s; }
.service-card:hover .card-border-glow { opacity: 1; }


/* =====================================================
   11. FEATURES SECTION
   ===================================================== */
.features-section { padding: var(--section-pad); background: var(--bg-section); position: relative; overflow: hidden; }
.features-section::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, var(--accent-blue), transparent); }
.features-inner { gap: 80px; }

.features-visual { display: flex; justify-content: center; align-items: center; }
.features-img-wrap { position: relative; display: inline-flex; }
.features-glow { position: absolute; width: 380px; height: 380px; background: radial-gradient(circle, rgba(59,130,246,0.15), transparent 70%); border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); filter: blur(40px); }
.features-img { width: clamp(240px, 35vw, 440px); filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.3)); position: relative; z-index: 1; }

.features-text { display: flex; flex-direction: column; gap: 0; }
.feature-list { display: flex; flex-direction: column; gap: 14px; margin: 28px 0 36px; }
.feature-item { display: flex; align-items: center; gap: 14px; font-size: 0.95rem; color: var(--text-dim); padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); transition: color 0.2s, padding-left 0.2s; }
.feature-item:hover { color: var(--text-main); padding-left: 6px; }
.feature-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-teal), var(--accent-blue)); box-shadow: 0 0 8px var(--accent-teal); }


/* =====================================================
   12. PROCESS SECTION (FIXED: MOBILE SPACING)
   ===================================================== */
.process-section { padding: var(--section-pad); text-align: center; position: relative; }
.process-steps { 
    display: flex; 
    align-items: stretch; 
    justify-content: center; 
    gap: 0; 
    max-width: var(--max-width); 
    margin: 0 auto 80px; 
    flex-wrap: wrap; 
}

.process-step { 
    flex: 1; 
    min-width: 140px; 
    max-width: 180px; 
    background: var(--glass); 
    border: 1px solid var(--glass-border); 
    border-radius: var(--radius-lg); 
    padding: 28px 16px; 
    text-align: center; 
    transition: border-color 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.process-step:hover { border-color: rgba(45, 212, 191, 0.4); transform: translateY(-8px); }

.step-num { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 2px; color: var(--accent-teal); margin-bottom: 10px; opacity: 0.7; }
.step-icon { width: 40px; height: 40px; margin-bottom: 12px; display: flex; align-items: center; justify-content: center; color: #2dd4bf; }
.step-icon svg { width: 40px; height: 40px; stroke: #2dd4bf; stroke-width: 1.8; transition: stroke 0.3s, stroke-width 0.3s, transform 0.3s; fill: none; }
.process-step:hover .step-icon svg { stroke: #3b82f6; stroke-width: 2.2; transform: scale(1.1); }
.process-step h4 { font-family: 'Orbitron', sans-serif; font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; color: var(--text-main); margin-bottom: 8px; }
.process-step p { font-size: 0.78rem; color: var(--text-dim); line-height: 1.6; }

.step-connector { flex-shrink: 0; width: 40px; display: flex; justify-content: center; align-items: center; }
.step-connector span { display: block; width: 100%; height: 1px; background: linear-gradient(to right, var(--accent-teal), var(--accent-blue)); position: relative; overflow: hidden; }
.step-connector span::after { content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%; background: white; animation: connector-pulse 2.5s linear infinite; }

.process-visual { position: relative; display: inline-flex; justify-content: center; align-items: center; }
.cycle-img { width: clamp(280px, 45vw, 520px); filter: drop-shadow(0 0 40px rgba(59, 130, 246, 0.3)); position: relative; z-index: 1; }


/* =====================================================
   13. CONTACT SECTION
   ===================================================== */
.contact-section { padding: var(--section-pad); background: var(--bg-section); position: relative; overflow: hidden; }
.contact-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(to right, transparent, var(--accent-teal), transparent); }
.contact-inner { max-width: 800px; margin: 0 auto; text-align: center; }
.contact-text { margin-bottom: 50px; }
.contact-text .section-desc { margin: 0 auto; }

.contact-cards { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 40px; }
.contact-card {
    display: flex; align-items: center; gap: 18px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius-md); padding: 24px 32px; text-align: left; transition: border-color 0.3s, transform 0.3s, background 0.3s; cursor: pointer; flex: 1; min-width: 240px; max-width: 320px;
}
.contact-card:hover { border-color: var(--glass-border-hover); background: var(--glass-hover); transform: translateY(-4px); }
.contact-card-icon { font-size: 1.8rem; flex-shrink: 0; }
.contact-label { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; letter-spacing: 3px; text-transform: uppercase; color: var(--accent-teal); margin-bottom: 4px; }
.contact-value { font-size: 0.92rem; color: var(--text-main); font-weight: 600; }

.contact-cta { display: flex; justify-content: center; }


/* =====================================================
   14. FOOTER (FIXED: aidesign.com.sg Branding)
   ===================================================== */
.footer { padding: 50px 8%; border-top: 1px solid var(--glass-border); text-align: center; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.footer-logo { display: flex; align-items: center; gap: 12px; }
.footer-logo-img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 0 8px var(--accent-teal)); }
.footer-logo span { font-family: 'Orbitron', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: 1px; color: var(--text-main); text-transform: lowercase; }
.footer-tagline { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; letter-spacing: 2px; color: var(--text-muted); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--accent-teal); }
.footer-copy { font-size: 0.75rem; color: var(--text-muted); opacity: 0.6; }


/* =====================================================
   15. FLOATING ACTION BUTTONS
   ===================================================== */
.fab-group { position: fixed; bottom: 30px; right: 24px; display: flex; flex-direction: column; gap: 12px; z-index: 500; }
.fab { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--glass-border); background: rgba(4, 13, 38, 0.9); backdrop-filter: blur(12px); color: var(--text-main); display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.25s var(--ease-bounce), border-color 0.25s, box-shadow 0.25s; }
.fab svg { width: 20px; height: 20px; }
.fab:hover { transform: scale(1.15); border-color: var(--accent-teal); box-shadow: 0 0 20px rgba(45, 212, 191, 0.4); }
.fab-top { opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.25s var(--ease-bounce); }
.fab-top.visible { opacity: 1; pointer-events: auto; }


/* =====================================================
   16. KEYFRAME ANIMATIONS
   ===================================================== */
@keyframes float { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-20px); } }
@keyframes floating-slow { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-12px); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
@keyframes pulse-ring { 0%, 100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.05); opacity: 0.1; } }
@keyframes float-chip { 0%, 100% { transform: translateY(0px); } 50% { transform: translateY(-8px); } }
@keyframes grow-line { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes fade-pulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 0.6; } }
@keyframes connector-pulse { 0% { left: -100%; } 100% { left: 200%; } }
@keyframes connector-pulse-vert { 0% { top: -100%; } 100% { top: 200%; } }


.floating      { animation: float 6s ease-in-out infinite; }
.floating-slow { animation: floating-slow 8s ease-in-out infinite; }


/* =====================================================
   17. RESPONSIVE / MEDIA QUERIES (FIXED: OVERLAP & JITTER)
   ===================================================== */
@media (max-width: 1024px) {
    .hero { flex-direction: column; text-align: center; padding-top: 140px; }
    .hero-content { align-items: center; display: flex; flex-direction: column; max-width: 100%; }
    .hero-stats, .hero-cta { justify-content: center; }
    .hero-visual { min-height: auto; margin-top: 40px; }
    .hero-img { width: 320px; }
    
    .section-inner { grid-template-columns: 1fr; gap: 60px; text-align: center; }
    .wwd-visual, .features-visual { order: -1; }
    .section-desc { margin: 0 auto; }

    /* Fix reveal animations for tablet/mobile */
    .reveal-left, .reveal-right { transform: translateY(30px); }

    .process-steps { gap: 15px; flex-wrap: wrap; justify-content: center; }
    .step-connector { display: none; }
    .process-step { min-width: 160px; max-width: 200px; }

    .services-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
    :root { --section-pad: 80px 6%; }
    .nav-links, .btn-nav { display: none; }
    .hamburger { display: flex; }

    .mobile-nav {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: fixed;
        top: 0; right: -100%;
        width: 75%; max-width: 300px;
        height: 100vh;
        background: rgba(4, 13, 38, 0.98);
        backdrop-filter: blur(20px);
        z-index: 10000;
        flex-direction: column;
        padding: 100px 30px;
        transition: right 0.4s var(--ease-smooth);
        border-left: 1px solid var(--glass-border);
    }
    .mobile-nav.open { right: 0; }
    .mobile-link { font-family: 'Orbitron', sans-serif; font-size: 0.9rem; color: var(--text-dim); padding: 14px 0; border-bottom: 1px solid var(--glass-border); }
    .hero-img { width: 240px; }
    .hero-title { font-size: 2.8rem; }

    .hero-stats { flex-wrap: wrap; gap: 20px; padding: 18px 20px; }
    .stat-divider { height: 30px; }

    .hero-corners { display: none; }

    .chip { display: none; }

    .hero-glow-ring { width: 300px; height: 300px; }
    .hero-glow-ring.ring2 { width: 400px; height: 400px; }

    .services-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }

    .process-steps { flex-direction: column; align-items: center; gap: 20px; }
    .process-step { width: 100%; max-width: 280px; min-height: 180px; padding: 32px 24px; }

    .step-connector { width: 2px; height: 40px; display: flex; }
    .step-connector span { width: 2px; height: 100%; background: linear-gradient(to bottom, var(--accent-teal), var(--accent-blue)); }
    .step-connector span::after { width: 100%; height: 100%; left: 0; top: -100%; animation: connector-pulse-vert 2.5s linear infinite; }

    .contact-cards { flex-direction: column; align-items: center; }
    .contact-card { max-width: 100%; width: 100%; justify-content: center; }

    .btn-large { padding: 16px 36px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
    .hero { padding-top: 120px; padding-bottom: 60px; }
    .hero-title { font-size: 2.2rem; }
    .hero-sub { font-size: 0.95rem; }
    .hero-img { width: 200px; }
    .hero-stats { flex-direction: column; gap: 16px; }
    .stat-divider { width: 40px; height: 1px; }
    .stat-num { font-size: 1.6rem; }

    .section-title { font-size: 1.6rem; }
    .section-desc { font-size: 0.95rem; }

    .process-step { min-height: 160px; padding: 24px 20px; }
    .step-icon { width: 32px; height: 32px; }

    .contact-card { padding: 18px 20px; }
    .contact-value { font-size: 0.85rem; }

    .fab-group { bottom: 20px; right: 16px; }
    .fab { width: 42px; height: 42px; }
}

/* Accessibility: 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;
    }
    .blob, #particle-canvas, .scanlines { display: none; }
    .floating, .floating-slow { animation: none; }
    .reveal-up, .reveal-left, .reveal-right { opacity: 1; transform: none; }
}