/* ---------------------------------------------------------------------------
   Forge — shared styles.

   Single-theme dark, deliberately. The app is dark-only
   (INFOPLIST_KEY_UIUserInterfaceStyle: Dark), and a site that flipped to white
   in daylight would stop looking like the thing it is selling. Every colour is
   painted explicitly so nothing borrows a host background.

   The palette is lifted from ThemeStyle.forge in the app, so the site and the
   product are the same dusk.
--------------------------------------------------------------------------- */

:root {
  --ground:   #120C24;   /* deeper than the app's sky, so cards can sit on it */
  --raised:   #1D1436;   /* ThemeStyle.surface */
  --raised-2: #251A44;
  --line:     #2E2350;
  --line-soft:#231A40;

  --ink:      #F3EFFC;
  --ink-2:    #B5AAD3;
  --ink-3:    #7C7099;

  --accent:   #9EE68F;   /* ThemeStyle.accent — torch green */
  --accent-dim:#6FBF62;
  --ember:    #FFD14D;   /* Outcome.gold, used once and sparingly */

  --sky-top:    #1A1238;
  --sky-bottom: #422661;
  --far:  #2E1C4D;
  --mid:  #4A2E70;
  --near: #613D85;

  --measure: 66ch;
  --radius: 14px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* The dusk the app opens on: one soft glow behind the top of the page. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  background:
    radial-gradient(120% 80% at 70% -10%, rgba(97, 61, 133, 0.55), transparent 60%),
    radial-gradient(90% 60% at 15% 0%, rgba(66, 38, 97, 0.45), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.wrap { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 660px; }

/* ---- Type ---- */

h1, h2, h3, .display {
  font-family: Fraunces, ui-serif, Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  text-wrap: balance;
  margin: 0;
}

h1 {
  font-weight: 900;
  font-size: clamp(40px, 7vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.022em;
}

h2 {
  font-weight: 600;
  font-size: clamp(26px, 3.6vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.012em;
  margin-bottom: 14px;
}

h3 {
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  margin-bottom: 6px;
}

p { margin: 0 0 16px; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: #B6F0A9; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

strong { color: var(--ink); font-weight: 600; }

.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin: 0 0 20px;
}

.lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--ink-2); max-width: 56ch; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; color: var(--ink-3); }

/* ---- Header ---- */

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 0 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Fraunces, serif;
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { display: block; }

nav.site a {
  font-size: 15px;
  color: var(--ink-2);
  text-decoration: none;
  margin-left: 22px;
}
nav.site a:hover { color: var(--ink); }

/* ---- Hero ---- */

.hero { padding: clamp(56px, 11vw, 104px) 0 clamp(40px, 7vw, 64px); }
.hero .lede { margin-top: 22px; }

/* The exchange rate is the whole product, so it gets to be an object rather
   than a sentence. */
.rate {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
  padding: 16px 22px;
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.rate-part { display: flex; flex-direction: column; gap: 2px; }
.rate-n {
  font-family: Fraunces, serif;
  font-weight: 900;
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.rate-n.work { color: var(--ink); }
.rate-n.phone { color: var(--accent); }
.rate-l {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.rate-arrow { color: var(--ink-3); font-size: 20px; }

/* ---- Sections ---- */

section { padding: clamp(44px, 7vw, 76px) 0; border-top: 1px solid var(--line-soft); }
section:first-of-type { border-top: 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 30px;
}
.card {
  background: var(--raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.card p { font-size: 15.5px; color: var(--ink-2); margin: 0; }
.card .icon { color: var(--accent); margin-bottom: 12px; display: block; }

/* The loop is numbered because it genuinely is a sequence — you cannot reflect
   before you have worked. */
.steps { counter-reset: step; margin-top: 30px; }
.step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line-soft);
}
.step:last-child { border-bottom: 0; }
.step-n {
  counter-increment: step;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dim);
  padding-top: 5px;
  font-variant-numeric: tabular-nums;
}
.step-n::before { content: counter(step, decimal-leading-zero); }
.step p { font-size: 16px; color: var(--ink-2); margin: 0; }

.list { list-style: none; padding: 0; margin: 26px 0 0; max-width: var(--measure); }
.list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
  color: var(--ink-2);
}
.list li::before {
  content: "";
  position: absolute;
  left: 4px; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-dim);
}
.list li strong { color: var(--ink); }

/* ---- Callout ---- */

.callout {
  background: linear-gradient(180deg, rgba(158, 230, 143, 0.09), rgba(158, 230, 143, 0.03));
  border: 1px solid rgba(158, 230, 143, 0.28);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 0 0 34px;
}
.callout p { margin: 0; color: var(--ink); }
.callout .display { font-size: 22px; font-weight: 600; display: block; margin-bottom: 8px; }

.note {
  border-left: 2px solid var(--line);
  padding-left: 18px;
  margin: 26px 0 0;
  color: var(--ink-3);
  font-size: 15.5px;
}

/* ---- Policy prose ---- */

.policy h2 { margin-top: 44px; }
.policy h2:first-of-type { margin-top: 0; }
.policy p, .policy li { color: var(--ink-2); }
.policy .updated {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ---- Footer ---- */

footer.site {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line-soft);
  margin-top: 40px;
  padding: 34px 0 60px;
  color: var(--ink-3);
  font-size: 14.5px;
}
footer.site .row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  align-items: baseline;
  justify-content: space-between;
}
footer.site a { color: var(--ink-2); text-decoration: none; }
footer.site a:hover { color: var(--accent); }

/* The layered dusk from the app's background, as a footer horizon. */
.horizon { display: block; width: 100%; height: auto; margin-top: 50px; }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .step { grid-template-columns: 38px 1fr; gap: 14px; }
  .rate { width: 100%; justify-content: space-between; }
  nav.site a { margin-left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- Research ----
   Citations are the point of this section, so they are set to be read and
   checked rather than skimmed past: full references, in the same size as the
   claim they support, not shrunk into a footnote nobody follows. */

.research { margin-top: 30px; }

.finding {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line-soft);
}
.finding:last-child { border-bottom: 0; }

.finding .mech {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-dim);
  padding-top: 6px;
  line-height: 1.5;
}

.finding h3 { margin-bottom: 8px; }
.finding p { font-size: 16px; color: var(--ink-2); margin: 0 0 12px; }

.cite {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
  border-left: 2px solid var(--line);
  padding-left: 14px;
  max-width: var(--measure);
}
.cite em { font-style: italic; }
.cite a { color: var(--ink-2); }
.cite a:hover { color: var(--accent); }

.stat {
  font-family: Fraunces, serif;
  font-weight: 900;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media (max-width: 620px) {
  .finding { grid-template-columns: 1fr; gap: 10px; }
  .finding .mech { padding-top: 0; }
}

/* ---- The story ----
   Set apart from the marketing voice around it: narrower measure, larger type,
   and no cards. It is one person talking, and it should look like it. */

.story { max-width: 620px; }
.story p { font-size: 18px; line-height: 1.7; max-width: none; margin-bottom: 20px; }

.signature {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
  font-size: 15.5px;
  color: var(--ink-3);
}
.signature strong { color: var(--ink-2); font-weight: 500; }
