/* Container */
.loader {
    width: 260px;
}

/* Villa outline */
.villa {
    width: 100%;
    stroke: #00a7b5;
    /* your architectural teal */
    stroke-width: 1.6;
    fill: none;
    /* strict outline only */
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Clean draw animation */
.villa rect,
.villa line {
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    animation: draw 3.5s ease-in-out infinite;
}

/* Subtle architectural sequencing */
.villa rect:nth-of-type(1) {
    animation-delay: 0s;
}

.villa rect:nth-of-type(2) {
    animation-delay: 0.2s;
}

.villa rect:nth-of-type(3) {
    animation-delay: 0.4s;
}

.villa rect:nth-of-type(4) {
    animation-delay: 0.6s;
}

.villa rect:nth-of-type(5) {
    animation-delay: 0.8s;
}

.villa rect:nth-of-type(6) {
    animation-delay: 1s;
}

.villa rect:nth-of-type(7) {
    animation-delay: 1.2s;
}

.villa line {
    animation-delay: 1.4s;
}

/* Blueprint-style drawing */
@keyframes draw {
    0% {
        stroke-dashoffset: 800;
        opacity: 0;
    }

    50% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    100% {
        stroke-dashoffset: -800;
        opacity: 0;
    }
}

.svg-container {
    width: 140px;
    /* Global glow triggered after the final piece is painted */
    animation: global-glow 6s infinite;
}

#preloader path {
    fill: transparent;
    stroke-linecap: round;
    stroke-linejoin: round;
    /* Thick stroke to mimic a paint brush */
    stroke-width: 5;
    stroke-dasharray: 800;
    stroke-dashoffset: 800;
    opacity: 0;
    animation: paint-individual 6s ease-in-out infinite;
}

/* Exact colors from pattern_4.jpg */
.white-path {
    stroke: #FFFFFF;
    --fill-col: #FFFFFF;
}

.teal-path {
    stroke: #00A3B1;
    --fill-col: #00A3B1;
}

/* Sequential delays to paint one after the other */
.p1 {
    animation-delay: 0.0s;
}

.p2 {
    animation-delay: 0.5s;
}

.p3 {
    animation-delay: 1.0s;
}

.p4 {
    animation-delay: 1.5s;
}

.p5 {
    animation-delay: 2.0s;
}

@keyframes paint-individual {
    0% {
        stroke-dashoffset: 800;
        opacity: 0;
        fill: transparent;
        stroke-width: 5;
    }

    5% {
        opacity: 1;
    }

    25% {
        stroke-dashoffset: 0;
        fill: transparent;
        stroke-width: 5;
    }

    35%,
    80% {
        stroke-dashoffset: 0;
        fill: var(--fill-col);
        stroke-width: 0;
        opacity: 1;
    }

    90%,
    100% {
        opacity: 0;
        fill: transparent;
    }
}

/* @keyframes global-glow {

    0%,
    55% {
        filter: drop-shadow(0 0 0px transparent);
    }

    /* Peaks after the 5th path (p5) has finished painting and filling */
70% {
    filter: drop-shadow(0 0 15px #FFFFFF) drop-shadow(0 0 25px #00A3B1);
}

90%,
100% {
    filter: drop-shadow(0 0 0px transparent);
}
}

*/ #preloader-text {
    opacity: 0;
    animation: text-glow-reveal 6s infinite;
}

/* @keyframes text-glow-reveal {

    0%,
    55% {
        opacity: 0;
        filter: drop-shadow(0 0 0px transparent);
    }

    70% {
        opacity: 1;
        filter: drop-shadow(0 0 15px #FFFFFF) drop-shadow(0 0 25px #00A3B1);
    }

    80% {
        opacity: 1;
        filter: drop-shadow(0 0 10px rgba(0, 167, 181, 0.5));
    }

    90%,
    100% {
        opacity: 0;
        filter: drop-shadow(0 0 0px transparent);
    }
} */

.preloader-subtitle {
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.25em;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 4px;
    margin-bottom: 0;
    line-height: 1;
}

.preloader-title {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--teal);
    margin-bottom: 0;
    line-height: 1;
}