:root {
    --bg-950: #060c1a;
    --bg-900: #0a142b;
    --bg-850: #0f1c3a;
    --primary: #00e5ff;
    --primary-2: #00c6e0;
    --ink: #e8f6ff;
    --muted: #9fb3c8;
    --ring: hsla(190, 100%, 55%, 0.18);
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    overflow: hidden;
    background: linear-gradient(180deg, var(--bg-900), var(--bg-950));
}

/* ---------- Shared layout ---------- */
.wrap {
    position: relative;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 24px clamp(16px, 4vw, 48px);
}

.brand {
    letter-spacing: .38em;
    text-transform: uppercase;
    font-weight: 700;
    font-size: .9rem;
    color: var(--muted);
    opacity: .9
}

.brand b {
    color: var(--primary)
}

.scene {
    position: relative;
    display: grid;
    place-items: center;
    text-align: center;
    overflow: visible
}

h1 {
    margin: 0;
    font-weight: 800;
    font-size: clamp(26px, 6vw, 54px);
    letter-spacing: .28em;
    text-indent: .28em;
    text-transform: uppercase;
    filter: drop-shadow(0 6px 20px rgba(0, 229, 255, .12));
    opacity: 0;
    transform: translateY(8px);
    animation: fadeUp .9s .2s both cubic-bezier(.2, .7, .2, 1)
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: none
    }
}

.logo-main {
    width: min(340px, 60vw);
    margin: 18px auto 4px;
    opacity: .96;
    filter: drop-shadow(0 6px 18px rgba(0, 229, 255, .12));
    transition: transform .25s ease, filter .3s ease
}

.logo-main:hover {
    transform: translateY(-1px);
    filter: drop-shadow(0 10px 28px rgba(0, 229, 255, .18))
}

.tag {
    margin: 8px 0 0;
    color: #9ccde0;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    font-size: clamp(12px, 1.8vw, 13px)
}

.sub {
    margin: 8px 0 0;
    color: #88a0b8;
    font-size: clamp(13px, 2vw, 15px)
}

.sub a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 229, 255, .4)
}

.sub a:hover {
    border-bottom-color: rgba(0, 229, 255, .7)
}

.card {
    place-self: center;
    margin-top: min(30vmin, 280px);
    background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 8px 40px -10px rgba(0, 0, 0, .45), 0 0 0 1px var(--ring);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 18px;
    width: min(720px, 92vw);
    transition: box-shadow .3s ease
}

.card:hover {
    box-shadow: 0 10px 44px -10px rgba(0, 0, 0, .55), 0 0 0 1px rgba(0, 229, 255, .22)
}

.card h2 {
    margin: 0 0 8px;
    font-weight: 600;
    font-size: clamp(14px, 2.2vw, 16px);
    letter-spacing: .18em;
    color: var(--muted);
    text-transform: uppercase
}

.form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px
}

.input {
    flex: 1;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: radial-gradient(120% 200% at 0% 0%, rgba(0, 229, 255, .06), transparent 40%), rgba(7, 18, 39, .82);
    color: var(--ink);
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03)
}

.input::placeholder {
    color: #8aa2ba
}

.input:focus {
    border-color: rgba(0, 229, 255, .55);
    box-shadow: 0 0 0 4px rgba(0, 229, 255, .12)
}

.btn {
    height: 44px;
    padding: 0 16px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #04121d;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
    box-shadow: 0 6px 18px -6px rgba(0, 229, 255, .6), 0 0 0 1px rgba(0, 229, 255, .35) inset;
    cursor: pointer;
    transition: transform .08s, box-shadow .25s
}

.btn:hover {
    box-shadow: 0 10px 26px -6px rgba(0, 229, 255, .75), 0 0 0 1px rgba(0, 229, 255, .45) inset
}

.btn:active {
    transform: translateY(1px)
}

.note {
    margin-top: 10px;
    font-size: 12px;
    color: #88a0b8
}

/* Footer centered */
footer {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #7f97b3;
    font-size: 12px;
    opacity: .85;
    padding: 6px 0
}

a {
    color: var(--primary);
    text-decoration: none
}

a:hover {
    text-decoration: underline
}

/* Subtle bottom-left Tembok Dev logo (placeholder path) */
.watermark {
    position: fixed;
    left: 40px;
    bottom: 20px;
    width: 20px;
    height: auto;
    opacity: 1;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, .35));
    /* pointer-events: none; */
    user-select: none;
    z-index: 5;
}

/* Theme switcher: now top-right */
.switcher {
    position: fixed;
    right: 16px;
    top: 16px;
    z-index: 10;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(8px);
    padding: 6px;
    border-radius: 999px
}

.chip {
    appearance: none;
    border: none;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #bcd2e6;
    background: transparent
}

.chip[aria-pressed="true"] {
    color: #04121d;
    background: linear-gradient(180deg, var(--primary), var(--primary-2))
}

