/* Crew Wrap site components. Every color, size and space comes from tokens.css.
   Style: compact and product-first. Bordered white cards and tables, sentence-case labels,
   one green button per area, real app screenshots, no hero art. */

@font-face {
  font-family: "Inter";
  src: url("/fonts/inter-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + var(--s-4)); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}
body > main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { margin: 0; color: inherit; text-wrap: balance; }
h1 { font-size: var(--fs-title); line-height: var(--lh-tight); letter-spacing: var(--tracking-display); font-weight: var(--w-bold); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-head); letter-spacing: -0.01em; font-weight: var(--w-semibold); }
h3 { font-size: var(--fs-h3); line-height: var(--lh-head); font-weight: var(--w-semibold); }
p { margin: 0; max-width: var(--measure); }
p + p { margin-top: var(--s-3); }
ul, ol { margin: 0; padding: 0; }
strong { font-weight: var(--w-semibold); }
blockquote { margin: 0; }
.num, time, td, th { font-variant-numeric: tabular-nums; }

a { color: var(--forest); text-decoration-thickness: var(--border-w); text-underline-offset: var(--hair-3); }
a:hover { text-decoration-thickness: var(--hair-2); }
:focus-visible { outline: var(--focus-w) solid var(--forest); outline-offset: var(--hair-2); border-radius: var(--r-sm); }
.on-dark :focus-visible { outline-color: var(--honey); }

.skip-link {
  position: absolute; left: var(--s-4); top: calc(-1 * var(--s-9)); z-index: 100;
  background: var(--surface); color: var(--forest); padding: var(--s-3) var(--s-4);
  border-radius: var(--r-btn); font-weight: var(--w-semibold); border: var(--border-w) solid var(--border);
}
.skip-link:focus { top: var(--s-3); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--tint { background: var(--surface-tint); border-top: var(--border-w) solid var(--border); border-bottom: var(--border-w) solid var(--border); }
.section__head { display: grid; gap: var(--s-2); margin-bottom: var(--s-5); max-width: var(--measure); }
.section__head p { color: var(--text-muted); }
.split .section__head { margin-bottom: 0; }
.lede { font-size: var(--fs-lede); color: var(--text-muted); }

.split { display: grid; gap: var(--s-6); align-items: start; }
.split > * { min-width: 0; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--s-7); align-items: center; }
  .split--flip > :first-child { order: 2; }
}

/* ---------- Label (small, sentence case) ---------- */
.label {
  display: inline-block; font-size: var(--fs-label); font-weight: var(--w-semibold); line-height: 1.4;
  color: var(--honey-ink);
}
.label--chip { background: var(--honey-wash); padding: var(--s-1) var(--s-2); border-radius: var(--r-sm); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: var(--btn-h); padding: var(--s-3) var(--s-5);
  border-radius: var(--r-btn); border: var(--border-w) solid transparent;
  font: inherit; font-weight: var(--w-semibold); text-decoration: none; cursor: pointer;
  background: var(--forest); color: var(--surface);
}
.btn:hover { background: var(--forest-deep); }
.btn--sm { min-height: var(--tap); padding: var(--s-2) var(--s-4); font-size: var(--fs-small); }
.store-badge { display: inline-block; min-height: var(--tap); }
.store-badge img { height: var(--btn-h); width: auto; }
.cta-note { font-size: var(--fs-small); color: var(--text-muted); margin-top: var(--s-2); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--surface); border-bottom: var(--border-w) solid var(--border);
}
.site-header .container { height: 100%; display: flex; align-items: center; gap: var(--s-4); }
.brand {
  display: inline-flex; align-items: center; gap: var(--s-3); min-height: var(--tap);
  color: var(--text); text-decoration: none; font-weight: var(--w-bold); font-size: var(--fs-h3); letter-spacing: -0.01em;
  margin-right: auto;
}
.brand img { width: var(--logo); height: var(--logo); border-radius: var(--r-sm); }
.nav { display: none; }
.nav ul { list-style: none; display: flex; gap: var(--s-1); }
.nav a {
  position: relative; display: inline-flex; align-items: center; min-height: var(--tap);
  padding: 0 var(--s-3); color: var(--text); text-decoration: none; font-size: var(--fs-small); font-weight: var(--w-medium);
  border-radius: var(--r-sm);
}
.nav a:hover { background: var(--surface-tint); }
.nav a[aria-current="page"] { color: var(--forest); font-weight: var(--w-semibold); }
.nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: var(--s-1);
  height: var(--hair-2); border-radius: var(--r-pill); background: var(--honey);
}
.header-cta .wide { display: none; }

