/* =====================================================================
   "How I work" section.
   Open editorial composition: three columns separated by thin rules (no boxes, no icons, no shadows),
   each with a custom SVG illustration that resolves on hover / focus / tap (class .is-on, set by how-i-work.js).
   Colours, type and easing come from the site's tokens and the hero's motion language.
   ===================================================================== */
.hw{--hw-spring:cubic-bezier(.22,1.2,.36,1);--hw-out:cubic-bezier(.22,.61,.36,1);--hw-dur:.9s;padding-bottom:var(--space)}
@supports (transition-timing-function:linear(0,1)){
  .hw{--hw-spring:linear(0,.009,.035 2.1%,.141 4.4%,.723 12.9%,.938 16.7%,1.017 20.3%,1.043 24.1%,1.035 28.5%,1.003 39.7%,.997 50.6%,1)}
}
.hw-grid{display:grid;gap:0}

/* ---------- a principle ---------- */
.hw-card{position:relative;display:grid;align-content:start;padding:clamp(28px,4vw,40px) 0 clamp(40px,6vw,64px);border-top:1px solid var(--line)}
.hw-card:first-child{border-top:0;padding-top:0}
.hw-n{display:block;margin:0 0 clamp(14px,1.6vw,20px);font-size:14px;color:var(--accent);font-variant-numeric:tabular-nums}
.hw-t{margin:clamp(22px,2.4vw,32px) 0 0;font:500 clamp(24px,2vw,30px)/1.1 var(--f-display);letter-spacing:-.03em;color:var(--ink)}
.hw-body{margin-top:clamp(14px,1.4vw,18px);max-width:34em}
.hw-body p{margin:0;font-size:16px;line-height:1.55;color:var(--muted)}
.hw-body p+p{margin-top:.8em}
/* the manifesto line */
.hw-m{position:relative;margin:clamp(26px,3vw,40px) 0 0;padding-top:18px;max-width:18em;
  font:300 clamp(24px,2.1vw,32px)/1.14 var(--f-display);letter-spacing:-.035em;color:var(--accent);text-wrap:balance}
.hw-m::before{content:"";position:absolute;left:0;top:0;width:40px;height:2px;border-radius:2px;background:var(--accent)}

