/* ScreenFolio site
 * Layout: one centered column (max 1200px) with a 20px gutter that grows on wide
 * screens; two-column sections collapse to one below 860px.
 */
:root {
  /* Colour: white ground, near-black green ink, the app icon's green as the one accent. */
  --bg: #ffffff;
  --ink: #0d1a13;
  --ink-soft: #33413a;
  --muted: #4e5b54;
  --placeholder: #66736b;        /* 4.8:1 on white */
  --tint: #eef3f0;
  --tint-hover: #e2ebe5;
  --line: rgba(13, 26, 19, 0.12);
  --line-strong: rgba(13, 26, 19, 0.35);
  --green: #15803d;              /* 5.0:1 on white; use --green-deep on --tint */
  --green-deep: #0f5e2d;
  --green-bright: #22a55a;
  --mark: rgba(21, 128, 61, 0.18);
  --night: #0d1a13;
  --night-muted: #b9c6bf;

  /* Elevation */
  --shadow-md: 0 10px 28px rgba(13, 26, 19, 0.08);
  --shadow-lg: 0 24px 60px rgba(13, 26, 19, 0.10);
  --shadow-lift: 0 18px 40px rgba(13, 26, 19, 0.16);

  /* Type: one grotesk for display and body, a mono for small machine-ish labels. */
  --font-sans: "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --fs-label: 13px;   /* mono labels */
  --fs-small: 14px;
  --fs-body: 17px;    /* secondary paragraphs */
  --fs-lead: clamp(17px, 1.5vw, 20px);
  --fs-h3: 20px;

  /* Shape: 8 / 14 / 28, plus pills. */
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 28px;

  --gutter: clamp(20px, 6vw, 120px);
  --max: 1200px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--green); }
