/* ===================================================================
   TraderFolks — main site (traderfolks.com)
   Design tokens: official brand (assets/traderfolks_logo.svg)
   Shared across all pages via /assets/inc/header.html + footer.html (SSI)
   =================================================================== */

:root {
  --blue: #0087f6;
  --blue-dark: #096bbb;
  --blue-soft: #eaf4ff;
  --orange: #dd390d;
  --orange-dark: #b82e09;
  --orange-soft: #fdece6;
  --ink: #12141a;
  --muted: #5b6472;
  --muted-2: #838d9c;
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --border: #e6e8ec;
  --border-strong: #d7dae0;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(18, 20, 26, 0.04), 0 8px 24px rgba(18, 20, 26, 0.06);
  --shadow-lg: 0 4px 8px rgba(18, 20, 26, 0.05), 0 20px 48px rgba(18, 20, 26, 0.10);
  --max: 1160px;
  --header-h: 72px;
}

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

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dark); }
ul, ol { padding-left: 1.2em; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; top: -48px; left: 12px;
  background: var(--ink); color: #fff; padding: 10px 18px;
  border-radius: var(--radius-sm); z-index: 200; transition: top .15s;
  font-weight: 600; font-size: 0.9rem;
}
.skip-link:focus { top: 12px; color: #fff; }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ─── Header / nav ─────────────────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.site-header .container {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { height: 30px; width: auto; }
.brand-word { font-weight: 800; font-size: 1.1rem; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.brand-word span { color: var(--orange); }

.nav-toggle {
  display: none;
  border: 1px solid var(--border-strong);
  background: #fff;
  border-radius: var(--radius-sm);
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 20px; height: 20px; }

.nav-primary { flex: 1; display: flex; justify-content: flex-end; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--muted); font-weight: 600; font-size: 0.94rem; white-space: nowrap;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-cta { margin-left: 8px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-primary {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    flex-direction: column; align-items: stretch;
    max-height: 0; overflow: hidden; transition: max-height .2s ease;
  }
  .nav-primary.is-open { max-height: 420px; }
  .nav-links { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 24px 20px; }
  .nav-links li { border-top: 1px solid var(--border); }
  .nav-links li:first-child { border-top: none; }
  .nav-links a { display: block; padding: 14px 4px; }
  .nav-cta { margin: 12px 4px 4px; }
  .nav-cta .btn { display: flex; justify-content: center; }
}

/* ─── Buttons ──────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 0.95rem;
  padding: 13px 26px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s, color .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--orange); color: #fff; box-shadow: 0 10px 24px rgba(221,57,13,0.25); }
.btn--primary:hover { background: var(--orange-dark); color: #fff; }
.btn--outline { background: #fff; color: var(--ink); border-color: var(--border-strong); }
.btn--outline:hover { border-color: var(--blue); color: var(--blue-dark); }
.btn--sm { padding: 9px 18px; font-size: 0.85rem; }
.btn--block { display: flex; width: 100%; }

/* ─── Hero ─────────────────────────────────────────────── */

.hero {
  padding: 76px 0 64px;
  background: radial-gradient(1100px 420px at 50% -10%, rgba(0,135,246,0.08), transparent), var(--bg);
  text-align: center;
}
.hero.hero--left { text-align: left; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--blue-soft); color: var(--blue-dark);
  font-weight: 700; font-size: 0.78rem; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px;
}
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; letter-spacing: -0.02em; margin: 0 0 16px; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.01em; margin: 0 0 14px; }
h3 { font-size: 1.15rem; font-weight: 700; margin: 0 0 8px; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; }
.hero .lead { margin: 0 auto 30px; }
.hero.hero--left .lead { margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero.hero--left .hero-actions { justify-content: flex-start; }

.page-hero { padding: 56px 0 44px; border-bottom: 1px solid var(--border); }
.page-hero p.lead { margin: 0 auto; }

/* ─── Sections ─────────────────────────────────────────── */

section.section { padding: 64px 0; }
.section-title { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-title h2 { margin-bottom: 10px; }
.section-title p { color: var(--muted); margin: 0; }

.bg-soft { background: var(--bg-soft); }

/* ─── Bonus banner ─────────────────────────────────────── */

.bonus-banner {
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  color: #fff; border-radius: var(--radius-lg);
  padding: 32px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  justify-content: space-between;
}
.bonus-banner__text { flex: 1; min-width: 240px; }
.bonus-banner__tag {
  display: inline-block; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.03em;
  text-transform: uppercase; background: rgba(255,255,255,0.16); padding: 4px 12px;
  border-radius: 999px; margin-bottom: 10px;
}
.bonus-banner h2 { color: #fff; margin-bottom: 6px; }
.bonus-banner p { color: rgba(255,255,255,0.85); margin: 0; }
.bonus-banner .btn--primary { background: #fff; color: var(--blue-dark); box-shadow: none; }
.bonus-banner .btn--primary:hover { background: var(--bg-soft); color: var(--blue-dark); }

/* ─── Steps (how it works) ─────────────────────────────── */

.steps-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
@media (max-width: 780px) { .steps-grid { grid-template-columns: 1fr; } }
.step-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; position: relative;
}
.step-num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--blue-soft); color: var(--blue-dark);
  display: flex; align-items: center; justify-content: center; font-weight: 800; margin-bottom: 16px;
}
.step-card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* ─── Cards / feature grid ─────────────────────────────── */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; transition: transform .15s, border-color .15s, box-shadow .15s;
}
a.card { text-decoration: none; color: inherit; display: block; }
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--blue-soft);
  color: var(--blue); display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; margin-bottom: 14px;
}
.card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ─── CTA section ──────────────────────────────────────── */

