/* SwapX — main stylesheet
   Tokens mirror the app: near-black canvas, hot-pink accent, Inter. */

:root {
  --bg: #0a0a0f;
  --surface: #13131f;
  --surface-2: #1a1a2e;
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.16);
  --text: #fff;
  --muted: #a0a0b0;
  --muted-2: #6f6f82;
  --accent: #ff007f;
  --accent-soft: rgba(255,0,127,.12);
  --accent-hover: #e60073;
  --ok: #34d399;
  --warn: #fbbf24;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 32px;
  --wrap: 1120px;
  --pad: clamp(16px, 4vw, 24px);
  --gap: clamp(56px, 8vw, 104px);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease, opacity .2s ease; }
ul, ol { list-style: none; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--accent); color: #fff; padding: 12px 20px; border-radius: 0 0 8px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--gap); }
.section--tight { padding-block: clamp(36px, 5vw, 64px); }

/* ---------- Type ---------- */
h1, h2, h3, h4 { line-height: 1.15; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 6vw, 3.9rem); font-weight: 900; }
h2 { font-size: clamp(1.6rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.45rem); }
h4 { font-size: 1.05rem; }
p  { text-wrap: pretty; }
.lead { font-size: clamp(1.02rem, 2.1vw, 1.22rem); color: var(--muted); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.accent { color: var(--accent); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); background: var(--accent-soft);
  padding: 6px 14px; border-radius: 100px; margin-bottom: 18px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 30px; border-radius: 100px; font-weight: 700; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; text-align: center; line-height: 1.2;
}
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 10px 30px rgba(255,0,127,.28); }
.btn--primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255,0,127,.42); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 10px 20px; font-size: .92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.center .btn-row { justify-content: center; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,10,15,.86); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 14px; }
.logo { font-size: 1.45rem; font-weight: 900; letter-spacing: -.03em; flex-shrink: 0; }
.nav-links { display: flex; gap: 26px; align-items: center; font-size: .95rem; font-weight: 500; }
.nav-links a { color: var(--muted); white-space: nowrap; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

/* Below 900px the links drop to their own scrollable row rather than
   disappearing — most traffic is mobile, so they have to stay reachable. */
@media (max-width: 900px) {
  .site-header nav { flex-wrap: wrap; row-gap: 10px; }
  .nav-links {
    order: 3; width: 100%; gap: 20px; font-size: .9rem;
    overflow-x: auto; scrollbar-width: none;
    padding-bottom: 4px; margin-inline: calc(var(--pad) * -1); padding-inline: var(--pad);
    -webkit-overflow-scrolling: touch;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links a[aria-current="page"] { color: var(--accent); }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(56px, 9vw, 104px) var(--gap); text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% 50% auto; translate: 50% 0;
  width: min(900px, 130vw); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,0,127,.17), transparent 62%);
  pointer-events: none; z-index: -1;
}
.hero h1 { margin-bottom: 20px; }
.hero .lead { margin-inline: auto; margin-bottom: 34px; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 22px; }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(276px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(24px, 3vw, 34px);
}
.card:hover { border-color: var(--line-strong); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .96rem; }
.card .icon { font-size: 1.9rem; display: block; margin-bottom: 16px; line-height: 1; }
a.card:hover { border-color: var(--accent); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 26px 26px; }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 16px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 1rem;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .94rem; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 24px 20px; text-align: center; }
.stat b { display: block; font-size: clamp(1.5rem, 3.4vw, 2.1rem); font-weight: 900; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: .87rem; }

/* ---------- FAQ (no JS) ---------- */
.faq { display: grid; gap: 12px; max-width: 860px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  cursor: pointer; list-style: none; padding: 20px 54px 20px 24px; position: relative;
  font-weight: 700; font-size: 1.02rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 24px; top: 50%; translate: 0 -50%;
  font-size: 1.5rem; font-weight: 400; color: var(--accent); line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq .faq-body { padding: 0 24px 22px; color: var(--muted); }
.faq .faq-body > * + * { margin-top: .9em; }
.faq .faq-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Table ---------- */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; min-width: 540px; font-size: .95rem; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--surface); font-weight: 700; font-size: .88rem; letter-spacing: .02em; }
tbody tr:last-child td { border-bottom: 0; }
td.yes { color: var(--ok); font-weight: 700; }
td.no { color: var(--muted-2); }

/* ---------- Prose (guides) ---------- */
.prose { max-width: 74ch; margin-inline: auto; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 1.9em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: var(--muted); font-size: 1.02rem; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose ul li { list-style: disc; }
.prose ol li { list-style: decimal; }
.prose li + li { margin-top: .5em; }
.prose blockquote { border-left: 3px solid var(--accent); padding: 4px 0 4px 20px; color: var(--muted); font-style: italic; }

/* ---------- Callout ---------- */
.callout {
  background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 22px 24px;
}
.callout--warn { border-left-color: var(--warn); }
.callout h3 { font-size: 1.05rem; margin-bottom: 8px; }
.callout p { color: var(--muted); font-size: .96rem; }

/* ---------- CTA band ---------- */
.cta {
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 68px) var(--pad); text-align: center;
}
.cta h2 { margin-bottom: 14px; }
.cta .lead { margin-inline: auto; margin-bottom: 30px; }

/* ---------- Breadcrumb ---------- */
.crumbs { font-size: .87rem; color: var(--muted-2); padding-top: 22px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: var(--muted-2); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* ---------- Language switcher ---------- */
.langs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.langs a { font-size: .85rem; color: var(--muted); border: 1px solid var(--line); padding: 6px 14px; border-radius: 100px; }
.langs a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(44px, 6vw, 72px) 34px; margin-top: var(--gap); }
.footer-grid { display: grid; gap: 34px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 40px; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); margin-bottom: 14px; }
.footer-col li + li { margin-top: 10px; }
.footer-col a { color: var(--muted); font-size: .94rem; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 26px; display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; }
.footer-bottom p { color: var(--muted-2); font-size: .87rem; }
