*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #070a14;
  --text: #e8ebf5;
  --muted: #8b93ad;
  --accent: #818cf8;
  --accent-2: #c084fc;
  --danger: #f87171;
  --glass: rgba(17, 22, 40, 0.62);
  --border: rgba(255, 255, 255, 0.09);
}

html, body { height: 100%; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: opacity .45s ease, transform .45s ease;
}
body.leaving { opacity: 0; transform: scale(1.02); }

/* ---------- Animated background ---------- */
.bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.orb {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .55;
  animation: float 18s ease-in-out infinite alternate;
}
.orb-1 { width: 520px; height: 520px; background: #4f46e5; top: -140px; left: -120px; }
.orb-2 { width: 460px; height: 460px; background: #9333ea; bottom: -160px; right: -80px; animation-delay: -6s; }
.orb-3 { width: 340px; height: 340px; background: #0ea5e9; top: 40%; left: 45%; opacity: .28; animation-delay: -12s; }
@keyframes float {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, -40px) scale(1.08); }
  100% { transform: translate(-40px, 50px) scale(.95); }
}
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%);
}

/* ---------- Layout ---------- */
.shell {
  position: relative; z-index: 1;
  min-height: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 64px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 32px;
}

/* ---------- Brand panel ---------- */
.brand { animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
.brand-head { display: flex; align-items: center; gap: 14px; margin-bottom: 56px; }
.brand-head strong { display: block; font-size: 18px; letter-spacing: .2px; }
.brand-head span { color: var(--muted); font-size: 13px; }
.headline { font-size: clamp(40px, 5vw, 60px); line-height: 1.05; letter-spacing: -1.5px; margin: 0 0 20px; font-weight: 800; }
.gradient-text {
  background: linear-gradient(90deg, var(--accent), var(--accent-2), #38bdf8, var(--accent));
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer { to { background-position: 300% 0; } }
.lead { color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 460px; margin: 0 0 40px; }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.features li { display: flex; gap: 14px; align-items: center; }
.features strong { display: block; font-size: 15px; font-weight: 600; }
.features small { color: var(--muted); font-size: 13px; }
.feat-icon {
  width: 42px; height: 42px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: rgba(129, 140, 248, .12); border: 1px solid rgba(129, 140, 248, .25);
}
.feat-icon svg, .field-icon, .toggle svg, .caps svg, .box svg, .done {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.feat-icon svg { width: 20px; height: 20px; color: var(--accent); }
.clock { margin-top: 48px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: .3px; }

/* ---------- Card ---------- */
.card {
  position: relative;
  width: 100%; max-width: 440px; justify-self: end;
  padding: 44px 40px 32px;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 24px;
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06);
  overflow: hidden;
  animation: rise .8s .12s cubic-bezier(.2,.8,.2,1) both;
}
.card-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -20%), rgba(129,140,248,.16), transparent 45%);
  transition: opacity .3s;
}
.card.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.mobile-logo { display: none; margin-bottom: 20px; }
.card h1 { font-size: 28px; margin: 0 0 6px; letter-spacing: -.5px; }
.sub { color: var(--muted); margin: 0 0 32px; font-size: 14.5px; }

/* ---------- Floating label fields ---------- */
.field { position: relative; margin-bottom: 18px; }
.field input {
  width: 100%; height: 58px;
  padding: 22px 48px 8px 46px;
  font: inherit; font-size: 15px; color: var(--text);
  background: rgba(255,255,255,.035);
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input:hover { border-color: rgba(255,255,255,.16); }
.field input:focus {
  border-color: var(--accent);
  background: rgba(129,140,248,.06);
  box-shadow: 0 0 0 4px rgba(129,140,248,.15);
}
.field label {
  position: absolute; left: 46px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted); font-size: 15px;
  pointer-events: none;
  transition: all .18s ease;
}
.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: 17px; font-size: 11.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--accent);
}
.field input:not(:focus):not(:placeholder-shown) + label { color: var(--muted); }
.field-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; color: var(--muted); transition: color .2s;
}
.field input:focus ~ .field-icon { color: var(--accent); }
.field input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0 100px #151a2e inset;
  caret-color: var(--text);
}

.toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer;
  display: grid; place-items: center;
}
.toggle:hover { color: var(--text); background: rgba(255,255,255,.06); }
.toggle:focus-visible { outline: 2px solid var(--accent); }
.toggle svg { width: 19px; height: 19px; }
.toggle .eye-off, .toggle.on .eye { display: none; }
.toggle.on .eye-off { display: block; }

.caps {
  display: flex; align-items: center; gap: 6px;
  margin: -6px 0 14px; font-size: 12.5px; color: #fbbf24;
}
.caps[hidden] { display: none; }
.caps svg { width: 14px; height: 14px; }

/* ---------- Checkbox ---------- */
.check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); cursor: pointer; user-select: none; margin: 4px 0 22px; }
.check input { position: absolute; opacity: 0; }
.box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1px solid rgba(255,255,255,.2);
  display: grid; place-items: center;
  transition: all .18s;
}
.box svg { width: 14px; height: 14px; color: #fff; stroke-width: 3; stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .25s; }
.check input:checked + .box { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; }
.check input:checked + .box svg { stroke-dashoffset: 0; }
.check input:focus-visible + .box { box-shadow: 0 0 0 3px rgba(129,140,248,.4); }

/* ---------- Error ---------- */
.error {
  display: flex; gap: 8px; align-items: center;
  padding: 12px 14px; margin-bottom: 18px;
  border-radius: 12px; font-size: 13.5px;
  color: #fecaca; background: rgba(248,113,113,.1); border: 1px solid rgba(248,113,113,.3);
  animation: rise .3s both;
}
.error[hidden] { display: none; }

/* ---------- Submit ---------- */
.submit {
  position: relative; width: 100%; height: 54px;
  border: 0; border-radius: 14px; cursor: pointer; overflow: hidden;
  font: inherit; font-size: 15.5px; font-weight: 600; color: #fff; letter-spacing: .2px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  box-shadow: 0 10px 30px -8px rgba(124, 58, 237, .6);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.submit::before {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.3), transparent);
  transition: left .6s;
}
.submit:hover::before { left: 140%; }
.submit:hover { box-shadow: 0 14px 36px -8px rgba(124, 58, 237, .8); filter: brightness(1.08); }
.submit:active { transform: scale(.985); }
.submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.submit:disabled { cursor: wait; }
.submit .spinner, .submit .done { position: absolute; inset: 0; margin: auto; opacity: 0; transition: opacity .2s; }
.submit .spinner {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.submit .done { width: 24px; height: 24px; stroke-width: 3; }
.submit .label { transition: opacity .2s; }
.submit.loading .label, .submit.success .label { opacity: 0; }
.submit.loading .spinner { opacity: 1; }
.submit.success { background: linear-gradient(135deg, #10b981, #22c55e); }
.submit.success .done { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.foot { text-align: center; color: var(--muted); font-size: 12.5px; margin: 26px 0 0; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .shell { grid-template-columns: 1fr; padding: 32px 20px; }
  .brand { display: none; }
  .card { justify-self: center; padding: 36px 26px 26px; }
  .mobile-logo { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
