/* Coming soon page: copy of the start-up loader styles (css/boot.css), plus the page's own additions at the end. */

.sw-boot {
    position: fixed;
    inset: 0;
    z-index: 1000;
    min-height: 100dvh;
    transition: opacity 700ms ease, transform 700ms cubic-bezier(0.22, 1, 0.36, 1), filter 700ms ease;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 1.5rem;
    background: radial-gradient(circle at 50% 42%, rgba(83, 191, 214, 0.2), transparent 32rem), radial-gradient(circle at 85% 10%, rgba(11, 120, 151, 0.35), transparent 28rem), linear-gradient(165deg, #003f5c 0%, #04314a 55%, #021a28 100%);
    color: #ffffff;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
}

.sw-boot__network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.85;
}

.sw-boot__grid {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 15%, transparent 70%);
    pointer-events: none;
}

.sw-boot__stage {
    position: relative;
    z-index: 1;
    width: min(100%, 30rem);
    display: grid;
    justify-items: center;
    gap: 1.6rem;
    text-align: center;
    animation: sw-boot-in 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.sw-boot.is-leaving {
    opacity: 0;
    transform: scale(1.04);
    filter: blur(6px);
    pointer-events: none;
}

.sw-boot.is-complete .sw-boot__plate {
    box-shadow: 0 0 0 2px rgba(127, 227, 245, 0.8), 0 0 5rem rgba(83, 191, 214, 0.8), 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
}

/* Logo core with orbiting energy ring */

.sw-boot__core {
    position: relative;
    display: grid;
    place-items: center;
    padding: 1.1rem;
}

.sw-boot__core::before,
.sw-boot__core::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 2rem;
    padding: 2px;
    background: conic-gradient(from var(--sw-boot-angle, 0deg), transparent 0deg, #53bfd6 70deg, #7fe3f5 110deg, transparent 180deg, transparent 360deg);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: sw-boot-orbit 2.4s linear infinite;
}

.sw-boot__core::after {
    inset: -0.6rem;
    border-radius: 2.4rem;
    opacity: 0.45;
    animation-duration: 3.6s;
    animation-direction: reverse;
    filter: blur(1px);
}

.sw-boot__plate {
    position: relative;
    padding: 0.9rem 1.4rem;
    border-radius: 1.4rem;
    box-shadow: 0 0 0 1px rgba(127, 227, 245, 0.35), 0 0 3rem rgba(83, 191, 214, 0.45), 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
    animation: sw-boot-breathe 2.8s ease-in-out infinite;
}

.sw-boot__plate img {
    width: min(62vw, 15rem);
    height: auto;
    display: block;
}

/* Headline & counter */

.sw-boot__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(127, 227, 245, 0.3);
    border-radius: 999px;
    background: rgba(127, 227, 245, 0.08);
    color: #7fe3f5;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sw-boot__pulse {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #7fe3f5;
    box-shadow: 0 0 0 0 rgba(127, 227, 245, 0.6);
    animation: sw-boot-ping 1.4s ease-out infinite;
}

.sw-boot__readout {
    display: grid;
    gap: 0.35rem;
}

.sw-boot__percent {
    margin: 0;
    font-size: clamp(3rem, 12vw, 4.5rem);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
    line-height: 1;
    background: linear-gradient(90deg, #7fe3f5 0%, #ffffff 60%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sw-boot__percent small {
    font-size: 0.45em;
    letter-spacing: 0;
}

.sw-boot__message {
    min-height: 1.5em;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.95rem;
}

/* Progress bar with shimmer */

.sw-boot__progress {
    position: relative;
    width: 100%;
    height: 0.4rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
}

.sw-boot__bar {
    position: relative;
    width: 3%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0b7897 0%, #53bfd6 60%, #7fe3f5 100%);
    box-shadow: 0 0 1rem rgba(127, 227, 245, 0.8);
    transition: width 260ms ease-out;
}

.sw-boot__bar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    transform: translateX(-100%);
    animation: sw-boot-shimmer 1.3s ease-in-out infinite;
}

/* Boot sequence */

