/*
 * Powerdrop welcome / onboarding screen.
 * Full-screen "satellite view of Sri Lanka", dark space + orange glow.
 * Self-contained — relies only on the :root variables from app.css.
 */

.welcome-body {
    margin: 0;
    height: 100vh;
    height: 100dvh;
    background: #05080e;
    color: var(--porcelain);
    font-family: var(--body);
    overflow: hidden;
}

/* keep the page canvas dark too, so no light hairline shows at the edges */
html {
    background: #05080e;
}

.welcome {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1.5rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
    overflow: hidden;
}

/* ---- Full-screen satellite backdrop ---- */
.welcome__sky {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    background: #05080e;
}

/* the satellite photo, filling the whole screen edge-to-edge */
.welcome__photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

/* dark gradient so the pitch + buttons stay readable at the bottom */
.welcome__scrim {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 80% at 50% 0%, transparent 30%, rgba(5, 8, 14, 0.25) 70%),
        linear-gradient(180deg,
            rgba(5, 8, 14, 0.10) 0%,
            rgba(5, 8, 14, 0.30) 38%,
            rgba(5, 8, 14, 0.86) 70%,
            #05080e 100%);
}

/* ---- Floating status chips ---- */
.wchip {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.34rem 0.72rem 0.34rem 0.6rem;
    border-radius: 999px;
    background: rgba(12, 17, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: wchipFloat 5.5s ease-in-out infinite;
}
.wchip--a { top: 17%; left: 6%; }
.wchip--b { top: 29%; right: 6%; animation-delay: -2.4s; }

.wchip__dot {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    flex: 0 0 auto;
}
.wchip__dot--on {
    background: #2fd07a;
    box-shadow: 0 0 10px 1px rgba(47, 208, 122, 0.9);
}
.wchip__dot--off {
    background: var(--filament);
    box-shadow: 0 0 10px 1px rgba(255, 77, 61, 0.9);
}
.wchip__name {
    font-family: 'Poppins', var(--body);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--porcelain);
}

@keyframes wchipFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* ---- Pitch ---- */
.welcome__content {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 1.6rem;
}
.welcome__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.7rem;
    font-family: 'Poppins', var(--body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    color: var(--sodium-pale);
}
.welcome__bolt { color: var(--sodium); }
.welcome__title {
    margin: 0 0 0.7rem;
    font-family: 'Poppins', var(--body);
    font-weight: 700;
    font-size: clamp(1.7rem, 6.6vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--porcelain);
}
.welcome__title span {
    background: linear-gradient(90deg, var(--sodium-pale), var(--sodium), var(--sodium-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.welcome__sub {
    margin: 0 auto;
    max-width: 20rem;
    font-family: var(--body);
    font-size: 0.9rem;
    line-height: 1.5;
    color: #c3cede;
}

/* ---- Actions ---- */
.welcome__actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}
.welcome__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 3.4rem;
    border-radius: 999px;
    font-family: 'Poppins', var(--body);
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}
.welcome__btn--primary {
    color: #1a0f02;
    background: linear-gradient(180deg, var(--sodium), var(--sodium-deep));
    box-shadow: 0 12px 30px -10px rgba(255, 141, 60, 0.85);
}
.welcome__btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(255, 141, 60, 0.95); }
.welcome__btn--ghost {
    color: var(--porcelain);
    background: rgba(13, 20, 31, 0.55);
    border: 1px solid rgba(255, 183, 101, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.welcome__btn--ghost:hover { transform: translateY(-2px); background: rgba(255, 183, 101, 0.14); }
.welcome__guest {
    display: block;
    margin-top: 0.5rem;
    text-align: center;
    font-family: 'Poppins', var(--body);
    font-size: 0.88rem;
    font-weight: 500;
    color: #aab7c9;
    text-decoration: none;
}
.welcome__guest:hover { color: var(--sodium-pale); }

@media (min-height: 820px) {
    .welcome__content { margin-bottom: 2rem; }
    .welcome__actions { padding-bottom: 1rem; }
}

/* ---- Tablet / desktop: full-bleed wide "Earth from space" backdrop ---- */
@media (min-width: 768px) {
    /* let the page fill the whole screen instead of a phone-width column */
    .welcome {
        max-width: none;
        align-items: center;
        padding: 0 2rem calc(3.5rem + env(safe-area-inset-bottom, 0px));
    }

    /* backdrop already covers the whole viewport; just reframe the planet */
    .welcome__photo { object-position: center 42%; }

    /* a touch more darkening so the pitch stays readable over the planet */
    .welcome__scrim {
        background:
            radial-gradient(80% 60% at 50% 32%, transparent 0%, rgba(5, 8, 14, 0.35) 100%),
            linear-gradient(180deg,
                rgba(5, 8, 14, 0.20) 0%,
                rgba(5, 8, 14, 0.35) 40%,
                rgba(5, 8, 14, 0.82) 74%,
                #05080e 100%);
    }

    /* centre the pitch + actions in a comfortable reading column */
    .welcome__content,
    .welcome__actions {
        width: 100%;
        max-width: 30rem;
    }
    .welcome__title { font-size: clamp(2.2rem, 3.6vw, 3rem); }
    .welcome__sub { font-size: 1rem; max-width: 26rem; }

    /* spread the floating chips out toward the screen edges */
    .wchip--a { top: 20%; left: 9%; }
    .wchip--b { top: 24%; right: 9%; }
}
