/* ============================================================
   PROPLYTICS — shared design system
   Dark, premium fintech. Cream for warmth. Trading green for truth.
   ============================================================ */

:root {
  /* Surfaces — warm-toned darks, low saturation */
  --bg:          #0B0B0C;   /* page */
  --bg-2:        #111113;   /* raised */
  --card:        #141416;   /* dark card */
  --card-2:      #1A1A1D;   /* dark card raised */
  --line:        rgba(255,255,255,0.08);
  --line-strong: rgba(255,255,255,0.14);

  /* Cream — warmth + contrast sections */
  --cream:       #F5F4F2;
  --cream-2:     #EDEBE7;
  --ink:         #121212;   /* text on cream */
  --ink-soft:    #6B6862;   /* muted on cream */

  /* Text on dark */
  --fg:          #F4F3F1;
  --fg-soft:     #9B9A97;
  --fg-faint:    #66655F;

  /* Brand */
  --green:       #10B981;   /* profit / brand */
  --green-bright:#34D399;   /* glowing hero numbers on dark */
  --green-deep:  #059669;
  --red:         #F0555B;   /* fees / negative */

  /* Firm accents */
  --ftmo:   #3B82F6;
  --tft:    #10B981;
  --mff:    #8B5CF6;
  --e8:     #F59E0B;

  --r-sm: 12px;
  --r:    18px;
  --r-lg: 26px;
  --r-xl: 34px;

  --maxw: 1180px;
  --pad:  clamp(20px, 5vw, 48px);

  --font: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

::selection { background: var(--green); color: #04130D; }

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }

/* tabular numbers everywhere money lives */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ---- eyebrow / micro label ---- */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
  font-weight: 500;
}
.eyebrow.on-cream { color: var(--ink-soft); }
.eyebrow.green { color: var(--green); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(11,11,12,0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 14px var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--green); position: relative; flex: none;
  display: grid; place-items: center;
  box-shadow: 0 0 0 1px rgba(16,185,129,0.4), 0 6px 18px -6px rgba(16,185,129,0.7);
}
.brand .mark svg { width: 15px; height: 15px; }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { font-size: 14.5px; color: var(--fg-soft); font-weight: 500; transition: color .2s; }
.nav-links a:hover { color: var(--fg); }
.nav-cta { display: flex; align-items: center; gap: 14px; }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font); font-weight: 600; font-size: 14.5px;
  padding: 11px 20px; border-radius: 999px; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, background .2s, border-color .2s, color .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-green { background: var(--green); color: #04130D; }
.btn-green:hover { background: var(--green-bright); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--fg-soft); background: rgba(255,255,255,0.04); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: #000; }

/* ---- App Store badge (original, not Apple's) ---- */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 16px; border-radius: 14px;
  background: #fff; color: #08090A; border: 1px solid rgba(0,0,0,0.06);
  transition: transform .15s ease, box-shadow .2s;
  box-shadow: 0 10px 30px -14px rgba(0,0,0,0.5);
}
.appstore:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -16px rgba(0,0,0,0.6); }
.appstore .apple { width: 26px; height: 26px; flex: none; }
.appstore .as-txt { display: flex; flex-direction: column; line-height: 1.1; }
.appstore .as-small { font-size: 10.5px; letter-spacing: 0.04em; color: #4A4A4A; font-weight: 500; }
.appstore .as-big { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.appstore.dark { background: #000; color: #fff; border-color: rgba(255,255,255,0.16); }
.appstore.dark .as-small { color: #B9B9B9; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--line); background: var(--bg); padding: 64px 0 40px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px;
  max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad);
}
.footer h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 18px; font-weight: 500; }
.footer ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer ul a { color: var(--fg-soft); font-size: 14.5px; transition: color .2s; }
.footer ul a:hover { color: var(--green-bright); }
.footer .blurb { color: var(--fg-soft); font-size: 14.5px; max-width: 34ch; margin-top: 16px; }
.footer-bottom {
  max-width: var(--maxw); margin: 48px auto 0; padding: 24px var(--pad) 0;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  color: var(--fg-faint); font-size: 13px;
}
.footer-bottom .mono { font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em; }
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-grid .f-about { grid-column: 1 / -1; }
}

