/* ============================================================
   FTD Network — Plain HTML/CSS/JS Export
   Converted from React + Tailwind + Framer Motion
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties (design tokens) ─────────────────── */
:root {
  --background:      hsl(240, 20%, 3.5%);
  --foreground:      hsl(210, 40%, 98%);
  --card:            hsl(240, 15%, 6%);
  --card-foreground: hsl(210, 40%, 98%);
  --primary:         hsl(210, 100%, 60%);
  --primary-fg:      hsl(240, 20%, 3.5%);
  --secondary:       hsl(240, 10%, 12%);
  --secondary-fg:    hsl(210, 40%, 98%);
  --muted:           hsl(240, 10%, 14%);
  --muted-fg:        hsl(215, 15%, 55%);
  --accent:          hsl(12, 90%, 62%);
  --accent-fg:       hsl(210, 40%, 98%);
  --border:          hsl(240, 10%, 15%);
  --input:           hsl(240, 10%, 15%);
  --ring:            hsl(210, 100%, 60%);
  --radius:          0.75rem;

  --gradient-primary: linear-gradient(135deg, hsl(12, 90%, 62%), hsl(210, 100%, 60%));
}

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

html { scroll-behavior: smooth; }

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Utility Classes ────────────────────────────────────────── */
.gradient-primary {
  background: var(--gradient-primary);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glass-card {
  background: hsl(240, 15%, 6%, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid hsl(240, 10%, 15%, 0.5);
}

.container {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.text-muted { color: var(--muted-fg); }
.text-accent { color: var(--accent); }
.text-primary-color { color: var(--primary); }
.font-space { font-family: 'Space Grotesk', sans-serif; }
.font-mono { font-family: 'Courier New', Courier, monospace; }

/* ── Scroll Reveal Animations ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal-scale.in-view {
  opacity: 1;
  transform: scale(1);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-left.in-view {
  opacity: 1;
  transform: translateX(0);
}
.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-right.in-view {
  opacity: 1;
  transform: translateX(0);
}

/* Staggered delays */
.delay-1 { transition-delay: 0.08s; }
.delay-2 { transition-delay: 0.16s; }
.delay-3 { transition-delay: 0.24s; }
.delay-4 { transition-delay: 0.32s; }
.delay-5 { transition-delay: 0.40s; }
.delay-6 { transition-delay: 0.48s; }

/* Entry animations (run once on mount) */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes pulse-glow {
  0%, 100% { opacity: 0.2; transform: scale(0.95); }
  50%       { opacity: 0.5; transform: scale(1.05); }
}

.anim-fade-up   { animation: fadeInUp   0.7s ease forwards; }
.anim-fade-up-d1 { animation: fadeInUp  0.7s 0.15s ease forwards; opacity: 0; }
.anim-fade-up-d2 { animation: fadeInUp  0.7s 0.3s  ease forwards; opacity: 0; }
.anim-scale     { animation: fadeInScale 0.8s 0.3s  ease forwards; opacity: 0; }

/* ── SVG Path Draw ──────────────────────────────────────────── */
@keyframes drawPath {
  from { stroke-dashoffset: var(--dash-len, 2000); }
  to   { stroke-dashoffset: 0; }
}
.draw-path {
  stroke-dasharray: var(--dash-len, 2000);
  stroke-dashoffset: var(--dash-len, 2000);
  animation: drawPath 2s ease-in-out forwards;
}
.draw-path-d1 {
  stroke-dasharray: var(--dash-len, 200);
  stroke-dashoffset: var(--dash-len, 200);
  animation: drawPath 0.5s 1.5s ease forwards;
}
.draw-path-d2 { animation-delay: 1.7s; }
.draw-path-d3 { animation-delay: 1.9s; }
.draw-path-d4 { animation-delay: 2.1s; }
.draw-path-d5 { animation-delay: 2.3s; }
.draw-path-d6 { animation-delay: 2.5s; }
.draw-path-d7 { animation-delay: 2.7s; }
.draw-path-d8 { animation-delay: 2.9s; }

/* ── Orbiting Dot Animations ────────────────────────────────── */
@keyframes orbitHex0 {
  0%   { top: 9.4%;  left: 50%; }
  16%  { top: 29.2%; left: 86.5%; }
  33%  { top: 70.8%; left: 86.5%; }
  50%  { top: 90.6%; left: 50%; }
  66%  { top: 70.8%; left: 13.5%; }
  83%  { top: 29.2%; left: 13.5%; }
  100% { top: 9.4%;  left: 50%; }
}
@keyframes orbitSquare {
  0%   { top: 12%; left: 12%; }
  25%  { top: 12%; left: 87%; }
  50%  { top: 87%; left: 87%; }
  75%  { top: 87%; left: 12%; }
  100% { top: 12%; left: 12%; }
}

.orbit-dot {
  position: absolute;
  z-index: 20;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.orbit-hex {
  animation: orbitHex0 7s linear infinite;
}
.orbit-hex-d1 { animation-delay: 2.3s; }
.orbit-hex-d2 { animation-delay: 4.6s; }
.orbit-sq {
  animation: orbitSquare 6s linear infinite;
}
.orbit-sq-d1 { animation-delay: 2s; }
.orbit-sq-d2 { animation-delay: 4s; }

/* Spinning dashed ring on step nodes */
.spin-ring {
  animation: spin 8s linear infinite;
}

/* ── Hexagon clip ───────────────────────────────────────────── */
.hex-shape {
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

/* ─────────────────────────────────────────────────────────────
   NAVBAR
   ───────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: black;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 6rem;
  padding: 0 1.5rem;
}
.navbar-logo img {
  height: 5rem;
  margin-top: -1rem;
  margin-bottom: -1rem;
}
@media(max-width:640px){
  .navbar-logo img {
    height: 4rem;
  } 
}
.navbar-desktop {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.nav-link-animated {
  position: relative;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  transition: color 0.2s;
}
.nav-link-animated::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.nav-link-animated:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: opacity 0.2s, background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-ghost {
  background: transparent;
  color: var(--muted-fg);
  border-color: transparent;
}
.btn-ghost:hover { color: var(--foreground); background: var(--secondary); }
.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  border: none;
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
  background: transparent;
  color: var(--foreground);
  border-color: var(--border);
}
.btn-outline:hover { background: var(--secondary); }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.125rem; }
.btn-xl { padding: 1.25rem 3rem; font-size: 1.125rem; }

.hamburger-btn {
  background: none;
  border: none;
  color: var(--foreground);
  padding: 0.25rem;
  display: none;
}
.mobile-menu {
  display: none;
  border-top: 1px solid hsl(240, 10%, 15%, 0.5);
  background: hsl(240, 20%, 3.5%, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 1rem 1.5rem;
  flex-direction: column;
  gap: 0.75rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu .btn {
  justify-content: space-between;
  width: 100%;
  padding: 0.75rem 1rem;
}

@media (max-width: 639px) {
  .navbar-desktop { display: none; }
  .hamburger-btn  { display: block; }
}
@media (min-width: 640px) {
  .hamburger-btn { display: none; }
}

/* ─────────────────────────────────────────────────────────────
   HERO SECTION
   ───────────────────────────────────────────────────────────── */
.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 85vh;
  overflow: hidden;
  padding-top: 8rem;
}
.hero-bg {
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.hero-bg-blob {
  position: absolute;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  filter: blur(120px);
}
.hero-grid {
  display: grid;
  align-items: center;
  gap: 3rem;
}
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: hsl(240, 10%, 12%, 0.5);
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-bottom: 1.5rem;
}
.hero-badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero-desc {
  font-size: 1.125rem;
  color: var(--muted-fg);
  line-height: 1.7;
  max-width: 32rem;
  margin-bottom: 2rem;
}
.hero-engine {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  margin: 0 auto;
}
@media (max-width: 1023px) {
  .hero-engine { max-width: 320px; }
  .hero-engine-desktop { display: none; }
}
@media (min-width: 1024px) {
  .hero-engine { max-width: 480px; }
  .hero-engine-mobile { display: none; }
}

/* Step nodes on hero hexagon */
.step-node {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.step-icon-wrap {
  position: relative;
  flex-shrink: 0;
}
.step-icon-glow {
  position: absolute;
  inset: -0.5rem;
  border-radius: 1rem;
  filter: blur(1rem);
  animation: pulse-glow 3s ease infinite;
}
.step-icon-ring {
  position: absolute;
  inset: -0.5rem;
  border-radius: 50%;
  border: 1px dashed hsl(210, 100%, 60%, 0.2);
  animation: spin 8s linear infinite;
}
.step-icon-hex {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.step-badge {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.step-label {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  line-height: 1.2;
}
.step-detail {
  font-family: 'Courier New', Courier, monospace;
  color: hsl(215, 15%, 55%, 0.6);
  line-height: 1.2;
}

/* Desktop step nodes (48×48 icon, larger text) */
.step-node-desktop .step-icon-hex { width: 50px; height: 50px; }
.step-node-desktop .step-badge   { width: 20px; height: 20px; border-radius: 4px; font-size: 9px; }
.step-node-desktop .step-label   { font-size: 11px; }
.step-node-desktop .step-detail  { font-size: 9px; }

/* Mobile step nodes (40×40 icon, smaller text) */
.step-node-mobile .step-icon-hex { width: 40px; height: 40px; }
.step-node-mobile .step-badge    { width: 16px; height: 16px; border-radius: 3px; font-size: 7px; }
.step-node-mobile .step-label    { font-size: 9px; }
.step-node-mobile .step-detail   { font-size: 7px; }

/* Center engine label */
.engine-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
}
.engine-label-sub {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: hsl(215, 15%, 55%, 0.5);
  margin-bottom: 0.25rem;
}
.engine-label-main {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────
   STATS BAR
   ───────────────────────────────────────────────────────────── */
.stats-bar {
  border-top: 1px solid hsl(240, 10%, 15%, 0.5);
  border-bottom: 1px solid hsl(240, 10%, 15%, 0.5);
  background: hsl(240, 10%, 12%, 0.1);
}
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  padding: 4rem 0;
  text-align: center;
}
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: clamp(1.75rem, 4vw, 3rem);
  white-space: nowrap;
}
.stat-label {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  white-space: nowrap;
}
@media (max-width: 639px) {
  .stat-label { font-size: 0.75rem; }
}

/* ─────────────────────────────────────────────────────────────
   HOW IT WORKS
   ───────────────────────────────────────────────────────────── */
.section { padding: 6rem 0; }
.section-alt {
  padding: 6rem 0;
  border-top: 1px solid hsl(240, 10%, 15%, 0.5);
  border-bottom: 1px solid hsl(240, 10%, 15%, 0.5);
  background: hsl(240, 10%, 12%, 0.1);
}
.section-header {
  max-width: 42rem;
  margin: 0 auto 4rem;
  text-align: center;
}
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: hsl(240, 10%, 12%, 0.5);
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-bottom: 1rem;
}
.section-badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.section-desc {
  color: var(--muted-fg);
  line-height: 1.7;
}

/* Steps (HowItWorks) */
.steps-container {
  position: relative;
  max-width: 56rem;
  margin: 0 auto;
}
.steps-line {
  position: absolute;
  left: 28px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg,
    hsl(12,90%,62%,0.5),
    hsl(210,100%,60%,0.5),
    hsl(12,90%,62%,0.5),
    hsl(210,100%,60%,0.5)
  );
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.5s ease;
}
.steps-line.in-view { transform: scaleY(1); }
@media (max-width: 767px) { .steps-line { display: none; } }

.steps-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.step-item {
  display: flex;
  gap: 1.5rem;
}
.step-item-icon-wrap {
  position: relative;
  flex-shrink: 0;
}
.step-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  backdrop-filter: blur(4px);
}
.step-item-badge {
  position: absolute;
  top: -4px; right: -4px;
  width: 20px; height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-primary);
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.step-item-content { padding-top: 0.5rem; }
.step-item-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.step-item-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-fg);
  max-width: 32rem;
}

