/* ─── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #06080f;
  --surface:   rgba(255,255,255,0.04);
  --border:    rgba(255,255,255,0.09);
  --border-focus: rgba(120,80,255,0.7);
  --text:      #e8eaf0;
  --muted:     #7a7f99;
  --accent-1:  #7c3aed;
  --accent-2:  #06b6d4;
  --accent-3:  #f59e0b;
  --error:     #f87171;
  --success:   #34d399;
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow:    0 24px 64px rgba(0,0,0,0.6);
  --transition: 0.22s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ─── Animated Background Blobs ────────────────────────────── */
.bg-blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  pointer-events: none;
  animation: drift 18s ease-in-out infinite alternate;
}
.blob-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-1), transparent 70%);
  top: -150px; left: -100px;
  animation-duration: 20s;
}
.blob-2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, var(--accent-2), transparent 70%);
  bottom: -100px; right: -80px;
  animation-duration: 15s;
  animation-direction: alternate-reverse;
}
.blob-3 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, var(--accent-3), transparent 70%);
  top: 40%; left: 55%;
  animation-duration: 25s;
  opacity: 0.1;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, 30px) scale(1.06); }
}

/* ─── Hero Section ──────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 24px 60px;
}

.hero-content { max-width: 700px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(124,58,237,0.18);
  border: 1px solid rgba(124,58,237,0.35);
  color: #c4b5fd;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
  animation: fadeUp 0.6s ease both;
}

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeUp 0.7s ease 0.1s both;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 60%, var(--accent-3) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  animation: fadeUp 0.7s ease 0.2s both;
}

/* ─── Form Section ──────────────────────────────────────────── */
.form-section {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: 0 24px 80px;
}

.form-card {
  width: 100%;
  max-width: 580px;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.07);
  animation: fadeUp 0.8s ease 0.3s both;
}

.form-card-header {
  text-align: center;
  margin-bottom: 36px;
}

.form-icon {
  font-size: 2.4rem;
  margin-bottom: 14px;
  display: block;
}

.form-card-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.form-card-header p {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ─── Fields ────────────────────────────────────────────────── */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}

input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

input::placeholder { color: rgba(122,127,153,0.6); }

input:focus {
  border-color: var(--border-focus);
  background: rgba(120,80,255,0.06);
  box-shadow: 0 0 0 3px rgba(120,80,255,0.12);
}

input:focus + .input-icon { opacity: 1; }

.field-group.has-error input {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(248,113,113,0.12);
}

.error-msg {
  font-size: 0.78rem;
  color: var(--error);
  min-height: 1em;
  animation: fadeIn 0.2s ease;
}

/* ─── Submit Button ─────────────────────────────────────────── */
.submit-btn {
  width: 100%;
  padding: 16px 24px;
  margin-top: 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-1) 0%, #6d28d9 100%);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}

.submit-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #8b5cf6 0%, var(--accent-2) 100%);
  opacity: 0;
  transition: opacity var(--transition);
}

.submit-btn:hover::before { opacity: 1; }
.submit-btn > * { position: relative; z-index: 1; }

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124,58,237,0.55);
}

.submit-btn:active { transform: scale(0.98); }

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-arrow { font-size: 1.1rem; transition: transform var(--transition); }
.submit-btn:hover .btn-arrow { transform: translateX(4px); }

/* Spinner */
.btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.submit-btn.loading .btn-text { display: none; }
.submit-btn.loading .btn-arrow { display: none; }
.submit-btn.loading .btn-spinner { display: block; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Success State ─────────────────────────────────────────── */
.success-state {
  text-align: center;
  padding: 20px 0;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.success-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  display: block;
  animation: bounce 0.6s ease 0.15s both;
}

.success-state h3 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--success);
}

.success-state p {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.reset-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.reset-btn:hover { border-color: var(--accent-1); color: var(--text); }

/* ─── Server Error Banner ───────────────────────────────────── */
.server-error {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.25);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 0.88rem;
  color: var(--error);
  animation: fadeIn 0.3s ease;
}
.server-error[hidden] { display: none; }

/* ─── Footer ────────────────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px 48px;
  color: rgba(122,127,153,0.55);
  font-size: 0.82rem;
}

/* ─── Keyframes ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-12px); }
}

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 520px) {
  .form-card { padding: 32px 22px; }
  .field-row { grid-template-columns: 1fr; }
}