.sw-boot__steps {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sw-boot__steps li {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    padding: 0.7rem 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.9rem;
    background: rgba(3, 36, 54, 0.72);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.25;
    transition: all 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sw-boot__dot {
    width: 1.3rem;
    height: 1.3rem;
    display: grid;
    place-items: center;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    transition: all 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sw-boot__steps li.is-active {
    border-color: rgba(127, 227, 245, 0.4);
    background: rgba(8, 64, 88, 0.82);
    color: #ffffff;
}

.sw-boot__steps li.is-active .sw-boot__dot {
    border-color: rgba(127, 227, 245, 0.35);
    border-top-color: #7fe3f5;
    animation: sw-boot-spin 800ms linear infinite;
}

.sw-boot__steps li.is-done {
    color: rgba(255, 255, 255, 0.9);
}

.sw-boot__steps li.is-done .sw-boot__dot {
    border-color: transparent;
    background: #12a36b;
    box-shadow: 0 0 0.9rem rgba(18, 163, 107, 0.7);
}

.sw-boot__steps li.is-done .sw-boot__dot::after {
    content: "";
    width: 0.32rem;
    height: 0.58rem;
    margin-top: -0.12rem;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Diagnostics */

.sw-boot__error {
    display: none;
    width: 100%;
    gap: 0.75rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.06);
    text-align: left;
    backdrop-filter: blur(10px);
}

.sw-boot.has-error .sw-boot__error,
.sw-boot.is-slow .sw-boot__error {
    display: grid;
}

.sw-boot.has-error .sw-boot__progress,
.sw-boot.has-error .sw-boot__steps,
.sw-boot.has-error .sw-boot__readout {
    display: none;
}

.sw-boot__error strong {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
}

.sw-boot.has-error .sw-boot__error strong {
    color: #ffb4ab;
}

.sw-boot__error code {
    max-height: 8rem;
    overflow: auto;
    padding: 0.6rem 0.75rem;
    border-radius: 0.6rem;
    background: rgba(0, 0, 0, 0.3);
    color: #e6f6fa;
    font-size: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.sw-boot__error code:empty {
    display: none;
}

.sw-boot__error button {
    justify-self: start;
    padding: 0.6rem 1.15rem;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #003f5c;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

/* Animations */

@property --sw-boot-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
}

@keyframes sw-boot-orbit {
    to { --sw-boot-angle: 360deg; }
}

@keyframes sw-boot-breathe {
    0%, 100% { box-shadow: 0 0 0 1px rgba(127, 227, 245, 0.35), 0 0 2.5rem rgba(83, 191, 214, 0.35), 0 1.5rem 4rem rgba(0, 0, 0, 0.45); }
    50% { box-shadow: 0 0 0 1px rgba(127, 227, 245, 0.55), 0 0 4rem rgba(83, 191, 214, 0.6), 0 1.5rem 4rem rgba(0, 0, 0, 0.45); }
}

@keyframes sw-boot-ping {
    to { box-shadow: 0 0 0 0.6rem rgba(127, 227, 245, 0); }
}

@keyframes sw-boot-shimmer {
    to { transform: translateX(100%); }
}

@keyframes sw-boot-spin {
    to { transform: rotate(360deg); }
}

@keyframes sw-boot-in {
    from { opacity: 0; transform: translateY(1rem) scale(0.98); }
}

@media (max-width: 480px) {
    .sw-boot__steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (prefers-reduced-motion: reduce) {
    .sw-boot *,
    .sw-boot *::before,
    .sw-boot *::after {
        animation: none !important;
    }

    .sw-boot {
        transition: opacity 200ms ease;
    }

    .sw-boot.is-leaving {
        transform: none;
        filter: none;
    }
}

/* Coming soon page additions */

html,
body {
    margin: 0;
    background: #021a28;
}

.sw-boot__title {
    margin: 0;
    font-size: clamp(2.6rem, 11vw, 4.25rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    background: linear-gradient(90deg, #7fe3f5 0%, #ffffff 60%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sw-boot__message {
    max-width: 26rem;
    line-height: 1.55;
}

/* Indeterminate bar: the build is in progress, with no end date to count down to. */
.sw-boot__bar.is-indeterminate {
    width: 38%;
    transition: none;
    animation: sw-build-sweep 2.4s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes sw-build-sweep {
    0% { transform: translateX(-105%); }
    100% { transform: translateX(270%); }
}

@media (prefers-reduced-motion: reduce) {
    .sw-boot__bar.is-indeterminate {
        width: 100%;
        opacity: 0.6;
    }
}
