/* Pest website, shared styles. Dark, minimal, glassy. Brand colours follow
   the app (pest/qml/Theme.qml). The launch page adds home.css on top. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-var.woff2") format("woff2-variations"), url("/fonts/geist-var.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --bg: #0a0c0b;
  --bg-raised: #101312;
  --surface: rgba(255, 255, 255, .035);
  --surface-2: rgba(255, 255, 255, .06);
  --surface-solid: #141716;
  --border: rgba(255, 255, 255, .08);
  --border-strong: rgba(255, 255, 255, .14);
  --text: #eef1ef;
  --muted: #9ba39f;
  --faint: #6c7470;
  --green: #099e37;
  --green-text: #4fd37a;
  --green-glow: rgba(9, 158, 55, .35);
  --blue: #0047ab;
  --blue-text: #7ea9ff;
  --amber: #e0a030;
  --danger: #f08a8a;
  --radius: 20px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "Roboto Mono", monospace;
  color-scheme: dark;
  interpolate-size: allow-keywords;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.6;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* A faint green glow at the top of every page. The home page adds more. */
body::before {
  content: ""; position: fixed; inset: -20vh -10vw auto; height: 70vh; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 60% at 50% 0%, rgba(9, 158, 55, .16), transparent 70%);
}

h1, h2, h3 { font-weight: 600; line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 .5em; text-wrap: balance; }
p { text-wrap: pretty; }

a { color: var(--green-text); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color .2s var(--ease); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--green-text); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(79, 211, 122, .3); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-solid); color: var(--text); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 16px; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ── Header ──────────────────────────────────────────────────────── */
header.site {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font-weight: 650; font-size: 19px; letter-spacing: -0.02em;
}
.brand .mark { width: 28px; height: 28px; flex: none; display: block; border-radius: 8px; }
header.site nav { display: flex; align-items: center; gap: 6px; }
header.site nav a:not(.button) {
  color: var(--muted); text-decoration: none; font-size: 14.5px; padding: 8px 12px; border-radius: 999px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
header.site nav a:not(.button):hover { color: var(--text); background: var(--surface-2); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-weight: 600; font-size: 15.5px; letter-spacing: -0.01em; text-decoration: none; text-align: center;
  /* Brand green takes near-black text for contrast (5.3:1), as in the app. */
  background: var(--green); color: #07110b;
  box-shadow: 0 0 0 1px rgba(79, 211, 122, .25) inset, 0 8px 24px -10px var(--green-glow);
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.button:hover { background: #0bb040; transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(79, 211, 122, .35) inset, 0 14px 30px -12px var(--green-glow); text-decoration: none; }
.button:active { transform: translateY(0) scale(.98); }
.button.quiet, .button.pill {
  background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: none;
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.button.quiet:hover, .button.pill:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, .24); box-shadow: none; }
.button.blue { background: var(--blue); color: #fff; }
.button.wide { display: flex; width: 100%; }
.button svg { width: 17px; height: 17px; flex: none; }
.buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Surfaces ────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px;
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.card h2, .card h3 { margin-top: 0; }

.notice { background: rgba(224, 160, 48, .07); border: 1px solid rgba(224, 160, 48, .22); color: #ecd3a3; border-radius: 16px; padding: 14px 18px; margin: 24px 0; font-size: 15px; }
.notice strong { color: var(--amber); }

section { margin: 40px 0; }
section h2 { font-size: 30px; }
ol.steps { padding-left: 22px; }
ol.steps li { margin-bottom: 8px; }
ol.steps li::marker { color: var(--green-text); font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

/* ── Footer ──────────────────────────────────────────────────────── */
footer.site { padding: 36px 0 48px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); margin-top: 32px; }
footer.site a { color: var(--muted); text-decoration: none; }
footer.site a:hover { color: var(--text); }
footer.site a.brand { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ── Invite page ─────────────────────────────────────────────────── */
.join { padding: 28px 0; }
.join .card { margin-bottom: 14px; }
.join h1 { font-size: 30px; }
.code {
  font-family: var(--mono); font-size: clamp(34px, 10vw, 52px); font-weight: 700; letter-spacing: .08em;
  text-align: center; background: rgba(0, 0, 0, .35); border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 8px; margin: 16px 0 18px; user-select: all; word-break: break-all; color: var(--green-text);
}
.hidden { display: none !important; }

/* ── Text pages: privacy, terms, delete account, support ────────── */
.prose { padding: 8px 0 16px; }
.prose h1 { font-size: clamp(36px, 7vw, 48px); margin: 28px 0 10px; }
.prose h2 { font-size: 22px; margin: 36px 0 8px; }
.prose h3 { font-size: 18px; margin: 24px 0 6px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--faint); }

@media (max-width: 480px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .buttons .button { flex: 1 1 100%; }
}

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