:root {
    --bg-dark: #050505;
    --text-main: #f5f5f7;
    --text-muted: #86868b;
    --accent: #ffffff;
    --glass-bg: rgba(20, 20, 20, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Cursor Logic */
@media (pointer: fine) {
    body, a, button, input, textarea {
        cursor: none !important;
    }
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 15px;
    height: 15px;
    background-color: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 9999;
    mix-blend-mode: difference;
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border 0.3s ease;
}

.custom-cursor.hover {
    width: 60px;
    height: 60px;
    background-color: transparent;
    border: 1px solid var(--accent);
}

/* Typography */
h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

/* Glassmorphism Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

header h1 {
    color: var(--accent);
    font-size: 22px;
    letter-spacing: 0px;
}

nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

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

nav a:hover, nav a.active {
    color: var(--accent);
}

/* Hero Section (Canvas Pin) */
#hero-section {
    position: relative;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    background: var(--bg-dark);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 1;
}

/* Dark overlay to ensure text is readable */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(5,5,5,0.3) 0%, rgba(5,5,5,0.8) 100%);
    z-index: 2;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 3;
    width: 100%;
    padding: 0 5%;
}

.hero-content h2 {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.hero-content p {
    font-size: 1.25rem;
    color: #c0c0c0;
}

/* Internal Page Headers (Spacing since hero is absent) */
.page-header {
    padding-top: 120px; /* Space for fixed header */
    padding-bottom: 40px;
    text-align: center;
}

/* General Sections */
.section {
    padding: 100px 8%;
    text-align: center;
    position: relative;
    z-index: 10;
    background: var(--bg-dark);
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.projects-grid img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.projects-grid img:hover {
    transform: scale(1.03);
}

/* Instagram Hovering Slider (Accordion) */
.instagram-slider {
    display: flex;
    justify-content: center;
    gap: 15px;
    height: 450px;
    margin-top: 50px;
    width: 100%;
}

.instagram-slider .slide {
    flex: 1;
    border-radius: 20px;
    overflow: hidden;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    position: relative;
}

.instagram-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
    filter: grayscale(80%);
}

.instagram-slider .slide:hover {
    flex: 3;
}

.instagram-slider .slide:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

/* Buttons */
.instagram-btn {
    display: inline-block;
    margin-top: 40px;
    padding: 14px 30px;
    background: var(--accent);
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.instagram-btn:hover {
    transform: translateY(-3px);
}

/* Glassmorphism Form */
.contact-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

input, textarea {
    width: 100%;
    padding: 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus {
    border-color: rgba(255,255,255,0.3);
}

button {
    padding: 16px;
    border: none;
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

button:hover {
    opacity: 0.9;
}

/* Footer */
footer {
    background: #000;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
    font-size: 0.9rem;
    border-top: 1px solid var(--glass-border);
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-links {
    display: flex;
    gap: 20px;
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--accent);
}

/* WhatsApp Floating Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.whatsapp-btn:hover {
    transform: translateY(-5px);
}

/* ================= Premium Add-ons ================= */

/* 1. Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: var(--bg-dark);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent);
    font-size: 3rem;
    font-weight: 600;
}

/* 2. Page Transition Overlay */
#page-transition {
    position: fixed;
    top: 100%; /* Hidden initially below screen */
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #111; /* Slightly lighter than pure dark for contrast */
    z-index: 99998;
}

/* 3. Typography Reveals (SplitText prep) */
.char, .word {
    display: inline-block;
    opacity: 0; /* JS will animate this */
    transform: translateY(30px);
}
.word {
    overflow: hidden;
    padding-bottom: 5px; /* prevents clipping */
}
.char {
    transform: translateY(100%);
}

/* 4. Parallax Wrappers (Projects) */
.parallax-wrap {
    overflow: hidden;
    border-radius: 12px;
    cursor: none; /* custom cursor */
}

.parallax-wrap img {
    height: 120%; /* Allow room to move vertically */
    transform: scale(1.05); /* Slight scale to prevent edge gaps */
    will-change: transform;
    border-radius: 0;
}

/* 5. Lightbox */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(0,0,0,0.9);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(10px);
}
#lightbox.active {
    opacity: 1;
    pointer-events: all;
}
#lightbox img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#lightbox.active img {
    transform: scale(1);
}
.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    font-size: 40px;
    cursor: none;
    background: none;
    border: none;
    padding: 10px;
    line-height: 1;
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}
.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px 30px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, background 0.3s ease;
}
.service-card:hover {
    transform: translateY(-5px);
    background: rgba(40, 40, 40, 0.8);
}
.service-card h3 {
    color: var(--accent);
    margin-bottom: 15px;
    font-size: 1.5rem;
}
.service-card p {
    font-size: 1rem;
    margin: 0;
}

