/* /design-process only. Reuses tokens from styles.css. */
:root { --mono: var(--font-mono-system); --ink: color-mix(in oklch, var(--foreground) 88%, transparent); }

.dp-hero h1 { font-size: clamp(2.75rem, 4.5vw + 1rem, 5rem); line-height: 1.05; letter-spacing: -.022em; text-wrap: balance; }
.dp-hero .k { width: 44px; height: 44px; margin-bottom: 28px; }
.dp-sub { margin: 16px auto 0; max-width: 40ch; text-wrap: balance; color: var(--secondary-foreground); font-size: var(--type-hero-subtitle); line-height: 1.45; letter-spacing: -0.01em; }

/* apple.css colours every link blue; chrome links stay neutral like apple.com */
.nav .brand { color: var(--foreground); }
.nav .nav-link { color: var(--secondary-foreground); }
.nav .nav-link:hover { color: var(--foreground); }
footer a:not(.btn) { color: var(--secondary-foreground); }
footer a:not(.btn):hover { color: var(--foreground); }

/* In brief: the answer first */
.dp-brief { max-width: 46rem; padding-bottom: 4rem; }
.dp-brief > p { font-size: clamp(1.1875rem, 1rem + .6vw, 1.4375rem); line-height: 1.5; letter-spacing: -0.015em; text-wrap: pretty; }
.dp-toc { list-style: none; padding: 0; margin-top: 32px; display: flex; flex-wrap: wrap; gap: 8px; }
.dp-toc a { display: inline-flex; align-items: baseline; gap: 8px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 13px; font-weight: 500; text-decoration: none; color: var(--secondary-foreground); }
.dp-toc a:hover { color: var(--foreground); border-color: var(--border-strong); }
.dp-toc span { font: 500 11px var(--mono); color: var(--accent); }