/* ─────────────────────────────────────────────────────────────
   BENEFITS GRID (Affiliates & Brokers)
   ───────────────────────────────────────────────────────────── */
.benefits-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}
@media (min-width: 640px)  { .benefits-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .benefits-grid-3 { grid-template-columns: 1fr 1fr 1fr; } }
@media (min-width: 1024px) { .benefits-grid-4 { grid-template-columns: repeat(4, 1fr); } }

.benefit-card {
  border-radius: 1rem;
  padding: 1.5rem;
  transition: border-color 0.2s;
}
.benefit-card:hover { border-color: hsl(12,90%,62%,0.3); }
.benefit-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  margin-bottom: 1rem;
}
.benefit-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.benefit-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-fg);
}

/* ─────────────────────────────────────────────────────────────
   DATA TYPES
   ───────────────────────────────────────────────────────────── */
.data-types-grid {
  display: grid;
  gap: 2rem;
  max-width: 64rem;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .data-types-grid { grid-template-columns: 1fr 1fr; }
}
.data-card {
  border-radius: 1rem;
  padding: 1.75rem;
}
.data-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.data-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  flex-shrink: 0;
}
.data-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
}
.data-card-desc {
  font-size: 0.875rem;
  color: var(--muted-fg);
  line-height: 1.7;
  margin-bottom: 1rem;
}
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tag {
  border-radius: 9999px;
  border: 1px solid var(--border);
  background: hsl(240, 10%, 12%, 0.5);
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

/* Flag grid */
.flags-header {
  max-width: 42rem;
  margin: 4rem auto 2rem;
  text-align: center;
}
.flags-title {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.flags-desc {
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-bottom: 2rem;
}
.flags-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  max-width: 48rem;
  margin: 0 auto;
}
@media (min-width: 640px) { .flags-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 768px) { .flags-grid { grid-template-columns: repeat(5, 1fr); } }
.flag-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  border-radius: 0.75rem;
  padding: 0.75rem;
}
.flag-card img {
  width: 2rem;
  height: 1.5rem;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.flag-name {
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
}
/* Larger flags for Brokers Languages section */
.flags-grid-lg .flag-card {
  gap: 0.75rem;
  padding: 1.5rem;
  border-radius: 1rem;
  transition: border-color 0.2s;
}
.flags-grid-lg .flag-card:hover { border-color: hsl(12,90%,62%,0.3); }
.flags-grid-lg .flag-card img {
  width: 4rem;
  height: 3rem;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.flags-grid-lg .flag-name {
  font-size: 0.875rem;
  font-weight: 600;
}
.flags-grid-lg .flag-regions {
  font-size: 0.75rem;
  color: var(--muted-fg);
  text-align: center;
}
.flags-grid-lg {
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .flags-grid-lg { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .flags-grid-lg { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .flags-grid-lg { grid-template-columns: repeat(5, 1fr); } }

/* ─────────────────────────────────────────────────────────────
   FAQ ACCORDION
   ───────────────────────────────────────────────────────────── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 48rem;
  margin: 0 auto;
}
.faq-item {
  border-radius: 1rem;
  overflow: hidden;
  border: none;
}
.faq-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  background: none;
  border: none;
  color: var(--foreground);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  gap: 1rem;
}
.faq-trigger svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.faq-item.open .faq-trigger svg { transform: rotate(180deg); }
.faq-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-item.open .faq-body { max-height: 300px; }
.faq-content {
  padding: 0 1.5rem 1.25rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-fg);
}

/* ─────────────────────────────────────────────────────────────
   CTA SECTIONS
   ───────────────────────────────────────────────────────────── */
.cta-box {
  position: relative;
  max-width: 48rem;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid hsl(240, 10%, 15%, 0.5);
  padding: 4rem 3rem;
  text-align: center;
}
.cta-bg {
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.cta-blob {
  position: absolute;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  filter: blur(100px);
}
.cta-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
.cta-desc {
  font-size: 1.125rem;
  color: var(--muted-fg);
  margin-bottom: 2rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}
.cta-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) {
  .cta-buttons { flex-direction: row; }
}

/* Broker CTA (simpler, no box) */
.broker-cta { text-align: center; }
.broker-cta .cta-desc { max-width: 42rem; }

/* ─────────────────────────────────────────────────────────────
   BROKERS PAGE SECTIONS
   ───────────────────────────────────────────────────────────── */
.qualifications-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 56rem;
  margin: 0 auto;
}
@media (min-width: 640px)  { .qualifications-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .qualifications-grid { grid-template-columns: 1fr 1fr 1fr; } }

.qual-card {
  border-radius: 1rem;
  padding: 1.25rem;
}
.qual-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
}
.qual-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin-bottom: 0.375rem;
}
.qual-desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--muted-fg);
}