.menu { position: relative; }
.menu summary {
  list-style: none; display: inline-flex; align-items: center; justify-content: center;
  width: var(--tap); height: var(--tap); border-radius: var(--r-btn); cursor: pointer; color: var(--text);
  border: var(--border-w) solid var(--border); background: var(--surface);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary svg { width: var(--icon); height: var(--icon); }
.menu .icon-close { display: none; }
.menu[open] .icon-open { display: none; }
.menu[open] .icon-close { display: block; }
.menu__panel {
  position: fixed; left: 0; right: 0; top: var(--header-h);
  background: var(--surface); border-bottom: var(--border-w) solid var(--border);
  padding: var(--s-2) var(--gutter) var(--s-5);
}
.menu__panel ul { list-style: none; }
.menu__panel a {
  display: flex; align-items: center; min-height: var(--btn-h); padding: 0 var(--s-2);
  color: var(--text); text-decoration: none; font-size: var(--fs-body); font-weight: var(--w-semibold);
  border-bottom: var(--border-w) solid var(--border);
}
.menu__panel a[aria-current="page"] { color: var(--forest); }
@media (min-width: 400px) { .header-cta .wide { display: inline; } }
@media (min-width: 860px) { .nav { display: block; } .menu { display: none; } }

/* ---------- Intro (top of every page) ---------- */
.intro { padding: var(--s-6) 0 var(--section-y); }
.intro h1 { margin-top: var(--s-3); }
.intro--home h1 { font-size: var(--fs-display); max-width: 18ch; }
.intro .lede { margin-top: var(--s-3); max-width: 46ch; }
.intro .cta-slot { margin-top: var(--s-5); }
.intro--page { border-bottom: var(--border-w) solid var(--border); background: var(--surface); padding-bottom: var(--s-6); }
@media (min-width: 900px) { .intro { padding-top: var(--s-7); } }

/* ---------- Screenshot frame ---------- */
.shot {
  margin: 0 auto; width: var(--shot-w); max-width: 100%;
  border: var(--border-w) solid var(--border); border-radius: var(--r-shot); overflow: hidden;
  background: var(--surface);
}
.shot img { width: 100%; }
.shot--card { width: auto; max-width: var(--w-prose); border-radius: var(--r-card); }
.shots { display: grid; grid-template-columns: 1fr; gap: var(--s-3); max-width: calc(2 * var(--shot-w) + var(--s-3)); margin: 0 auto; }
.shots .shot { width: 100%; }
figcaption.shot-caption, .shot-caption { margin-top: var(--s-2); font-size: var(--fs-small); color: var(--text-muted); text-align: center; }
@media (min-width: 900px) { .intro .shot { margin-right: 0; } }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: var(--border-w) solid var(--border);
  border-radius: var(--r-card); padding: var(--s-5);
}
.card h3 + p, .card h3 + ul { margin-top: var(--s-2); }
.card p { color: var(--text-muted); }
.card-grid { display: grid; gap: var(--s-3); list-style: none; }
@media (min-width: 640px) { .card-grid--2, .card-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } .card-grid--4 { grid-template-columns: repeat(4, 1fr); } }

.icon-dot {
  display: inline-grid; place-items: center; width: var(--s-6); height: var(--s-6); margin-bottom: var(--s-3);
  border-radius: var(--r-sm); background: var(--surface-tint); color: var(--forest);
}
.icon-dot svg { width: var(--icon-sm); height: var(--icon-sm); }

.step-num { display: block; margin-bottom: var(--s-2); font-size: var(--fs-small); font-weight: var(--w-bold); color: var(--honey-ink); font-variant-numeric: tabular-nums; }

