/* ==========================================================================
   SafiLink Marketing Site — Design System
   Colors & type mirror the SafiLink Flutter app theme exactly.
   ========================================================================== */

:root {
  /* Brand colors (from app theme) */
  --primary: #1A6BF0;
  --primary-dark: #0F4FC0;
  --primary-light: #4D8EF7;
  --primary-surface: #E8F0FE;
  --success: #00C48C;
  --success-surface: #E3FBF3;
  --warning: #FFB800;
  --warning-surface: #FFF6E0;
  --error: #FF4D4D;
  --error-surface: #FFEAEA;

  /* Neutrals */
  --ink: #0A0F1E;
  --ink-soft: #3A4257;
  --slate: #6B7A99;
  --slate-light: #97A3BD;
  --border: #E2E8F5;
  --surface: #F5F7FF;
  --surface-alt: #F0F4FF;
  --white: #FFFFFF;

  /* Type */
  --font-display: 'Sora', 'Poppins', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'DM Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;

  /* Layout */
  --max-w: 1180px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(10,15,30,0.06), 0 1px 2px rgba(10,15,30,0.08);
  --shadow-md: 0 8px 24px rgba(10,15,30,0.08);
  --shadow-lg: 0 24px 60px rgba(15,79,192,0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-soft);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; }
img { max-width: 100%; display: block; }
ul { padding-left: 0; margin: 0; list-style: none; }

:focus-visible {
  outline: 2.5px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-surface);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.lede {
  font-size: 1.15rem;
  color: var(--slate);
  max-width: 620px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(26,107,240,0.28);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 14px 28px rgba(26,107,240,0.34); }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-surface); transform: translateY(-2px); }
.btn-white {
  background: var(--white);
  color: var(--primary);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 10px 20px; font-size: 0.88rem; }
.btn-block { width: 100%; }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid var(--border);
}
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  z-index: -1;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.brand img { height: 34px; width: auto; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--primary); background: var(--primary-surface); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-toggle { display: none; }

.mobile-nav-cta { display: none; }

@media (max-width: 920px) {
  .main-nav { position: fixed; inset: 70px 0 0 0; background: var(--white); flex-direction: column; align-items: stretch; padding: 18px; gap: 4px; transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; overflow-y: auto; z-index: 99; }
  .main-nav a { padding: 14px 16px; font-size: 1.05rem; }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: var(--white); cursor: pointer; flex: none; }
  .header-actions .btn-outline { display: none; }
  .mobile-nav-cta { display: block; order: -1; padding: 4px 4px 14px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
}

@media (max-width: 640px) {
  .site-header .container { height: 66px; }
  .main-nav { inset: 66px 0 0 0; }
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand img { height: 30px; }
  .header-actions { gap: 8px; }
  .header-actions .btn-primary.btn-sm { display: none; }
}

@media (max-width: 360px) {
  .brand { font-size: 0.98rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 72px 0 40px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--white) 100%);
}
.hero .container { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; }
.hero-copy h1 { margin-bottom: 20px; }
.hero-copy .lede { margin-bottom: 8px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-badge { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 700; color: var(--ink-soft); background: var(--white); border: 1px solid var(--border); padding: 8px 14px; border-radius: var(--radius-pill); box-shadow: var(--shadow-sm); }
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex: none; }

.hero-visual { position: relative; display: flex; justify-content: center; }
.phone {
  position: relative;
  width: 260px;
  border-radius: 34px;
  background: var(--ink);
  padding: 10px;
  box-shadow: var(--shadow-lg);
}
.phone img { border-radius: 24px; width: 100%; display: block; }
.phone::before {
  content: "";
  position: absolute;
  top: 22px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 6px; background: rgba(255,255,255,0.25); border-radius: 4px;
}
.phone-float {
  position: absolute;
  width: 210px;
  border-radius: 28px;
  background: var(--ink);
  padding: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 2;
}
.phone-float img { border-radius: 20px; width: 100%; display: block; }
.phone-primary { z-index: 1; }
.phone-secondary { bottom: -40px; right: -30px; }

.hero-visual-inner { position: relative; }