/* ─────────────────────────────────────────────────────────────
   LOGIN / REGISTER PAGES
   ───────────────────────────────────────────────────────────── */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem;
  position: relative;
}
.auth-bg {
  pointer-events: none;
  position: absolute;
  inset: 0;
}
.auth-blob {
  position: absolute;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  filter: blur(100px);
}
.auth-card {
  position: relative;
  width: 100%;
  max-width: 28rem;
  border-radius: 1rem;
  padding: 2rem;
  animation: fadeInUp 0.5s ease forwards;
}
.auth-logo {
  display: block;
  margin: 0 auto 1.5rem;
  height: 6rem;
}
.auth-subtitle {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-bottom: 2rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.form-label {
  font-size: 0.875rem;
  color: var(--muted-fg);
}
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: hsl(240, 10%, 12%, 0.5);
  color: var(--foreground);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
.form-input::placeholder { color: hsl(215, 15%, 55%, 0.5); }
.form-input:focus { border-color: var(--primary); }
.btn-form-submit {
  width: 100%;
  padding: 0.9rem;
  margin-top: 0.25rem;
}
.auth-footer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted-fg);
  margin-top: 1.5rem;
}
.auth-footer a {
  color: var(--accent);
}
.auth-footer a:hover { text-decoration: underline; }

