/* ============================================================
   THForex – "Precision Navigator" Design System
   style.css – Design tokens, base, layout, typography, utilities
   ============================================================ */

/* ---- Design Tokens ---- */
:root {
  --color-primary:       #0047BB;
  --color-primary-dark:  #003399;
  --color-primary-light: #E8F0FE;
  --color-primary-mid:   #2563EB;
  --color-accent:        #F59E0B;
  --color-accent-light:  #FEF3C7;
  --color-success:       #10B981;
  --color-success-light: #D1FAE5;
  --color-danger:        #EF4444;
  --color-white:         #FFFFFF;
  --color-slate-bg:      #F8FAFC;
  --color-border:        #E2E8F0;
  --color-text:          #1E293B;
  --color-text-muted:    #64748B;
  --color-text-light:    #94A3B8;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 71, 187, 0.10);
  --shadow-lg: 0 8px 32px rgba(0, 71, 187, 0.14);
  --shadow-xl: 0 16px 48px rgba(0, 71, 187, 0.18);

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --transition: 0.2s ease;
  --transition-md: 0.3s ease;

  --container-max: 1200px;
  --nav-height: 68px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }
input, select { font-family: var(--font); }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}
.section--slate {
  background: var(--color-slate-bg);
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-tag {
  display: inline-block;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 14px;
}
.section-sub {
  font-size: 16px;
  color: var(--color-text-muted);
  max-width: 580px;
  margin: 0 auto;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 2px 8px rgba(0, 71, 187, 0.3);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 4px 16px rgba(0, 71, 187, 0.4);
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary-light);
}
.btn-ghost {
  background: transparent;
  color: var(--color-text-muted);
  padding: 10px 16px;
}
.btn-ghost:hover {
  color: var(--color-primary);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ---- Navigation ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow var(--transition);
}
.nav.scrolled {
  box-shadow: var(--shadow-md);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
  flex-shrink: 0;
}
.nav__logo strong {
  color: var(--color-primary);
}
.nav__logo-text {
  font-weight: 700;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav__link {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: all var(--transition);
}
.nav__link:hover, .nav__link--active {
  color: var(--color-primary);
  background: var(--color-primary-light);
}
.nav__cta {
  margin-left: 16px;
  flex-shrink: 0;
}
.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}
.nav__hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: 96px 0 80px;
  background: var(--color-white);
  overflow: hidden;
  text-align: center;
}
.hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 71, 187, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 71, 187, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.hero__grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(232, 240, 254, 0.8) 0%, transparent 70%);
}
.hero__inner {
  position: relative;
  z-index: 1;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 28px;
  border: 1px solid rgba(0, 71, 187, 0.15);
}
.hero__badge i { color: var(--color-accent); }
.hero__title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 20px;
}
.hero__title-accent {
  color: var(--color-primary);
  position: relative;
}
.hero__sub {
  font-size: 17px;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}
.hero__search {
  display: flex;
  gap: 12px;
  max-width: 580px;
  margin: 0 auto 56px;
}
.hero__search-wrap {
  flex: 1;
  position: relative;
}
.hero__search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  font-size: 14px;
}
.hero__search-input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.hero__search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 71, 187, 0.12);
}
.hero__search-btn {
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius);
}
.hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
}
.hero__stat {
  flex: 1;
  min-width: 140px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero__stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.hero__stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: 4px;
  text-align: center;
}
.hero__stat-divider {
  width: 1px;
  height: 44px;
  background: var(--color-border);
  flex-shrink: 0;
}

/* ---- Trust Grid ---- */
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.trust-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-md);
}
.trust-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(0, 71, 187, 0.2);
}
.trust-icon {
  width: 56px;
  height: 56px;
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--color-primary);
  margin: 0 auto 16px;
}
.trust-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}
.trust-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---- Steps Grid ---- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.step-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-md);
  position: relative;
  overflow: hidden;
}
.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}
.step-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-primary);
}
.step-num {
  font-size: 40px;
  font-weight: 800;
  color: var(--color-primary-light);
  line-height: 1;
  margin-bottom: 8px;
}
.step-icon {
  font-size: 24px;
  color: var(--color-primary);
  margin-bottom: 16px;
}
.step-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
}
.step-desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ---- Reviews Grid ---- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ---- FAQ ---- */
.faq-list {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- Broker Logo Placeholders ---- */
.broker-logo-sm {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--color-white);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.broker-logo-sm--blue   { background: var(--color-primary); }
.broker-logo-sm--green  { background: var(--color-success); }
.broker-logo-sm--purple { background: #7C3AED; }
.broker-logo-sm--orange { background: #F97316; }
.broker-logo-sm--red    { background: var(--color-danger); }
.broker-logo-sm--teal   { background: #0891B2; }

/* ---- Footer ---- */
.footer {
  background: #0F172A;
  color: #CBD5E1;
}
.footer__risk-bar {
  background: #1E293B;
  border-bottom: 1px solid #334155;
  padding: 12px 0;
  font-size: 12px;
  line-height: 1.6;
  color: #94A3B8;
}
.footer__risk-bar .container {
  display: flex;
  gap: 10px;
}
.footer__risk-bar i {
  color: var(--color-accent);
  margin-top: 2px;
  flex-shrink: 0;
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding: 56px 24px 48px;
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 16px;
}
.footer__logo strong { color: #60A5FA; }
.footer__tagline {
  font-size: 13px;
  color: #64748B;
  line-height: 1.65;
  margin-bottom: 20px;
}
.footer__social {
  display: flex;
  gap: 12px;
}
.footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  font-size: 14px;
  transition: all var(--transition);
}
.footer__social a:hover {
  background: var(--color-primary);
  color: var(--color-white);
}
.footer__heading {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-white);
  margin-bottom: 18px;
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__links a {
  font-size: 13px;
  color: #64748B;
  transition: color var(--transition);
}
.footer__links a:hover { color: #93C5FD; }
.footer__bottom {
  border-top: 1px solid #1E293B;
  padding: 20px 0;
}
.footer__bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: #475569;
  flex-wrap: wrap;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .trust-grid, .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .section-header { margin-bottom: 36px; }

  .nav__links, .nav__cta { display: none; }
  .nav__hamburger { display: flex; }
  .nav__links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    padding: 16px;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    z-index: 999;
    gap: 4px;
  }

  .hero { padding: 64px 0 56px; }
  .hero__search { flex-direction: column; }
  .hero__stats { flex-direction: column; border-radius: var(--radius); }
  .hero__stat-divider { width: 80%; height: 1px; }
  .hero__stat { width: 100%; }

  .trust-grid { grid-template-columns: 1fr; gap: 16px; }
  .steps-grid { grid-template-columns: 1fr; gap: 16px; }
  .reviews-grid { grid-template-columns: 1fr; gap: 16px; }
  .cards-grid { grid-template-columns: 1fr; }

  .footer__inner { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero__title { font-size: 30px; }
}