@media (max-width: 920px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 20px; }
  .phone-secondary { right: -8px; }
}

/* ---------- Trust strip ---------- */
.trust-strip { background: var(--ink); padding: 22px 0; }
.trust-strip .container { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: center; }
.trust-strip span { color: rgba(255,255,255,0.78); font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; }
.trust-strip span svg { flex: none; }

/* ---------- Sections ---------- */
section { padding: 88px 0; }
.section-head { max-width: 680px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.bg-surface { background: var(--surface); }
.bg-ink { background: var(--ink); color: rgba(255,255,255,0.82); }
.bg-ink h2, .bg-ink h3 { color: var(--white); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 920px) { .grid-3, .grid-4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.card-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--primary-surface); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--slate); font-size: 0.95rem; }

.service-card { text-align: center; padding: 22px 16px; }
.service-card .card-icon { margin: 0 auto 14px; }
.service-card h3 { font-size: 1rem; margin-bottom: 4px; }
.service-card p { font-size: 0.85rem; }

/* ---------- Stepper (signature element: verification journey) ---------- */
.journey {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
  margin-top: 8px;
}
.journey-step {
  position: relative;
  padding: 0 18px 0 0;
  text-align: left;
}
.journey-step::before {
  content: "";
  position: absolute;
  top: 21px; left: -18px; right: 0;
  height: 2px;
  background: var(--border);
}
.journey-step:first-child::before { display: none; }
.journey-step.done::before { background: var(--success); }
.journey-num {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; color: var(--slate);
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.journey-step.done .journey-num { background: var(--success); border-color: var(--success); color: var(--white); }
.journey-step h4 { font-family: var(--font-display); font-size: 1rem; margin: 0 0 6px; color: var(--ink); }
.journey-step p { font-size: 0.88rem; color: var(--slate); margin: 0; }
@media (max-width: 820px) {
  .journey { grid-template-columns: 1fr; gap: 28px; }
  .journey-step::before { top: -14px; left: 21px; right: auto; width: 2px; height: 14px; }
}

/* ---------- Numbered process (how it works) ---------- */
.process { display: flex; flex-direction: column; gap: 0; }
.process-item { display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--border); }
.process-item:last-child { border-bottom: none; }
.process-index { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; color: var(--primary-surface); -webkit-text-stroke: 1.5px var(--primary); }
.process-body h3 { margin-bottom: 6px; }
.process-body p { color: var(--slate); margin: 0 0 14px; max-width: 560px; }
.process-shot { display: flex; }

/* ---------- Split sections ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 920px) { .split { grid-template-columns: 1fr; } }
.split-reverse .split-media { order: 2; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: 0.98rem; color: var(--ink-soft); }
.check-list svg { flex: none; margin-top: 3px; }

/* ---------- Stats ---------- */
.stat { text-align: center; }
.stat b { display: block; font-family: var(--font-display); font-size: 2.2rem; font-weight: 800; color: var(--white); }
.stat span { font-size: 0.85rem; color: rgba(255,255,255,0.65); }

/* ---------- Audience split (client/provider) ---------- */
.audience {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
}
@media (max-width: 820px) { .audience { grid-template-columns: 1fr; } }
.audience-card {
  border-radius: var(--radius-lg);
  padding: 40px;
  position: relative;
  overflow: hidden;
}
.audience-card.client { background: var(--primary); color: var(--white); }
.audience-card.provider { background: var(--ink); color: var(--white); }
.audience-card h3 { color: var(--white); font-size: 1.5rem; }
.audience-card p { color: rgba(255,255,255,0.78); }
.audience-card .btn-white { margin-top: 14px; }

/* ---------- Waitlist form ---------- */
.waitlist-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 40px;
  max-width: 480px;
  margin: 0 auto;
}
.role-toggle { display: flex; background: var(--surface); border-radius: var(--radius-pill); padding: 4px; margin-bottom: 22px; }
.role-toggle input { display: none; }
.role-toggle label { flex: 1; text-align: center; padding: 10px 12px; border-radius: var(--radius-pill); font-weight: 700; font-size: 0.9rem; cursor: pointer; color: var(--slate); transition: all .15s; }
.role-toggle input:checked + label { background: var(--primary); color: var(--white); }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: 12px; border: 1.5px solid var(--border);
  font-family: var(--font-body); font-size: 0.95rem; background: var(--surface); color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); background: var(--white); }
