:root {
    /* Colors derived from Logo */
    --primary-blue: #2998E2;
    --primary-blue-hover: #1f82c4;
    --primary-dark: #2C1A66;
    --primary-dark-light: #3d2685;

    /* Neutral colors */
    --bg-light: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --white: #ffffff;

    /* Transitions & Shadows */
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 4px 20px -2px rgba(44, 26, 102, 0.03);
    --shadow-md: 0 12px 32px -4px rgba(44, 26, 102, 0.06);
    --shadow-lg: 0 24px 48px -8px rgba(44, 26, 102, 0.08);
}

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

html {
    /* scroll-behavior: smooth; removed for Lenis */
}

body {
    font-family: 'Outfit', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--white);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader.hidden {
    transform: translateY(-100%);
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.loader-logo {
    height: 48px;
    width: auto;
    animation: pulse 2s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

.loader-bar {
    width: 200px;
    height: 2px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: var(--primary-blue);
    transform-origin: left;
    animation: progress 1.5s infinite ease-in-out;
}

@keyframes progress {
    0% {
        transform: scaleX(0);
        transform-origin: left;
    }

    49% {
        transform: scaleX(1);
        transform-origin: left;
    }

    50% {
        transform: scaleX(1);
        transform-origin: right;
    }

    100% {
        transform: scaleX(0);
        transform-origin: right;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* Typography */
h1,
h2,
h3,
h4 {
    color: var(--primary-dark);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(41, 152, 226, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 152, 226, 0.4);
    color: var(--white);
}

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary-dark);
}

.full-width {
    width: 100%;
}

/* Glassmorphism utility */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
    padding: 16px 0;
    background: rgba(255, 255, 255, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px -2px rgba(44, 26, 102, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: grid;
    align-items: center;
}

.logo img {
    grid-area: 1 / 1;
    height: 40px;
    width: auto;
    transition: opacity 0.4s ease;
}

.logo-white {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.logo-colored {
    opacity: 0;
}

.header.scrolled .logo-white {
    opacity: 0;
}

.header.scrolled .logo-colored {
    opacity: 1;
}

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

.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 16px;
    font-weight: 500;
    color: var(--white);
    transition: color 0.4s ease;
}

.header.scrolled .lang-switch {
    color: var(--text-main);
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
    padding: 4px;
}

.header.scrolled .lang-btn {
    color: var(--text-muted);
}

.lang-btn.active,
.lang-btn:hover {
    color: var(--primary-blue);
    font-weight: 700;
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    position: relative;
    transition: color 0.4s ease;
}

.header.scrolled .nav-link {
    color: var(--primary-dark);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
}

.mobile-menu-btn .bar {
    width: 24px;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

.header.scrolled .mobile-menu-btn .bar {
    background-color: var(--primary-dark);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: linear-gradient(135deg, rgba(44, 26, 102, 0.85) 0%, rgba(26, 14, 63, 0.7) 100%), url('images/hero.png');
    background-size: cover;
    background-position: center;
    z-index: -2;
    will-change: transform;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 80% 20%, rgba(41, 152, 226, 0.25) 0%, transparent 50%);
    z-index: -1;
}

.hero-content {
    color: var(--white);
    max-width: 800px;
    z-index: 1;
}

.hero-content h1 {
    color: var(--white);
    margin-bottom: 24px;
}

.hero-content p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 16px;
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid var(--white);
    border-radius: 13px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--white);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0) translateX(-50%);
    }

    40% {
        transform: translateY(-10px) translateX(-50%);
    }

    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 12px);
        opacity: 0;
    }
}

