﻿/* #region Page Transition */
:root {
    --rd-bg: var(--section-bg-primary, #fffdf9);
    --rd-surface: var(--section-bg-secondary, #fbf1df);
    --rd-cloud: rgba(var(--accent-main-rgb), 0.18);
}

html[data-theme="dark"] {
    /* --rd-cafe override: animación usa crema claro para visibilidad en fondo oscuro */
    --rd-cafe: #ece4da;
    --rd-bg: var(--section-bg-primary, #141216);
    --rd-surface: var(--section-bg-secondary, #1e1c22);
    --rd-cloud: rgba(var(--text-main-rgb), 0.14);
}

.page-loader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at top, var(--rd-surface) 0%, var(--rd-bg) 55%);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.8, 0, 0.2, 1);
}

.loader-active {
    transform: translateY(0) !important;
}

.loader-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 10;
}

.loader {
    position: relative;
    width: 160px;
    height: 60px;
    animation: speeder 0.4s linear infinite;
}

.torso-base {
    position: absolute;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-right: 100px solid var(--rd-cafe);
    border-bottom: 6px solid transparent;
    left: 0;
    top: 25px;
}

.jetpack {
    height: 22px;
    width: 22px;
    border-radius: 50%;
    background: var(--rd-cafe);
    position: absolute;
    right: -110px;
    top: -16px;
}

.jetpack::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-top: 0 solid transparent;
    border-right: 55px solid var(--rd-cafe);
    border-bottom: 16px solid transparent;
    top: 0;
    right: 12px;
}

.rider-face {
    position: absolute;
    height: 12px;
    width: 20px;
    background: var(--rd-cafe);
    border-radius: 20px 20px 0 0;
    transform: rotate(-40deg);
    right: -121px;
    top: -14px;
}

.rider-face::after {
    content: "";
    height: 12px;
    width: 12px;
    background: var(--rd-cafe);
    right: 4px;
    top: 7px;
    position: absolute;
    transform: rotate(40deg);
    border-radius: 0 0 0 2px;
}

.loader-brand {
    text-align: center;
    margin-top: 40px;
}

.brand-title {
    color: var(--rd-cafe);
    font-weight: 900;
    font-size: 2.8rem;
    margin: 0;
}

.brand-slogan {
    color: var(--accent-main);
    font-weight: bold;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin: 5px 0 0 0;
}

.clouds-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.cloud {
    position: absolute;
    background: var(--rd-cloud);
    border-radius: 50px;
    animation: moveClouds 3s linear infinite;
}

.c1 { width: 120px; height: 40px; top: 20%; left: 110%; animation-duration: 6s; }
.c2 { width: 160px; height: 50px; top: 50%; left: 110%; animation-duration: 4s; }
.c3 { width: 90px; height: 35px; top: 80%; left: 110%; animation-duration: 7s; }

.top-fazers > span {
    height: 5px;
    width: 35px;
    background: var(--accent-main);
    position: absolute;
    top: 5px;
    left: 60px;
    border-radius: 2px 10px 1px 0;
}

.longfazers span {
    position: absolute;
    height: 2px;
    width: 20%;
    background: var(--accent-main);
    opacity: 0.18;
}

@keyframes moveClouds {
    from { left: 110%; }
    to { left: -200px; }
}

@keyframes speeder {
    0% { transform: translate(2px, 1px) rotate(0deg); }
    50% { transform: translate(-1px, 3px) rotate(-1deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}
/* #endregion */