/* ---- firm dot ---- */
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }

/* ---- reveal-on-scroll ---- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   LEGAL / READING PAGES
   ============================================================ */
.legal-hero { padding: 64px 0 36px; border-bottom: 1px solid var(--line); position: relative; }
.legal-hero::before { content:""; position:absolute; inset:0; background: radial-gradient(700px 300px at 12% 0%, rgba(16,185,129,0.08), transparent 60%); pointer-events:none; }
.legal-hero .wrap { position: relative; }
.legal-hero .eyebrow { margin-bottom: 18px; display: block; }
.legal-hero h1 { font-size: clamp(34px, 5vw, 56px); font-weight: 800; letter-spacing: -0.035em; line-height: 1; }
.legal-hero .updated { margin-top: 18px; color: var(--fg-faint); font-size: 13.5px; font-family: var(--mono); letter-spacing: 0.02em; }
.legal-hero .intro { margin-top: 22px; color: var(--fg-soft); font-size: 17px; max-width: 60ch; text-wrap: pretty; }

.legal-layout { display: grid; grid-template-columns: 240px 1fr; gap: 56px; padding: 56px 0 96px; align-items: start; }
.toc { position: sticky; top: 88px; }
.toc h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--fg-faint); margin-bottom: 16px; }
.toc ul { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc a { display: block; padding: 8px 12px; border-radius: 9px; color: var(--fg-soft); font-size: 13.5px; line-height: 1.35; border-left: 2px solid transparent; transition: all .2s; }
.toc a:hover { color: var(--fg); background: rgba(255,255,255,0.03); }
.toc a.active { color: var(--green-bright); border-left-color: var(--green); background: rgba(16,185,129,0.06); }

.prose { max-width: 70ch; }
.prose section { padding-top: 14px; margin-bottom: 40px; scroll-margin-top: 88px; }
.prose h2 { font-size: clamp(21px, 2.6vw, 27px); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; display: flex; align-items: baseline; gap: 12px; }
.prose h2 .num { font-family: var(--mono); font-size: 13px; color: var(--green); font-weight: 500; }
.prose h3 { font-size: 16.5px; font-weight: 700; margin: 22px 0 8px; color: var(--fg); }
.prose p { color: var(--fg-soft); font-size: 15.5px; line-height: 1.7; margin-bottom: 14px; text-wrap: pretty; }
.prose ul.bul { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 6px 0 18px; }
.prose ul.bul li { position: relative; padding-left: 22px; color: var(--fg-soft); font-size: 15.5px; line-height: 1.65; }
.prose ul.bul li::before { content: ""; position: absolute; left: 2px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.prose ul.bul li strong { color: var(--fg); font-weight: 600; }
.prose a.link { color: var(--green-bright); border-bottom: 1px solid rgba(52,211,153,0.35); }
.prose a.link:hover { border-bottom-color: var(--green-bright); }
.prose .callout { border: 1px solid var(--line-strong); border-radius: var(--r); padding: 20px 22px; background: var(--card); margin: 18px 0 22px; }
.prose .callout p { margin: 0; color: var(--fg); font-size: 14.5px; }
.prose .callout p + p { margin-top: 8px; color: var(--fg-soft); }
.prose .data-table { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 8px 0 22px; }
.prose .data-table .row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.prose .data-table .row:last-child { border-bottom: none; }
.prose .data-table .row .k { font-weight: 600; font-size: 14.5px; color: var(--fg); }
.prose .data-table .row .v { font-size: 14px; color: var(--fg-soft); line-height: 1.55; }
.prose .data-table .row.head { background: var(--bg-2); }
.prose .data-table .row.head .k, .prose .data-table .row.head .v { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--fg-faint); }

@media (max-width: 860px) {
  .legal-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
}
