/* Preloader v6 — minimal iris reveal, mesh sweep */

.p4p-preloader {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0810;
    transition: opacity 0.65s cubic-bezier(0.19, 1, 0.22, 1), visibility 0.65s;
    overflow: hidden;
}

.p4p-preloader::before {
    content: '';
    position: absolute;
    inset: -20%;
    background:
        radial-gradient(ellipse 80% 60% at 50% 35%, rgba(232, 168, 124, 0.14) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 50% 85%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
        linear-gradient(180deg, #1a1210 0%, #0c0a12 55%, #060508 100%);
    pointer-events: none;
}

.p4p-preloader__mesh {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background:
        repeating-linear-gradient(105deg, transparent 0 28px, rgba(232, 168, 124, 0.04) 28px 29px),
        repeating-linear-gradient(-15deg, transparent 0 36px, rgba(167, 139, 250, 0.03) 36px 37px);
    animation: p4pPreMeshDrift 8s linear infinite;
    pointer-events: none;
}

.p4p-preloader.is-opening {
    animation: p4pPreIris 0.95s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.p4p-preloader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.p4p-preloader__stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.35rem;
    width: min(92vw, 420px);
}

.p4p-preloader__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.p4p-preloader__logo-wrap img {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(232, 168, 124, 0.4));
}

.p4p-preloader__wordmark {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    font-family: var(--p4p-font-display);
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #fff;
}

.p4p-preloader__wordmark em {
    font-style: normal;
    background: linear-gradient(135deg, #e8a87c, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.p4p-preloader__tagline {
    margin: 0;
    font-family: var(--p4p-font-tech, monospace);
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.42);
    text-align: center;
}

.p4p-preloader__track {
    width: 100%;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
    position: relative;
}

.p4p-preloader__progress {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: linear-gradient(90deg, #a78bfa, #e8a87c, #f0c4a0);
    box-shadow: 0 0 16px rgba(232, 168, 124, 0.45);
    transition: width 0.14s linear;
}

.p4p-preloader__status {
    margin: 0;
    min-height: 1.2em;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
    line-height: 1.4;
}

.p4p-preloader__counter {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

@keyframes p4pPreMeshDrift {
    from { transform: translateY(0); }
    to { transform: translateY(-36px); }
}

@keyframes p4pPreIris {
    0% { clip-path: circle(120% at 50% 50%); filter: blur(0); }
    100% { clip-path: circle(0% at 50% 50%); filter: blur(6px); opacity: 0.2; }
}

html.p4p-reduced-motion .p4p-preloader__mesh {
    animation: none;
}

html.p4p-reduced-motion .p4p-preloader.is-opening {
    animation: none;
}
