:root {
    --page-padding-x: 7vw;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Cormorant Garamond', Georgia, serif;
}

/* Basic Styles */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    font-family: var(--font-body);
    overflow: hidden; /* Prevents scrollbars from appearing */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

* {
    box-sizing: border-box;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 3px;
}

/* Performance optimizations */
img, svg {
    max-width: 100%;
    height: auto;
}

.swiper-slide {
    will-change: transform;
    contain: layout style paint;
}

body.loading .hero-type-1-item-title {
    opacity: 0;
}

.container {
    width: 100%;
    padding: 0 var(--page-padding-x);
    margin: 0 auto;
    position: relative;
    z-index: 2;
    box-sizing: border-box;
}

/* Constrain the hero text container to the right side of the page */
.swiper-slide .container {
    width: 55%; /* Only occupy the right-hand side of the viewport */
    margin-left: auto; /* Push the container to the right */
    margin-right: 0;
}

/* Hero Slider Styles */
.hero-type-1 {
    width: 100%;
    height: 100vh; /* Full viewport height */
}

.hero-type-1-swiper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6)); /* Darker gradient overlay */
    z-index: 1;
}

/* Text Animation Styles (from spotlessagency.com inspiration) */
.hero-type-1-item-title {
    font-family: var(--font-heading);
    font-size: 3.5rem; /* Final size */
    font-weight: 400;
    text-align: right; /* Align text to the right */
    text-transform: none;
    color: #fff;
    position: relative;
    width: 100%;
    transition: opacity 0.5s ease;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8), 0 4px 40px rgba(0, 0, 0, 0.6);
}

.swiper-slide-active .hero-type-1-item-title .char {
    animation: slide-in-char 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--char-index, 0.05s); /* Use --char-index for delay */
}

@keyframes slide-in-char {
    0% {
        opacity: 0;
        transform: translateY(100%);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Initial state for non-active slides */
.hero-type-1-item-title .char {
    opacity: 0;
    transform: translateY(100%);
}

/* Main Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    background-color: rgba(17, 24, 39, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    width: 100%;
    padding: 0 var(--page-padding-x);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.logo-img {
    height: 80px;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    margin-left: 30px;
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    transition: opacity 0.3s;
    opacity: 0.7;
}

.nav-links a.active, .nav-links a:hover {
    opacity: 1;
}

/* Content Panel */
.content-panel {
    position: absolute;
    top: 50%;
    left: var(--page-padding-x);
    transform: translateY(-50%) scale(1);
    width: 90%;
    max-width: 420px; /* Slightly narrower */
    height: auto;
    max-height: 75vh; /* Slightly taller */
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 500;
    color: #fff;
    padding: 30px; /* Reduced padding */
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    line-height: 1.5;
}

.content-panel.panel-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) scale(0.95);
}

/* Close Panel Button */
.close-panel-btn {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: background-color 0.3s, transform 0.2s;
    z-index: 501;
}

.close-panel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.close-panel-btn:active {
    transform: scale(0.95);
}

.content-section {
    display: none; /* Hide all sections by default */
}

.content-section.active {
    display: block; /* Show only the active section */
}