/* --- Stats Section --- */
.stats-container {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
    flex-wrap: wrap;
}
.stat-item h3 {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 5px;
}
.stat-item p {
    font-size: 1rem;
    margin: 0;
    color: var(--text-muted);
}

/* --- About: Team & Core Values --- */
.team-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 50px;
    text-align: left;
}
.team-img {
    width: 100%;
    border-radius: 15px;
    aspect-ratio: 4/5;
    object-fit: cover;
}
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}
.value-card {
    text-align: center;
    padding: 30px;
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}
.value-card h3 {
    color: var(--accent);
    margin-bottom: 10px;
}

/* --- Project Filters & Overlays --- */
.project-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.filter-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
}
.filter-btn.active, .filter-btn:hover {
    background: var(--accent);
    color: var(--bg-dark);
    border-color: var(--accent);
}

.parallax-wrap {
    position: relative;
}
.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    opacity: 0;
    transition: opacity 0.4s ease;
    text-align: left;
    pointer-events: none;
}
.parallax-wrap:hover .project-overlay {
    opacity: 1;
}
.project-overlay h3 {
    color: var(--accent);
    font-size: 1.4rem;
    margin-bottom: 5px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}
.project-overlay p {
    color: #ccc;
    font-size: 0.9rem;
    margin: 0;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}
.parallax-wrap:hover .project-overlay h3,
.parallax-wrap:hover .project-overlay p {
    transform: translateY(0);
}

/* --- Contact Info & Map --- */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    max-width: 1100px;
    margin: 50px auto 0;
    text-align: left;
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.info-block h3 {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.info-block p, .info-block a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    margin: 0;
}
.info-block a:hover {
    color: var(--accent);
}
.map-container {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}
.contact-form-wrap {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 20px;
}

/* --- Custom Alert Modal --- */
#custom-alert {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--bg-dark);
    padding: 15px 30px;
    border-radius: 30px;
    font-weight: 600;
    z-index: 999999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#custom-alert.show {
    bottom: 40px;
}

/* Responsiveness */
@media(max-width: 992px){
    .instagram-slider {
        height: 350px;
    }
    .hero-content h2 {
        font-size: 3rem;
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .team-container {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 768px){
    header {
        flex-direction: column;
        padding: 15px 5%;
        gap: 15px;
        border-radius: 0 0 20px 20px;
    }
    nav {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-content h2 {
        font-size: 2.5rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .instagram-slider {
        flex-direction: column;
        height: 600px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 60px 5%;
    }
    .contact-container {
        padding: 30px 20px;
    }
    .values-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        flex-direction: column;
        justify-content: center;
    }
}

@media(max-width: 480px){
    header h1 {
        font-size: 18px;
    }
    nav {
        gap: 15px;
    }
    nav a {
        font-size: 13px;
    }
    .hero-content h2 {
        font-size: 2rem;
    }
    h2 {
        font-size: 2rem;
    }
    .whatsapp-btn {
        padding: 12px 20px;
        font-size: 14px;
        bottom: 20px;
        right: 20px;
    }
}