/* Holding page shown while YALKO is in maintenance or teasing mode. */
:root {
    --gate-bg: #000;
    --gate-orb-rgb: 255 255 255;
    --gate-text: #fff;
    --gate-muted: #ffffffbf;
    --gate-glass: rgba(255, 255, 255, .16);
    --gate-surface-highlight: rgba(255, 255, 255, .38);
    --gate-surface-warmth: rgba(236, 92, 19, .18);
    --gate-rim: rgba(255, 255, 255, .5);
    --gate-mark-opacity: .28;
    --gate-mark-filter: drop-shadow(0 1px 1px var(--gate-rim));
    color-scheme: dark;
}

:root[data-theme="light"] {
    --gate-bg: #f2f2f4;
    --gate-orb-rgb: 0 0 0;
    --gate-text: #111113;
    --gate-muted: #111113b3;
    --gate-glass: rgba(17, 17, 19, .04);
    --gate-surface-highlight: rgba(255, 255, 255, .16);
    --gate-surface-warmth: rgba(236, 92, 19, .06);
    --gate-rim: rgba(17, 17, 19, .28);
    --gate-mark-opacity: .06;
    --gate-mark-filter: invert(1) drop-shadow(0 1px 1px var(--gate-rim));
    color-scheme: light;
}

@media (prefers-color-scheme: light) {
    :root[data-theme="system"] {
        --gate-bg: #f2f2f4;
        --gate-orb-rgb: 0 0 0;
        --gate-text: #111113;
        --gate-muted: #111113b3;
        --gate-glass: rgba(17, 17, 19, .04);
        --gate-surface-highlight: rgba(255, 255, 255, .16);
        --gate-surface-warmth: rgba(236, 92, 19, .06);
        --gate-rim: rgba(17, 17, 19, .28);
        --gate-mark-opacity: .06;
        --gate-mark-filter: invert(1) drop-shadow(0 1px 1px var(--gate-rim));
        color-scheme: light;
    }
}

* {
    box-sizing: border-box;
}

html,
body.gate-body {
    margin: 0;
    height: 100%;
    background: var(--gate-bg);
    color: var(--gate-text);
    font-family: 'Oswald', sans-serif;
    -webkit-font-smoothing: antialiased;
    user-select: none;
    -webkit-user-select: none;
}

.gate {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 16px;
    overflow: hidden;
}

.gate-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 720px;
    text-align: center;
}

/* ---- Logo + the light behind it ---- */

.gate-mark {
    position: relative;
    width: clamp(140px, 30vmin, 220px);
    aspect-ratio: 1;
    isolation: isolate;
    touch-action: manipulation; /* rapid taps register as clicks, not a double-tap zoom */
    -webkit-tap-highlight-color: transparent;
}

.gate-logo {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    height: 100%;
    opacity: var(--gate-mark-opacity);
    -webkit-user-drag: none;
    filter: var(--gate-mark-filter);
}

/* Frosted glass follows the silhouette and transmits the moving color behind it. */
.gate-glass {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(135deg, var(--gate-surface-highlight), transparent 32%, var(--gate-glass) 58%, var(--gate-surface-warmth));
    -webkit-backdrop-filter: blur(8px) saturate(1.6);
    backdrop-filter: blur(8px) saturate(1.6);
    -webkit-mask: var(--gate-logo) center / contain no-repeat;
    mask: var(--gate-logo) center / contain no-repeat;
    pointer-events: none;
}

/* Colored light drifting behind the mark */
.gate-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    width: 340%;
    isolation: isolate;
    aspect-ratio: 1;
    translate: -50% -50%;
    filter: blur(48px);
    opacity: 0.65;
    pointer-events: none;
}

.gate-orbit {
    position: absolute;
    inset: 0;
    animation: gate-orbit linear infinite;
}

.gate-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38%;
    aspect-ratio: 1;
    border-radius: 50%;
    mix-blend-mode: normal;
}

.gate-orbit--a {
    z-index: 1;
    animation-duration: 26s;
}

.gate-orbit--a .gate-orb {
    translate: -85% -80%;
    background: radial-gradient(circle, rgb(var(--gate-orb-rgb) / .9) 0%, rgb(var(--gate-orb-rgb) / .85) 28%, transparent 70%);
}

.gate-orbit--b {
    animation-duration: 34s;
    animation-direction: reverse;
}

.gate-orbit--b .gate-orb {
    width: 48%;
    translate: -20% -30%;
    background: radial-gradient(circle, #ff6a1f 0%, #ec5c13 30%, transparent 70%);
}

.gate-orbit--c {
    animation-duration: 42s;
    animation-delay: -12s;
}

.gate-orbit--c .gate-orb {
    width: 26%;
    translate: -20% 10%;
    background: radial-gradient(circle, rgb(var(--gate-orb-rgb) / .75) 0%, rgb(var(--gate-orb-rgb) / .6) 25%, transparent 68%);
    mix-blend-mode: normal;
}

/* A soft core follows the floating light’s color. */
.gate-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22%;
    aspect-ratio: 1;
    translate: -50% -50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgb(var(--gate-orb-rgb) / .35) 0%, transparent 70%);
    z-index: 2;
    animation: gate-breathe 9s ease-in-out infinite;
}

@keyframes gate-orbit {
    to {
        rotate: 360deg;
    }
}

@keyframes gate-breathe {
    0%, 100% {
        opacity: 0.7;
        scale: 1;
    }
    50% {
        opacity: 1;
        scale: 1.25;
    }
}

/* Lettering is built like the logo: faint ink with a rim, under frosted glass cut to the glyphs. */
.gate-title,
.gate-text {
    position: relative;
    z-index: 1;
}

.gate-lettering {
    position: relative;
    display: inline-block;
    max-width: 100%;
}

.gate-ink {
    color: var(--gate-text);
    opacity: var(--gate-mark-opacity);
    filter: drop-shadow(0 1px 1px var(--gate-rim));
}

.gate-lettering::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, var(--gate-surface-highlight), transparent 32%, var(--gate-glass) 58%, var(--gate-surface-warmth));
    -webkit-backdrop-filter: blur(8px) saturate(1.6);
    backdrop-filter: blur(8px) saturate(1.6);
    -webkit-mask: var(--gate-letter-mask, none) center / 100% 100% no-repeat;
    mask: var(--gate-letter-mask, none) center / 100% 100% no-repeat;
    pointer-events: none;
}

/* Until the glyph mask is ready, the faint ink alone shows the text. */
.gate-lettering:not([style])::before { display: none; }

.gate-title {
    margin: 8px 0 0;
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gate-text {
    margin: 12px 0 0;
    font-size: clamp(16px, 2.4vw, 20px);
    font-weight: 300;
    line-height: 1.5;
}

@media (prefers-reduced-motion: reduce) {
    .gate-orbit,
    .gate-core {
        animation: none;
    }

}