/* ─────────────────────────────────────────────────────────────
   404 PAGE
   ───────────────────────────────────────────────────────────── */
.not-found {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--muted);
  text-align: center;
}
.not-found h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.not-found p {
  font-size: 1.25rem;
  color: var(--muted-fg);
  margin-bottom: 1rem;
}
.not-found a {
  color: var(--primary);
  text-decoration: underline;
}
.not-found a:hover { color: hsl(210, 100%, 75%); }

/* ─────────────────────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid hsl(240, 10%, 15%, 0.5);
  background: hsl(240, 10%, 12%, 0.1);
}
.footer-inner {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

/* ─────────────────────────────────────────────────────────────
   BROKERS PARTNERSHIP FLOW (text + animation side by side)
   ───────────────────────────────────────────────────────────── */
.partnership-grid {
  display: grid;
  align-items: center;
  gap: 4rem;
}
@media (min-width: 1024px) {
  .partnership-grid { grid-template-columns: 1fr 1fr; }
}
.partnership-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}
.partnership-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.partnership-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient-primary);
}
.partnership-step-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.partnership-step-desc {
  font-size: 0.875rem;
  color: var(--muted-fg);
}

/* Mobile partnership flow (vertical list fallback) */
.partnership-mobile-flow {
  margin-top: 4rem;
  display: block;
}
@media (min-width: 1024px) { .partnership-mobile-flow { display: none; } }
.pm-flow-list {
  position: relative;
  max-width: 24rem;
  margin: 0 auto;
}
.pm-flow-line {
  position: absolute;
  left: 30px;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, hsl(210,100%,60%), hsl(12,90%,62%), hsl(210,100%,60%), hsl(12,90%,62%));
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.5s ease;
}
.pm-flow-line.in-view { transform: scaleY(1); }

/* ─────────────────────────────────────────────────────────────
   SQUARE ANIMATION (BrokersHero & PartnershipFlow)
   ───────────────────────────────────────────────────────────── */
.sq-engine {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  max-width: 420px;
  margin: 0 auto;
}
.sq-engine svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* Corner step nodes for square animation */
.sq-node {
  position: absolute;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
