/* ═══════════════════════════════════════════════════════════════════════════
   WorkMart — public website styles
   Fonts load from Google Fonts (see <link> tags); everything else is
   self-hosted. Works on any static host.

   Palette is taken from the APP, not invented here:
     --navy-1/2   NAVY_GRADIENT from components/ui/AuthChrome.tsx
     --blue       Brand.blue  in constants/Colors.ts
     --blue-2/3   SIGNIN_GRADIENT
     --orange     the bevel under the auth chevron

   The previous version used indigo/violet/fuchsia (#6366f1 / #8b5cf6 /
   #d946ef). Those colours appear nowhere in the app any more, so anyone
   arriving from the Play listing met a different product to the one they
   downloaded. Radii follow the app's 8 / 12 / 16 / 999 scale for the same
   reason.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* Brand */
  --navy-1: #001d65;
  --navy-2: #00154e;
  --navy-3: #000f3a;
  --blue:   #085ceb;
  --blue-2: #0055f5;
  --blue-3: #003cd4;
  --orange: #f5741b;

  /* Light surfaces */
  --ink:    #0b132b;
  --body:   #3d4257;
  --muted:  #6b7280;
  --line:   #e3e8f4;
  --bg:     #ffffff;
  --soft:   #f4f7fd;
  --card:   #ffffff;
  --callout-bg:   #eaf1ff;
  --callout-line: #c2d6ff;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --wrap: 1180px;
}

/* The app is theme-aware, so the site should not blaze white at a user who
   arrives from a dark-mode phone at night. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink:    #f2f5ff;
    --body:   #c3cbe0;
    --muted:  #949cb4;
    --line:   #1e2740;
    --bg:     #0a0f1f;
    --soft:   #0f1628;
    --card:   #121a2e;
    --callout-bg:   #10214a;
    --callout-line: #1f3a76;
  }
}

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

html { scroll-behavior: smooth; }

/* Anchored sections (#how, #faq…) must clear the sticky header, or the
   jump lands with the title hidden underneath it. */
section[id] { scroll-margin-top: 72px; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  color: var(--body);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Header ─────────────────────────────────────────────────────────────── */
header.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: none; margin: 0; padding: 12px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}

/* The wordmark is real artwork now, not a gradient tile with a letter in it.
   Height-constrained with width:auto so the aspect ratio can never skew. */
.brand { display: flex; align-items: center; gap: 10px; }
.brand img.wordmark { height: 30px; width: auto; display: block; }
.brand img.emblem   { height: 32px; width: auto; display: block; }

/* The artwork is drawn for a dark background: on a white header its navy
   core reads fine, but in dark mode it needs no treatment at all. Kept as a
   single rule so the two themes cannot drift apart. */
@media (prefers-color-scheme: dark) {
  .brand img.wordmark { filter: brightness(1.12); }
}

.nav-links { display: flex; gap: 20px; flex-wrap: wrap; }
.nav-links a { color: var(--body); font-size: 14px; font-weight: 600; }
.nav-links a:hover { color: var(--blue); text-decoration: none; }

/* ── Hero ───────────────────────────────────────────────────────────────── */
/* Deep navy, the same gradient as the app's sign-in screen, so the site and
   the first app screen look like one product. */
.hero {
  background:
    radial-gradient(1100px 420px at 78% -10%, rgba(0,85,245,0.34), transparent 60%),
    radial-gradient(700px 380px at 8% 110%, rgba(245,116,27,0.12), transparent 60%),
    linear-gradient(160deg, var(--navy-1) 0%, var(--navy-2) 55%, var(--navy-3) 100%);
  padding: 84px 0 76px;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px;
  align-items: center; text-align: left;
}
/* Hero is a visual band, not a document — it earns a wider measure than
   text sections so the copy and the phone spread across the screen. */
