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

/* ── Base ──────────────────────────────────────────────────── */
:root {
  --blue:        #1d6cd4;
  --blue-dark:   #1558b0;
  --blue-light:  #eef4fd;
  --blue-border: #b5d0f5;
  --text:        #1a1a1a;
  --text-muted:  #666;
  --text-hint:   #999;
  --border:      #e0e0e0;
  --border-inp:  #d0d0d0;
  --bg:          #f5f5f3;
  --white:       #ffffff;
  --red:         #e74c3c;
  --amber:       #f39c12;
  --green:       #27ae60;
  --radius-sm:   6px;
  --radius:      8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --shadow:      0 4px 24px rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
}

/* ── NAV ───────────────────────────────────────────────────── */
.nav {
  background: var(--white);
  border-bottom: 0.5px solid var(--border);
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.logo span { color: var(--text); }

.nav-links { display: flex; gap: 10px; align-items: center; }

.btn { padding: 8px 18px; border-radius: var(--radius); font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 500; transition: all 0.15s; border: none; display: inline-flex; align-items: center; gap: 6px; }
.btn-outline { background: none; border: 0.5px solid var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue-light); }
.btn-fill { background: var(--blue); color: var(--white); }
.btn-fill:hover { background: var(--blue-dark); }
.btn-fill:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-wide { width: 100%; justify-content: center; padding: 11px 18px; font-size: 15px; }

/* ── HERO ──────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 6rem 1.5rem 3rem;
  max-width: 700px;
  margin: 0 auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.5px;
}
.hero h1 .accent { color: var(--blue); }

.hero p {
  font-size: clamp(15px, 2vw, 17px);
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto 2rem;
}

.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
  border: none;
}
.btn-hero-primary { background: var(--blue); color: var(--white); }
.btn-hero-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-hero-secondary { background: var(--white); color: var(--text); border: 0.5px solid var(--border-inp); }
.btn-hero-secondary:hover { background: var(--bg); }

/* ── STATS ─────────────────────────────────────────────────── */
.stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding: 2rem 1.5rem 0;
  max-width: 700px;
  margin: 0 auto;
}
.stat { text-align: center; }
.stat-num { font-size: 22px; font-weight: 700; color: var(--blue); }
.stat-label { font-size: 12px; color: var(--text-hint); margin-top: 2px; }

/* ── FEATURES ──────────────────────────────────────────────── */
.section { padding: 4rem 1.5rem; }
.section-title { text-align: center; font-size: clamp(20px, 3vw, 26px); font-weight: 600; margin-bottom: 0.5rem; }
.section-sub { text-align: center; font-size: 15px; color: var(--text-muted); margin-bottom: 2.5rem; }

.features-grid {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--white);
  border: 0.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  transition: box-shadow 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow); }

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
  font-size: 22px;
  color: var(--blue);
}
.feature-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.feature-card p { font-size: 13px; color: var(--text-hint); line-height: 1.55; }

/* ── BROKERS ───────────────────────────────────────────────── */
.brokers-section { background: var(--white); border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); padding: 3rem 1.5rem; }
.brokers-grid { max-width: 800px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.broker-pill { background: var(--bg); border: 0.5px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ── FOOTER ────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem;
  font-size: 13px;
  color: var(--text-hint);
  border-top: 0.5px solid var(--border);
}

/* ── OVERLAY ───────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
}
.overlay.active { display: flex; }

/* ── MODAL ─────────────────────────────────────────────────── */
.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 460px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: var(--shadow);
  animation: slideUp 0.2s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--text-hint);
  cursor: pointer;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.modal-close:hover { background: var(--bg); color: var(--text); }

/* ── MODAL TABS ────────────────────────────────────────────── */
.modal-tabs {
  display: flex;
  border-bottom: 0.5px solid var(--border);
  margin-bottom: 1.5rem;
}
.modal-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 8px;
  font-size: 14px;
  color: var(--text-hint);
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  margin-bottom: -1px;
  transition: color 0.15s;
}
.modal-tab.active { color: var(--blue); border-bottom-color: var(--blue); }

.modal-panel { display: none; }
.modal-panel.active { display: block; }

/* ── FORM ──────────────────────────────────────────────────── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #444; margin-bottom: 5px; font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.input-wrap { position: relative; }
.input-wrap i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; color: #bbb; pointer-events: none; }
.input-wrap input { padding-left: 38px; }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
  width: 100%;
  height: 42px;
  border: 0.5px solid var(--border-inp);
  border-radius: var(--radius);
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none;
}
input:focus, select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,108,212,0.1);
}
input::placeholder { color: #bbb; }

/* ── PASSWORD STRENGTH ─────────────────────────────────────── */
.pwd-strength { display: flex; gap: 4px; margin-top: 6px; }
.pwd-bar { height: 3px; flex: 1; border-radius: 2px; background: var(--border); transition: background 0.3s; }
.pwd-bar.weak   { background: var(--red); }
.pwd-bar.medium { background: var(--amber); }
.pwd-bar.strong { background: var(--green); }
.pwd-label { font-size: 11px; color: var(--text-hint); margin-top: 4px; }

/* ── FORM RESULT ───────────────────────────────────────────── */
.form-result {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  display: none;
  line-height: 1.5;
}
.form-result.error   { background: #fff5f5; border: 0.5px solid #f5a0a0; color: #c0392b; }
.form-result.success { background: #f4fbf6; border: 0.5px solid #a0d9b4; color: #1e7e45; }

.switch-link { text-align: center; font-size: 13px; color: var(--text-hint); margin-top: 1rem; }
.switch-link a { color: var(--blue); text-decoration: none; font-weight: 500; cursor: pointer; }
.switch-link a:hover { text-decoration: underline; }

.required { color: var(--red); }

/* ── RESPONSIVE ────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 1rem; }
  .hero { padding: 4rem 1rem 2rem; }
  .stats { gap: 1.5rem; }
  .section { padding: 3rem 1rem; }
}

@media (max-width: 480px) {
  .nav-links .btn-outline { display: none; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .modal { padding: 1.25rem; border-radius: 12px; }
  .hero-btns { flex-direction: column; align-items: center; }
  .btn-hero { width: 100%; justify-content: center; }
}