.form-note { font-size: 0.78rem; color: var(--slate-light); margin-top: 14px; text-align: center; }
.form-success { display: none; text-align: center; padding: 20px 0; }
.form-success.show { display: block; }
.form-success svg { margin: 0 auto 14px; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary { cursor: pointer; padding: 22px 0; font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.02rem; display: flex; justify-content: space-between; align-items: center; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; color: var(--primary); font-weight: 400; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding-bottom: 22px; margin: 0; color: var(--slate); max-width: 700px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.6); padding: 64px 0 28px; }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.1); }
@media (max-width: 820px) { .footer-top { grid-template-columns: 1fr 1fr; } }
.footer-brand .brand { color: var(--white); margin-bottom: 14px; }
.footer-brand p { max-width: 280px; font-size: 0.92rem; }
.footer-col h4 { color: var(--white); font-family: var(--font-body); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.62); font-size: 0.92rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 24px; font-size: 0.82rem; }
.footer-legal { display: flex; gap: 18px; }
.footer-legal a { color: rgba(255,255,255,0.55); }

/* ---------- Page hero (interior pages) ---------- */
.page-hero { padding: 60px 0 50px; background: var(--surface); text-align: center; }
.page-hero .lede { margin: 0 auto; }
.page-hero.tight { padding: 48px 0; }

/* ---------- Badge pill ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); padding: 6px 12px; border-radius: var(--radius-pill); font-size: 0.8rem; font-weight: 700; color: var(--ink-soft); }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.muted { color: var(--slate); }
.small { font-size: 0.85rem; }

/* CTA band */
.cta-band { background: var(--primary); border-radius: var(--radius-lg); padding: 56px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; color: var(--white); }
.cta-band h2 { color: var(--white); margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.82); margin: 0; }

/* Legal pages */
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h2 { margin-top: 2.2em; font-size: 1.35rem; }
.legal-content h3 { margin-top: 1.6em; font-size: 1.05rem; }
.legal-content ul { list-style: disc; padding-left: 22px; margin-bottom: 1.2em; }
.legal-content li { margin-bottom: 8px; }
.legal-content p { color: var(--ink-soft); }
.legal-updated { color: var(--slate-light); font-size: 0.88rem; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-item { display: flex; gap: 16px; margin-bottom: 26px; }
.contact-info-item .card-icon { margin: 0; flex: none; }
.contact-info-item h4 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1rem; }
.contact-info-item p { margin: 0; color: var(--slate); font-size: 0.92rem; }
.contact-info-item a { color: var(--ink-soft); font-weight: 600; }
.contact-info-item a:hover { color: var(--primary); }

/* Skip link */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--primary); color: white; padding: 12px 20px; border-radius: 0 0 10px 0; z-index: 999; }
.skip-link:focus { left: 0; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,15,30,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 1000;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  position: relative; background: var(--white); border-radius: var(--radius-lg);
  padding: 40px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modal-in .22s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-close { position: absolute; top: 18px; right: 18px; background: var(--surface); border: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* ---------- Hero audience switch ---------- */
.audience-switch {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 24px;
  gap: 2px;
}
.audience-tab {
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: var(--slate);
  transition: background .15s, color .15s;
}
.audience-tab.active { background: var(--primary); color: var(--white); }
.audience-tab:not(.active):hover { color: var(--ink); }

/* ---------- Reveal on scroll (micro-animation) ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

.service-card .card-icon, .card .card-icon { transition: transform .2s ease; }
.card:hover .card-icon { transform: scale(1.08) rotate(-2deg); }

/* Honeypot field — hidden from real users, catches basic bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.form-error { color: var(--error); background: var(--error-surface); border-radius: 10px; padding: 10px 14px; font-size: 0.85rem; margin-top: 12px; text-align: center; }
.form-error a { color: var(--error); font-weight: 700; text-decoration: underline; }