.cta-section {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 64px 0; text-align: center;
}
.cta-box {
  background: linear-gradient(135deg, var(--blue-soft), var(--orange-soft));
  border: 1px solid #cfe6fb; border-radius: var(--radius-lg);
  padding: 48px 32px; max-width: 720px; margin: 0 auto;
}
.cta-box h2 { margin-bottom: 10px; }
.cta-box p { color: var(--muted); margin: 0 auto 26px; max-width: 480px; }

/* ─── FAQ (native <details>) ───────────────────────────── */

.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 4px 22px; margin-bottom: 12px; background: var(--bg);
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 0;
  font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; font-weight: 400; color: var(--muted-2); flex: 0 0 auto; }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item p { margin: 0 0 20px; color: var(--muted); }

/* ─── Prose (About / legal pages) ──────────────────────── */

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 40px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: #333c48; line-height: 1.75; }
.prose ul { color: #333c48; line-height: 1.75; }
.prose .updated { color: var(--muted-2); font-size: 0.85rem; margin-bottom: 32px; }
.prose .draft-notice {
  background: var(--orange-soft); border: 1px solid #f6cdbd; color: var(--orange-dark);
  border-radius: var(--radius); padding: 14px 18px; font-size: 0.88rem; font-weight: 600;
  margin-bottom: 32px;
}

/* ─── Contact ──────────────────────────────────────────── */

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 720px; margin: 0 auto; }
@media (max-width: 620px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card {
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; text-align: center;
}
.contact-card .card-icon { margin: 0 auto 14px; }

/* ─── Telegram accent (community page, footer, nav) ────── */

.telegram-link { color: #229ed9; font-weight: 600; }
.telegram-link:hover { color: #1483b5; }
.telegram-link i, .telegram-link svg { margin-right: 6px; }

/* ─── Footer ───────────────────────────────────────────── */

.site-footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 52px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 30px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.footer-brand img { height: 26px; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted-2); margin: 0 0 14px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--muted); font-size: 0.9rem; font-weight: 600; }
.footer-links a:hover { color: var(--ink); }
.disclosure { font-size: 0.78rem; color: var(--muted-2); line-height: 1.6; }
.disclosure strong { color: var(--muted); }
.disclosure + .disclosure { margin-top: 10px; }
.footer-bottom { border-top: 1px solid var(--border-strong); padding-top: 18px; font-size: 0.78rem; color: var(--muted-2); text-align: center; }

/* ─── Utility ──────────────────────────────────────────── */

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
