/*
 * Copyright (c) 2026 pocketservices GmbH
 * Author: Benjamin Lorenz <ben@pocket.services>
 *
 * pocket.services — the whole design system in one file.  The palette
 * is the qwabbl brand family (app/static/css/tw/input.css is the
 * upstream source of the values): brand green #8abc5a for fills,
 * #5d9f23 for green text on light, promoted to the text accent on
 * dark.  Inter variable is self-hosted (no third-party requests —
 * the colophon on the page is a factual claim, keep it true).
 *
 * ZERO JavaScript by design: theme follows prefers-color-scheme only
 * (no toggle, so no [data-theme] states exist), and the nginx CSP is
 * default-src 'none' — an inline style attribute or <style> block in
 * the pages would be the first step toward breaking that posture.
 */

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

:root {
  --bg: #ffffff;               /* page ground */
  --bg-2: #f4f5f7;             /* quiet band (qwabbl page gray) */
  --ink: #24292f;
  --muted: #59626c;
  --faint: #6b7280;
  --accent: #5d9f23;           /* green TEXT (readable on white) */
  --accent-hover: #6daf33;
  --accent-fill: #8abc5a;      /* green FILLS (buttons, the dot) */
  --accent-fill-hover: #79ad49;
  --hairline: color-mix(in srgb, var(--ink) 14%, transparent);
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas,
          'Liberation Mono', monospace;
  --sans: 'Inter', 'Helvetica Neue', Arial, Helvetica, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c;
    --bg-2: #1d2025;
    --ink: #e6e8eb;
    --muted: #9aa2ad;
    --faint: #7d8590;
    --accent: #8abc5a;         /* the fill green IS the text accent on dark */
    --accent-hover: #9ccf72;
    --accent-fill: #8abc5a;
    --accent-fill-hover: #9ccf72;
    --hairline: color-mix(in srgb, var(--ink) 16%, transparent);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  color-scheme: light dark;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
p a, li a, dd a { text-decoration: underline; text-underline-offset: 0.15em; }
:focus-visible {
  outline: 2px solid var(--accent-fill);
  outline-offset: 2px;
  border-radius: 2px;
}

.shell {
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: 1.375rem;
}

/* ------------------------------------------------------------- header */

.site-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
  padding-block: 1.75rem 0;
}

.wordmark {
  font-weight: 650;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.wordmark:hover { color: var(--ink); }
.wordmark .dot { color: var(--accent-fill); }

.site-nav {
  display: flex;
  gap: 1.375rem;
  font-family: var(--mono);
  font-size: 0.8125rem;
}
.site-nav a { color: var(--muted); }
.site-nav a:hover { color: var(--accent); }

/* --------------------------------------------------------------- hero */

.hero { padding-block: 5.5rem 5rem; }

.kicker {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 3.75rem);
  font-weight: 650;
  letter-spacing: -0.022em;
  line-height: 1.06;
  text-wrap: balance;
}
h1 .dot { color: var(--accent-fill); }

.lede {
  margin-top: 1.5rem;
  max-width: 38rem;
  font-size: 1.1875rem;
  color: var(--muted);
  text-wrap: pretty;
}

.hero-links {
  margin-top: 2.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: var(--accent-fill);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.6875rem 1.375rem;
  border-radius: 10px;
}
.btn:hover { background: var(--accent-fill-hover); color: #fff; }

.quiet-link {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--muted);
}
.quiet-link:hover { color: var(--accent); }

/* ----------------------------------------------------------- sections */

section { padding-block: 3.5rem; border-top: 1px solid var(--hairline); }

.k {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  margin-bottom: 2.25rem;
}
.k .dot { color: var(--accent-fill); font-weight: 700; }

/* Definition rows: term left, prose right; stacked on small screens. */
.rows { display: grid; gap: 2rem; }
.row { display: grid; grid-template-columns: 11rem 1fr; gap: 0.5rem 2rem; }
.row h3 {
  font-size: 1.0625rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.4;
}
.row p { color: var(--muted); text-wrap: pretty; }
.row p strong { color: var(--ink); font-weight: 600; }

@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; gap: 0.375rem; }
}

/* ------------------------------------------------------ proof + cards */

.card {
  background: var(--bg-2);
  border-radius: 12px;
  padding: 2rem 2.25rem;
}
.card p { color: var(--muted); text-wrap: pretty; }
.card p + p { margin-top: 1rem; }
.card strong { color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  .card { padding: 1.5rem 1.375rem; }
}

/* ------------------------------------------------------------ contact */

.contact-mail {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: clamp(1.375rem, 4.5vw, 1.875rem);
  font-weight: 640;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-decoration: none;
}
.contact-mail:hover { color: var(--accent); }
.contact-alt {
  margin-top: 0.75rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--faint);
}
#contact > p:first-of-type { color: var(--muted); max-width: 36rem; }

/* ----------------------------------------------------------- colophon */

.colophon p {
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--faint);
  max-width: 40rem;
}

/* ------------------------------------------------------------- footer */

.site-foot {
  border-top: 1px solid var(--hairline);
  padding-block: 2rem 2.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--faint);
}
.site-foot nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.site-foot a { color: var(--faint); }
.site-foot a:hover { color: var(--accent); }

/* --------------------------------------------- document pages (legal) */

.doc { padding-block: 3rem 4rem; }
.doc h1 {
  font-size: 1.875rem;
  font-weight: 650;
  letter-spacing: -0.018em;
  margin-bottom: 0.5rem;
}
.doc .doc-meta {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--faint);
  margin-bottom: 2.5rem;
}
.doc h2 {
  font-size: 1.25rem;
  font-weight: 630;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}
.doc h3 {
  font-size: 1.0625rem;
  font-weight: 620;
  margin: 1.75rem 0 0.5rem;
}
.doc p, .doc li { color: var(--muted); text-wrap: pretty; }
.doc p + p { margin-top: 0.75rem; }
.doc ul { padding-left: 1.25rem; margin-top: 0.5rem; }
.doc li + li { margin-top: 0.375rem; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 3rem 0;
}

/* ---------------------------------------------------------- 404 page */

.oops { padding-block: 7rem 5rem; }
.oops h1 {
  font-size: clamp(2.25rem, 6vw, 3rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}
.oops p { margin-top: 1rem; color: var(--muted); }
