/* storyFT marketing site — the design's theme spec (board 1d).
 *
 * Dark chrome (nav, hero, footer), cream reading surfaces. Legal text is never
 * light-on-dark. No JavaScript anywhere on this site.
 *
 * Fonts are self-hosted rather than pulled from Google's CDN: the whole pitch
 * of this app is that it sends nothing about you anywhere, and a webfont
 * request would hand every visitor's IP to a third party on the very page that
 * says otherwise. Subset to Latin and served as WOFF2, the pair costs 72 KB.
 */

@font-face {
  font-family: 'Baloo 2';
  src: url('fonts/Baloo2-subset.woff2') format('woff2-variations');
  font-weight: 400 800;
  font-display: swap;
}

@font-face {
  font-family: 'Nunito';
  src: url('fonts/Nunito-subset.woff2') format('woff2-variations');
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --night: #1b1b3a;
  --night-high: #26264f;
  --footer: #16162e;
  --moonlight: #e8e6f2;
  --mist: #9c99b8;
  --firefly: #ffc66b;
  --cream: #f4f2ec;
  --card: #fff;
  --ink: #23223c;
  --body: #3f3d55;
  --muted: #5b586f;
  --link: #8a5a00;
  --radius: 14px;
  --page: 1100px;
  --prose: 720px;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--body);
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Baloo 2', system-ui, sans-serif;
  color: var(--ink);
  line-height: 1.2;
  margin: 0;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: #5c3c00; text-decoration: underline; }

/* Never let a keyboard user lose the caret against the dark chrome. */
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--firefly);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* Skip link — visible only once focused. */
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--firefly); color: var(--night);
  padding: 10px 18px; font-weight: 700; z-index: 10;
}
.skip:focus { left: 8px; top: 8px; }

/* ---- Chrome ------------------------------------------------------------ */

/* Kept out of a style attribute on purpose: no inline styles anywhere means
   the vhost's Content-Security-Policy needs no 'unsafe-inline'. */
.site-header { background: var(--night); }

.nav {
  background: var(--night);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px 32px; flex-wrap: wrap;
  /* Longhand: this element is also .wrap, and a `padding` shorthand here would
     silently zero the 24px gutter that keeps the wordmark off a phone's edge. */
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 700; font-size: 24px; color: var(--moonlight);
}
.wordmark span { color: var(--firefly); }
a.wordmark:hover { text-decoration: none; color: var(--moonlight); }

.nav-links { display: flex; gap: 12px 28px; flex-wrap: wrap; font-size: 15px; font-weight: 600; }
.nav-links a { color: var(--mist); padding-bottom: 2px; }
.nav-links a:hover { color: var(--moonlight); text-decoration: none; }
.nav-links a[aria-current='page'] {
  color: var(--moonlight);
  border-bottom: 2px solid var(--firefly);
}

.footer { background: var(--footer); color: var(--mist); font-size: 13.5px; }
.footer .wrap {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px 24px; padding-top: 26px; padding-bottom: 26px;
}
.footer .copy { color: #77748d; }
.footer nav { display: flex; gap: 12px 24px; flex-wrap: wrap; }
.footer a { color: var(--mist); }
.footer a:hover { color: var(--moonlight); }

/* ---- Home -------------------------------------------------------------- */

.hero {
  background: linear-gradient(180deg, var(--night) 0%, var(--night-high) 100%);
  text-align: center;
  padding: 64px 0 80px;
}
.hero svg { display: block; margin: 0 auto 26px; }
.hero h1 { color: var(--moonlight); font-size: clamp(32px, 5.2vw, 52px); font-weight: 700; }
.hero p {
  font-size: clamp(16px, 2.1vw, 19px); color: var(--mist);
  max-width: 52ch; margin: 20px auto 0;
}

.cta { display: flex; gap: 16px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.btn {
  display: inline-block; border-radius: var(--radius);
  padding: 14px 28px; font-weight: 700; font-size: 16px;
  border: 2px solid transparent;
}
.btn-primary { background: var(--moonlight); color: var(--night); }
.btn-primary:hover { background: #fff; color: var(--night); text-decoration: none; }
.btn-ghost { color: var(--moonlight); border-color: #3a3a5c; }
/* Not a link yet — reads as a statement of fact, not a dead button. */
.btn-soon { color: var(--mist); border-color: #3a3a5c; font-weight: 600; cursor: default; }

.pillars {
  background: var(--cream);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
  text-align: center;
  padding: 56px 0;
}
.pillars h2 { font-size: 20px; font-weight: 600; }
.pillars p { font-size: 15px; color: var(--muted); margin: 8px 0 0; }

/* ---- Reading pages ----------------------------------------------------- */

.page { padding: 52px 0 68px; }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .08em;
  color: var(--link); text-transform: uppercase;
}
.page h1 { font-size: clamp(28px, 4.4vw, 38px); font-weight: 700; margin-top: 8px; }
.lede { font-size: 16.5px; color: var(--body); margin: 14px 0 0; }

.summary {
  background: var(--card); border-radius: 12px;
  padding: 18px 22px; margin: 16px 0 0;
  font-size: 16px; color: var(--muted);
}
.summary strong { color: var(--ink); }

.sections { margin-top: 36px; display: flex; flex-direction: column; gap: 28px; }
.sections h2 { font-size: 21px; font-weight: 600; }
.sections p, .sections li { font-size: 15.5px; line-height: 1.75; color: var(--body); }
.sections p { margin: 8px 0 0; }
.sections ul { margin: 8px 0 0; padding-left: 22px; }
.sections li { margin-top: 6px; }

.cards { margin-top: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card { background: var(--card); border-radius: var(--radius); padding: 22px 24px; }
.card h2 { font-size: 18px; font-weight: 600; }
.card p { font-size: 14.5px; line-height: 1.65; color: var(--muted); margin: 8px 0 0; }

.callout {
  margin-top: 40px; background: var(--night); border-radius: 16px;
  padding: 30px 32px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 20px; flex-wrap: wrap;
}
.callout h2 { font-size: 21px; font-weight: 600; color: var(--moonlight); }
.callout p { font-size: 14.5px; color: var(--mist); margin: 6px 0 0; max-width: 44ch; }
.callout .btn { background: var(--firefly); color: var(--night); font-size: 15.5px; padding: 13px 26px; }
.callout .btn:hover { background: #ffd591; text-decoration: none; }

.note {
  margin-top: 28px; font-size: 14px; color: var(--muted);
  border-left: 3px solid var(--firefly); padding-left: 14px;
}

/* ---- Responsive -------------------------------------------------------- */

@media (max-width: 860px) {
  .pillars { grid-template-columns: 1fr; gap: 32px; text-align: left; }
  .cards { grid-template-columns: 1fr; }
  .callout { flex-direction: column; align-items: flex-start; }
}

/* The wordmark and four links do not fit one phone-width row — left in a row
 * they overflow the viewport rather than wrapping, because the link list can
 * shrink internally and so is treated as fitting. Give it its own row. */
@media (max-width: 620px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .nav-links { font-size: 14px; gap: 8px 18px; }
  .cta .btn { width: 100%; text-align: center; }
  .footer .wrap { flex-direction: column; align-items: flex-start; }
}
