/* Shared by every "How it works" page. Same tokens as the portfolio homepage (adapted from Apple's design system). */
:root {
  --canvas: #ffffff; --parch: #f5f5f7; --ink: #1d1d1f; --ink-2: #6e6e73; --line: rgba(0, 0, 0, .08);
  --blue: #0066cc; --blue-focus: #0071e3; --on-blue: #ffffff; --tint: #e8f1fb; --drop: rgba(0, 0, 0, .22);
  --display: "Geist", "SF Pro Display", system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: "Geist", "SF Pro Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #0f0f11; --parch: #1c1c1e; --ink: #f5f5f7; --ink-2: #a1a1a6; --line: rgba(255, 255, 255, .1);
    --blue: #2997ff; --blue-focus: #4aa8ff; --on-blue: #06121f; --tint: #14263a; --drop: rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 17px/1.5 var(--body); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue-focus); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1060px; margin: 0 auto; padding-inline: max(24px, env(safe-area-inset-left)); }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.6vw, 36px); font-weight: 700; letter-spacing: -.035em; margin: 0 0 20px; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; margin: 0 0 4px; }
.eyebrow { font-size: 14px; color: var(--ink-2); font-weight: 500; }
section.wrap { border-top: 1px solid var(--line); padding-block: 48px; }

.back { display: inline-flex; align-items: center; min-height: 44px; margin-top: calc(12px + env(safe-area-inset-top)); font-size: 15px; font-weight: 500; }
header.wrap { padding-block: 16px 48px; }
header h1 { font-size: clamp(40px, 6vw, 60px); font-weight: 700; line-height: 1.05; letter-spacing: -.045em; margin: 8px 0 18px; }
h1 .appicon { display: inline-block; width: .9em; height: .9em; border-radius: 22%; vertical-align: -.1em; margin-right: .22em; box-shadow: 0 6px 14px -8px var(--drop); }
.lede { font: 500 clamp(20px, 2.4vw, 24px)/1.3 var(--display); letter-spacing: -.025em; max-width: 36em; margin: 0 0 14px; }
header p { color: var(--ink-2); max-width: 44em; margin: 0 0 12px; }
.open { display: inline-flex; align-items: center; min-height: 44px; margin-top: 12px; padding: 0 22px; border-radius: 999px; background: var(--blue); color: var(--on-blue); font-weight: 500; font-size: 16px; touch-action: manipulation; transition: transform .15s cubic-bezier(.16,1,.3,1), background-color .2s; }
.open:hover { text-decoration: none; background: var(--blue-focus); }
.open:active { transform: scale(.97); }
.film { display: inline-flex; align-items: center; min-height: 44px; margin: 12px 0 0 16px; font-size: 15px; font-weight: 500; }

/* ---------- the big-picture diagram ----------
   Zones run left to right with arrows between them (top to bottom on a phone).
   Each zone is a place where work happens; each box inside is one system. */
.flow { display: flex; align-items: stretch; }
.zone { flex: 1; min-width: 0; background: var(--parch); border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.zone.hot { background: var(--tint); }
.zone { transition: box-shadow .4s, transform .4s cubic-bezier(.16,1,.3,1); }
.zone.on { box-shadow: 0 0 0 2px var(--blue), 0 10px 24px -14px var(--blue); transform: translateY(-2px); }
.arrow::before { display: inline-block; transition: transform .35s cubic-bezier(.34,1.56,.64,1), opacity .35s; opacity: .55; }
.arrow.on::before { transform: scale(1.35); opacity: 1; }
.zone > .eyebrow { font-size: 12px; font-weight: 600; color: var(--blue); }
.box { border-radius: 12px; padding: 10px 12px; background: var(--canvas); font-size: 14px; line-height: 1.4; }
.box b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.box span { color: var(--ink-2); }
.arrow { flex: 0 0 32px; display: grid; place-items: center; color: var(--blue); font-size: 20px; }
.arrow::before { content: "→"; }
.arrow.back-arrow::before { content: "⇄"; }
.caption { font-size: 14px; color: var(--ink-2); margin: 14px 0 0; }

/* ---------- step by step ---------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 20px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--parch); color: var(--ink); font: 500 14px var(--mono); margin-top: 1px; }
.steps p { margin: 0; color: var(--ink-2); max-width: 46em; }
.where { display: inline-block; margin-left: 8px; padding: 2px 9px; border-radius: 999px; background: var(--tint); color: var(--blue); font-size: 12px; font-weight: 500; vertical-align: 2px; }

/* ---------- the pieces ---------- */
.pieces { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.piece { background: var(--parch); border-radius: 18px; padding: 18px 20px; }
.piece p { margin: 0; color: var(--ink-2); font-size: 15px; }
.piece .why { margin-top: 10px; color: var(--ink); font-size: 14px; }
.piece .why::before { content: "Why: "; font-weight: 600; color: var(--blue); }

.honest { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; max-width: 50em; }
.honest li { padding-left: 22px; position: relative; color: var(--ink-2); }
.honest li::before { content: "•"; position: absolute; left: 4px; color: var(--blue); }

footer.wrap { border-top: 1px solid var(--line); padding-block: 24px calc(48px + env(safe-area-inset-bottom)); font-size: 15px; }
footer a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding-inline: max(18px, env(safe-area-inset-left)); }
  header.wrap { padding-block: 8px 36px; }
  section.wrap { padding-block: 40px; }
  .flow { flex-direction: column; }
  .arrow { flex-basis: 28px; }
  .arrow::before { content: "↓"; }
  .arrow.back-arrow::before { content: "⇅"; }
  .steps li { grid-template-columns: 30px 1fr; gap: 12px; }
  .steps li::before { width: 26px; height: 26px; font-size: 13px; }
  .open { width: 100%; justify-content: center; }
  .film { margin-left: 0; }
}