/* ---------- Tables ---------- */
.table-card { background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--r-card); overflow: hidden; }
.table-card__head { padding: var(--s-4) var(--s-5); border-bottom: var(--border-w) solid var(--border); }
.table-card__head h3 { font-size: var(--fs-body); }
.table-card__head p { font-size: var(--fs-small); color: var(--text-muted); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-small); }
caption { text-align: left; }
th, td { text-align: left; padding: var(--s-3) var(--s-4); border-bottom: var(--border-w) solid var(--border); vertical-align: middle; }
th { font-weight: var(--w-semibold); color: var(--text-muted); background: var(--bg); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.n, th.n { text-align: right; white-space: nowrap; }
td .sub { display: block; color: var(--text-muted); font-size: var(--fs-label); }
tfoot td { background: var(--bg); font-weight: var(--w-semibold); border-top: var(--border-w) solid var(--border); border-bottom: 0; }
.tag { display: inline-block; border-radius: var(--r-pill); padding: 0 var(--s-2); font-size: var(--fs-label); font-weight: var(--w-semibold); white-space: nowrap; }
.tag--ok { background: var(--surface-tint); color: var(--forest); }
.tag--wait { background: var(--honey-wash); color: var(--honey-ink); }
@media (max-width: 520px) { th, td { padding: var(--s-2) var(--s-3); } .table-card__head { padding: var(--s-4); } }

/* ---------- Lists ---------- */
.check-list, .x-list { list-style: none; display: grid; gap: var(--s-3); }
.check-list li, .x-list li { display: flex; gap: var(--s-3); align-items: flex-start; }
.check-list svg, .x-list svg { flex: none; width: var(--icon); height: var(--icon); margin-top: var(--hair-3); }
.check-list svg { color: var(--forest); }
.x-list svg { color: var(--text-muted); }

/* ---------- Founder note ---------- */
.note { border-left: var(--s-1) solid var(--vernal); padding-left: var(--s-5); }
.note footer { margin-top: var(--s-3); font-size: var(--fs-small); color: var(--text-muted); }

/* ---------- FAQ ---------- */
.faq { background: var(--surface); border: var(--border-w) solid var(--border); border-radius: var(--r-card); max-width: var(--w-faq); }
.faq details + details { border-top: var(--border-w) solid var(--border); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-4);
  min-height: var(--btn-h); padding: var(--s-4) var(--s-5); cursor: pointer; list-style: none;
  font-weight: var(--w-semibold);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary svg { flex: none; width: var(--icon); height: var(--icon); color: var(--forest); transition: transform 0.2s ease; }
.faq details[open] summary svg { transform: rotate(45deg); }
.faq .answer { padding: 0 var(--s-5) var(--s-5); color: var(--text-muted); }
.faq .answer p + p, .faq .answer p + ul, .faq .answer ul + p { margin-top: var(--s-3); }
.faq .answer ul { padding-left: var(--s-5); display: grid; gap: var(--s-2); }

/* ---------- Prose (Privacy) ---------- */
.prose { max-width: var(--w-prose); }
.prose h2 { font-size: var(--fs-h3); letter-spacing: 0; margin-top: var(--s-6); margin-bottom: var(--s-2); }
.prose p + p, .prose ul + p, .prose p + ul { margin-top: var(--s-3); }
.prose ul { padding-left: var(--s-5); display: grid; gap: var(--s-2); }
.prose .meta { color: var(--honey-ink); font-size: var(--fs-small); font-weight: var(--w-semibold); font-variant-numeric: tabular-nums; background: var(--honey-wash); display: inline-block; padding: var(--s-1) var(--s-2); border-radius: var(--r-sm); margin-bottom: var(--s-4); }

/* ---------- CTA card ---------- */
.cta-card { display: grid; gap: var(--s-4); align-items: center; }
.cta-card p { margin-top: var(--s-2); }
@media (min-width: 768px) { .cta-card { grid-template-columns: 1fr auto; gap: var(--s-6); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--forest-deep); color: var(--on-forest-muted); padding: var(--s-6) 0; font-size: var(--fs-small); }
.site-footer .container { display: grid; gap: var(--s-4); }
.site-footer .brand { color: var(--surface); font-size: var(--fs-body); }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 var(--s-5); }
.site-footer a { color: var(--surface); display: inline-flex; align-items: center; min-height: var(--tap); }
@media (min-width: 768px) {
  .site-footer .container { grid-template-columns: auto 1fr; align-items: center; }
  .site-footer ul { justify-content: flex-end; }
  .site-footer .fine { grid-column: 1 / -1; }
}

/* ---------- 404 ---------- */
.not-found .code { font-size: var(--fs-small); color: var(--honey-ink); font-weight: var(--w-bold); font-variant-numeric: tabular-nums; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

.mt-3 { margin-top: var(--s-3); }
.mt-5 { margin-top: var(--s-5); }
.section:not(.section--tint) + .section:not(.section--tint) { padding-top: 0; }
.muted { color: var(--text-muted); }
.intro .shot { width: var(--shot-w-intro); }
td strong { white-space: nowrap; }
@media (min-width: 600px) { .shots { grid-template-columns: 1fr 1fr; } }
tfoot .sub { font-weight: var(--w-regular); }
@media (max-width: 520px) { .tag { white-space: normal; } }
