/* CSS RESET & VARIABLES */
:root {
    --bg-dark: #07070b;
    --primary-purple: #8b5cf6;
    --primary-cyan: #06b6d4;
    --primary-magenta: #ec4899;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --glass-bg: rgba(13, 13, 23, 0.45);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-glow: rgba(139, 92, 246, 0.15);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-drag: none;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-dark);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 16px;
    scroll-behavior: smooth;
}

/* THREE.JS BACKGROUND CANVAS */
#webgl-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* CUSTOM CURSOR */
.cursor-dot {
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-magenta));
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 10000;
    box-shadow: 0 0 15px var(--primary-cyan);
    transition: width 0.2s, height 0.2s, background 0.2s;
}

.cursor-ring {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: border-color 0.2s, width 0.3s, height 0.3s, transform 0.1s cubic-bezier(0.1, 0.8, 0.3, 1);
}

/* Hover states for interactive items */
.interactive-hover:hover ~ .cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--primary-cyan);
    background: rgba(6, 182, 212, 0.05);
}

.interactive-hover:hover ~ .cursor-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-cyan);
}

/* LAYOUT & CONTAINERS */
.app-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* HEADER & FLOATING NAVIGATION */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2rem 4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 2rem;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 30%, var(--primary-cyan) 70%, var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-cyan);
    box-shadow: 0 0 12px var(--primary-cyan);
}

nav {
    display: flex;
    gap: 3rem;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s, text-shadow 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-cyan), var(--primary-purple));
    transition: width 0.3s;
}

nav a:hover, nav a.active {
    color: var(--text-light);
    text-shadow: 0 0 8px rgba(255,255,255,0.3);
}

nav a.active::after {
    width: 100%;
}

.header-btn {
    background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1.8rem;
    border-radius: 100px;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    backdrop-filter: blur(10px);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.2s;
}

.header-btn:hover {
    border-color: var(--primary-purple);
    box-shadow: 0 0 20px var(--glass-glow);
    transform: translateY(-2px);
}

/* SIDEBAR DOT NAVIGATION */
.sidebar-nav {
    position: fixed;
    right: 4rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 10;
}

.sidebar-dot-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
    text-decoration: none;
    cursor: pointer;
}

.sidebar-label {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.sidebar-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.sidebar-dot-container:hover .sidebar-label {
    opacity: 1;
    transform: translateX(0);
    color: var(--text-light);
}

.sidebar-dot-container:hover .sidebar-dot {
    background: var(--primary-cyan);
    transform: scale(1.5);
    box-shadow: 0 0 10px var(--primary-cyan);
}

.sidebar-dot-container.active .sidebar-dot {
    background: var(--primary-purple);
    transform: scale(1.6);
    box-shadow: 0 0 15px var(--primary-purple);
}

.sidebar-dot-container.active .sidebar-label {
    opacity: 0.5;
    color: var(--primary-purple);
}

/* FULL PAGE SLIDES WRAPPER */
.slides-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE 10+ */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s 1.2s; /* hides slide after transition completes */
    z-index: 1;
}
.slide::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    z-index: 2;
    transition: opacity 0.8s ease-in-out, visibility 0s;
}

/* GENERAL TYPOGRAPHY IN SLIDES */
.slide-content {
    width: 100%;
    max-width: 1400px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 8rem 8%;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    position: relative;
}

.slide-title-large {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 7.5rem);
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.slide-title-large span {
    display: inline-block;
    background: linear-gradient(135deg, #ffffff 40%, #a5b4fc, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-title-large .gradient-text {
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple) 60%, var(--primary-magenta));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.slide-subtitle {
    font-family: var(--font-display);
    font-size: clamp(1rem, 2vw, 1.4rem);
    font-weight: 600;
    color: var(--primary-cyan);
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.slide-subtitle::before {
    content: '';
    width: 30px;
    height: 2px;
    background: var(--primary-cyan);
    display: inline-block;
}

.slide-copy {
    font-size: clamp(1rem, 1.2vw, 1.2rem);
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* BUTTONS */
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.8rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: none;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    color: #fff;
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease-in-out;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4);
}

.cta-btn:hover::before {
    left: 100%;
}

.cta-btn-arrow {
    transition: transform 0.3s;
}

.cta-btn:hover .cta-btn-arrow {
    transform: translateX(5px);
}

/* GLASS CARD COMMON STYLES */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(12px) saturate(160%);
    padding: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s;
}

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

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 30px 60px rgba(139, 92, 246, 0.12), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* --- SCREEN 1: HERO --- */
#slide-1 .slide-content {
    grid-template-columns: 1.2fr 0.8fr;
}

.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.scroll-hint {
    position: absolute;
    bottom: -15vh;
    left: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.scroll-hint-line {
    width: 60px;
    height: 1px;
    background: var(--text-muted);
    position: relative;
    overflow: hidden;
}

.scroll-hint-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-cyan);
    transform: translateX(-100%);
    animation: scroll-line-anim 2s infinite ease-in-out;
}

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

/* --- SCREEN 2: SERVICES --- */
#slide-2 .slide-content {
    grid-template-columns: 1fr;
}

