/* Shared stylesheet for simple content pages (case studies, 404). */
:root {
  --paper: #f6f4ee;
  --card: #fff;
  --ink: #121212;
  --muted: #67645d;
  --line: #e2ded3;
  --accent: #2346ff;
  --on-ink: #fff;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c0c0d;
    --card: #141416;
    --ink: #f1efe8;
    --muted: #9b978e;
    --line: #26262a;
    --accent: #8093ff;
    --on-ink: #0c0c0d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 "Space Grotesk", system-ui, sans-serif;
  overflow-x: hidden;
}
a { color: inherit; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; }

.page { max-width: 760px; margin: 0 auto; padding: 32px 16px 96px; }

/* top bar */
.back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 500; text-decoration: none; color: var(--muted);
}
.back:hover { color: var(--ink); }

/* type */
.label {
  font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); font-weight: 500; margin: 0;
}
h1 {
  font-size: clamp(40px, 9vw, 72px); line-height: .98; letter-spacing: -.035em;
  font-weight: 700; margin: 14px 0 16px; overflow-wrap: anywhere;
}
.pitch { font-size: clamp(19px, 3.2vw, 23px); line-height: 1.4; margin: 0; max-width: 34em; }
h2 {
  font-size: clamp(24px, 4.4vw, 30px); letter-spacing: -.035em; font-weight: 700;
  line-height: 1.1; margin: 0 0 12px;
}
h3 { font-size: 18px; margin: 20px 0 6px; letter-spacing: -.01em; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 20px; }
li { margin: 0 0 6px; }
code {
  font: 14px/1.4 ui-monospace, "Cascadia Code", Consolas, monospace;
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1px 5px;
}
.muted { color: var(--muted); }

.hero { padding: 40px 0 28px; border-bottom: 1.5px solid var(--ink); position: relative; }

section { padding: 30px 0 6px; border-bottom: 1px solid var(--line); position: relative; }
section:last-of-type { border-bottom: 0; }

/* facts strip */
.facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  overflow: hidden; margin: 26px 0 0;
}
.facts div { padding: 12px 14px; box-shadow: 1px 1px 0 var(--line); }
.facts dt { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 2px 0 0; font-weight: 500; font-size: 15px; }

/* callouts */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; margin: 0 0 14px;
}
.honest {
  border-left: 3px solid var(--accent); padding: 4px 0 4px 14px; margin: 14px 0; color: var(--ink);
}

/* stack chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 12px; }
.chips li {
  margin: 0; font-size: 14px; padding: 5px 11px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card);
}

/* buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 500 15px "Space Grotesk", system-ui, sans-serif;
  padding: 13px 22px; border: 1.5px solid var(--ink); border-radius: 12px;
  background: transparent; color: var(--ink); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-2px); color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--on-ink); }
.btn.primary:hover { color: var(--on-ink); }

/* handwritten margin notes */
.note {
  font-family: "Caveat", cursive; font-weight: 700; color: var(--accent);
  font-size: 23px; line-height: 1.1; display: block; transform: rotate(-2deg);
  margin: 6px 0 14px 4px;
}
.note::before { content: "\2197\00a0"; }
@media (min-width: 1180px) {
  .note.side {
    position: absolute; left: calc(100% + 34px); top: 38px; width: 190px; margin: 0;
    transform: rotate(-4deg);
  }
  .note.side::before { content: "\2190\00a0"; }
}

/* next / footer */
.next { margin-top: 40px; padding-top: 22px; border-top: 1.5px solid var(--ink); }
.foot { margin-top: 28px; font-size: 14px; color: var(--muted); }

/* reveal on load */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero > *, section { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
.hero > :nth-child(2) { animation-delay: .05s; }
.hero > :nth-child(3) { animation-delay: .1s; }
.hero > :nth-child(4) { animation-delay: .15s; }
.hero > :nth-child(5) { animation-delay: .2s; }
section:nth-of-type(1) { animation-delay: .2s; }
section:nth-of-type(2) { animation-delay: .26s; }
section:nth-of-type(3) { animation-delay: .32s; }
section:nth-of-type(n+4) { animation-delay: .38s; }

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

@media (max-width: 520px) {
  body { font-size: 16px; }
  .page { padding-top: 22px; }
  .hero { padding-top: 28px; }
  .btn { width: 100%; justify-content: center; }
}
