/* Staplegun — base design system.
   Print-shop aesthetic: newsprint paper, ink, one safety-orange signal color.
   Shared by the marketing site (site.css) and the app (app.css). */

@font-face { font-family: 'Shoulders'; src: url('/fonts/ui/big-shoulders-display-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Shoulders'; src: url('/fonts/ui/big-shoulders-display-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Shoulders'; src: url('/fonts/ui/big-shoulders-display-latin-900-normal.woff2') format('woff2'); font-weight: 900; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/ui/archivo-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/ui/archivo-latin-400-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/ui/archivo-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/ui/archivo-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Archivo'; src: url('/fonts/ui/archivo-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/ui/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/ui/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url('/fonts/ui/ibm-plex-mono-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --paper: #f1ece1;
  --paper-2: #e8e1d2;
  --paper-3: #ddd4c1;
  --card: #fbf8f1;
  --ink: #15130f;
  --ink-2: #48433b;
  --ink-3: #6b6458;
  --rule: rgba(21, 19, 15, 0.14);
  --rule-strong: rgba(21, 19, 15, 0.85);
  --signal: #ff4b1f;          /* safety orange — the one loud color */
  --signal-ink: #1a0a04;
  --signal-soft: #ffd9cc;
  --highlight: #ffe45c;       /* highlighter marks */
  --ok: #1f7a4d;
  --warn: #b25b00;
  --danger: #c0271a;
  --shadow: 0 1px 0 rgba(21, 19, 15, 0.06), 0 12px 28px -12px rgba(21, 19, 15, 0.35);
  --shadow-poster: 0 2px 2px rgba(21, 19, 15, 0.12), 0 18px 36px -14px rgba(21, 19, 15, 0.45);
  --radius: 4px;
  --radius-lg: 10px;

  --font-display: 'Shoulders', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #14120f;
    --paper-2: #1c1a16;
    --paper-3: #26231e;
    --card: #1a1814;
    --ink: #efe8da;
    --ink-2: #c3baa9;
    --ink-3: #a39b8c;
    --rule: rgba(239, 232, 218, 0.14);
    --rule-strong: rgba(239, 232, 218, 0.85);
    --signal: #ff5a2e;
    --signal-soft: #3a1a10;
    --highlight: #b89a12;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 28px -12px rgba(0, 0, 0, 0.7);
    --shadow-poster: 0 2px 2px rgba(0, 0, 0, 0.3), 0 18px 36px -14px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --paper: #14120f;
  --paper-2: #1c1a16;
  --paper-3: #26231e;
  --card: #1a1814;
  --ink: #efe8da;
  --ink-2: #c3baa9;
  --ink-3: #a39b8c;
  --rule: rgba(239, 232, 218, 0.14);
  --rule-strong: rgba(239, 232, 218, 0.85);
  --signal: #ff5a2e;
  --signal-soft: #3a1a10;
  --highlight: #b89a12;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 12px 28px -12px rgba(0, 0, 0, 0.7);
  --shadow-poster: 0 2px 2px rgba(0, 0, 0, 0.3), 0 18px 36px -14px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--signal); }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
::selection { background: var(--highlight); color: #15130f; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1; }

/* ---------- type ---------- */
.display {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  line-height: 0.86;
}
.h1 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(48px, 9vw, 128px); line-height: 0.86; letter-spacing: -0.01em; }
.h2 { font-family: var(--font-display); font-weight: 900; text-transform: uppercase; font-size: clamp(36px, 5.6vw, 72px); line-height: 0.9; }
.h3 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(24px, 3vw, 34px); line-height: 0.95; letter-spacing: 0.01em; }
.lede { font-size: clamp(18px, 2vw, 21px); line-height: 1.5; color: var(--ink-2); max-width: 38em; }
.label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-3); }
.mark { background: linear-gradient(transparent 55%, var(--highlight) 55%, var(--highlight) 92%, transparent 92%); padding: 0 0.08em; }
code, kbd, pre { font-family: var(--font-mono); font-size: 0.9em; }
:not(pre) > code { background: var(--paper-2); border: 1px solid var(--rule); padding: 0.05em 0.35em; border-radius: 3px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: var(--stack, 1rem); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
.rule-heavy { border: 0; border-top: 3px solid var(--rule-strong); margin: 0; }

/* ---------- buttons ---------- */
.btn {
  --b-bg: var(--ink);
  --b-fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.62em 1.15em;
  border: 2px solid var(--b-bg);
  border-radius: var(--radius);
  background: var(--b-bg);
  color: var(--b-fg);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 var(--signal);
  transition: transform 80ms ease, box-shadow 80ms ease, background-color 120ms ease;
  white-space: nowrap;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--signal); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--signal); }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-signal { --b-bg: var(--signal); --b-fg: #fff; box-shadow: 3px 3px 0 var(--ink); }
.btn-signal:hover { box-shadow: 4px 4px 0 var(--ink); }
.btn-signal:active { box-shadow: 1px 1px 0 var(--ink); }
.btn-ghost { --b-bg: transparent; --b-fg: var(--ink); border-color: var(--rule-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--paper-2); box-shadow: none; transform: none; }
.btn-sm { min-height: 34px; padding: 0.4em 0.8em; font-size: 14px; box-shadow: 2px 2px 0 var(--signal); }
.btn-lg { min-height: 56px; padding: 0.8em 1.5em; font-size: 18px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > span, .field > label { font-size: 14px; font-weight: 600; }
.field small, .hint { font-size: 13px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.6em 0.8em;
  border: 2px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-size: 16px; /* no iOS zoom */
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; font-family: var(--font-mono); font-size: 14px; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-soft); }
.error-text { color: var(--danger); font-size: 14px; }

/* ---------- surfaces ---------- */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px; border: 1px solid var(--rule-strong); border-radius: 2px; background: var(--card);
}
.tag-signal { background: var(--signal); color: #fff; border-color: var(--signal); }

/* A poster "stapled" to the wall. Put an <img> inside. */
.poster {
  position: relative;
  background: var(--paper-3);
  box-shadow: var(--shadow-poster);
  transform: rotate(var(--tilt, 0deg));
}
.poster > img { width: 100%; height: auto; display: block; }
.poster::before, .poster::after {
  /* two staples */
  content: '';
  position: absolute;
  top: 10px;
  width: 22px;
  height: 7px;
  border: 2px solid #9a968d;
  border-bottom: 0;
  background: linear-gradient(#d9d6ce, #a9a59b);
  background-clip: padding-box;
  box-shadow: 0 1px 1px rgba(0,0,0,0.35);
  z-index: 2;
}
.poster::before { left: 14%; transform: rotate(-4deg); }
.poster::after { right: 14%; transform: rotate(3deg); }
.poster.no-staples::before, .poster.no-staples::after { display: none; }

/* ---------- site chrome ---------- */
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 100; }
.nav { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: saturate(1.2) blur(6px); border-bottom: 1px solid var(--rule); }
.nav .wrap { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 900; font-size: 26px; text-transform: uppercase; letter-spacing: 0.01em; }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; gap: 22px; margin-left: auto; align-items: center; font-size: 15px; font-weight: 500; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; }
@media (max-width: 720px) {
  .nav-links .hide-sm { display: none; }
  .nav-links { gap: 14px; }
}
.footer { border-top: 3px solid var(--rule-strong); margin-top: 96px; padding: 40px 0 56px; font-size: 15px; color: var(--ink-2); }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 32px; }
.footer-grid a { text-decoration: none; display: block; padding: 3px 0; }
.footer-grid a:hover { text-decoration: underline; }
.footer-grid a.brand { display: inline-flex; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- utilities ---------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
