/* Winzos landing — layout chrome around the inline contest widget.
   The widget paints its own card inside a shadow root. */

html {
    scroll-behavior: smooth;
}

body {
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-bar {
    padding-top: env(safe-area-inset-top);
}

#contest {
    scroll-margin-top: 5.5rem;
}

.contest-stage {
    position: relative;
    width: 100%;
    max-width: 34rem;
    margin-inline: auto;
}

@media (min-width: 1024px) {
    .contest-stage {
        max-width: none;
        margin-inline: 0;
    }
}

/* Centered page: keep the widget a card in the middle, wide enough
   for its side-by-side layout, instead of stretching with the column. */
.contest-stage.contest-stage-centered {
    max-width: min(100%, 46rem);
    margin-inline: auto;
}

@media (min-width: 1024px) {
    .contest-stage.contest-stage-centered {
        max-width: 46rem;
        margin-inline: auto;
    }

    /* Steps page: the widget fills the column so it is as tall as the
       stacked steps beside it. The inline all:initial on the host
       needs !important to let the column height through. */
    .layout-steps #how {
        align-self: start;
    }

    .layout-steps .contest-column {
        align-self: stretch;
        display: flex;
        flex-direction: column;
    }

    .layout-steps .contest-column #contest {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .layout-steps .contest-column #contest .contest-mount {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .layout-steps #contest contest-widget-host {
        flex: 1 1 auto;
        height: 100% !important;
        min-height: max(100%, 36rem) !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

.contest-mount {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 0;
}

/* Hold the mount over the placeholder until the SDK paints, so the
   first view matches the landing card and then swaps cleanly. */
.contest-stage:not(.is-live) .contest-mount {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.contest-stage.is-live .contest-skeleton {
    display: none;
}

.contest-stage.is-slow:not(.is-live) .contest-mount {
    pointer-events: none;
}

.contest-stage.is-slow:not(.is-live) .contest-pending {
    display: none;
}

.contest-fallback {
    display: none;
}

.contest-stage.is-slow:not(.is-live) .contest-fallback {
    display: block;
}

contest-widget-host {
    display: block;
    width: 100%;
    max-width: 100%;
}

@keyframes blob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

@keyframes live-pulse {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.55); }
    70% { box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.live-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: #059669;
    animation: live-pulse 1.8s ease-out infinite;
}

.hero-mesh {
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(209, 250, 229, 0.7), transparent 60%),
        radial-gradient(700px 380px at 10% 0%, rgba(243, 244, 246, 0.9), transparent 55%);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .animate-blob,
    .live-dot { animation: none; }
}

@media (max-width: 380px) {
    .hero-title {
        font-size: 2.15rem;
    }
}