a:hover { color: var(--green-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, .button:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

h1, h2, h3 { text-wrap: balance; margin: 0; }
p, li, dd { text-wrap: pretty; }
/* Long words and unbroken strings never push the page wider than the screen. */
h1, h2, h3, p, li, dt, dd, label { overflow-wrap: break-word; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: calc(720px + var(--gutter) * 2); }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border-radius: 10px;
  background: var(--green); color: #ffffff; font-size: 16px; font-weight: 600; text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease;
}
.button:hover { background: var(--green-deep); color: #ffffff; }
.download-label-mobile { display: none; }
@media (max-width: 720px) {
  .download-label-desktop { display: none; }
  .download-label-mobile { display: inline; }
}

/* ---------- Nav ---------- */
.nav { display: flex; align-items: center; gap: 28px; min-height: 80px; font-size: 15px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; flex: none; }
.brand span { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; }
.nav .spacer { flex: 1; }
.nav a.link { color: var(--muted); text-decoration: none; }
.nav a.link:hover { color: var(--ink); }
.nav .button { font-size: 15px; }
@media (max-width: 720px) { .nav a.link { display: none; } }
@media (max-width: 420px) {
  .nav { gap: 12px; min-height: 68px; }
  .nav .button { min-height: 40px; padding: 0 14px; font-size: 14px; }
  .brand span { font-size: 17px; }
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding-top: clamp(32px, 6vw, 64px); }
.hero h1 {
  max-width: 1000px; margin-inline: auto;
  font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; line-height: 1.0; letter-spacing: -0.03em;
}
.hero .lede { max-width: 640px; margin: 22px auto 0; font-size: var(--fs-lead); color: var(--muted); }

.hero-cta { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.hero-cta .meta { margin: 0; font-size: var(--fs-small); color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding-top: clamp(96px, 11vw, 150px); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(40px, 7vw, 96px); row-gap: 28px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: minmax(0, 1fr); } }
.split.center { align-items: center; }
.h2 { font-size: clamp(32px, 3.6vw, 48px); font-weight: 800; line-height: 1.05; letter-spacing: -0.03em; }
.eyebrow { font: var(--fs-label) var(--font-mono); color: var(--green); }
.body-lg { font-size: var(--fs-lead); color: var(--muted); margin: 0; }
.stack { display: flex; flex-direction: column; gap: 22px; }

.band { margin-top: clamp(96px, 11vw, 160px); background: var(--tint); padding-block: clamp(56px, 8vw, 110px); }
.band .body-lg { color: var(--ink-soft); }
/* Green text on the tint needs the deeper green for 4.5:1. */
.band a, .band .eyebrow, .latest a { color: var(--green-deep); }

/* Facts: term/definition pairs in a 2 x 2 grid, one column on phones.
 * Works for a flat dt/dd list (dense placement keeps each dd under its dt)
 * and for dt/dd pairs wrapped in <div>s. */
.facts {
  margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-flow: row dense; column-gap: 32px; font-size: var(--fs-body);
}
.facts dt { font-weight: 700; }
.facts dd { margin: 4px 0 22px; color: var(--ink-soft); }
.facts > dt:nth-of-type(odd), .facts > dd:nth-of-type(odd) { grid-column: 1; }
.facts > dt:nth-of-type(even), .facts > dd:nth-of-type(even) { grid-column: 2; }
.facts > div dd { margin-bottom: 22px; }
@media (max-width: 520px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts > dt, .facts > dd { grid-column: 1 !important; }
}

.rows { display: flex; flex-direction: column; }
.rows > div { padding: 26px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.rows > div:last-child { border-bottom: 1px solid var(--line); }
.rows h3 { font-size: var(--fs-h3); font-weight: 700; }
.rows p { margin: 0; font-size: var(--fs-body); color: var(--muted); }

.faq { margin: 0; display: flex; flex-direction: column; }
.faq > div { padding: 24px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.faq > div:last-child { border-bottom: 1px solid var(--line); }
.faq dt { font-size: var(--fs-h3); font-weight: 700; }
.faq dd { margin: 0; font-size: var(--fs-body); color: var(--muted); }
/* Questions section: narrower heading column that stays in view while reading. */
@media (min-width: 861px) {
  .split:has(> .faq) { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split:has(> .faq) > .h2 { position: sticky; top: 40px; }
}

.cta {
  margin-top: clamp(96px, 11vw, 150px); border-radius: var(--radius-lg); color: #ffffff;
  background: radial-gradient(120% 140% at 0% 0%, rgba(34, 165, 90, 0.22), rgba(34, 165, 90, 0) 55%), var(--night);
  padding: clamp(40px, 6vw, 90px) clamp(24px, 5.5vw, 80px);
  display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); flex-wrap: wrap;
}
.cta img { width: 88px; height: 88px; flex: none; }
.cta .text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.cta .meta { margin: 0; color: var(--night-muted); font-size: var(--fs-body); }
.cta .button:focus-visible { outline-color: var(--green-bright); }

.footer { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; min-height: 120px; padding-block: 32px; font-size: var(--fs-small); color: var(--muted); }
.footer img { width: 22px; height: 22px; }
.footer-identity { display: flex; align-items: center; gap: 16px; }
.footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-left: auto; }
.footer a { color: var(--muted); }

/* ---------- Text pages (privacy, release notes) ---------- */
.doc { padding-top: clamp(40px, 6vw, 72px); display: flex; flex-direction: column; gap: 40px; }
.doc h1 { font-size: clamp(40px, 5vw, 56px); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; }
.doc .date { margin: 0; font: var(--fs-label) var(--font-mono); color: var(--muted); }
.doc .intro { margin: 0; font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-soft); }
.doc section { display: flex; flex-direction: column; gap: 12px; }
.doc h2 { font-size: 24px; font-weight: 700; }
.doc p { margin: 0; }
.doc ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }

.latest { padding: 28px; border-radius: var(--radius); background: var(--tint); display: flex; flex-direction: column; gap: 14px; }
.latest .head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.latest h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.latest .when { font: var(--fs-label) var(--font-mono); color: var(--muted); }
.latest h3 { font-size: 15px; font-weight: 700; margin-top: 4px; }
.latest p { margin: 0; }
.releases { display: flex; flex-direction: column; gap: 20px; }
.versions { list-style: none; margin: 0; padding: 0; }
.versions a {
  min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); color: var(--ink); text-decoration: none;
  font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.versions a span { font-size: 15px; font-weight: 500; color: var(--green-deep); }
.versions li:last-child a { border-bottom: 1px solid var(--line); }
.doc-head { display: flex; flex-direction: column; gap: 14px; }
.doc .versions { padding: 0; gap: 0; display: block; }

/* ---------- Reduced motion: every state change is instant. ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0s !important;
    transition-delay: 0s !important;
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* Real app captures: preserve the entire UI, with a full-size link for detail. */
.product-shot { margin: 36px 0 0; min-width: 0; }
.screenshot-link { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); background: var(--tint); }
.screenshot-link img { display: block; width: 100%; }
.product-shot figcaption { margin-top: 18px; color: var(--muted); font-size: var(--fs-small); text-align: center; }
.product-shot figcaption span { white-space: nowrap; }
.hero > .product-shot { margin-top: 48px; }
.assistant-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 860px) {
  .assistant-shots { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .assistant-shots .product-shot { max-width: 600px; width: 100%; margin-inline: auto; }
}

/* Keep the primary download action in reach while browsing the landing page. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
html:has(.site-header) { scroll-padding-top: 104px; }
@media (max-width: 420px) {
  html:has(.site-header) { scroll-padding-top: 88px; }
}

.library-sources-art { display: block; width: min(100%, 440px); height: auto; margin-top: 12px; }

@media (max-width: 720px) {
  .footer { align-items: flex-start; flex-direction: column; gap: 20px; }
  .footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 24px; width: 100%; margin-left: 0; }
  .footer-links a { display: flex; align-items: center; min-height: 44px; }
}