.services-header {
    margin-bottom: 4rem;
    text-align: center;
}

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

.service-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
}

.service-num {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-cyan), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.service-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.98rem;
}

/* --- SCREEN 3: PORTFOLIO SHOWCASE --- */
#slide-3 .slide-content {
    grid-template-columns: 1fr;
}

.portfolio-header {
    margin-bottom: 3rem;
}

.portfolio-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

.portfolio-card {
    padding: 0;
    height: 480px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.3s;
}

.portfolio-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: var(--primary-cyan);
}

/* Individual projects fallback mock images */
.project-1 { background-image: linear-gradient(to top, rgba(7,7,11,0.95) 20%, rgba(7,7,11,0.2) 60%), url('https://images.unsplash.com/photo-1508921912186-1d1a45ebb3c1?q=80&w=600'); }
.project-2 { background-image: linear-gradient(to top, rgba(7,7,11,0.95) 20%, rgba(7,7,11,0.2) 60%), url('https://images.unsplash.com/photo-1541701494587-cb58502866ab?q=80&w=600'); }
.project-3 { background-image: linear-gradient(to top, rgba(7,7,11,0.95) 20%, rgba(7,7,11,0.2) 60%), url('https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe?q=80&w=600'); }

.portfolio-card-info {
    padding: 2.5rem;
    z-index: 2;
}

.portfolio-card-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-cyan);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.portfolio-card-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.portfolio-card-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s, transform 0.4s;
}

.portfolio-card:hover .portfolio-card-desc {
    opacity: 1;
    transform: translateY(0);
}

/* --- SCREEN 4: WORKFLOW TIMELINE --- */
#slide-4 .slide-content {
    grid-template-columns: 1fr;
}

.workflow-header {
    margin-bottom: 4rem;
}

.timeline-container {
    display: flex;
    justify-content: space-between;
    position: relative;
    width: 100%;
}

.timeline-line-bg {
    position: absolute;
    top: 24px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    z-index: 1;
}

.timeline-node {
    display: flex;
    flex-direction: column;
    width: 22%;
    z-index: 2;
    cursor: pointer;
}

.timeline-bullet {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    position: relative;
    transition: border-color 0.4s, background 0.4s, box-shadow 0.4s, transform 0.4s;
}

.timeline-node:hover .timeline-bullet {
    border-color: var(--primary-cyan);
    background: var(--primary-cyan);
    color: var(--bg-dark);
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.4);
}

.timeline-node.active .timeline-bullet {
    border-color: var(--primary-purple);
    background: var(--primary-purple);
    color: #fff;
    transform: scale(1.15);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.5);
}

.timeline-node h4 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    letter-spacing: -0.5px;
    transition: color 0.3s;
}

.timeline-node:hover h4 {
    color: var(--primary-cyan);
}

.timeline-node p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

/* --- SCREEN 5: CONTACT --- */
#slide-5 .slide-content {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-card {
    width: 100%;
    max-width: 550px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

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

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
}

.form-input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 16px; /* Prevent auto-zoom on mobile */
    outline: none;
    transition: border-color 0.3s, background-color 0.3s, box-shadow 0.3s;
}

.form-input:focus {
    border-color: var(--primary-cyan);
    background-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
}

textarea.form-input {
    resize: none;
    height: 120px;
}

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

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.contact-item svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--primary-cyan);
    stroke-width: 2;
}

.socials {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s, background-color 0.3s, transform 0.2s;
    text-decoration: none;
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    transition: fill 0.3s;
}

.social-link:hover {
    border-color: var(--primary-purple);
    background-color: var(--glass-bg);
    transform: translateY(-3px);
}

.social-link:hover svg {
    fill: var(--text-light);
}

/* --- RESPONSIVE WORK --- */
@media (max-width: 1100px) {
    header {
        padding: 1.5rem 2.5rem;
    }
    nav {
        display: none; 
    }
    .sidebar-nav {
        right: 2rem;
    }
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .portfolio-track {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .portfolio-card {
        height: 280px;
    }
    .timeline-container {
        flex-direction: column;
        gap: 2rem;
    }
    .timeline-line-bg {
        display: none;
    }
    .timeline-node {
        width: 100%;
        flex-direction: row;
        gap: 1.5rem;
        align-items: flex-start;
    }
    .timeline-bullet {
        margin-bottom: 0;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }
    #slide-5 .slide-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .contact-card {
        max-width: 100%;
    }
    .slide {
        padding: 0;
    }
    .slide-content {
        padding: 6rem 2.5rem;
    }
    .glass-card {
        padding: 1.8rem 1.5rem !important; /* reduce padding so inputs fit mobile screens */
        border-radius: 16px;
    }
    .form-row {
        grid-template-columns: 1fr; /* stack Name and Email fields vertically on mobile */
        gap: 1.2rem;
    }
    .contact-form {
        gap: 1.2rem;
    }
}

/* GSAP TEXT ANIMATION SPLIT SPANS */
.word-span {
    display: inline-block;
    white-space: nowrap;
}

.char {
    opacity: 0;
    transform: translateY(30px) rotate(5deg);
    display: inline-block;
}
