/* Shared look for /projects: the homepage's tokens, type and "challenge, role, what changed" pattern.
   Pills for anything you press, 14px corners for containers. */
:root {
  --bg: #f7f8f5; --surface: #eef1e8; --surface-2: #e3e8d9; --text: #1d211b; --muted: #565d52;
  --line: #d8ddd1; --accent: #4d6b35; --accent-ink: #f7f8f5; --radius: 14px; --max: 1160px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141712; --surface: #1c2019; --surface-2: #252a21; --text: #eceee8;
    --muted: #a6ad9f; --line: #30362b; --accent: #a9c98a; --accent-ink: #141712;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "DM Sans", system-ui, sans-serif; font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
p { margin: 0; }
h1, h2, h3 { font-weight: 500; letter-spacing: -0.025em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.75rem); max-width: 18ch; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.25; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--text); color: var(--bg); padding: 8px 12px; z-index: 10; }

/* Header and footer, as on the homepage */
header.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
header.nav .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 600; text-decoration: none; letter-spacing: -0.02em; font-size: 19px; }
nav ul { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; align-items: center; font-size: 16px; }
nav a { text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--accent); }
footer { border-top: 1px solid var(--line); margin-top: 96px; padding: 28px 0; font-size: 15px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; }

/* Sub nav: every project, under the main nav */
.subnav { position: sticky; top: 73px; z-index: 19; background: color-mix(in srgb, var(--bg) 88%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.subnav ul { gap: 28px; overflow-x: auto; scrollbar-width: none; }
.subnav ul::-webkit-scrollbar { display: none; }
.subnav .rule { flex: none; width: 1px; height: 18px; background: var(--line); }
.subnav a { display: flex; align-items: center; height: 48px; font-size: 15px; color: var(--muted); white-space: nowrap; box-shadow: inset 0 -2px 0 transparent; transition: color .2s, box-shadow .2s; }
.subnav a:hover { color: var(--text); }
.subnav a[aria-current] { color: var(--text); font-weight: 500; box-shadow: inset 0 -2px 0 var(--accent); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; min-height: 48px;
  padding: 0 22px; border-radius: 999px; font-weight: 500; font-size: 16px; text-decoration: none;
  border: 1px solid var(--text); transition: transform .2s cubic-bezier(.16,1,.3,1), background .2s, color .2s;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-ghost:hover { background: var(--surface-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* The projects page: chapters, each a claim with its proof */
.intro { padding: 72px 0 56px; }
.intro p { color: var(--muted); max-width: 52ch; margin-top: 16px; font-size: 1.15rem; }

.ch{padding:72px 0;border-top:1px solid var(--line)}
.ch h2{font-size:clamp(2rem,4vw,3rem);max-width:16ch}
.ch h3{font-size:1.3rem;margin-top:28px}
.ch p{color:var(--muted);max-width:46ch;margin-top:8px}
.ch-split{display:grid;grid-template-columns:1fr 1fr;gap:56px;align-items:center}
.ch-split .ch-media{background:var(--surface);border-radius:var(--radius);padding:40px;display:flex;justify-content:center}
.ch-split .phone{width:min(270px,80%)}
.proof{margin-top:28px;max-width:30ch}.proof b{display:block;font-weight:500;font-size:clamp(2.2rem,4.4vw,3.2rem);letter-spacing:-.03em;line-height:1.05;color:var(--accent)}
.proof span{display:block;color:var(--muted);font-size:16px;line-height:1.4;margin-top:6px}
.ch-head{display:flex;justify-content:space-between;gap:48px;align-items:flex-end}.ch-head .proof{flex:none}
.ch-wide .ch-media{background:var(--surface);border-radius:var(--radius);padding:clamp(24px,5vw,56px);margin-top:40px;display:flex;justify-content:center}.ch-wide .mac{max-width:760px}
.ch-pair{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin-top:40px}
.ch-pair .ch-media{background:var(--surface);border-radius:var(--radius);padding:32px;aspect-ratio:5/4;display:flex;align-items:center;justify-content:center}
.ch-pair .duo,.ch-pair .mac{width:100%}
@media (max-width:860px){.ch{padding:48px 0}.ch-split,.ch-pair{grid-template-columns:1fr;gap:32px}.ch-head{flex-direction:column;align-items:flex-start;gap:20px}.ch-pair .ch-media{aspect-ratio:auto;padding:20px}}

/* A case study */
.org { color: var(--accent); font-size: 16px; font-weight: 500; margin-top: 40px; }
.case-head h1 { margin-top: 12px; }
.lede { font-size: 1.25rem; line-height: 1.5; color: var(--muted); max-width: 54ch; margin-top: 20px; }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 56px; }
.kpis b { display: block; font-weight: 500; font-size: clamp(2.2rem, 4.4vw, 3.2rem); letter-spacing: -0.03em; line-height: 1.05; }
.kpis span { display: block; color: var(--muted); font-size: 16px; line-height: 1.4; margin-top: 8px; max-width: 26ch; }
.crm { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 72px; padding-top: 32px; border-top: 1px solid var(--line); }
.crm h2 { font-size: 1rem; letter-spacing: 0; line-height: 1.4; font-weight: 600; margin-bottom: 8px; }
.block { margin-top: 88px; }
.block > p { max-width: 62ch; margin-top: 16px; }
.items { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; margin-top: 36px; }
.items p { color: var(--muted); margin-top: 8px; }
.note { background: var(--surface); border-radius: var(--radius); padding: 22px 26px; margin-top: 32px; font-size: 16px; max-width: 72ch; }
.next { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-top: 88px; padding-top: 32px; border-top: 1px solid var(--line); text-decoration: none; }
.next span { color: var(--muted); font-size: 16px; }
.next b { display: block; font-weight: 500; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; color: var(--text); }
.next .arrow { font-size: 1.6rem; color: var(--accent); transition: transform .2s; }
.next:hover .arrow { transform: translateX(4px); }

@media (max-width: 860px) {
  .crm, .items { grid-template-columns: 1fr; }
  .crm { gap: 28px; }
}
@media (max-width: 720px) {
  header.nav { position: static; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--bg); }
  header.nav .wrap { height: 64px; }
  header.nav li:not(:last-child) { display: none; }
  .subnav { top: 0; }
  .subnav ul { gap: 22px; margin: 0 -16px; padding: 0 16px; }
  .subnav a { height: 52px; }
  .wrap { padding: 0 16px; }
  body { font-size: 17px; }
  .intro { padding: 48px 0 32px; }
  .kpis { grid-template-columns: 1fr; gap: 24px; }
  .kpis span { max-width: none; }
  .block, .next { margin-top: 64px; }
  footer { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) { .btn, .next .arrow, .subnav a { transition: none; } }

.stage { background: var(--surface); border-radius: var(--radius); padding: clamp(24px, 5vw, 64px); margin-top: 56px; display: flex; justify-content: center; }
.stage .mac, .stage .duo { width: 100%; max-width: 820px; }
.stage-cap { color: var(--muted); font-size: 15px; margin-top: 10px; }
