/* Brand splash: covers the page while it loads. The TriLingva mark spins in the centre, the name and the slogan sit under it. */
.brand-splash {
    position: fixed;
    inset: 0;
    z-index: 2147483600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    background: radial-gradient(circle at 50% 42%, #fffaf0 0%, #f6e7cc 55%, #e9d3ad 100%);
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.brand-splash.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.brand-splash__inner {
    display: grid;
    justify-items: center;
    gap: 18px;
    text-align: center;
}

.brand-splash__mark {
    position: relative;
    display: grid;
    place-items: center;
    --brand-mark: min(46vw, 220px);
    width: var(--brand-mark);
    aspect-ratio: 1;
    /* the square turns around its centre and its corners reach about 0.21 of its size past the box:
       the room below keeps them clear of the name */
    margin-bottom: calc(var(--brand-mark) * 0.22);
}

.brand-splash__mark::before {
    content: "";
    position: absolute;
    inset: -14%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(23, 169, 214, 0.22) 0%, rgba(255, 176, 46, 0.12) 45%, transparent 70%);
    animation: brand-splash-pulse 2.4s ease-in-out infinite;
}

.brand-splash__mark img {
    position: relative;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 14px 22px rgba(15, 23, 42, 0.18));
    animation: brand-splash-spin 2.6s linear infinite;
}

.brand-splash__name {
    color: #2b2116;
    font-size: clamp(1.7rem, 6vw, 2.4rem);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-splash__slogan {
    color: #7a6446;
    font-size: clamp(0.95rem, 3.6vw, 1.1rem);
}

:root[data-theme="dark"] .brand-splash {
    background: radial-gradient(circle at 50% 42%, #1d2a36 0%, #121b24 60%, #0b1118 100%);
}

:root[data-theme="dark"] .brand-splash__name {
    color: #f3ead8;
}

:root[data-theme="dark"] .brand-splash__slogan {
    color: #a9b6c4;
}

/* loading bar: the same striped green bar as the trainer uses under its stage picture */
.brand-splash__progress {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: min(260px, 70vw);
    margin-top: 12px;
}

.brand-splash__track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(120, 82, 30, 0.16);
    overflow: hidden;
}

.brand-splash__fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: repeating-linear-gradient(135deg, #58cc02 0 12px, #7ddc2a 12px 24px);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.12);
}

.brand-splash__label {
    color: #7a5a2a;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

:root[data-theme="dark"] .brand-splash__track {
    background: rgba(255, 255, 255, 0.12);
}

:root[data-theme="dark"] .brand-splash__label {
    color: #c9b48a;
}

@keyframes brand-splash-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes brand-splash-pulse {
    0%, 100% { transform: scale(0.94); opacity: 0.7; }
    50% { transform: scale(1.04); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .brand-splash__mark img,
    .brand-splash__mark::before {
        animation-duration: 6s;
    }
}