/* ---------- illustration area (a button: hover, focus, tap) ---------- */
.hw-fig{display:block;width:100%;margin:0;padding:0;border:0;border-radius:6px;background:none;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.hw-fig:focus-visible{outline:2px solid var(--accent);outline-offset:6px}
.hw-svg{display:block;width:100%;height:auto;aspect-ratio:4/3;overflow:visible}
.hw-svg *{transition-timing-function:var(--hw-spring);transition-duration:var(--hw-dur)}

/* 01 & 02 are still pictures (no motion); only 03 reacts. They share the palette, line weight and scale of 03. */
.hw-static{cursor:default}

/* 01 — among scattered signals, a few connect into one clear direction */
.hw-a1 .faint path{fill:none;stroke:color-mix(in srgb,var(--ink) 18%,transparent);stroke-width:1;vector-effect:non-scaling-stroke}
.hw-a1 .noise circle{fill:color-mix(in srgb,var(--ink) 35%,transparent)}
.hw-a1 .noise .o{fill:none;stroke:color-mix(in srgb,var(--ink) 35%,transparent);stroke-width:1.2;vector-effect:non-scaling-stroke}
.hw-a1 .noise .dash{stroke-dasharray:2 3}
.hw-a1 .ring{fill:none;stroke:color-mix(in srgb,var(--accent) 40%,transparent);stroke-width:1.2;vector-effect:non-scaling-stroke}
.hw-a1 .spokes path{fill:none;stroke:var(--accent);stroke-width:1.4;vector-effect:non-scaling-stroke}
.hw-a1 .sig circle{fill:var(--accent)}
.hw-a1 .focus{fill:var(--citron);stroke:var(--ink);stroke-width:1.2;vector-effect:non-scaling-stroke}

/* 02 — sketch → iteration → finished piece, stepping forward (abstract; no literal screen) */
.hw-a2 .sketch{fill:none;stroke:color-mix(in srgb,var(--ink) 45%,transparent);stroke-width:1.2;stroke-dasharray:4 4;vector-effect:non-scaling-stroke}
.hw-a2 .draft{fill:color-mix(in srgb,var(--lilac) 40%,var(--paper));stroke:color-mix(in srgb,var(--lilac) 80%,var(--paper));stroke-width:1.2;vector-effect:non-scaling-stroke}
.hw-a2 .draft-line{fill:color-mix(in srgb,var(--plum) 35%,transparent)}
.hw-a2 .final{fill:var(--plum)}
.hw-a2 .final-dot{fill:var(--citron)}
.hw-a2 .final-line{fill:#F7F4EE;opacity:.9}

/* 03 — different shapes → together they form a bird.
   circle = body, small circle = head, triangle = wing, square (turned) = tail, small triangle = beak.
   Each keeps its own shape and colour; overlaps (multiply) show where they meet. */
.hw-s3 .shapes{isolation:isolate}
/* a touch lighter at rest so the solid shapes weigh the same as the line drawings beside them */
.hw-s3 .shapes{opacity:.88;transition:opacity .6s var(--hw-out)}
.is-on .hw-s3 .shapes{opacity:1}
.hw-s3 .sh{transform-box:fill-box;transform-origin:center;mix-blend-mode:multiply;transition-property:transform}
.hw-s3 .s-body{fill:var(--plum);transform:translate(0,0)}
.hw-s3 .s-tail{fill:var(--citron);transform:translate(0,0) rotate(14deg) scale(1);transition-delay:.06s}
.hw-s3 .s-wing{fill:var(--lilac);transform:translate(0,0) rotate(-10deg) scale(1);transition-delay:.12s}
.hw-s3 .s-head{fill:var(--lilac);transform:translate(0,0);transition-delay:.04s}
.hw-s3 .s-beak{fill:var(--citron);transform:translate(0,0) rotate(30deg);transition-delay:.16s}
.hw-s3 .eye{fill:var(--ink);transform-box:fill-box;transform-origin:center;transform:scale(0);transition-property:transform}
.hw-s3 .legs path{fill:none;stroke:var(--ink);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 1;stroke-dashoffset:1;transition-property:stroke-dashoffset;transition-timing-function:var(--hw-out);transition-duration:.45s}
.is-on .hw-s3 .s-body{transform:translate(88px,68px)}
.is-on .hw-s3 .s-tail{transform:translate(-141px,55px) rotate(45deg) scale(.55)}
.is-on .hw-s3 .s-wing{transform:translate(42px,-44px) rotate(-80deg) scale(.7)}
.is-on .hw-s3 .s-head{transform:translate(-58px,-90px)}
.is-on .hw-s3 .s-beak{transform:translate(-70px,-38px) rotate(0deg)}
.is-on .hw-s3 .eye{transform:scale(1);transition-delay:.6s}
.is-on .hw-s3 .legs path{stroke-dashoffset:0;transition-delay:.65s}
.is-on .hw-s3 .legs path+path{transition-delay:.72s}
/* a moment after it forms, the bird pecks at the ground once: head down quickly, a short pause, back up */
.hw-s3 .peck{mix-blend-mode:multiply;transform-box:fill-box;transform-origin:32% 50%}
.is-on .hw-s3 .peck{animation:hw-peck 1.15s 1.6s both}
@keyframes hw-peck{
  0%{transform:translate(0,0) rotate(0deg);animation-timing-function:cubic-bezier(.5,0,.9,.4)}
  20%{transform:translate(8px,64px) rotate(32deg);animation-timing-function:linear}
  30%{transform:translate(8px,60px) rotate(30deg)}
  38%{transform:translate(8px,64px) rotate(32deg);animation-timing-function:cubic-bezier(.22,.61,.36,1)}
  100%{transform:translate(0,0) rotate(0deg)}
}

/* dark mode: the illustrations sit on the dark page, so overlaps add light instead of darkening */
@media (prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .hw-s3 .sh{mix-blend-mode:screen}
  :root:not([data-theme="light"]) .hw-s3 .eye{fill:var(--citron)}
  :root:not([data-theme="light"]) .hw-s3 .legs path{stroke:var(--ivory)}
}
:root[data-theme="dark"] .hw-s3 .sh{mix-blend-mode:screen}
:root[data-theme="dark"] .hw-s3 .eye{fill:var(--citron)}
:root[data-theme="dark"] .hw-s3 .legs path{stroke:var(--ivory)}

/* ---------- tablet: one principle per row, illustration beside the text ---------- */
@media (min-width:700px) and (max-width:1099px){
  .hw-card{grid-template-columns:minmax(0,5fr) minmax(0,7fr);column-gap:clamp(32px,5vw,56px);align-items:start}
  .hw-n{grid-column:1/-1}
  .hw-fig{grid-column:1;grid-row:2/span 3}
  .hw-t{grid-column:2;grid-row:2;margin-top:0}
  .hw-body{grid-column:2;grid-row:3}
  .hw-m{grid-column:2;grid-row:4}
}
/* ---------- desktop: three columns side by side, rows aligned across columns ---------- */
@media (min-width:1100px){
  .hw-grid{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:auto auto auto 1fr auto;column-gap:0}
  .hw-card{grid-row:span 5;grid-template-rows:subgrid;padding:0 clamp(24px,2.6vw,44px) 0;border-top:0;border-left:1px solid var(--line)}
  .hw-card:first-child{padding-left:0;border-left:0}
  .hw-card:last-child{padding-right:0}
}
/* phones: a shorter illustration so text starts sooner */
@media (max-width:699px){.hw-svg{aspect-ratio:4/3;max-width:420px}}

@media (prefers-reduced-motion:reduce){.hw-svg *{transition-duration:.01s!important;transition-delay:0s!important}.is-on .hw-s3 .peck{animation:none}}