/* Sections Common */
.section {
    padding: 120px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.service-card {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.service-card-content {
    padding: 40px 32px;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

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

.service-card .icon {
    font-size: 3rem;
    display: inline-block;
    color: var(--primary-blue);
}

/* Gallery */
.gallery {
    background-color: var(--bg-light);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 24px;
    border: 2px solid var(--primary-blue);
    background: transparent;
    color: var(--primary-blue);
    border-radius: 30px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 1rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-blue);
    color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: visible; /* changed from hidden to allow layers to pop out */
    aspect-ratio: 4/3;
    cursor: pointer;
    perspective: 1000px;
}

/* Multi-layer Stack Styles */
.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.layer img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Layer positioning */
.layer-3 {
    transform: scale(0.85) translateY(-20px) rotate(-4deg);
    z-index: 1;
    opacity: 0.6;
}

.layer-2 {
    transform: scale(0.92) translateY(-10px) rotate(3deg);
    z-index: 2;
    opacity: 0.8;
}

.layer-main {
    transform: scale(1) translateY(0) rotate(0deg);
    z-index: 3;
    opacity: 1;
}

/* Hover effect: fan out the stack */
.gallery-item:hover .layer-3 {
    transform: scale(0.85) translateY(-35px) translateX(-15px) rotate(-8deg);
}

.gallery-item:hover .layer-2 {
    transform: scale(0.92) translateY(-25px) translateX(15px) rotate(6deg);
}

.gallery-item:hover .layer-main {
    transform: scale(1.02) translateY(0);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 40px 20px 20px;
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
    opacity: 1;
}

.gallery-overlay h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Renovations */
.renovations {
    background-color: var(--white);
}

@media (min-width: 993px) {
    .renovations .about-grid {
        grid-template-columns: 1.8fr 1fr;
        gap: 80px;
    }
}

/* About */
.about {
    background-color: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.features {
    list-style: none;
    margin-top: 24px;
}

.features li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.features li span:first-child {
    color: var(--primary-blue);
    background: rgba(41, 152, 226, 0.1);
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.about-img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    object-fit: cover;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-lg);
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Contact */
.contact {
    background: linear-gradient(to bottom, var(--bg-light) 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(41, 152, 226, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.contact-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 48px;
}

.contact-details {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contact-item {
    display: flex;
    gap: 16px;
}

.contact-item .icon {
    font-size: 1.5rem;
    background: rgba(44, 26, 102, 0.05);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--text-muted);
    margin: 0;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.8);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(41, 152, 226, 0.2);
    background: #fff;
}

/* Footer */
.footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0;
    text-align: center;
}

.footer-logo img {
    height: 32px;
    margin-bottom: 16px;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

/* Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
}

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Responsive */
@media (max-width: 992px) {

    .about-grid,
    .contact-card {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {

    /* Redesigned Mobile Navbar (Full Screen Blur) */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1);
        z-index: 900;
        display: flex;
        gap: 24px;
    }

    .nav.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.5rem;
        font-weight: 500;
        color: var(--primary-dark);
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .nav.active .nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered entrance animations */
    .nav.active .nav-link:nth-child(1) {
        transition-delay: 0.2s;
    }

    .nav.active .nav-link:nth-child(2) {
        transition-delay: 0.3s;
    }

    .nav.active .nav-link:nth-child(3) {
        transition-delay: 0.4s;
    }

    .nav .btn {
        margin-top: 16px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .nav.active .btn {
        opacity: 1;
        transform: translateY(0);
        transition-delay: 0.5s;
    }

    .nav .lang-switch {
        margin-top: 32px;
        opacity: 0;
        transition: opacity 0.4s ease;
    }

    .nav.active .lang-switch {
        opacity: 1;
        transition-delay: 0.6s;
    }

    .logo {
        position: relative;
        z-index: 1000;
    }

    .mobile-menu-btn {
        display: flex;
        position: relative;
        z-index: 1000;
    }

    /* Fix colors when mobile menu is open over white background */
    .header.menu-open .logo-white {
        opacity: 0 !important;
    }

    .header.menu-open .logo-colored {
        opacity: 1 !important;
    }

    .header.menu-open .mobile-menu-btn .bar {
        background-color: var(--primary-dark) !important;
    }

    .header.menu-open .lang-switch button,
    .header.menu-open .lang-switch span {
        color: var(--primary-dark) !important;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .contact-card {
        padding: 32px 24px;
    }
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    position: relative;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    transition: opacity 0.2s ease;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    color: white;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    color: var(--primary-blue);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.3);
    border: none;
    padding: 15px;
    border-radius: 5px;
    transition: background 0.3s ease, color 0.3s;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(0,0,0,0.8);
    color: var(--primary-blue);
}

.lightbox-nav.prev {
    left: 20px;
}

.lightbox-nav.next {
    right: 20px;
}

/* Lightbox Animations */
.lightbox-img.slide-next {
    animation: slideNext 0.3s forwards ease-out;
}

.lightbox-img.slide-prev {
    animation: slidePrev 0.3s forwards ease-out;
}

.lightbox-img.zoom-in {
    animation: zoomIn 0.4s forwards cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideNext {
    0% { transform: translateX(30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slidePrev {
    0% { transform: translateX(-30px); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes zoomIn {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}