/* Firme Labs site. Tokens from the Firme Design System (tokens.json); the theme follows the device. */

@font-face { font-family: 'Geist'; src: url('fonts/Geist-Regular.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/Geist-Medium.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/Geist-SemiBold.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('fonts/Geist-Bold.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f5f5f3;
  --line: #e7e7e4;
  --line-strong: #8e8e93;
  --ink: #0b0b0c;
  --ink-muted: #5f5f64;
  --on-ink: #ffffff;
  --brasa: #e8803a;
  --brasa-text: #a84f16;
  --brasa-soft: #fdf1e8;
  --focus: #0b0b0c;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --screen-x: 24px;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --measure: 680px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --surface: #161618;
    --surface-muted: #1f1f22;
    --line: #2c2c30;
    --line-strong: #6e6e73;
    --ink: #f5f5f3;
    --ink-muted: #a1a1a6;
    --on-ink: #0b0b0c;
    --brasa-text: #f09a5e;
    --brasa-soft: #2a1a10;
    --focus: #f5f5f3;
  }
}

*, *::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: 17px;
  line-height: 26px;
  -webkit-font-smoothing: antialiased;
}

/* Typography (Design System styles) */
.title-xl { font-size: 34px; line-height: 38px; font-weight: 600; letter-spacing: -0.03em; }
.title-l { font-size: 28px; line-height: 32px; font-weight: 600; letter-spacing: -0.025em; }
.title-m { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.015em; }
.title-s { font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.01em; }
.body-l { font-size: 17px; line-height: 26px; font-weight: 400; }
.body { font-size: 15px; line-height: 22px; font-weight: 400; }
.label { font-size: 15px; line-height: 20px; font-weight: 500; }
.caption { font-size: 13px; line-height: 18px; font-weight: 400; }
.overline { font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--brasa-text); }
.muted { color: var(--ink-muted); }

h1, h2, h3, p, ul, ol { margin: 0; }

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Layout */
.page {
  max-width: calc(var(--measure) + 2 * var(--screen-x));
  margin: 0 auto;
  padding: 0 var(--screen-x);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 88px;
}

.site-header nav { display: flex; gap: var(--space-5); flex-wrap: wrap; justify-content: flex-end; }
.site-header nav a { text-decoration: none; color: var(--ink-muted); }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--ink); }

.logo { display: inline-flex; align-items: center; min-height: 44px; }
.logo img { display: block; height: 32px; width: auto; }
.logo-dark { display: none !important; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none !important; }
  .logo-dark { display: block !important; }
}

.wordmark { font-weight: 600; letter-spacing: -0.015em; font-size: 18px; text-decoration: none; }

main { padding: var(--space-8) 0 var(--space-16); }

.hero { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-8) 0 var(--space-10); }
.hero .body-l { color: var(--ink-muted); max-width: 560px; }

.stack { display: flex; flex-direction: column; gap: var(--space-3); }

/* Card and soft panel: borders, not shadows */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
a.card { text-decoration: none; }
a.card:hover { border-color: var(--line-strong); }
a.card:focus-visible { border-radius: var(--radius-lg); }

.panel {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
}

.links { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); }

/* Long-form documents (privacy policy, terms) */
.doc { display: flex; flex-direction: column; gap: var(--space-10); }
.doc-head { display: flex; flex-direction: column; gap: var(--space-3); }
.doc section { display: flex; flex-direction: column; gap: var(--space-4); scroll-margin-top: var(--space-6); }
.doc h3 { margin-top: var(--space-2); }
.doc ul, .doc ol { padding-left: 1.25em; display: flex; flex-direction: column; gap: var(--space-2); }
.doc li::marker { color: var(--ink-muted); }
.doc strong { font-weight: 600; }

.toc ol { padding-left: 1.5em; display: flex; flex-direction: column; gap: var(--space-1); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 22px; }
th, td { text-align: left; vertical-align: top; padding: var(--space-3) var(--space-4); }
th { font-weight: 500; color: var(--ink-muted); background: var(--surface-muted); }
tr + tr td { border-top: 1px solid var(--line); }

.site-footer {
  border-top: 1px solid var(--line);
  padding: var(--space-8) 0 var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  color: var(--ink-muted);
}
.site-footer a { color: var(--ink-muted); }

@media (min-width: 720px) {
  .hero { padding-top: var(--space-12); }
}
