:root {
    --brand-blue: #0A2342;
    --brand-gold: #FFD700;
    --brand-light-gray: #F3F4F6;
    --brand-white: #FFFFFF;
    --brand-scroll-blue: #3F90D5;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--brand-light-gray);
    color: var(--brand-blue);
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--brand-gold);
    color: var(--brand-blue);
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--brand-blue);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease-out;
}

.embroidery-loader {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.thread {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid;
    border-color: transparent;
    animation: thread-spin 3s linear infinite;
}

.thread:nth-child(1) {
    border-top-color: var(--brand-gold);
    animation-delay: 0s;
}

.thread:nth-child(2) {
    border-top-color: var(--brand-white);
    animation-delay: -1s;
}

.thread:nth-child(3) {
    border-top-color: var(--brand-gold);
    animation-delay: -2s;
}

.loader-logo-container {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: logo-pulse 2s infinite;
}

.loader-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

@keyframes thread-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes logo-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
    50% { transform: scale(1.1); box-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

.loader-text {
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-align: center;
    margin-top: 30px;
    text-transform: uppercase;
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.loader-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--brand-gold);
    border-radius: 2px;
    animation: progress-loading 3s infinite;
}

@keyframes progress-loading {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.header-sticky {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
}

.header-sticky .header-logo-text {
    color: var(--brand-blue);
}

.header-sticky .header-logo-subtext {
    color: var(--brand-scroll-blue);
}

.header-sticky .nav-link {
    color: var(--brand-blue);
}

.header-sticky .nav-link:hover {
    color: var(--brand-gold);
}

#mobile-menu-btn {
    color: var(--brand-gold);
}

.header-sticky #mobile-menu-btn {
    color: var(--brand-blue);
}

.hero-slide {
    display: block;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: opacity, transform;
    min-height: 100vh;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
    animation: kenburns 20s infinite;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.hero-slide.exiting {
    opacity: 0;
    transform: scale(1.1);
    z-index: 1;
}


@keyframes kenburns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    50% {
        transform: scale(1.2) translate(-10px, 10px);
    }
    100% {
        transform: scale(1) translate(0, 0);
    }
}

.slide-dot {
    border-radius: 50% !important;
    transition: all 0.3s ease;
}

.slide-dot.bg-brand-gold {
    background-color: var(--brand-gold) !important;
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
}

.reveal-element {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal-element.slide-in-up {
    transform: translateY(40px);
}

.reveal-element.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.expertise-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.category-card .category-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.category-card:hover .category-slideshow {
    opacity: 1;
}

.category-card:hover .category-default-image {
    opacity: 0;
}

.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slideshow-image.active {
    opacity: 1;
}

#clients {
    position: relative;
    background-image: url('photos/map/map.jpeg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 6rem 0;
}

#clients::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 35, 66, 0.8);
}

#clients .container {
    position: relative;
    z-index: 1;
}

#clients h2, #clients p {
    color: var(--brand-white);
}

/* Logo circle styling for Trusted by section */
#clients .grid > div > a {
    background-color: white !important;
    border: 3px solid var(--brand-gold);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

#clients .grid > div > a:hover {
    background-color: rgba(255, 215, 0, 0.1) !important;
    border-color: var(--brand-gold);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Animated Stitch Effect for Hero Text */
.stitch-text {
    font-family: 'Inter', sans-serif;
    font-weight: 900;
    font-size: 3.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    margin: 0;
    padding: 0;
}

.stitch-text.white-stitch {
    color: transparent;
    -webkit-text-stroke: 2px white;
    text-stroke: 2px white;
    stroke-dasharray: 0, 1000;
    stroke-dashoffset: 0;
    animation: stitchDraw 3s ease-in-out forwards;
    animation-delay: 0.5s;
}

.stitch-text.gold-stitch {
    color: transparent;
    -webkit-text-stroke: 2px var(--brand-gold);
    text-stroke: 2px var(--brand-gold);
    stroke-dasharray: 0, 1000;
    stroke-dashoffset: 0;
    animation: stitchDraw 3s ease-in-out forwards;
    animation-delay: 1.2s;
}

.stitch-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.3) 50%, transparent 100%);
    background-size: 200% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    animation: stitchShine 2s ease-in-out infinite;
    animation-delay: inherit;
}

.stitch-text.gold-stitch::before {
    background: linear-gradient(90deg, transparent 0%, rgba(255,215,0,0.4) 50%, transparent 100%);
    background-size: 200% 100%;
}

@keyframes stitchDraw {
    0% {
        stroke-dasharray: 0, 1000;
        opacity: 0;
        transform: translateY(20px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        stroke-dasharray: 1000, 0;
        opacity: 1;
    }
}

@keyframes stitchShine {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Dashed stitch effect */
.stitch-dashed {
    position: relative;
    display: inline-block;
}

.stitch-dashed::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -5px;
    right: -5px;
    height: 2px;
    background: repeating-linear-gradient(
        90deg,
        currentColor 0px,
        currentColor 3px,
        transparent 3px,
        transparent 8px
    );
    opacity: 0;
    animation: stitchLine 0.5s ease-in-out forwards;
}

.stitch-text.white-stitch .stitch-dashed::after {
    animation-delay: 0.8s;
    background: repeating-linear-gradient(
        90deg,
        white 0px,
        white 3px,
        transparent 3px,
        transparent 8px
    );
}

.stitch-text.gold-stitch .stitch-dashed::after {
    animation-delay: 1.5s;
    background: repeating-linear-gradient(
        90deg,
        var(--brand-gold) 0px,
        var(--brand-gold) 3px,
        transparent 3px,
        transparent 8px
    );
}

@keyframes stitchLine {
    0% {
        opacity: 0;
        transform: scaleX(0);
    }
    100% {
        opacity: 1;
        transform: scaleX(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .stitch-text {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .stitch-text {
        font-size: 2rem;
    }
}

.footer-logo-text {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

footer .group img {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}


/* Responsive Design */
@media (max-width: 768px) {
    .header-logo-text {
        font-size: 1.125rem;
    }
    .header-logo-subtext {
        font-size: 0.75rem;
    }
    #desktop-menu {
        display: none;
    }
    #mobile-menu-btn {
        display: block;
    }
    .hero-slide h1 {
        font-size: 2.25rem;
    }
    .hero-slide p {
        font-size: 1rem;
    }
    .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    .footer-logo-text {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }

    footer .group img {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }
}

@media (max-width: 640px) {
    .hero-slide h1 {
        font-size: 1.875rem;
    }
    .hero-slide p {
        font-size: 0.875rem;
    }
    .footer-logo-text {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }

    footer .group img {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    }
}