:root {
  --primary: #1a56db;
  --primary-dark: #1341a8;
  --accent: #0ea5e9;
  --text: #111827;
  --text-muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f9fafb;
  --border: #e5e7eb;
  --success: #059669;
  --error: #dc2626;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Nav ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.5px;
}

.nav-logo span { color: var(--text); }

nav a.btn-nav {
  background: var(--primary);
  color: #fff;
  padding: .5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
}

nav a.btn-nav:hover { background: var(--primary-dark); text-decoration: none; }

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #0f2057 0%, #1a56db 60%, #0ea5e9 100%);
  color: #fff;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  letter-spacing: -.5px;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: .9;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.btn-hero {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-size: 1.05rem;
  padding: .85rem 2.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  transition: transform .15s, box-shadow .15s;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0,0,0,.15);
  text-decoration: none;
}

/* ── Section wrapper ── */
section { padding: 5rem 1.5rem; }
section.alt { background: var(--bg-alt); }

.container { max-width: 1100px; margin: 0 auto; }

.section-label {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: .75rem;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  margin-bottom: 1rem;
  letter-spacing: -.3px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-bottom: 3rem;
}

/* ── Features grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: #eff6ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon svg { width: 24px; height: 24px; color: var(--primary); }

.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.feature-card p { color: var(--text-muted); font-size: .95rem; }

/* ── How it works ── */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 2rem; }

.step { text-align: center; }

.step-num {
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  margin: 0 auto 1rem;
}

.step h3 { font-weight: 700; margin-bottom: .5rem; }
.step p { color: var(--text-muted); font-size: .95rem; }

/* ── Onboarding form ── */
#register { background: var(--bg-alt); }

.form-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  max-width: 720px;
  margin: 0 auto;
}

.form-section-title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.75rem 0 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}

.form-section-title:first-child { margin-top: 0; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; gap: .375rem; }

label {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
}

label .optional {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: .25rem;
}

input, select, textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem .85rem;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}

input::placeholder { color: #9ca3af; }

.btn-submit {
  width: 100%;
  margin-top: 1.75rem;
  padding: .875rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.btn-submit:hover:not(:disabled) { background: var(--primary-dark); }
.btn-submit:active:not(:disabled) { transform: scale(.99); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }

.form-message {
  display: none;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-top: 1rem;
  font-size: .95rem;
  font-weight: 500;
}

.form-message.success {
  display: block;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: var(--success);
}

.form-message.error {
  display: block;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--error);
}

/* ── Footer ── */
footer {
  background: #111827;
  color: #9ca3af;
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: .875rem;
}

footer strong { color: #fff; }