/* Background variants */
.bg--eclipse body {
    background: radial-gradient(1200px 600px at 50% -20%, #0d1a33 0%, transparent 60%), linear-gradient(180deg, var(--bg-900), var(--bg-950))
}

.eclipse {
    position: absolute;
    width: min(64vmin, 720px);
    aspect-ratio: 1/1;
    border-radius: 50%;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(70% 70% at 50% 30%, rgba(0, 229, 255, .45), rgba(0, 229, 255, .06) 55%, transparent 60%),
        radial-gradient(50% 40% at 50% 15%, rgba(0, 198, 224, .6), rgba(0, 198, 224, 0) 60%);
    filter: blur(18px);
    opacity: .85;
    animation: haloPulse 6.5s ease-in-out infinite
}

.eclipse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(120% 100% at 50% 110%, #0b1326 0%, #070f20 50%, #060c1a 100%);
    transform: translateY(12%);
    box-shadow: 0 -40px 120px -40px rgba(0, 229, 255, .25) inset
}

@keyframes haloPulse {

    0%,
    100% {
        filter: blur(18px) scale(1)
    }

    50% {
        filter: blur(28px) scale(1.02)
    }
}

.bg--aurora body {
    background: linear-gradient(180deg, #071128, #050b1b)
}

.aurora {
    position: absolute;
    inset: -20vmax -10vmax;
    pointer-events: none;
    filter: blur(30px) saturate(1.3);
    opacity: .6
}

.aurora::before,
.aurora::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(60vmax 60vmax at 30% 10%, rgba(0, 229, 255, .35), transparent 60%),
        radial-gradient(60vmax 60vmax at 70% 20%, rgba(0, 198, 224, .25), transparent 60%),
        radial-gradient(60vmax 60vmax at 50% 80%, rgba(0, 255, 200, .12), transparent 60%);
    animation: auroraFlow 20s ease-in-out infinite
}

.aurora::after {
    animation-duration: 28s;
    mix-blend-mode: screen;
    opacity: .8
}

@keyframes auroraFlow {
    0% {
        transform: translateY(0)
    }

    50% {
        transform: translateY(-2vmax)
    }

    100% {
        transform: translateY(0)
    }
}

.star-canvas {
    position: absolute;
    inset: 0;
    opacity: .4;
    pointer-events: none
}

.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(60vmax 60vmax at 50% -10%, rgba(0, 230, 255, .06), transparent 60%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0, rgba(255, 255, 255, .02) 1px, transparent 1px, transparent 2px);
    mix-blend-mode: screen;
    opacity: .6;
    animation: grainMove 16s linear infinite
}

@keyframes grainMove {
    0% {
        transform: translate3d(0, 0, 0)
    }

    100% {
        transform: translate3d(-2%, -2%, 0)
    }
}

.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* --- Mobile polish (≤ 640px) --- */
@media (max-width: 640px) {

    /* Use the "small viewport" unit on iOS so the footer isn't crushed by the URL bar */
    .wrap {
        min-height: 100svh;
        /* fallback is in your original */
        grid-template-rows: auto 1fr auto;
        padding: calc(12px + env(safe-area-inset-top, 0px)) clamp(12px, 4vw, 20px) calc(12px + env(safe-area-inset-bottom, 0px)) clamp(12px, 4vw, 20px);
    }

    body {
        overflow: auto;
    }

    /* let content scroll if needed on short screens */

    /* Brand & header spacing */
    .brand {
        font-size: .78rem;
        letter-spacing: .32em;
    }

    /* Theme switcher: tighter & safe-area aware */
    .switcher {
        top: calc(10px + env(safe-area-inset-top, 0px));
        right: calc(10px + env(safe-area-inset-right, 0px));
        gap: 6px;
        padding: 4px;
    }

    .chip {
        padding: 6px 8px;
        font-size: 11px;
    }

    /* Headline & logo scale */
    h1 {
        font-size: clamp(22px, 8vw, 34px);
        letter-spacing: .18em;
        text-indent: .18em;
    }

    .logo-main {
        width: min(220px, 70vw);
        margin: 14px auto 2px;
    }

    /* Tag + sub copy */
    .tag {
        font-size: 12px;
        letter-spacing: .12em;
    }

    .sub {
        font-size: 13px;
    }

    /* Card placement & size */
    .card {
        margin-top: 18vmin;
        /* lower the big jump so it fits */
        width: min(95vw, 680px);
        padding: 14px;
        border-radius: 14px;
    }

    .card h2 {
        font-size: 12px;
        letter-spacing: .16em;
    }

    /* Form: stack vertically and make controls full-width */
    .form {
        display: grid;
        grid-template-columns: 1fr;
        /* stack */
        gap: 10px;
    }

    .input,
    .btn {
        width: 100%;
        min-width: 0;
    }

    .input {
        height: 46px;
        font-size: 16px;
    }

    /* comfy tap target */
    .btn {
        height: 46px;
    }

    /* Footer centered with notch padding */
    footer {
        padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        font-size: 11px;
    }

    /* Watermark: keep subtle and away from the corner radius / notch */
    .watermark {
        left: calc(12px + env(safe-area-inset-left, 0px));
        bottom: calc(12px + env(safe-area-inset-bottom, 0px));
        width: 34px;
        opacity: .14;
    }

    /* Background layers: keep them from overlapping the header too hard */
    .eclipse {
        top: 14%;
    }

    /* a bit higher on small screens */
    .star-canvas {
        opacity: .35;
    }

    /* softer so text pops */
}

/* Ultra-small (≤ 360px): tighten a hair more */
@media (max-width: 360px) {
    .chip {
        display: none;
    }

    /* hide theme chips if you want max simplicity */
    .card {
        margin-top: 14vmin;
    }
}