.content-section h2 {
    font-family: var(--font-heading);
    margin-top: 0;
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.intro-text {
    font-size: 0.9rem;
    font-weight: 300;
    opacity: 0.85;
    margin-bottom: 20px;
    line-height: 1.5;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.service-item {
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    padding-left: 15px;
    transition: border-color 0.3s;
}

.service-item:hover {
    border-left-color: rgba(255, 255, 255, 0.8);
}

.service-item h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0 0 5px 0;
    letter-spacing: 0.02em;
}

.service-item p {
    font-size: 0.85rem;
    font-weight: 300;
    opacity: 0.85;
    margin: 0;
    line-height: 1.4;
}

/* Hidden SEO content - visible to crawlers, not users */
.seo-content {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Social Links in Nav */
.social-links {
    display: flex;
    align-items: center;
    margin-left: 20px; /* Space between nav links and social icons */
}

.social-icon {
    color: #fff;
    margin-left: 20px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.social-icon:hover {
    opacity: 1;
}

.social-icon svg {
    width: 22px;
    height: 22px;
}

/* Contact Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
}

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

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    opacity: 0.85;
    text-transform: uppercase;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 12px 15px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    box-sizing: border-box;
    transition: border-color 0.3s, background-color 0.3s;
}

.contact-form select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.contact-form select option {
    background-color: #1a1a1a;
    color: #fff;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder,
.contact-form select::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Hide honeypot field */
.hidden {
    display: none;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background-color: rgba(0, 0, 0, 0.4);
}

.submit-btn {
    padding: 12px 20px;
    background-color: #fff; /* White button */
    color: #333; /* Dark text */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.05em;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    background-color: #f0f0f0;
}

/* Swiper Navigation & Scrollbar Styles (spotlessagency.com inspired) */
.bottom {
    position: fixed;
    bottom: 30px;
    right: var(--page-padding-x);
    z-index: 100;
    display: flex;
    align-items: center;
}

.nav-wrapper {
    display: flex;
    margin-right: 20px;
}

.swiper-button-prev, .swiper-button-next {
    position: static; /* Override default positioning */
    width: 50px;
    height: 50px;
    background-color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
    margin: 0 5px;
    display: flex; /* Use flexbox for centering */
    justify-content: center;
    align-items: center;
}

.swiper-button-prev:hover, .swiper-button-next:hover {
    background-color: #f0f0f0; /* Slight grey on hover */
}

.swiper-button-prev::after, .swiper-button-next::after {
    /* Forcefully remove the default swiper icon */
    content: '' !important;
}

/* Hide the injected SVG icon from swiper */
.swiper-navigation-icon {
    display: none !important;
}

/* More accurate arrow style */
.arrow {
    display: block;
    width: 12px;
    height: 12px;
    border-top: 1.5px solid #555; /* Grey and slightly thinner */
    border-left: 1.5px solid #555; /* Grey and slightly thinner */
}

.swiper-button-prev .arrow {
    transform: rotate(-45deg);
    margin-left: 2px; /* Nudge for optical centering */
}

.swiper-button-next .arrow {
    transform: rotate(135deg);
    margin-right: 2px; /* Nudge for optical centering */
}

.pagination.swiper-scrollbar-horizontal {
    position: static;
    width: 100px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.2);
}

.swiper-scrollbar-drag {
    background-color: #fff;
    height: 100%;
}

/* Project Name Indicator */
.project-name-indicator {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    padding: 10px 20px;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* Splash Screen Styles */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9); /* Slightly darker background */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    flex-direction: column;
}

.splash-content p {
    font-family: var(--font-heading); /* Use the heading font for consistency */
    font-size: 1.8rem; /* Reduced font size for a more subtle appearance */
    font-weight: 400; /* Match the weight of hero titles */
    text-align: center;
    letter-spacing: 0.02em; /* Consistent letter spacing */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    animation: fade-in-out 1.5s infinite;
}

/* Progress Bar */
.progress-bar {
    width: 80%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #1e4d5c, #3a7d8c); /* Updated to match the site's tone */
    animation: progress-animation 1.5s infinite;
}

@keyframes progress-animation {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

@keyframes fade-in-out {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===================================
   RESPONSIVE DESIGN - MOBILE FIRST
   =================================== */

/* Mobile devices (up to 640px) */
@media (max-width: 640px) {
    :root {
        --page-padding-x: 5vw;
    }

    /* Navigation */
    .main-nav {
        padding: 10px 0;
    }

    .logo-img {
        height: 50px;
    }

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide nav-right by default on mobile */
    .nav-right {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: 100vh;
        background-color: rgba(17, 24, 39, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }

    .nav-right.mobile-menu-open {
        right: 0;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-bottom: 30px;
    }

    .nav-links a {
        margin-left: 0;
        margin-bottom: 20px;
        font-size: 1.1rem;
        padding: 10px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .social-links {
        margin-left: 0;
        display: flex;
        gap: 20px;
    }

    .social-icon {
        margin-left: 0;
    }

    .social-icon svg {
        width: 24px;
        height: 24px;
    }

    /* Mobile menu overlay */
    body.mobile-menu-active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    /* Hero Text */
    .swiper-slide .container {
        width: 90%;
        margin-left: auto;
        margin-right: auto;
        padding: 0 5vw;
    }

    .hero-type-1-item-title {
        font-size: 1.8rem;
        text-align: center;
        line-height: 1.3;
    }

    /* Content Panel - Full screen on mobile */
    .content-panel {
        position: fixed;
        top: 0;
        left: 0;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        padding: 80px 20px 20px 20px;
        overflow-y: auto;
    }

    .content-panel.panel-hidden {
        transform: translateX(-100%);
    }

    /* Show close button on mobile */
    .close-panel-btn {
        display: flex;
    }

    .content-section h2 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }

    .intro-text {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .service-item h3 {
        font-size: 1rem;
    }

    .service-item p {
        font-size: 0.8rem;
    }

    /* Form adjustments */
    .contact-form label {
        font-size: 0.75rem;
    }

    .contact-form input,
    .contact-form textarea,
    .contact-form select {
        font-size: 0.9rem;
        padding: 10px 12px;
    }

    .submit-btn {
        font-size: 0.95rem;
        padding: 14px 20px;
    }

    /* Navigation controls */
    .bottom {
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
    }

    .swiper-button-prev, .swiper-button-next {
        width: 40px;
        height: 40px;
    }

    .arrow {
        width: 10px;
        height: 10px;
    }

    .pagination.swiper-scrollbar-horizontal {
        width: 80px;
    }

    /* Project name indicator */
    .project-name-indicator {
        bottom: 80px;
        font-size: 0.9rem;
        padding: 8px 16px;
    }
}

/* Small tablets (641px to 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    :root {
        --page-padding-x: 6vw;
    }

    .logo-img {
        height: 60px;
    }

    .nav-links a {
        margin-left: 20px;
        font-size: 0.9rem;
    }

    .swiper-slide .container {
        width: 70%;
    }

    .hero-type-1-item-title {
        font-size: 2.5rem;
        text-align: center;
    }

    .content-panel {
        left: 50%;
        transform: translateX(-50%) translateY(-50%);
        max-width: 500px;
    }

    .content-panel.panel-hidden {
        transform: translateX(-50%) translateY(-50%) scale(0.95);
    }

    /* Show mobile menu on smaller tablets */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-right {
        position: fixed;
        top: 0;
        right: -100%;
        width: 50%;
        max-width: 350px;
        height: 100vh;
        background-color: rgba(17, 24, 39, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        z-index: 1000;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.3);
    }

    .nav-right.mobile-menu-open {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        margin-bottom: 30px;
    }

    .nav-links a {
        margin-left: 0;
        margin-bottom: 15px;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .social-links {
        margin-left: 0;
    }
}

/* Tablets (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .swiper-slide .container {
        width: 65%;
    }

    .hero-type-1-item-title {
        font-size: 3rem;
    }

    .content-panel {
        max-width: 450px;
    }
}

/* Large screens (1025px to 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .hero-type-1-item-title {
        font-size: 3.5rem;
    }

    .content-panel {
        max-width: 480px;
    }
}

/* Extra large screens (1441px+) */
@media (min-width: 1441px) {
    .hero-type-1-item-title {
        font-size: 4rem;
    }

    .content-panel {
        max-width: 520px;
    }

    .swiper-button-prev, .swiper-button-next {
        width: 60px;
        height: 60px;
    }

    .arrow {
        width: 14px;
        height: 14px;
    }
}

/* Landscape mobile devices */
@media (max-width: 896px) and (orientation: landscape) {
    .hero-type-1-item-title {
        font-size: 1.5rem;
    }

    .content-panel {
        max-height: 85vh;
        padding: 70px 20px 20px 20px;
    }

    .main-nav {
        padding: 8px 0;
    }

    .logo-img {
        height: 45px;
    }

    .bottom {
        bottom: 15px;
    }

    .project-name-indicator {
        display: none;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-links a,
    .social-icon,
    .submit-btn,
    .swiper-button-prev,
    .swiper-button-next {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .service-item {
        padding: 15px;
        margin-bottom: 10px;
        background-color: rgba(255, 255, 255, 0.03);
        border-radius: 8px;
        border-left: 2px solid rgba(255, 255, 255, 0.3);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .swiper-slide-active .hero-type-1-item-title .char {
        animation: none;
        opacity: 1;
        transform: translateY(0);
    }
}

/* Print styles */
@media print {
    .main-nav,
    .hero-type-1,
    .bottom,
    .project-name-indicator,
    #splash-screen {
        display: none;
    }

    .content-panel {
        position: static;
        transform: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        background: none;
        border: none;
        color: #000;
    }

    .content-section {
        display: block !important;
        page-break-inside: avoid;
    }
}