/* Chapters */
.ch { display: grid; gap: 40px; padding-block: 4.5rem; border-top: 1px solid var(--border); scroll-margin-top: 72px; }
.ch-num { font: 500 12px/1.5 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.ch h2 { font-size: clamp(2.25rem, 2.6vw + 1.25rem, 3.5rem); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.ch .lede { margin: 16px 0 0; max-width: 34em; color: var(--secondary-foreground); font-size: var(--type-hero-subtitle); line-height: 1.45; letter-spacing: -0.01em; text-wrap: pretty; }
.notes { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 12px; counter-reset: n; }
.notes li { position: relative; padding-left: 22px; color: var(--secondary-foreground); line-height: 1.5; }
.notes li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 1.5px; border-radius: 1px; background: var(--accent); }
ol.notes li::before { content: counter(n); counter-increment: n; top: .1em; width: auto; height: auto; background: none; font: 500 11px/1.9 var(--mono); color: var(--accent); }
.notes b { font-weight: 500; color: var(--foreground); }
@media (min-width: 960px) {
  .ch { grid-template-columns: 5fr 7fr; gap: 72px; align-items: center; padding-block: 7rem; }
  .ch:nth-of-type(odd) { grid-template-columns: 7fr 5fr; } /* sections alternate sides (the brief is the 1st section) */
  .ch:nth-of-type(odd) .ch-text { order: 2; }
}

/* Drafting paper */
.ch-fig { margin: 0; }
.paper { position: relative; padding: 14px; border-radius: 20px; border: 1px solid var(--border); color: var(--ink);
  background-color: var(--surface-step);
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 24px 24px; background-position: -1px -1px; }
@media (prefers-color-scheme: light) { .paper { background-color: var(--surface); } }
.ch-fig figcaption { margin-top: 14px; font: 400 12px/1.5 var(--mono); color: var(--faint-foreground); text-align: right; }
.inset { display: block; width: 74%; margin: -56px 18px 0 auto; position: relative; }
.inset img { border-radius: 12px; border: 1px solid var(--border-strong); box-shadow: 0 24px 60px -20px rgb(0 0 0 / .55); }
@media (prefers-color-scheme: light) { .inset img { box-shadow: 0 24px 60px -24px rgb(0 0 0 / .3); } }
#grid .paper { padding-bottom: 64px; }

/* Sketch strokes */
.draw { display: block; width: 100%; height: auto; overflow: visible; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.draw .i path { stroke: currentColor; stroke-width: 1.35; stroke-dasharray: 1 2; }
.draw .c path { stroke: var(--faint-foreground); stroke-width: .75; }
.draw .d path { stroke: currentColor; stroke-width: 1.5; stroke-dasharray: .5 5.5; opacity: .75; }
.draw .h path { stroke: var(--accent); stroke-width: 9; opacity: .4; stroke-dasharray: 1 2; }
.draw text { fill: var(--secondary-foreground); stroke: none; font: 400 12.5px var(--mono); }
.draw text.lb { fill: var(--foreground); font-weight: 600; font-size: 11.5px; letter-spacing: .06em; }
.draw text.sm { fill: var(--faint-foreground); font-size: 10.5px; letter-spacing: .04em; }
.draw text.hand { fill: var(--accent); font: italic 500 15px var(--font-system); }
.draw circle { stroke: none; }
.draw .mo { display: none; }
.draw .ink { fill: currentColor; }
.draw .sw0 { fill: var(--accent); }
.draw .sw1 { fill: color-mix(in oklch, var(--foreground) 80%, transparent); }
.draw .sw2 { fill: color-mix(in oklch, var(--foreground) 55%, transparent); }
.draw .sw3 { fill: color-mix(in oklch, var(--foreground) 32%, transparent); }
.draw .sw4 { fill: color-mix(in oklch, var(--foreground) 14%, transparent); stroke: var(--border-strong); stroke-width: 1; }
@media (prefers-color-scheme: light) { .draw .h path { opacity: .3; } }

/* Draw on scroll: design-process.js adds .dp-anim (not under Reduce Motion), then .on per sketch. */
.dp-anim .draw .i path, .dp-anim .draw .h path { transition: stroke-dashoffset 1.5s var(--ease-signature); }
.dp-anim .draw .i path:nth-child(3n+2) { transition-delay: .12s; }
.dp-anim .draw .i path:nth-child(3n) { transition-delay: .24s; }
.dp-anim .draw .h path { transition-delay: 1s; transition-duration: .7s; }
.dp-anim .draw .c, .dp-anim .draw .d, .dp-anim .draw .t { transition: opacity .8s var(--ease-standard); }
.dp-anim .draw .t { transition-delay: .9s; }
.dp-anim .draw .d { transition-delay: .5s; }
.dp-anim .draw:not(.on) .i path, .dp-anim .draw:not(.on) .h path { stroke-dashoffset: 1.001; }
.dp-anim .draw:not(.on) .c, .dp-anim .draw:not(.on) .d, .dp-anim .draw:not(.on) .t { opacity: 0; }

.dp-faq h2 { font-size: clamp(2.25rem, 2.6vw + 1.25rem, 3.5rem); }
.dp-faq .grid li { border-radius: 18px; padding: 24px; }
.dp-faq h2, .closing h2 { letter-spacing: -.02em; }
.closing h2 { font-size: clamp(2.5rem, 4vw + 1rem, 4.5rem); text-wrap: balance; }
.dp-faq .grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.dp-close { margin: 14px auto 28px; color: var(--secondary-foreground); font-size: var(--type-hero-subtitle); }

@media (max-width: 639px) {
  .ch { padding-block: 3.5rem; gap: 28px; }
  .paper { margin-inline: -1rem; border-radius: 0; border-inline: 0; padding: 10px 6px; }
  #grid .paper { padding-bottom: 40px; }
  .inset { width: 86%; margin-top: -32px; margin-right: 0; }
  /* phones: sketch scale is about .67, so keep only short labels and draw them at 11px or more; the text beside carries the rest */
  .draw text:not(.lb):not(.hand):not(.k), .draw .dsk, .draw .nm { display: none; }
  .draw text.k { font-size: 17px; }
  .draw text.lb { font-size: 16.5px; letter-spacing: .02em; }
  .draw text.hand { font-size: 18px; }
  .draw .mo { display: inline; }
}
