* { box-sizing: border-box; }

:root {
    --bg: #050706;
    --card: #0B0F0E;
    --card-border: rgba(255, 255, 255, 0.07);
    --ink: #F2F6F4;
    --muted: #7C8985;
    --accent: #2EE6A6;
    --accent-dim: rgba(46, 230, 166, 0.16);
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--ink);
    position: relative;
    overflow: hidden;
}

/* Ambient glow arcs -- soft, slow-drifting, GPU-safe (opacity/transform only) */
body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
}

body::before {
    width: 60rem;
    height: 60rem;
    top: -34rem;
    left: 50%;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(46, 230, 166, 0.16), transparent 72%);
    animation: drift-a 14s ease-in-out infinite alternate;
}

body::after {
    width: 46rem;
    height: 46rem;
    bottom: -30rem;
    right: -10rem;
    background: radial-gradient(closest-side, rgba(46, 230, 166, 0.10), transparent 72%);
    animation: drift-b 18s ease-in-out infinite alternate;
}

@keyframes drift-a {
    from { transform: translateX(-50%) translateY(0) scale(1); opacity: 0.85; }
    to   { transform: translateX(-46%) translateY(1.5rem) scale(1.06); opacity: 1; }
}

@keyframes drift-b {
    from { transform: translateY(0) scale(1); opacity: 0.7; }
    to   { transform: translateY(-1.5rem) scale(1.08); opacity: 0.95; }
}

.card {
    position: relative;
    z-index: 1;
    width: min(380px, 90vw);
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 2.4rem 2rem 2.2rem;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 30px 80px -20px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(46, 230, 166, 0.04);
    opacity: 0;
    animation: card-enter 0.6s var(--ease) 0.05s both;
}

@keyframes card-enter {
    from { opacity: 0; transform: translateY(16px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.stagger {
    opacity: 0;
    animation: rise-in 0.55s var(--ease) both;
}
.brand   { animation-delay: 0.14s; }
h1       { animation-delay: 0.20s; }
.field-1 { animation-delay: 0.26s; }
.field-2 { animation-delay: 0.32s; }
.submit-row { animation-delay: 0.38s; }

@keyframes rise-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
}

.brand-mark {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px 2px var(--accent-dim);
    flex: none;
    animation: pulse-mark 2.6s ease-in-out infinite;
}

@keyframes pulse-mark {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(46, 230, 166, 0.35); }
    50%      { box-shadow: 0 0 16px 4px rgba(46, 230, 166, 0.6); }
}

.eyebrow {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--muted);
}

h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 4vw, 1.85rem);
    letter-spacing: -0.02em;
    line-height: 1.15;
    margin: 0 0 1.8rem;
    color: var(--ink);
}

.field { margin-bottom: 1.15rem; }

label {
    display: block;
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--muted);
    margin: 0 0 0.4rem;
    letter-spacing: 0.01em;
}

input {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.025);
    color: var(--ink);
    font-family: inherit;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}

input::placeholder { color: #4B5450; }

input:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

input:focus {
    border-color: var(--accent);
    background: rgba(46, 230, 166, 0.04);
    box-shadow: 0 0 0 4px var(--accent-dim);
}

button {
    width: 100%;
    padding: 0.8rem;
    margin-top: 0.3rem;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #05130E;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.25s var(--ease-spring), box-shadow 0.25s var(--ease), background-color 0.2s var(--ease);
}

button::after {
    content: "→";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: rgba(5, 19, 14, 0.14);
    font-size: 0.78rem;
    transition: transform 0.25s var(--ease-spring);
}

button:hover {
    box-shadow: 0 12px 28px -8px rgba(46, 230, 166, 0.45);
    transform: translateY(-1px);
}

button:hover::after {
    transform: translateX(2px);
}

button:active {
    transform: translateY(0) scale(0.98);
}

button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.error {
    background: rgba(224, 90, 74, 0.1);
    border: 1px solid rgba(224, 90, 74, 0.28);
    color: #F0A392;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    font-size: 0.82rem;
    margin-bottom: 1.1rem;
    text-align: center;
    animation: error-in 0.35s var(--ease) both;
}

@keyframes error-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    body::before, body::after { animation: none; }
}