.hero .hero-grid { max-width: 1560px; }
.hero-copy { text-align: left; }
.hero h1 {
  font-size: 48px; line-height: 1.1; letter-spacing: -1.5px;
  color: #fff; font-weight: 900;
}
.hero p.sub {
  font-size: 17.5px; color: #c3d4ff; margin: 20px 0 0; max-width: 560px;
}
.hero p.sub strong { color: #fff; }

/* The orange bevel motif from the app's auth screens. */
.hero h1::after {
  content: ""; display: block; width: 96px; height: 6px; border-radius: 999px;
  background: var(--orange); margin: 24px 0 0;
}

/* Floating ambient orbs */
.orb { position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none; }
.orb-1 {
  width: 180px; height: 180px; right: 6%; top: 8%;
  background: radial-gradient(circle, rgba(0,85,245,0.35), transparent 70%);
  animation: drift 9s ease-in-out infinite;
}
.orb-2 {
  width: 120px; height: 120px; left: 44%; bottom: 6%;
  background: radial-gradient(circle, rgba(245,116,27,0.22), transparent 70%);
  animation: drift 12s ease-in-out infinite reverse;
}
@keyframes drift {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
@media (prefers-reduced-motion: reduce) {
  .orb-1, .orb-2, .mock-float { animation: none; }
}

.hero .cta-row { justify-content: flex-start; }

/* Eyebrow labels above section titles */
.eyebrow {
  display: block; text-align: center; color: var(--blue);
  font-size: 12px; font-weight: 800; letter-spacing: 1.6px;
  text-transform: uppercase; margin-bottom: 10px;
}

/* Trust strip — honest proof points, no invented numbers. */
.trust-strip {
  border-bottom: 1px solid var(--line);
  background: var(--card);
}
.trust-strip .wrap {
  display: flex; justify-content: center; gap: 12px 36px; flex-wrap: wrap;
  padding-top: 18px; padding-bottom: 18px;
}
.trust-strip span {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 700; color: var(--body);
  white-space: nowrap;
}
.trust-strip svg { width: 17px; height: 17px; color: var(--blue); flex-shrink: 0; }

/* FAQ — native details accordion, zero JS. */
.faq { max-width: 760px; margin: 32px auto 0; }
.faq details {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); margin-bottom: 10px; overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px; font-weight: 800; font-size: 15px; color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex-shrink: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: color-mix(in srgb, var(--blue) 10%, transparent);
  color: var(--blue); font-size: 17px; font-weight: 800; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 18px 16px; font-size: 14.5px; color: var(--body); }
.faq details a { font-weight: 700; }

/* Final CTA band */
.final-cta {
  background:
    radial-gradient(800px 300px at 50% -20%, rgba(0,85,245,0.35), transparent 65%),
    linear-gradient(160deg, var(--navy-1), var(--navy-3));
  border-radius: 24px;
  padding: 52px 32px;
  text-align: center;
  position: relative; overflow: hidden;
}
.final-cta h2 { color: #fff; font-size: 30px; font-weight: 900; letter-spacing: -0.5px; }
.final-cta p { color: #c3d4ff; margin: 12px auto 0; max-width: 520px; font-size: 15.5px; }
.final-cta .cta-row { justify-content: center; }
.final-cta small { display: block; color: #8e9ac0; margin-top: 16px; font-size: 12.5px; }

/* ── Phone mockup (pure CSS product shot) ─────────────────────────────── */
.mock-float { animation: drift 7s ease-in-out infinite; }
.phone {
  width: 270px; margin: 0 auto; background: #0b132b;
  border-radius: 44px; padding: 12px;
  border: 1px solid rgba(255,255,255,0.16);
  box-shadow: 0 30px 80px rgba(0,0,0,0.5), 0 0 0 8px rgba(255,255,255,0.04);
}
.phone-screen {
  background: #f4f7fd; border-radius: 34px; overflow: hidden;
  padding: 16px 14px 18px;
}
.mock-bar {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.mock-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--blue); }
.mock-line { height: 8px; border-radius: 4px; background: #d7e1f5; }
.mock-card {
  background: #fff; border-radius: 14px; padding: 12px;
  box-shadow: 0 6px 18px rgba(8,92,235,0.1); margin-bottom: 10px;
}
.mock-row { display: flex; align-items: center; justify-content: space-between; }
.mock-title { font-size: 13px; font-weight: 800; color: #0b132b; }
.mock-price { font-size: 15px; font-weight: 900; color: var(--blue); }
.mock-sub { font-size: 11px; color: #6b7280; margin-top: 2px; }
.mock-escrow {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  background: rgba(22,163,74,0.1); color: #15803d;
  font-size: 10.5px; font-weight: 800; padding: 4px 9px; border-radius: 999px;
}
.mock-btn {
  margin-top: 10px; background: linear-gradient(135deg, var(--blue-2), var(--blue-3));
  color: #fff; text-align: center; font-size: 13px; font-weight: 800;
  border-radius: 10px; padding: 10px 0;
}
.mock-tip {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 14px; padding: 10px 12px;
  box-shadow: 0 6px 18px rgba(8,92,235,0.1);
  font-size: 12px; font-weight: 700; color: #0b132b;
}
.mock-tip small { display: block; font-weight: 600; color: #6b7280; font-size: 10.5px; }

.badge-pill {
  display: inline-block;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.22);
  color: #dfe8ff; font-weight: 700; font-size: 13px;
  padding: 7px 16px; border-radius: 999px; margin: 0 8px 22px 0;
  backdrop-filter: blur(4px);
}
.badge-pill.hot {
  background: rgba(245,116,27,0.18);
  border-color: rgba(245,116,27,0.55);
  color: #ffd9b8;
}

.cta-row { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .cta-row { justify-content: flex-start; }
.btn {
  display: inline-block; padding: 14px 28px; border-radius: var(--r-md);
  font-weight: 700; font-size: 15px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue-2), var(--blue-3));
  color: #fff; box-shadow: 0 10px 26px rgba(0,60,212,0.42);
}
.btn-primary:hover { text-decoration: none; opacity: 0.94; }
.btn-ghost {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.3); color: #fff;
}
.btn-ghost:hover { text-decoration: none; border-color: #fff; }

/* On a light section the ghost button needs light-surface treatment. */
section .btn-ghost { background: var(--card); border-color: var(--line); color: var(--ink); }
section .btn-ghost:hover { border-color: var(--blue); }

/* ── Sections ───────────────────────────────────────────────────────────── */
section { padding: 62px 0; }
section.alt { background: var(--soft); }
h2.section-title {
  font-size: 31px; color: var(--ink); font-weight: 800;
  letter-spacing: -0.5px; text-align: center;
}
p.section-lead {
  text-align: center; color: var(--muted); max-width: 660px;
  margin: 12px auto 0; font-size: 16px;
}

.grid { display: grid; gap: 18px; margin-top: 38px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 24px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--blue) 45%, var(--line)); transform: translateY(-2px); }
/* Tinted icon tile instead of a bare emoji — consistent in every browser. */
.card .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: color-mix(in srgb, var(--blue) 10%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
}
.card .ico svg { width: 22px; height: 22px; }
.card .ico.warm { background: rgba(245,116,27,0.12); color: var(--orange); }
.card .ico.green { background: rgba(22,163,74,0.1); color: #15803d; }
.card .ico.gold { background: rgba(245,158,11,0.12); color: #b45309; }
.card .ico.pink { background: rgba(236,72,153,0.1); color: #db2777; }
.card h3 { color: var(--ink); font-size: 17px; margin: 12px 0 6px; font-weight: 800; }
.card p { color: var(--body); font-size: 14.5px; }

.step-num {
  width: 36px; height: 36px; border-radius: var(--r-md); font-weight: 900; color: #fff;
  background: linear-gradient(135deg, var(--blue-2), var(--blue-3));
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}

/* ── Legal / policy pages ───────────────────────────────────────────────── */
.legal { padding: 52px 0 76px; }
.legal .wrap { max-width: 820px; }
/* Docs layout: sticky section nav fills the wide-screen dead space instead
   of leaving the text stranded in a middle strip. Applied by site.js, which
   also wraps the content column — no per-page markup needed. */
.legal .wrap.has-toc {
  max-width: 1280px;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
}
/* Full-bleed tinted backdrop + floating content sheet: on wide screens the
   margins read as background, not emptiness. */
.legal:has(.has-toc) {
  background:
    radial-gradient(900px 300px at 50% -80px, color-mix(in srgb, var(--blue) 7%, transparent), transparent 70%),
    var(--soft);
}
.docs-body {
  min-width: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 36px 40px;
  box-shadow: 0 12px 40px rgba(11,19,43,0.06);
}
.docs-body > h1:first-child { margin-top: 0; }
.toc {
  position: sticky; top: 88px;
  max-height: calc(100vh - 130px); overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  padding: 16px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
}
.toc::-webkit-scrollbar { width: 5px; }
.toc::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.toc-title {
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a {
  display: block; padding: 6px 0 6px 14px; margin-left: -2px;
  font-size: 13.5px; font-weight: 600; color: var(--muted);
  border-left: 2px solid transparent;
}
.toc li a:hover { color: var(--blue); text-decoration: none; }
.toc li a.active { color: var(--blue); border-left-color: var(--blue); }
.docs-body { min-width: 0; }
.legal h2[id] { scroll-margin-top: 88px; }
@media (max-width: 900px) {
  .toc { display: none; }
  .legal .wrap.has-toc { display: block; max-width: 820px; }
}
.legal h1 { font-size: 35px; color: var(--ink); font-weight: 900; letter-spacing: -0.5px; }
.legal .updated { color: var(--muted); font-size: 14px; margin-top: 8px; }
.legal h2 { font-size: 20px; color: var(--ink); font-weight: 800; margin: 36px 0 10px; }
.legal h3 { font-size: 16px; color: var(--ink); font-weight: 700; margin: 22px 0 8px; }
.legal p  { margin: 10px 0; font-size: 15.5px; }
.legal ul, .legal ol { margin: 10px 0 10px 22px; }
.legal li { margin: 7px 0; font-size: 15.5px; }
.legal strong { color: var(--ink); }
.legal .intro {
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; margin: 20px 0 8px; font-size: 15px; color: var(--body);
}
/* Left rule in brand blue: policy callouts are the lines people screenshot. */
.legal .callout {
  background: var(--callout-bg); border: 1px solid var(--callout-line);
  border-left: 4px solid var(--blue);
  border-radius: var(--r-md); padding: 14px 16px; margin: 16px 0; font-size: 14.5px;
}
.legal .contact-box {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 22px; margin-top: 20px;
}

/* ── Fee table ──────────────────────────────────────────────────────────── */
.fee-table {
  width: 100%; border-collapse: collapse; margin-top: 24px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.fee-table th, .fee-table td {
  padding: 14px 16px; text-align: left; font-size: 15px; border-bottom: 1px solid var(--line);
}
.fee-table th {
  background: var(--soft); color: var(--ink); font-weight: 800;
  font-size: 13px; text-transform: uppercase; letter-spacing: 0.4px;
}
.fee-table td:last-child, .fee-table th:last-child { text-align: right; }
.fee-table tr:last-child td { border-bottom: none; }

/* Wide tables scroll inside themselves rather than pushing the page sideways. */
.table-scroll { overflow-x: auto; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
footer {
  background: linear-gradient(160deg, var(--navy-1), var(--navy-3));
  color: #b9c6e6; padding: 48px 0 32px;
}
footer .wrap { display: flex; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
footer a { color: #b9c6e6; font-size: 14px; display: block; margin: 6px 0; }
footer a:hover { color: #fff; }
footer .col h4 {
  color: #fff; font-size: 13px; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 10px;
}
footer .legalline {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 30px;
  padding-top: 20px; font-size: 13px; color: #8e9ac0;
}
/* Footer sits on navy in BOTH themes, so the wordmark never needs adjusting
   there — override the dark-mode filter that applies to the header copy. */
footer .brand img.wordmark { filter: none; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .hero { padding: 60px 0 54px; }
  .hero h1 { font-size: 33px; }
  .hero p.sub { font-size: 16px; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  section { padding: 44px 0; }
  .legal h1 { font-size: 28px; }
  footer .wrap { flex-direction: column; }
}
