@font-face {
  font-family: Bricolage;
  src: url("assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: Onest;
  src: url("assets/fonts/onest.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+2212;
}
@font-face {
  font-family: Onest;
  src: url("assets/fonts/onest-cyrillic.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Allura;
  src: url("assets/fonts/allura.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --ink: #102c54;
  --muted: #435873;
  --desk: #eee9df;
  --rule: #c9bba7;
  --radius-control: 4px;
  --radius-panel: 8px;
  --blue: #245cc1;
  --light: #f0f6ff;
  --stroke: #fff;
  --shadow: 0 3px 0 #00000030, 0 10px 18px #00000025, 0 24px 43px #00000012;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #dde4ec; color: var(--ink); font: 400 1rem/1.55 Onest, system-ui, sans-serif; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 800; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2862c7; outline-offset: 4px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { flex: none; width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(1216px, calc(100% - 84px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; z-index: 5; top: 12px; left: 12px; padding: 12px 16px; background: var(--light); border-radius: 10px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }

.site-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; min-height: 85px; }
.wordmark { display: grid; align-content: center; width: fit-content; min-height: 44px; }
.header-nav { display: flex; gap: 8px; align-items: center; font-size: .9rem; font-weight: 600; }
.header-nav a { display: grid; align-items: center; min-height: 44px; padding: 6px 13px; border-radius: 9px; }
.header-cta { justify-self: end; }
.dock { display: none; }

.surface { border: 1px solid var(--stroke); border-radius: 23px; box-shadow: var(--shadow); }
.button {
  --fill: var(--light);
  --button-shadow: #8daedb;
  display: inline-flex;
  position: relative;
  isolation: isolate;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 47px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: var(--fill);
  font-size: .89rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 140ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.button::before {
  position: absolute;
  z-index: -1;
  inset: -1px;
  border-radius: inherit;
  box-shadow: 0 4px 0 var(--button-shadow), 0 7px 12px #0000002f;
  content: "";
  transition: opacity 140ms var(--ease-out);
}
.button--dark { --fill: #153760; --button-shadow: #092243; color: #fff; border-color: #436a9b; }
.button--light { --fill: #f5f9ff; color: var(--ink); border-color: #fff; }
.button:active, .button[aria-pressed="true"] { transform: translateY(4px); }
.button:active::before, .button[aria-pressed="true"]::before { opacity: 0; }
.header-cta { min-height: 41px; }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, .98fr);
  min-height: 514px;
  overflow: hidden;
  padding: 31px 35px 29px 54px;
  background: #dbe8fb;
}
.hero-waves { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.hero-waves i { position: absolute; display: block; border-radius: 49%; transform: rotate(-22deg); }
.hero-waves i:nth-child(1) { width: 535px; height: 219px; top: -141px; right: -159px; background: #346cb8; }
.hero-waves i:nth-child(2) { width: 454px; height: 205px; top: -139px; right: -167px; background: #17447d; }
.hero-waves i:nth-child(3) { width: 600px; height: 262px; bottom: -223px; left: -205px; border: 1px solid #f9fcffbd; background: #a9c5ee; box-shadow: 0 -20px 0 #d2e4fcab, 0 -36px 0 #e5f1ff9e; }
.hero-copy { position: relative; z-index: 1; padding-block: 12px 21px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: #29538b; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow::after { width: 32px; height: 1px; background: currentColor; content: ""; opacity: .7; }
.hero h1 { margin-top: 14px; font-family: Bricolage, Onest, system-ui, sans-serif; font-size: clamp(4rem, 9.65vw, 9.35rem); line-height: .91; letter-spacing: -.024em; }
.hero-dot { color: #3871c7; }
.signature { position: relative; z-index: 1; width: fit-content; margin-top: -.145em; margin-left: clamp(18px, 3.6vw, 50px); color: #2355a0; font: 400 clamp(2.3rem, 5vw, 4.65rem)/.93 Allura, cursive; white-space: nowrap; transform: rotate(-8deg); }
.hero-intro { max-width: 370px; margin-top: 30px; color: var(--muted); font-size: clamp(1rem, 1.42vw, 1.17rem); line-height: 1.48; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 23px; }

.computer { position: relative; align-self: center; min-width: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.computer-stage { position: relative; isolation: isolate; width: 100%; height: clamp(300px, 32.8vw, 420px); }
.stage-halo { position: absolute; z-index: -2; width: min(76%, 390px); top: 42%; left: 50%; aspect-ratio: 1; border: 1px solid #fff8; border-radius: 50%; background: #b4d2fb; box-shadow: none; transform: translate(-50%, -50%); }
.stage-orbit { position: absolute; z-index: -1; left: 50%; top: 48%; width: 96%; aspect-ratio: 2.24; transform: translate(-50%, -50%) rotate(-23deg); border: 1px solid #fbfdffd9; border-radius: 50%; }
.stage-orbit--back { width: 99%; transform: translate(-50%, -50%) rotate(30deg); border-color: #3e6bbd52; }
.stage-satellite { position: absolute; z-index: -1; top: 48%; left: 50%; width: 96%; aspect-ratio: 2.24; transform: translate(-50%, -50%) rotate(-23deg); }
.stage-satellite::after { position: absolute; top: 0; left: 0; width: 9px; height: 9px; border: 1px solid #fff; border-radius: 50%; background: #4078c9; box-shadow: 0 2px 5px #0000004d; content: ""; offset-path: ellipse(50% 50% at 50% 50%); animation: orbit 15s linear -2s infinite paused; }
.computer-stage[data-spinning] .stage-satellite::after { animation-play-state: running; }
.star { position: absolute; z-index: -1; width: 30px; height: 30px; }
.star--upper { top: 13%; left: 16%; color: #2b60a9; }
.star--lower { right: 8%; bottom: 22%; width: 24px; height: 24px; color: white; }
.stage-shadow { position: absolute; z-index: -1; left: 50%; bottom: 10%; width: 69%; height: 12%; transform: translateX(-50%) rotate(-5deg); border-radius: 50%; background: #123d7a4a; filter: blur(7px); }
.computer-still, .computer-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.computer-canvas { cursor: grab; touch-action: pan-y pinch-zoom; -webkit-tap-highlight-color: transparent; }
.computer-canvas.is-dragging { cursor: grabbing; }
.computer-canvas:focus-visible { outline-offset: -4px; border-radius: 15px; }
.computer-stage[data-live] .computer-still { visibility: hidden; }
.computer-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 11px; }
.computer-controls p { display: flex; align-items: center; gap: 6px; color: #254b82; font-size: .78rem; font-weight: 700; }
.computer-controls p .icon { width: 18px; height: 18px; }
.orbit-actions { display: flex; gap: 3px; }
.orbit-button { display: grid; width: 44px; min-height: 44px; place-items: center; padding: 0; border: 1px solid #ffffffb0; border-radius: 50%; background: #e5efffc7; box-shadow: 0 2px 0 #4575ba63, 0 5px 10px #0000001f; cursor: pointer; transition: transform 140ms var(--ease-out); }
.orbit-button:active { transform: translateY(2px); }
.orbit-button .icon { width: 18px; height: 18px; }
.orbit-button--toggle[aria-pressed="true"] .orbit-play, .orbit-button--toggle[aria-pressed="false"] .orbit-pause { display: none; }

.section { margin-top: 24px; }
section[id] { scroll-margin-top: 16px; }
.motion { padding: 29px; background: #eef4ff; }
h2 { margin-top: 8px; font-size: clamp(1.85rem, 3.4vw, 3rem); line-height: 1.01; letter-spacing: -.025em; }
.motion-copy > p { margin-top: 13px; color: var(--muted); font-size: .98rem; text-wrap: pretty; }

.motion { display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1fr); align-items: center; gap: 29px; padding: 29px; }
.motion-copy { padding: 7px 0 7px 18px; }
.motion-copy h2 { font-size: clamp(2.6rem, 5.2vw, 5.1rem); line-height: .93; }
.motion-copy h2 span { color: #3471c9; }
.motion-copy > p { max-width: 325px; }
.lab-tabs { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 17px; }
.lab-tabs button { min-height: 44px; padding: 7px 10px; border: 1px solid #aec7ec; border-radius: 9px; background: #f4f9ff; font-size: .82rem; font-weight: 700; cursor: pointer; }
.lab-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: white; }
.lab-stage { display: grid; place-items: center; min-height: 268px; padding: 20px; border: 1px solid #f0f7ff; border-radius: 18px; background: #bed8fa; }
.lab-window { width: min(100%, 380px); overflow: hidden; border: 1px solid #f6faff; border-radius: 15px; background: #f8fbff; box-shadow: 0 4px 0 #34609c4f, 0 12px 26px #00000033; }
.lab-toolbar { display: flex; align-items: center; gap: 5px; height: 31px; padding-inline: 11px; background: #dbeaff; }
.lab-toolbar i { width: 7px; height: 7px; border-radius: 50%; background: #749bd2; }
.lab-toolbar i:first-child { background: #3462a6; }
.lab-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 13px; min-height: 146px; padding: 13px; }
.lab-caption { color: var(--muted); font-size: .86rem; font-weight: 600; }
.demo-switch { position: relative; width: 84px; height: 48px; border: 1px solid #9ebae5; border-radius: 99px; background: #cbdef9; box-shadow: 0 3px #849ec7; cursor: pointer; }
.switch-thumb { position: absolute; top: 5px; left: 5px; width: 36px; height: 36px; border: 1px solid #a9c2e5; border-radius: 50%; background: #f7fbff; transition: transform 190ms var(--ease-out); }
.demo-switch[aria-checked="true"] { background: #2c67bd; }
.demo-switch[aria-checked="true"] .switch-thumb { transform: translateX(36px); }
.reveal-content { display: flex; justify-content: center; align-items: center; gap: 7px; padding: 6px 12px; border: 1px solid #bfd4f1; border-radius: 8px; background: #e1edff; font-size: .85rem; font-weight: 700; transform: translateY(-7px) scale(.97); opacity: 0; visibility: hidden; transition: transform 210ms var(--ease-out), opacity 210ms var(--ease-out), visibility 210ms; }
.reveal-content[aria-hidden="false"] { transform: none; opacity: 1; visibility: visible; }

.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 24px; align-items: center; padding: clamp(23px, 4.5vw, 53px); background: #173e75; color: white; }
.contact .eyebrow { color: #c6dfff; }
.contact h2 { margin-top: 11px; font-size: clamp(2.5rem, 5.8vw, 5.15rem); line-height: .96; }
.contact h2 span { color: #accfff; }
.contact-links { display: grid; gap: 11px; }
.contact-link { --fill: #213f69; --button-shadow: #0b203f; justify-content: flex-start; gap: 11px; min-height: 59px; width: 100%; padding: 8px 12px; border-color: #597eaa; }
.contact-link--telegram { --fill: #daebff; --button-shadow: #6e9fdb; color: var(--ink); border-color: white; }
.contact-link span { display: grid; gap: 3px; overflow-wrap: anywhere; }
.contact-link small { font-size: .81rem; font-weight: 500; opacity: .88; }
.contact-out { margin-left: auto; }
.contact a:focus-visible { outline-color: #e5f4ff; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block: 18px; color: #365581; font-size: .82rem; font-weight: 700; }
.site-footer a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.site-footer .icon { transform: rotate(180deg); }

@keyframes rise {
  from { opacity: 0; translate: 0 12px; }
  to { opacity: 1; translate: 0 0; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes orbit { to { offset-distance: 100%; } }
.hero-copy { animation: rise 550ms var(--ease-out) both; }
.computer { animation: fade-in 530ms var(--ease-out) 70ms both; }
.lab-panel:not([hidden]) { animation: fade-in 150ms var(--ease-out) both; }

@media (hover: hover) and (pointer: fine) {
  .header-nav a:hover { background: #f8fbff9c; }
  .button:hover:not(:active, [aria-pressed="true"]) { transform: translateY(-2px); }
  .orbit-button:hover:not(:active) { background: #f7fbff; transform: translateY(-1px); }
}

@media (max-width: 930px) {
  .wrap { width: calc(100% - 48px); }
  .hero { min-height: 440px; padding: 25px 21px 25px 34px; }
  .computer-controls { gap: 5px 7px; }
  .motion { padding: 22px; }
}

@media (max-width: 700px) {
  body { padding-bottom: calc(65px + env(safe-area-inset-bottom)); }
  .wrap { width: calc(100% - 28px); }
  .site-header { grid-template-columns: minmax(0, 1fr) auto; min-height: 68px; gap: 6px; }
  .header-nav { display: none; }
  .header-cta { min-height: 44px; padding-inline: 9px; font-size: .8rem; }
  .surface { border-radius: 19px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 21px 17px 17px; }
  .hero-copy { padding: 4px 3px 3px; }
  .hero h1 { margin-top: 13px; font-size: clamp(3.45rem, 14.4vw, 6.5rem); }
  .signature { margin-left: clamp(15px, 9vw, 65px); font-size: clamp(2.35rem, 8.5vw, 3.75rem); }
  .hero-intro { margin-top: 21px; max-width: 350px; }
  .hero-actions { margin-top: 18px; }
  .computer { width: min(100%, 468px); margin: 10px auto 0; }
  .computer-stage { height: clamp(212px, 65vw, 363px); }
  .stage-halo { width: min(73%, 314px); }
  .computer-controls { gap: 3px 7px; }
  .orbit-button { width: 44px; min-height: 44px; }
  .hero-waves i:nth-child(1) { top: -166px; right: -386px; }
  .hero-waves i:nth-child(2) { top: -162px; right: -362px; }
  .hero-waves i:nth-child(3) { left: -270px; }
  .motion, .contact { grid-template-columns: 1fr; }
  .section { margin-top: 20px; }
  .motion, .contact { padding: 19px; }
  .motion { gap: 16px; }
  .motion-copy { padding: 3px 0; }
  .lab-stage { min-height: 207px; padding: 12px; }
  .contact { gap: 17px; }
  .dock { position: fixed; z-index: 3; inset: auto 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 4px 7px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid #f6fbff; background: #eff6ff; box-shadow: 0 -3px 14px #2d52852e; }
  .dock a { display: grid; justify-items: center; align-content: center; gap: 1px; min-height: 50px; border-radius: 10px; font-size: .7rem; font-weight: 700; }
  .dock a span { display: grid; width: 40px; height: 26px; place-items: center; border-radius: 99px; font-size: .94rem; }
  .dock a:focus-visible { outline-offset: -1px; }
}

@media (max-width: 385px) {
  .hero-actions { gap: 7px; }
  .hero-actions .button { padding-inline: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-copy, .computer { animation: fade-in 140ms var(--ease-out) both; }
  .button, .button::before, .orbit-button, .switch-thumb, .reveal-content { transition: none; }
  .button:hover:not(:active, [aria-pressed="true"]), .orbit-button:hover:not(:active) { transform: none; }
  .reveal-content { transform: none; }
  .stage-satellite::after { animation: none; }
}


/* ———————————————————— Scrapbook ———————————————————— */
.scrapbook { --kraft: #c89f72; --paper: #fffdf7; --pen: #1d3f78; --hot: #f04a24; padding-top: 30px; }
.folder {
  position: relative;
  padding: clamp(12px, 2.2vw, 28px);
  border-radius: 4px 22px 22px 22px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .32 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"),
    var(--kraft);
  box-shadow: inset 0 0 0 1px #ffffff40, inset 0 -6px 0 #0000000f, 0 3px 0 #8a643f70, 0 16px 34px #00000040;
}
.folder-tab {
  position: absolute;
  bottom: calc(100% - 1px);
  left: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 2px 26px 0 18px;
  border-radius: 13px 16px 0 0;
  background: #cfa77b;
  color: #4a3016;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.folder-tab span { color: #2b1c0e; font-weight: 800; }
.binder { position: absolute; z-index: 3; top: -14px; width: 30px; filter: drop-shadow(0 3px 3px #0004); }
.binder--left { left: 22%; }
.binder--right { right: 14%; }

.board {
  container: board / inline-size;
  position: relative;
  border-radius: 6px;
  background: var(--kraft-tex) #f8f6ef;
  box-shadow: 0 2px 0 #00000014, 0 8px 18px #0000002e;
  rotate: -.35deg;
}
.board-inner { --u: 1cqw; position: relative; aspect-ratio: 1.58; }

/* pieces */
.piece {
  position: absolute;
  z-index: var(--z, 1);
  left: var(--x);
  top: var(--y);
  width: var(--w);
  margin: 0;
  rotate: calc(var(--r, 0deg) + var(--tilt, 0deg));
  filter: drop-shadow(0 calc(var(--u) * .15) calc(var(--u) * .2) #00000030) drop-shadow(0 calc(var(--u) * .9) calc(var(--u) * 1.1) #00000024);
  transition: scale 260ms var(--ease-out), rotate 520ms cubic-bezier(.3, 1.6, .5, 1), filter 260ms var(--ease-out);
  user-select: none;
  -webkit-user-select: none;
}
.piece img { display: block; width: 100%; height: auto; -webkit-user-drag: none; }
.piece.is-dragging { scale: 1.045; transition: scale 200ms var(--ease-out), filter 200ms var(--ease-out); filter: drop-shadow(0 calc(var(--u) * .4) calc(var(--u) * .4) #00000030) drop-shadow(0 calc(var(--u) * 2.6) calc(var(--u) * 2.4) #00000038); cursor: grabbing; }

.script { font-family: Allura, cursive; font-weight: 400; line-height: 1; }

/* torn notebook page */
.page {
  position: relative;
  padding: calc(var(--u) * 3.6) calc(var(--u) * 2.4) calc(var(--u) * 3) calc(var(--u) * 4.6);
  background: var(--paper);
}
.page::before {
  position: absolute;
  inset: 0 auto 0 calc(var(--u) * 3.4);
  border-left: 1px solid #ff8f7a99;
  pointer-events: none;
  content: "";
}
.photo {
  position: relative;
  width: 74%;
  margin: 0 0 0 4%;
  padding: calc(var(--u) * .7) calc(var(--u) * .7) calc(var(--u) * 2.8);
  background: #fff;
  box-shadow: 0 1px 2px #0002, 0 calc(var(--u) * .5) calc(var(--u) * 1) #0000001f;
  rotate: 3deg;
}
.photo img { aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 50% 46%; filter: contrast(1.04) saturate(.92); }
.photo figcaption { position: absolute; left: 0; right: 0; bottom: calc(var(--u) * .35); color: var(--pen); font: 400 calc(var(--u) * 2.2)/1 Allura, cursive; text-align: center; }
.hello { position: absolute; top: calc(var(--u) * 14); right: calc(var(--u) * 1.2); color: #9d2d15; font-size: calc(var(--u) * 3.1); rotate: -12deg; pointer-events: none; }
.page h2 { margin-top: calc(var(--u) * 1.6); color: var(--ink); font-size: calc(var(--u) * 3.2); line-height: 1; letter-spacing: -.03em; }
.page-text { margin-top: calc(var(--u) * .8); color: #263c5e; font-size: max(calc(var(--u) * 1.22), 13px); line-height: max(calc(var(--u) * 2.1), 21px); text-wrap: pretty; }
.marker { padding: 0 .1em; background: transparent; color: inherit; box-shadow: inset 0 -.55em #ffe066b8; }
.marker--blue { box-shadow: inset 0 -.55em #9fcaffb0; }
.doodle { position: absolute; fill: var(--hot); }
.doodle--star { right: calc(var(--u) * 2); bottom: calc(var(--u) * 2.4); width: calc(var(--u) * 2.2); rotate: 14deg; }

/* tape */
.tape {
  position: absolute;
  z-index: 2;
  width: calc(var(--u) * 6.5);
  height: calc(var(--u) * 1.9);
  background: #a9c6f0b8;
  box-shadow: 0 1px 2px #0000001a;
  clip-path: polygon(0 0, 4% 14%, 0 28%, 4% 42%, 0 56%, 4% 70%, 0 84%, 4% 100%, 100% 100%, 96% 86%, 100% 72%, 96% 58%, 100% 44%, 96% 30%, 100% 16%, 96% 0);
}
.tape--warm { background: #ffb59ec0; }
.tape--tl { top: calc(var(--u) * -.6); left: calc(var(--u) * -2); rotate: -38deg; }
.tape--tr { top: calc(var(--u) * -.6); right: calc(var(--u) * -2); rotate: 36deg; }
.tape--br { bottom: calc(var(--u) * 2); right: calc(var(--u) * -2.2); rotate: -40deg; }
.tape--top { top: calc(var(--u) * -.9); left: calc(50% - var(--u) * 3.25); rotate: -3deg; }

/* title made of cut-out letters */
.title-script { position: relative; z-index: 2; width: fit-content; margin: 0 0 calc(var(--u) * -1.2) calc(var(--u) * -1.5); color: var(--pen); font-size: calc(var(--u) * 4); rotate: -6deg; }
.cutout { display: flex; flex-wrap: nowrap; gap: calc(var(--u) * .2); margin: 0; font-size: calc(var(--u) * 4.5); line-height: 1; letter-spacing: 0; text-transform: uppercase; }
.cutout span {
  display: inline-grid;
  place-items: center;
  min-width: 1.05em;
  padding: .06em .1em .1em;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 1px 1px #0002, 0 3px 5px #0000001c;
  rotate: var(--lr, 0deg);
}
.cutout span:nth-child(1) { --lr: -6deg; background: var(--ink); color: #fff; }
.cutout span:nth-child(2) { --lr: 4deg; background: #ffd84a; font-family: Georgia, serif; font-style: italic; text-transform: none; }
.cutout span:nth-child(3) { --lr: -3deg; background: var(--hot); color: #2b1c0e; }
.cutout span:nth-child(4) { --lr: 7deg; background: #fff; border-radius: 50%; color: #245cc1; }
.cutout span:nth-child(5) { --lr: -5deg; background: #a9c6f0; font-family: Georgia, serif; }
.cutout span:nth-child(6) { --lr: 3deg; background: #2b1c0e; color: #f6e3c6; }
.label-tape {
  display: inline-block;
  margin: calc(var(--u) * 1.4) 0 0 calc(var(--u) * 3);
  padding: calc(var(--u) * .45) calc(var(--u) * 1.4);
  background: #17345f;
  color: #e7efff;
  font-size: max(calc(var(--u) * .95), 11px);
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #00000080, 0 -1px 0 #ffffff26;
  clip-path: polygon(0 0, 100% 0, 98.5% 50%, 100% 100%, 0 100%, 1.5% 50%);
  rotate: 2deg;
}

/* stickers */
.badge, .burst { display: block; width: 100%; height: auto; overflow: visible; }
.badge text { fill: #fff; font: 800 10.4px Onest, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.badge-spin { transform-origin: 60px 60px; animation: spin 16s linear infinite; }
.burst text { fill: #fff; font: 800 15px Onest, sans-serif; letter-spacing: -.01em; }
.piece--burst .burst { animation: wobble 3.6s ease-in-out infinite; }

/* project shots */
.browser { overflow: hidden; border: calc(var(--u) * .45) solid #fff; border-radius: calc(var(--u) * .8); background: #fff; }
.browser-bar { display: flex; align-items: center; gap: calc(var(--u) * .4); height: calc(var(--u) * 2); padding-inline: calc(var(--u) * .8); background: #eceff4; }
.browser-bar i { width: calc(var(--u) * .6); aspect-ratio: 1; border-radius: 50%; background: #ff6b5b; }
.browser-bar i:nth-child(2) { background: #ffc94a; }
.browser-bar i:nth-child(3) { background: #3fcf7a; }
.browser-bar span { flex: 1; max-width: 50%; margin-left: calc(var(--u) * 1); padding: 0 calc(var(--u) * .6); border-radius: 99px; background: #fff; color: #5a6274; font-size: max(calc(var(--u) * .75), 9px); line-height: 1.6; }
.print { background: #fff; padding: calc(var(--u) * .5); }
.print--torn { padding: calc(var(--u) * .9) calc(var(--u) * 1.1) calc(var(--u) * 1.6); }
.clip { position: absolute; z-index: 2; top: calc(var(--u) * -2.6); left: calc(50% - var(--u) * 2.7); width: calc(var(--u) * 5.4); filter: drop-shadow(0 2px 2px #0005); }
.polaroid { padding: calc(var(--u) * .7) calc(var(--u) * .7) 0; background: #fff; }
.polaroid img { aspect-ratio: 1 / 1.55; object-fit: cover; object-position: top; }
.polaroid figcaption { display: grid; justify-items: center; padding: calc(var(--u) * .4) 0 calc(var(--u) * .7); }
.polaroid .script { color: var(--pen); font-size: calc(var(--u) * 2.3); }
.polaroid small { color: #5a6b85; font-size: max(calc(var(--u) * .8), .75rem); font-weight: 600; }

.note {
  position: absolute;
  z-index: 3;
  right: calc(var(--u) * -1.4);
  bottom: calc(var(--u) * -2.6);
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: calc(var(--u) * .6);
  align-items: baseline;
  padding: calc(var(--u) * .9) calc(var(--u) * 1.4) calc(var(--u) * 1);
  background: var(--paper);
  color: var(--ink);
  font-size: max(calc(var(--u) * 1.25), 13px);
  font-weight: 800;
  line-height: 1.15;
  rotate: var(--nr, 0deg);
}
.note b { grid-row: span 2; align-self: center; color: #c9360f; font-family: Bricolage, Onest, sans-serif; font-size: 1.5em; }
.note small { color: #4c6386; font-size: max(.72em, .75rem); font-weight: 600; }
.note--blue { background: #d9e8ff; }
.piece--clip .note, .piece--browser .note { right: auto; left: calc(var(--u) * -1.6); }

/* sticky note */
.sticky { padding: calc(var(--u) * 1.8) calc(var(--u) * 1.4) calc(var(--u) * 1.4); background: #ffee8c; border-radius: 0 0 calc(var(--u) * 1.6) 0 / 0 0 calc(var(--u) * .6) 0; }
.sticky h3 { color: #3a2e05; font-size: max(calc(var(--u) * 1.35), 13px); letter-spacing: -.01em; }
.sticky ul { display: grid; gap: calc(var(--u) * .35); margin: calc(var(--u) * .7) 0 0; padding: 0; list-style: none; }
.sticky li { display: flex; align-items: center; gap: calc(var(--u) * .45); color: #4b3d0b; font-size: max(calc(var(--u) * 1.1), 12px); font-weight: 600; }
.sticky li svg { width: 1.15em; flex: none; fill: none; stroke: var(--hot); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.paperclip { position: absolute; z-index: 2; top: calc(var(--u) * -2.4); left: calc(var(--u) * 1.4 - 12px); display: grid; justify-items: center; align-items: start; width: 44px; min-height: 44px; padding: 0; border: 0; background: none; rotate: 8deg; cursor: pointer; }
.paperclip svg { display: block; width: max(17px, calc(var(--u) * 1.6)); }

/* doodled arrow + hint */
.arrow { position: absolute; z-index: 4; left: var(--x); top: var(--y); width: var(--w); overflow: visible; pointer-events: none; }
.arrow path { fill: none; stroke: var(--pen); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.arrow text { fill: var(--pen); font: 400 26px Allura, cursive; }
.board-hint { position: absolute; z-index: 1; left: var(--x); top: var(--y); display: grid; justify-items: center; gap: 4px; translate: -50% 0; color: #5a6f92; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.board-reset { min-height: 32px; padding: 3px 12px; border: 1.5px dashed #6f87ad; border-radius: 99px; background: #fffdf7; color: var(--ink); font-size: .78rem; font-weight: 700; cursor: pointer; }

/* ——— motion ——— */
@keyframes spin { to { rotate: 360deg; } }
@keyframes wobble { 0%, 100% { rotate: -4deg; scale: 1; } 50% { rotate: 5deg; scale: 1.05; } }
@keyframes drop-in {
  0% { opacity: 0; transform: translate(var(--fx, 0px), var(--fy, -50px)) rotate(var(--fr, -10deg)) scale(1.22); }
  35% { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes tape-on { from { opacity: 0; scale: 1.6 .7; } to { opacity: 1; scale: 1; } }
@keyframes letter-pop { 0% { opacity: 0; transform: translateY(-.5em) rotate(-25deg) scale(1.6); } 100% { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes write { from { clip-path: inset(-30% 100% -30% 0); } to { clip-path: inset(-30% -10% -30% -10%); } }

.js-board .piece:not(.is-in), .js-board .piece:not(.is-in) :is(.tape, .cutout span, .clip, .paperclip, .hello, .title-script), .js-board .board:not(.is-in) .board-hint { opacity: 0; }
.js-board .board:not(.is-in) .arrow path, .js-board .piece:not(.is-in) .sticky li svg { stroke-dashoffset: 1; }
.js-board .board:not(.is-in) .arrow text { opacity: 0; }
.piece.is-in { animation: drop-in 950ms cubic-bezier(.18, 1.25, .4, 1) calc(var(--i) * 120ms) both; }
.piece.is-in :is(.tape, .clip, .paperclip) { animation: tape-on 380ms cubic-bezier(.3, 1.5, .5, 1) calc(var(--i) * 120ms + 620ms) both; }
.piece.is-in .cutout span { animation: letter-pop 520ms cubic-bezier(.3, 1.6, .5, 1) calc(var(--i) * 120ms + 250ms + var(--k) * 70ms) both; }
.piece.is-in :is(.hello, .title-script) { animation: write 900ms ease-out calc(var(--i) * 120ms + 900ms) both; }
.board.is-in .arrow text { animation: write 900ms ease-out 1.55s both; }
.board.is-in .arrow path { animation: draw 800ms ease-in-out 1.6s both; }
.board.is-in .arrow path + path { animation-delay: 2.3s; animation-duration: 300ms; }
.piece.is-in .sticky li svg { animation: draw 360ms ease-out both; }
.piece.is-in .sticky li:nth-child(1) svg { animation-delay: 1.9s; }
.piece.is-in .sticky li:nth-child(2) svg { animation-delay: 2.1s; }
.piece.is-in .sticky li:nth-child(3) svg { animation-delay: 2.3s; }
.piece.is-in .sticky li:nth-child(4) svg { animation-delay: 2.5s; }
.board.is-in .board-hint { animation: fade-in 500ms ease 2.6s both; }
.piece.is-settled { animation: none; }

@media (hover: hover) and (pointer: fine) {
  .board.is-draggable .piece { cursor: grab; }
  .board.is-draggable .piece:hover:not(.is-dragging) { scale: 1.025; }
  .board-reset:hover { background: #fff; border-style: solid; }
}

/* flow layout for narrow boards */
@container board (max-width: 760px) {
  .board-inner { --u: 8.4px; display: grid; grid-auto-flow: row dense; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 46px 18px; aspect-ratio: auto; padding: 34px 18px 40px; }
  .piece { position: relative; left: auto; top: auto; width: auto; rotate: calc(var(--r) * .6 + var(--tilt, 0deg)); }
  .piece--page { grid-column: 1 / -1; width: min(100%, 420px); justify-self: center; }
  .piece--title { grid-column: 1 / -1; justify-self: center; }
  .piece--badge { position: absolute; top: -10px; right: 6px; width: 92px; z-index: 5; }
  .piece--burst { position: absolute; top: 47%; right: -6px; width: 96px; z-index: 5; }
  .piece--browser, .piece--torn { grid-column: 1 / -1; }
  .piece--clip { grid-column: 1 / -1; width: 88%; justify-self: end; }
  .piece--polaroid { width: 82%; justify-self: center; }
  .piece--sticky { align-self: center; }
  .cutout { font-size: 44px; }
  .title-script { font-size: 38px; }
  .page h2 { font-size: 30px; }
  .hello { top: 150px; font-size: 27px; }
  .arrow, .board-hint { display: none; }
}
@container board (max-width: 380px) {
  .board-inner { --u: 7.6px; gap: 42px 12px; padding-inline: 12px; }
  .piece--burst { width: 80px; }
  .cutout { font-size: 36px; }
}

@media (max-width: 700px) {
  .scrapbook { padding-top: 26px; }
  .folder { padding: 10px; }
  .binder { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .badge-spin, .piece--burst .burst { animation: none; }
  .piece.is-in:not(.is-settled), .piece.is-in :is(.tape, .clip, .paperclip, .cutout span, .hello, .title-script, .sticky li svg), .board.is-in :is(.arrow text, .arrow path, .board-hint) { animation: fade-in 200ms ease both; }
  .marker { transition: none; }
  .piece { transition: none; }
}

/* The folder, work line and contact sheet share the same paper and ink. */
:root {
  --paper: #fffdf7;
  --pen: #1d3f78;
  --hot: #e74722;
  --sun: #ffdf54;
  --paper-shadow: 0 3px 0 #00000021, 0 12px 24px #00000024;
}
body { background-color: #dde4ec; }
.site-header { min-height: 61px; }
.scrapbook.section { margin-top: 6px; }
:is(.button,.board-reset,.lab-tabs button,.orbit-button,.demo-switch) {
  --fill: var(--sun);
  --button-shadow: #b68334;
  border-color: #9c6a24;
  background: var(--fill);
  color: #2a2415;
}
.button::before { box-shadow: 0 4px 0 var(--button-shadow), 0 8px 14px #0000003d; }
:is(.button,.board-reset):focus-visible { outline-color: #15458e; }
.note a, .polaroid a { display: block; min-height: 32px; }
.note a:focus-visible, .polaroid a:focus-visible { outline-offset: 1px; }
.note a:hover, .polaroid a:hover { color: #9d2d15; }
.board-jump { position: absolute; left: 7.5%; top: 87%; z-index: 4; white-space: nowrap; }
.board-hint { z-index: 4; }
.board-reset { min-height: 40px; box-shadow: 0 3px 0 #b68334; transition: transform 140ms var(--ease-out); }
.board-reset:active { transform: translateY(3px); box-shadow: none; }
.board-reset:hover { background: #ffe88a; }
.page h2 { text-wrap: balance; }
.polaroid img { aspect-ratio: 9 / 15; object-fit: cover; object-position: center top; }

.project-gallery {
  position: relative;
  margin: 58px 0 48px;
  padding: 26px clamp(14px, 4vw, 57px) 50px;
  border-radius: 4px 7px 9px 7px;
  background: #f8f6ed;
  box-shadow: 0 4px 0 #a780598c, 0 12px 32px #00000028;
}
.gallery-head {
  position: relative;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px 28px;
  margin-bottom: 34px;
  padding: 15px 8px 23px;
  border-bottom: 2px solid #263d60;
}
.gallery-head .script { color: #3b2410; font-size: clamp(1.85rem, 3vw, 2.9rem); }
.gallery-head h2 { margin-top: 1px; font-size: clamp(2.2rem, 5.2vw, 5rem); font-family: Bricolage, Onest, sans-serif; }
.gallery-head > p { max-width: 260px; padding-bottom: 3px; color: #385275; font-size: .94rem; text-wrap: pretty; }
.case-line { display: grid; gap: clamp(29px, 5vw, 67px); }
.case {
  --lean: -2.5deg;
  --case-paper: #ecf2ff;
  --strand-x: 24%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 5vw, 74px);
  padding: 37px 13px 13px;
  border-top: 1.5px solid #8b6340a3;
  scroll-margin-top: 22px;
}
.case:nth-child(2n) { --lean: 2.7deg; --case-paper: #fae7c6; --strand-x: 76%; }
.case:nth-child(3n) { --case-paper: #dbeafa; }
.case:nth-child(2n) .case-print { grid-column: 2; grid-row: 1; }
.case:nth-child(2n) .case-note { grid-column: 1; grid-row: 1; }
.case::before, .archive-case::before {
  position: absolute;
  z-index: 1;
  top: -3px;
  left: var(--strand-x);
  width: 2px;
  height: 42px;
  background: #9d6a42;
  box-shadow: 2px 1px 1px #00000022;
  content: "";
}
.case::after, .archive-case::after {
  position: absolute;
  z-index: 2;
  top: -5px;
  left: calc(var(--strand-x) - 3px);
  width: 8px;
  height: 8px;
  border: 1px solid #ad3419;
  border-radius: 50%;
  background: #ea694a;
  box-shadow: 0 1px 2px #00000057;
  content: "";
}
.case-print {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  margin: 0;
  padding: 10px 10px 12px;
  border-radius: 3px;
  background: var(--paper);
  box-shadow: var(--paper-shadow);
  transform: rotate(var(--lean));
  transform-origin: 50% 0;
}
.case-print::after {
  position: absolute;
  right: -15px;
  bottom: 9px;
  width: 68px;
  height: 23px;
  background: #92b6e6af;
  transform: rotate(-32deg);
  content: "";
}
.case-print img { display: block; width: 100%; aspect-ratio: 1.6; object-fit: cover; object-position: center top; border-radius: 2px; background: var(--case-paper); }
.case--portrait .case-print { background: var(--case-paper); }
.case--portrait .case-print img { width: auto; max-width: 100%; height: clamp(205px, 25vw, 335px); aspect-ratio: auto; object-fit: contain; box-shadow: 0 5px 12px #00000032; }
.line-clip { position: absolute; z-index: 2; top: -15px; left: calc(50% - 17px); width: 34px; height: 21px; border-radius: 3px 3px 6px 6px; background: #1d2636; box-shadow: inset 0 5px #54617a, inset 0 -5px #354561, 0 3px 4px #00000062; }
.line-clip::before { position: absolute; top: -8px; left: 9px; width: 16px; height: 11px; border: 2px solid #a9afbb; border-bottom: 0; border-radius: 9px 9px 0 0; content: ""; }
.case-note { position: relative; padding: clamp(18px, 3vw, 35px); border: 1px solid #f8f4e9; border-radius: 3px 6px 10px 3px; background: var(--paper); box-shadow: var(--paper-shadow); transform: rotate(.65deg); }
.case:nth-child(2n) .case-note { transform: rotate(-.65deg); }
.case-note::before { position: absolute; top: -7px; left: 24px; width: 77px; height: 18px; background: #ffcb827f; transform: rotate(-5deg); content: ""; }
.case-kind { color: #845324; font-size: .8rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.case h3, .archive-case h4 { margin: 7px 0 9px; font-family: Bricolage, Onest, sans-serif; font-weight: 800; line-height: 1.02; overflow-wrap: anywhere; }
.case h3 { font-size: clamp(1.8rem, 3.2vw, 3.35rem); }
.case-note > p:not(.case-kind), .archive-paper > p:not(.case-kind) { margin-top: 8px; color: #334e70; }
.case-summary { font-weight: 700; }
.case-tools { width: fit-content; max-width: 100%; padding: 3px 8px; background: #e4edf9; font-size: .78rem; font-weight: 700; overflow-wrap: anywhere; }
.archive-title { margin: 63px 0 28px; font-family: Bricolage, Onest, sans-serif; font-size: clamp(1.9rem, 3.8vw, 3.2rem); font-weight: 800; }
.archive-line { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 29px 32px; }
.archive-case { --strand-x: 50%; --lean: -1.1deg; position: relative; padding: 34px 4% 6px; border-top: 1.5px solid #8b6340a3; scroll-margin-top: 22px; }
.archive-case:nth-child(2n) { --lean: 1.1deg; }
.archive-paper {
  position: relative;
  height: 100%;
  padding: 20px;
  border-radius: 3px;
  background: #fff8dd;
  box-shadow: var(--paper-shadow);
  transform: rotate(var(--lean));
  transform-origin: 50% 0;
}
.archive-case:nth-child(3n + 1) .archive-paper { background-color: #e6eefb; }
.archive-case:nth-child(3n + 2) .archive-paper { background-color: #fcf9ee; }
.archive-case h4 { font-size: clamp(1.3rem, 2.3vw, 2rem); }
.archive-paper p { font-size: .91rem; }
.archive-paper .case-kind { font-size: .72rem; }
.archive-paper .case-tools { background: #fff9; font-size: .75rem; }

.motion.surface, .contact.surface {
  position: relative;
  margin-top: 40px;
  border: 1px solid #fff9;
  border-radius: 6px 9px 11px 6px;
  box-shadow: var(--paper-shadow);
}
.motion.surface {
  grid-template-columns: minmax(0, .46fr) minmax(0, 1fr);
  align-items: center;
  padding: 29px;
  background: var(--paper);
}
.motion-copy { min-width: 0; }
.motion-copy h2 { font-size: clamp(2rem, 4vw, 4.1rem); }
.motion-copy h2 span, .contact h2 span { color: var(--hot); }
.motion-workbench { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; align-items: center; }
.motion-workbench .computer { margin: 0; max-width: none; width: 100%; }
.computer-stage { height: clamp(220px, 23vw, 330px); }
.computer-controls p { color: #315284; }
.orbit-button { box-shadow: 0 3px 0 #bb874d, 0 5px 10px #754d1732; }
.orbit-button:hover:not(:active) { background: #ffe787; }
.lab-tabs button { font-size: .81rem; box-shadow: 0 3px 0 #b68334; }
.lab-tabs button[aria-selected="true"] { background: #ffe78b; border-color: #523718; color: #2f271b; box-shadow: inset 0 2px 0 #b6833470; }
.lab-stage { border-color: #c8a779; border-radius: 6px; background: var(--kraft-tex) #ebd5b1; box-shadow: var(--paper-shadow); transform: rotate(1.5deg); }
.lab-window { border-color: #a5b4c8; border-radius: 7px; background: var(--paper); box-shadow: var(--paper-shadow); }
.lab-toolbar { background: #e4ebf7; }
.demo-switch[aria-checked="true"] { background: #f2bf30; }
.contact.surface {
  background: #fdf7e4;
  color: var(--ink);
}
.contact .eyebrow { color: var(--pen); }
.contact-link { min-height: 54px; }
.contact a:focus-visible { outline-color: #15458e; }
.site-footer { color: #294870; }

.paper-flight {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 4;
  display: grid;
  width: 54px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  animation: takeoff 850ms var(--ease-out) both;
}
.paper-flight span { position: absolute; inset: 0; filter: drop-shadow(1px 3px 2px #0000004d); transform-origin: center; }
.paper-flight span::before, .paper-flight span::after, .paper-flight b {
  position: absolute;
  inset: 0;
  content: "";
}
.paper-flight span::before { background: #fffdf1; clip-path: polygon(3% 10%, 98% 49%, 32% 51%); }
.paper-flight span::after { background: #b9d2ed; clip-path: polygon(32% 51%, 98% 49%, 36% 91%); }
.paper-flight b { background: #7292ba; clip-path: polygon(32% 51%, 98% 49%, 41% 67%, 36% 91%); }
.paper-flight i { position: absolute; right: 44px; top: 20px; width: 58px; height: 9px; border-bottom: 2px dashed #5379b1a3; border-radius: 50%; pointer-events: none; }
[data-hanging].has-entered :is(.case-print,.archive-paper) { animation: paper-settle 700ms var(--ease-out) both; }
@keyframes paper-settle {
  0% { transform: translateY(-6px) rotate(calc(var(--lean) - 5deg)); opacity: .72; }
  62% { transform: rotate(calc(var(--lean) + 1.3deg)); opacity: 1; }
  100% { transform: rotate(var(--lean)); opacity: 1; }
}
@keyframes takeoff {
  from { translate: -64px 30px; }
  to { translate: 0 0; }
}

@container board (max-width: 760px) {
  .board-jump { position: static; justify-self: start; align-self: center; grid-column: 1 / -1; white-space: normal; }
  .piece--title { z-index: 2; }
  .note a, .polaroid a { min-height: 44px; }
}
@media (max-width: 830px) {
  .motion.surface { grid-template-columns: 1fr; gap: 14px; }
  .motion-workbench { gap: 20px; }
  .motion-copy { padding-inline: 9px; }
}
@media (max-width: 700px) {
  .site-header { min-height: 64px; }
  .scrapbook.section { margin-top: 1px; }
  .project-gallery { margin-top: 35px; padding-inline: 13px; padding-bottom: 26px; }
  .gallery-head { flex-direction: column; align-items: flex-start; gap: 7px; margin-bottom: 23px; padding-bottom: 13px; }
  .gallery-head > p { max-width: none; }
  .case, .case:nth-child(2n) { --strand-x: 50%; grid-template-columns: 1fr; gap: 16px; padding-inline: 5px; padding-top: 32px; }
  .case:nth-child(2n) .case-print { grid-column: auto; grid-row: auto; }
  .case:nth-child(2n) .case-note { grid-column: auto; grid-row: auto; }
  .case-print::after { right: -6px; width: 49px; }
  .case--portrait .case-print img { height: min(78vw, 350px); }
  .archive-title { margin-top: 40px; margin-bottom: 21px; }
  .archive-line { grid-template-columns: 1fr; gap: 22px; }
  .motion-workbench { grid-template-columns: 1fr; }
  .motion-workbench .computer { width: min(100%, 395px); margin: auto; }
  .motion.surface, .contact.surface { margin-top: 29px; padding: 20px; }
  .paper-flight { width: 46px; height: 44px; }
  .paper-flight i { right: 31px; top: 13px; width: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-hanging].has-entered :is(.case-print,.archive-paper) { animation: none; }
}


/* ———————————————————— Tape marquee ———————————————————— */
html, body { overflow-x: clip; }
.tape-run { position: relative; z-index: 2; height: 110px; margin: 26px calc(50% - 50vw) -40px; overflow: hidden; pointer-events: none; }
.tape-strip {
  position: absolute;
  left: -5%;
  width: 110%;
  padding: 9px 0 8px;
  box-shadow: 0 3px 0 #0000001a, 0 8px 16px #26355126;
  font: 800 1.02rem/1 Onest, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, 99.6% 50%, 100% 100%, 0 100%, .4% 50%);
}
.tape-strip p { display: flex; width: max-content; animation: tape-roll 38s linear infinite; }
.tape-strip--blue { top: 22px; background: #1d3f78; color: #e7efff; rotate: -2.2deg; }
.tape-strip--sun { top: 54px; background: #ffdf54e6; color: #3a2a00; rotate: 1.6deg; }
.tape-strip--sun p { animation-direction: reverse; animation-duration: 30s; }
@keyframes tape-roll { to { transform: translateX(-50%); } }

/* ———————————————————— Toolbox + receipt ———————————————————— */
.desk { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: clamp(22px, 4vw, 52px); align-items: start; margin: 10px 0 48px; }
.desk-sheet {
  position: relative;
  padding: clamp(20px, 3.4vw, 40px);
  border-radius: 8px;
  background: #f3f1ea;
  box-shadow: 0 4px 0 #a780598c, 0 12px 32px #00000028;
  rotate: -.6deg;
}
.desk-sheet::before { position: absolute; top: -12px; left: 42%; width: 120px; height: 28px; background: #ffb59ec0; rotate: 3deg; content: ""; }
.desk-head .script { color: var(--hot); font-size: clamp(1.7rem, 2.8vw, 2.5rem); }
.desk-head h2 { margin-top: 0; font-family: Bricolage, Onest, sans-serif; font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: .95; }
.desk-head > p:last-child { max-width: 420px; margin-top: 10px; color: #385275; font-size: .94rem; text-wrap: pretty; }

.sticker-sheet { display: flex; flex-wrap: wrap; gap: 16px 14px; align-items: center; margin: 26px 0 0; padding: 0; list-style: none; }
.sticker {
  --lift: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 15px;
  background: var(--c);
  color: var(--t);
  font: 800 1rem/1 Bricolage, Onest, sans-serif;
  letter-spacing: -.01em;
  box-shadow: 0 0 0 4px #fff, 0 1px 0 4px #00000014;
  filter: drop-shadow(0 2px 2px #00000030) drop-shadow(0 calc(4px + var(--lift)) calc(6px + var(--lift)) #00000024);
  rotate: var(--r);
  translate: var(--dx, 0px) var(--dy, 0px);
  transition: rotate 380ms var(--ease-out), scale 220ms var(--ease-out), filter 220ms var(--ease-out);
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
}
.sticker b { display: inline-grid; place-items: center; min-width: 1.9em; height: 1.9em; padding: 0 .3em; border: 1.5px dashed currentColor; border-radius: 99px; font: 700 .8rem/1 Onest, sans-serif; }
.sticker--circle { flex-direction: column; justify-content: center; gap: 4px; width: 104px; aspect-ratio: 1; padding: 8px; border-radius: 50%; text-align: center; }
.sticker--pill { border-radius: 99px; padding-inline: 19px; }
.sticker--rect { border-radius: 4px; }
.sticker--badge { border-radius: 16px 4px 16px 4px; padding: 14px 16px; font-size: 1.08rem; }
/* peeling corner */
.sticker:not(.sticker--circle)::after {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 22px;
  height: 22px;
  background: #efe9dc;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  border-top-left-radius: 6px;
  box-shadow: -2px -2px 4px #0000001f;
  scale: 0;
  transform-origin: 100% 100%;
  transition: scale 260ms var(--ease-out);
  content: "";
}
.sticker.is-dragging { --lift: 16px; scale: 1.08; z-index: 5; cursor: grabbing; transition: scale 200ms var(--ease-out), filter 200ms var(--ease-out); }
.sticker-reset { margin-top: 22px; min-height: 40px; padding: 4px 14px; border: 1px solid #9c6a24; border-radius: 11px; background: var(--sun); box-shadow: 0 3px 0 #b68334; color: #2a2415; font-weight: 700; cursor: pointer; }
.sticker-reset:active { translate: 0 3px; box-shadow: none; }

@media (hover: hover) and (pointer: fine) {
  .sticker { cursor: grab; }
  .sticker:hover:not(.is-dragging) { --lift: 6px; scale: 1.05; rotate: calc(var(--r) * -.4); }
  .sticker:hover::after { scale: 1; }
}

/* receipt */
.receipt-desk { position: relative; padding-top: 4px; }
.printer { position: relative; z-index: 3; height: 34px; margin: 0 -14px; border-radius: 12px 12px 6px 6px; background: #262d3e; box-shadow: 0 6px 14px #00000055, inset 0 1px 0 #ffffff2a; }
.printer i { position: absolute; left: 6%; right: 6%; bottom: 7px; height: 5px; border-radius: 3px; background: #0b0f18; }
.printer::after { position: absolute; top: 11px; right: 18px; width: 7px; height: 7px; border-radius: 50%; background: #3fcf7a; box-shadow: none; content: ""; animation: blink 1.4s steps(2) infinite; }
.receipt-roll { position: relative; z-index: 2; margin-top: -9px; overflow: hidden; padding: 0 8px 26px; }
.receipt {
  --tooth: 11px;
  padding: 26px 22px calc(28px + var(--tooth));
  background: #fffefa;
  color: #23262e;
  font: 500 .86rem/1.5 ui-monospace, "Cascadia Mono", Consolas, "Courier New", monospace;
  box-shadow: 0 10px 22px #00000026;

  rotate: .8deg;
}
.receipt-brand { padding-bottom: 12px; border-bottom: 2px dashed #9aa0ab; font-weight: 800; letter-spacing: .32em; text-align: center; }
.receipt-brand small { font-weight: 500; letter-spacing: .12em; opacity: .75; }
.receipt-meta, .receipt-total { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; text-transform: uppercase; }
.receipt-title { margin: 16px 0 6px; font: 800 1.05rem/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace; letter-spacing: .04em; text-transform: uppercase; }
.receipt-lines { display: grid; gap: 4px; margin: 0; padding: 0 0 12px; border-bottom: 2px dashed #9aa0ab; list-style: none; counter-reset: line; }
.receipt-lines li { display: flex; align-items: baseline; gap: 6px; counter-increment: line; }
.receipt-lines li::before { content: counter(line, decimal-leading-zero); opacity: .55; }
.receipt-lines i { flex: 1; border-bottom: 2px dotted #b9bdc6; translate: 0 -4px; }
.receipt-lines b { color: var(--hot); }
.receipt-total { padding-top: 12px; border-top: 2px solid #23262e; font-weight: 800; }
.receipt-total span:last-child { max-width: 60%; text-align: right; text-transform: none; }
.barcode { height: 54px; margin: 20px 4px 4px; background: none; border-block: 4px dashed #23262e; }
.receipt-thanks { margin-top: 10px; color: var(--pen); font-size: 2.3rem; text-align: center; }
.stamp {
  position: absolute;
  z-index: 4;
  right: -16px;
  bottom: 34px;
  display: grid;
  place-items: center;
  width: 128px;
  aspect-ratio: 1;
  border: 4px double #a8290c;
  border-radius: 50%;
  color: #a8290c;
  font: 800 .78rem/1.05 Onest, sans-serif;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
  rotate: -14deg;
  mix-blend-mode: multiply;
}
.stamp b { margin-top: -18px; font: 400 2.5rem/1 Allura, cursive; letter-spacing: 0; text-transform: none; }
.stamp:hover { background: #a8290c14; }
.stamp:focus-visible { outline-offset: 4px; }

/* ——— desk motion ——— */
@keyframes blink { 50% { opacity: .25; } }
@keyframes slap { 0% { opacity: 0; scale: 1.7; rotate: calc(var(--r) + 25deg); } 60% { opacity: 1; } 100% { opacity: 1; scale: 1; rotate: var(--r); } }
@keyframes print {
  0% { transform: translateY(-101%); }
  18% { transform: translateY(-80%); } 24% { transform: translateY(-78%); }
  44% { transform: translateY(-52%); } 50% { transform: translateY(-50%); }
  72% { transform: translateY(-22%); } 78% { transform: translateY(-20%); }
  100% { transform: translateY(0); }
}
@keyframes stamp-in { 0% { opacity: 0; scale: 2.4; } 70% { opacity: 1; scale: .94; } 100% { opacity: 1; scale: 1; } }
@keyframes tick { from { opacity: 0; scale: 2; } to { opacity: 1; scale: 1; } }

.js-desk .desk:not(.is-in) :is(.sticker, .stamp, .receipt-lines b) { opacity: 0; }
.js-desk .desk:not(.is-in) .receipt { transform: translateY(-101%); }
.desk.is-in .sticker { animation: slap 520ms var(--ease-out) calc(var(--s) * 70ms + 150ms) both; }
.desk.is-in .sticker.is-placed { animation: none; }
.desk.is-in .receipt { animation: print 2.4s cubic-bezier(.4, 0, .6, 1) 300ms both; }
.desk.is-in .receipt-lines b { animation: tick 300ms var(--ease-out) both; }
.desk.is-in .receipt-lines li:nth-child(1) b { animation-delay: 2.8s; }
.desk.is-in .receipt-lines li:nth-child(2) b { animation-delay: 3s; }
.desk.is-in .receipt-lines li:nth-child(3) b { animation-delay: 3.2s; }
.desk.is-in .receipt-lines li:nth-child(4) b { animation-delay: 3.4s; }
.desk.is-in .receipt-lines li:nth-child(5) b { animation-delay: 3.6s; }
.desk.is-in .receipt-lines li:nth-child(6) b { animation-delay: 3.8s; }
.desk.is-in .stamp { animation: stamp-in 420ms cubic-bezier(.5, 0, .75, 1) 4.2s both; }

@media (max-width: 900px) {
  .desk { grid-template-columns: 1fr; }
  .receipt-desk { width: min(100%, 380px); justify-self: center; }
}
@media (max-width: 700px) {
  .sticker-sheet { gap: 13px 11px; }
  .sticker { font-size: .9rem; padding: 8px 12px; }
  .sticker--circle { width: 88px; }
  .stamp { right: -4px; width: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  .desk.is-in :is(.sticker, .receipt, .receipt-lines b, .stamp) { animation: fade-in 200ms ease both; }
  .sticker, .sticker::after { transition: none; }
}

/* ════════════════════ THE DESK ════════════════════ */
/* Whitewashed wooden desk: flat colour + grain texture + plank seams. No gradients. */
body {
  position: relative;
  background-color: #dde4ec;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='260'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0025 .11' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .33 0 0 0 0 .4 0 0 0 0 .5 .9 0 0 0 -.38'/%3E%3C/filter%3E%3Crect width='700' height='260' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .34 0 0 0 0 .4 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, .site-header, .site-footer { position: relative; z-index: 1; }
.wrap { width: min(1240px, calc(100% - 72px)); }

.desk-world { position: absolute; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; }
.obj {
  position: absolute;
  left: calc(50% + var(--x));
  top: var(--y);
  width: var(--w);
  rotate: var(--r);
  filter: drop-shadow(0 2px 1px #00000033) drop-shadow(0 calc(4px + var(--d) * 40px) calc(6px + var(--d) * 40px) #0000002e);
  will-change: translate;
}
.obj svg { display: block; width: 100%; height: auto; }
@media (max-width: 1100px) { .obj--wide { display: none; } }
@media (max-width: 700px) {
  .obj { width: calc(var(--w) * .55); }
  /* The objects hidden on phones (plant, second mug, laptop) are all .obj--wide, already hidden below 1100px.
     The old .obj:nth-child(3n) rule broke when the laptop was added first, so it is gone. */
  .wrap { width: calc(100% - 28px); }
}

/* ════════════════════ ZONE MATERIALS ════════════════════ */
@keyframes slide-onto-desk {
  from { transform: translateY(70px) rotate(var(--arrive, 1.6deg)); opacity: .4; }
  to { transform: none; opacity: 1; }
}
@supports (animation-timeline: view()) {
  :is(.desk-sheet, .receipt-desk, .motion.surface) {
    animation: slide-onto-desk linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 55%;
  }
  .desk-sheet { --arrive: -1.8deg; }
}

/* — Zone 2: cork board in a wooden frame — */
.project-gallery {
  padding-top: 40px;
  border: 16px solid #8b5a34;
  border-radius: 8px;
  background-color: #c4935f;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .32 0 0 0 0 .19 0 0 0 0 .08 0 0 0 1.5 -.62'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23c)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='90'%3E%3Cfilter id='l'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .92 0 0 0 0 .78 0 0 0 1.4 -.85'/%3E%3C/filter%3E%3Crect width='90' height='90' filter='url(%23l)'/%3E%3C/svg%3E");
  box-shadow: inset 0 0 0 2px #6e4527, inset 0 3px 10px #00000066, 0 5px 0 #5d3a1f, 0 18px 36px #00000040;
}
.gallery-head {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto 0;
  margin-bottom: 44px;
  padding: 22px 28px 20px;
  border: 0;
  background: var(--paper);
  box-shadow: var(--paper-shadow);
  rotate: -1.2deg;
}
.gallery-head::before, .gallery-head::after { position: absolute; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: #e74722; box-shadow: 0 2px 0 #9e2c12, 2px 5px 4px #0000004d; content: ""; }
.gallery-head::before { left: 12px; }
.gallery-head::after { right: 12px; background: #2f6fd1; box-shadow: 0 2px 0 #1d3f78, 2px 5px 4px #0000004d; }
.project-gallery { display: flow-root; }
.gallery-head { margin-left: 0; }
.case, .archive-case { border-top-color: #f3ead7; border-top-width: 2.5px; }
.case::before, .archive-case::before { background: #f3ead7; }

/* — project formats — */
.case-print { isolation: isolate; }
/* 1. browser window */
.case--browser .case-print { padding: 34px 8px 8px; border-radius: 9px; background: #fff; }
.print-bar { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 9px 9px 0 0; background: #e9edf3; }
.print-bar i { width: 9px; height: 9px; border-radius: 50%; background: #ff6b5b; }
.print-bar i:nth-child(2) { background: #ffc94a; }
.print-bar i:nth-child(3) { background: #3fcf7a; }
.print-bar span { margin-left: 12px; padding: 1px 12px; border-radius: 99px; background: #fff; color: #5a6274; font-size: .72rem; font-weight: 600; }
/* 2. ID badge on a lanyard */
.case--badge .case-print { padding: 34px 14px 16px; border: 3px solid #d7e0ec; border-radius: 16px; background: #fbfdff; }
.case--badge .case-print::before { position: absolute; top: 12px; left: calc(50% - 22px); width: 44px; height: 9px; border-radius: 6px; background: #c4935f; box-shadow: inset 0 2px 2px #0000004d; content: ""; }
.case--badge .line-clip { top: -26px; }
.badge-strap { position: absolute; z-index: -1; top: -64px; left: calc(50% - 15px); width: 30px; height: 56px; background: #1d3f78; box-shadow: inset 10px 0 #2f6fd1, inset -10px 0 #2f6fd1; clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%); }
/* 3. instant photo with a handwritten caption */
.case--snap .case-print { padding: 14px 14px 64px; background: #fff; }
.case--snap .case-print::after { right: auto; left: 0; bottom: 14px; width: 100%; height: auto; background: none; color: var(--pen); font: 400 2.1rem/1 Allura, cursive; text-align: center; transform: none; content: attr(data-caption); }
.case--snap .case-print img { box-shadow: none; }
/* 4. film negative */
.case--film .case-print { padding: 34px 26px; border-radius: 2px; background: #1b1a1f; }
.case--film .case-print img { filter: saturate(1.15) contrast(1.05); }
.film-label { position: absolute; left: 30px; right: 30px; bottom: 24px; display: flex; justify-content: space-between; color: #ffb44a; font: 700 .62rem/1 ui-monospace, Consolas, monospace; letter-spacing: .16em; translate: 0 100%; }
.case--film .case-print::after { display: none; }
/* 5. game cartridge */
.case--cartridge .case-print { padding: 40px 22px 58px; border-radius: 14px 14px 6px 6px; background: #3a3f4c; clip-path: polygon(0 0, 100% 0, 100% 86%, 94% 86%, 94% 100%, 6% 100%, 6% 86%, 0 86%); }
.case--cartridge .case-print::before { position: absolute; top: 12px; left: 22px; right: 22px; height: 16px; background: #2b2f39; content: ""; }
.case--cartridge .case-print::after { display: none; }
.case--cartridge .case-print img { border: 4px solid #fff; border-radius: 4px; }
.case--cartridge .line-clip { display: none; }
.cart-label { position: absolute; left: 9%; right: 9%; bottom: 22px; display: flex; justify-content: space-between; align-items: baseline; color: #ffdf54; font: 800 1rem/1 Bricolage, Onest, sans-serif; letter-spacing: .12em; }
.cart-label small { color: #d6dae3; font: 600 .7rem/1 Onest, sans-serif; letter-spacing: .04em; }
/* 6. ripped magazine page */
.case--ripped .case-print { padding: 22px 14px; background: #f6f1e4; clip-path: polygon(0% 3%, 6% 0%, 12% 2.5%, 19% .5%, 27% 3%, 34% 1%, 41% 3.5%, 49% .8%, 57% 2.6%, 64% .3%, 72% 3%, 80% 1%, 88% 3.2%, 95% .6%, 100% 2.4%, 100% 97%, 94% 100%, 87% 97.5%, 79% 99.5%, 71% 97%, 63% 99.2%, 55% 96.8%, 47% 99.4%, 39% 97.2%, 31% 99.6%, 23% 97%, 15% 99.3%, 8% 97.4%, 0% 99%); }
.case--ripped .case-print::after { display: none; }
.case--ripped .line-clip { display: none; }
.case--ripped { --strand-x: 76%; }
/* 7. postcard */
.case--postcard .case-print { padding: 14px 14px 14px; border-radius: 3px; background: #fbf4e3; }
.post-stamp { position: absolute; z-index: 2; top: -16px; right: -14px; display: grid; place-items: center; width: 76px; height: 90px; padding: 6px; background: #fbf4e3; rotate: 6deg; }
.post-stamp span { display: grid; place-items: center; width: 100%; height: 100%; background: #e74722; color: #fff; font: 800 .56rem/1 Onest, sans-serif; letter-spacing: .1em; writing-mode: vertical-rl; }
.postmark { position: absolute; z-index: 3; top: 4px; right: 40px; width: 92px; height: 60px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 92 60'%3E%3Cg fill='none' stroke='%231d3f78' stroke-width='2' opacity='.7'%3E%3Ccircle cx='30' cy='30' r='24'/%3E%3Ccircle cx='30' cy='30' r='18'/%3E%3Cpath d='M56 18c6-4 12 4 18 0s12 4 18 0M56 30c6-4 12 4 18 0s12 4 18 0M56 42c6-4 12 4 18 0s12 4 18 0'/%3E%3C/g%3E%3Ctext x='30' y='34' font-family='Arial' font-size='9' font-weight='700' fill='%231d3f78' opacity='.75' text-anchor='middle'%3EASTANA%3C/text%3E%3C/svg%3E") no-repeat center / contain; rotate: -12deg; pointer-events: none; }
.case--postcard .case-print::after { display: none; }
.case--postcard .line-clip { display: none; }

/* — archive: wooden card-catalogue drawer — */
.cabinet { margin-top: 64px; }
.archive-title { width: fit-content; margin: 0 0 18px; padding: 8px 18px; background: #17345f; color: #e7efff; font-family: Onest, sans-serif; font-size: clamp(1rem, 1.6vw, 1.25rem); letter-spacing: .2em; text-transform: uppercase; rotate: -1.5deg; clip-path: polygon(0 0, 100% 0, 98.5% 50%, 100% 100%, 0 100%, 1.5% 50%); }
.drawer-body { position: relative; overflow: hidden; padding: 18px 22px 8px; border: 12px solid #6f4426; border-bottom: 0; border-radius: 6px 6px 0 0; background: #4a2e1a; transition: max-height 700ms var(--ease-out); }
.drawer-body .archive-line { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.drawer-body .archive-case { padding: 18px 0 0; border-top: 0; }
.drawer-body .archive-case::before, .drawer-body .archive-case::after, .drawer-body .line-clip { display: none; }
.drawer-body .archive-paper {
  padding: 34px 18px 18px;
  border-radius: 4px 4px 2px 2px;
  background: var(--paper);
  transition: transform 420ms var(--ease-out);
}
.drawer-body .archive-paper { box-shadow: 0 3px 0 #00000038, 0 10px 16px #0000004d; }
.drawer-body .archive-paper::before { position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #e74722; content: ""; }
.drawer-body .archive-case:nth-child(3n + 1) .archive-paper, .drawer-body .archive-case:nth-child(3n + 2) .archive-paper { background-color: #fffdf7; }
.drawer-body .archive-case:nth-child(3n + 2) .archive-paper { background-color: #eef5ff; }
.drawer-body .archive-paper .case-kind { position: absolute; top: -14px; left: 14px; padding: 4px 10px 6px; border-radius: 6px 6px 0 0; background: inherit; background-color: #ffe9a6; color: #5c3b0f; }
.drawer-front { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 26px; width: 100%; min-height: 92px; margin-top: -2px; padding: 12px 24px; border: 0; border-radius: 0 0 8px 8px; background: #8b5a34; box-shadow: inset 0 0 0 10px #7a4c2b, inset 0 3px 0 10px #a06d45, 0 6px 0 #4e301a, 0 14px 22px #00000055; cursor: pointer; }
.drawer-card { display: grid; gap: 2px; padding: 8px 18px; border: 3px solid #c7a24c; border-radius: 3px; background: #fffdf7; color: var(--ink); font-size: .9rem; font-weight: 600; text-align: left; }
.drawer-card b { font-family: Bricolage, Onest, sans-serif; font-size: 1.25rem; letter-spacing: .06em; text-transform: uppercase; }
.drawer-handle { width: 86px; height: 26px; border: 5px solid #d5b25a; border-top: 0; border-radius: 0 0 40px 40px; box-shadow: 0 3px 0 #6e5320; }
.drawer-hint { color: #fff3da; font: 400 1.7rem/1 Allura, cursive; }
.drawer-front:focus-visible { outline-color: #ffdf54; outline-offset: 4px; }
.cabinet.is-closed .drawer-body { max-height: 150px; }
.cabinet.is-closed .drawer-body .archive-paper { transform: translateY(14px); }
.cabinet:not(.is-closed) .drawer-body .archive-paper { transform: rotate(var(--lean)); }
@media (hover: hover) and (pointer: fine) {
  .cabinet.is-closed:has(.drawer-front:hover) .archive-paper { transform: translateY(2px); }
  .drawer-body .archive-paper:hover { transform: translateY(-10px) rotate(0deg); }
}

/* — Zone 3: green cutting mat — */
.desk-sheet {
  background-color: #2f6b55;
  background-image: var(--kraft-tex);
  box-shadow: inset 0 0 0 10px #275c49, 0 4px 0 #1c4436, 0 14px 32px #1c2b2240;
}
.desk-head .script { color: #ffdf54; }
.desk-head h2 { color: #fff; }
.desk-head > p:last-child { color: #d8efe5; }
.sticker-reset { box-shadow: 0 3px 0 #b68334; }

/* — Zone 4: blueprint — */
.motion.surface {
  border-color: #6f9ad6;
  background-color: #1f4f8f;
  background-image: var(--kraft-tex);
  color: #fff;
}
.motion-copy h2 { color: #fff; }
.motion-copy h2 span { color: #ffdf54; }
.motion-copy > p { color: #d6e5ff; }
.computer-controls p { color: #e8f0ff; }
.stage-halo { background: #3e74c0; border-color: #ffffff55; box-shadow: none; }
.stage-orbit { border-color: #ffffffb0; }
.stage-orbit--back { border-color: #ffffff4a; }
.star--upper { color: #ffdf54; }
.motion.surface::after { position: absolute; right: 18px; bottom: 12px; color: #ffffffb0; font: 600 .66rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .12em; text-align: right; white-space: pre; content: "SHEET 04 / MOTION DESK\A SCALE 1:1 · REV. 2026"; }

/* — Zone 5: kraft envelope — */
.contact.surface {
  overflow: hidden;
  padding-top: clamp(70px, 8vw, 104px);
  border: 0;
  background-color: #d7b385;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .3 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  box-shadow: 0 4px 0 #9d7748, 0 16px 34px #00000040;
}
.contact.surface > :not(.envelope-flap, .seal-tape, .postage, .postmark) { position: relative; z-index: 2; }
.envelope-flap { position: absolute; z-index: 1; inset: 0 0 auto; height: min(58%, 260px); background: #c9a272; clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 4px 0 #a9824f); }
.postage { position: absolute; z-index: 3; top: 18px; right: 22px; display: grid; place-items: center; width: 82px; height: 98px; padding: 7px; background: #fffdf7; rotate: 5deg; }
.postage > span { display: grid; place-items: center; align-content: center; width: 100%; height: 100%; background: #1d3f78; color: #ffdf54; font: 700 .62rem/1 Onest, sans-serif; letter-spacing: .12em; }
.postage b { color: #fff; font: 800 1.7rem/1 Bricolage, Onest, sans-serif; letter-spacing: -.02em; }
.postmark--contact { top: 30px; right: 88px; z-index: 4; }
.contact .eyebrow { color: #3b2410; }
.contact h2 span { color: #b3300f; }

/* — seal tape that gets peeled off as you scroll — */
.seal-tape {
  --peel: 0;
  position: absolute;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 260px;
  height: 40px;
  background: #ffdf54e8;
  color: #4a3500;
  font: 800 .78rem/1 Onest, sans-serif;
  letter-spacing: .2em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 3% 20%, 0 40%, 3% 60%, 0 80%, 3% 100%, 100% 100%, 97% 80%, 100% 60%, 97% 40%, 100% 20%, 97% 0);
  transform-origin: 0% 50%;
  transform: translate(calc(var(--peel) * 40px), calc(var(--peel) * -90px)) rotate(calc(-3deg - var(--peel) * 32deg)) scaleY(calc(1 - var(--peel) * .35));
  opacity: calc(1 - var(--peel) * var(--peel) * 1.1);
  filter: drop-shadow(0 calc(1px + var(--peel) * 18px) calc(2px + var(--peel) * 14px) #0000003a);
  pointer-events: none;
}
.seal-tape--gallery { top: -26px; left: calc(50% - 130px); }
.seal-tape--contact { top: calc(min(58%, 260px) - 26px); left: calc(50% - 130px); background-color: #e74722e0; color: #fff; }

/* ════════════════════ INK LAYER + PENCIL CASE ════════════════════ */
.ink-layer { position: fixed; z-index: 30; inset: 0; width: 100%; height: 100%; pointer-events: none; }
body.is-doodling .ink-layer { pointer-events: auto; cursor: crosshair; touch-action: none; }
.pencil-case { position: fixed; z-index: 31; left: 18px; bottom: 18px; display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 14px; background: #1d2433; box-shadow: 0 4px 0 #0c1019, 0 12px 24px #00000055; }
.tool { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 6px 12px; border: 0; border-radius: 9px; background: #2c3448; color: #f3f6fb; font-size: .8rem; font-weight: 700; cursor: pointer; transition: background 160ms var(--ease-out), translate 140ms var(--ease-out); }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tool:hover { background: #3a4460; }
.tool:active { translate: 0 2px; }
.tool[aria-pressed="true"] { background: #ffdf54; color: #2a2415; }
.tool--sound[aria-pressed="true"] .mute, .tool--sound[aria-pressed="false"] .wave { display: none; }
.tool--sound[aria-pressed="false"] { background: #2c3448; color: #aeb7c9; }
.tool:focus-visible, .swatch:focus-visible { outline: 3px solid #ffdf54; outline-offset: 2px; }
.ink-swatches { display: flex; align-items: center; gap: 6px; padding-inline: 4px; }
.swatch { width: 26px; height: 26px; padding: 0; border: 3px solid #2c3448; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 2px #ffffff40; cursor: pointer; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px #ffdf54; }
@media (max-width: 700px) {
  .pencil-case { left: auto; right: 10px; bottom: calc(72px + env(safe-area-inset-bottom)); padding: 4px; }
  .tool span { display: none; }
  .tool { min-height: 44px; min-width: 44px; justify-content: center; padding: 6px; }
}

/* ════════════════════ responsive + reduced motion ════════════════════ */
@media (max-width: 900px) {
  .drawer-body .archive-line { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .project-gallery { border-width: 10px; }
  .gallery-head { margin-bottom: 30px; padding: 18px 18px 16px; rotate: -.6deg; }
  .drawer-body { padding: 14px 10px 6px; border-width: 8px; }
  .drawer-body .archive-line { grid-template-columns: 1fr; }
  .drawer-front { flex-wrap: wrap; gap: 10px 16px; min-height: 80px; }
  .drawer-hint { display: none; }
  .postage { width: 64px; height: 78px; top: 12px; right: 12px; }
  .postmark--contact { right: 56px; width: 70px; }
  .seal-tape { width: 210px; left: calc(50% - 105px); }
  .motion.surface::after { display: none; }
  .case--cartridge .case-print { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  :is(.desk-sheet, .receipt-desk, .motion.surface) { animation: none; }
  .drawer-body, .drawer-body .archive-paper, .tool { transition: none; }
  .seal-tape { display: none; }
}


/* ════════════════════ ONE SYSTEM: desk + kraft + white paper, yellow tape + orange ink ════════════════════ */
/* Ruled notebook lines as an SVG texture (flat, no gradient). */
:root { --ruled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='26' viewBox='0 0 10 26' preserveAspectRatio='none'%3E%3Crect y='25' width='10' height='1' fill='%236f96c2' fill-opacity='.2'/%3E%3C/svg%3E"); }
:root { --kraft-tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35 0 0 0 0 .24 0 0 0 0 .12 0 0 0 .3 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E"); }
.wrap { width: min(1180px, calc(100% - 72px)); }

/* kraft: project board + contact */
.project-gallery, .contact.surface {
  border: 0;
  background-color: #c89f72;
  background-image: var(--kraft-tex);
  box-shadow: inset 0 0 0 1px #ffffff40, 0 4px 0 #8a643f70, 0 16px 34px #00000040;
}
.project-gallery { padding: 44px clamp(16px, 4vw, 60px) 56px; border-radius: 6px 22px 22px 22px; }
.case, .archive-case { border-top: 0; }
.case::before, .case::after, .archive-case::before, .archive-case::after { display: none; }

/* white paper: toolbox + motion */
.desk-sheet, .motion.surface {
  border: 0;
  background-color: var(--paper);
  background-image: none;
  color: var(--ink);
  box-shadow: var(--paper-shadow);
}
.desk-head .script, .about-me .script, .process-head .script { color: #9d2d15; }
.desk-head h2, .motion-copy h2 { color: var(--ink); }
.desk-head > p:last-child, .motion-copy > p, .computer-controls p { color: #385275; }
.motion-copy h2 span { color: var(--hot); }
.motion.surface::after { color: #5a6f92; content: "desk / motion"; }
.stage-halo { background: #dbe8fb; border-color: #fff; }
.stage-orbit { border-color: #fff; }
.stage-orbit--back { border-color: #3e6bbd52; }
.star--upper { color: #2b60a9; }

/* the three feature projects: one frame, big */
.case-line { gap: clamp(46px, 7vw, 92px); }
.case, .case:nth-child(2n) { grid-template-columns: 1fr; gap: 0; padding: 22px 0 0; }
.case:nth-child(2n) .case-print, .case:nth-child(2n) .case-note { grid-column: auto; grid-row: auto; }
.case-print { padding: 12px 12px 14px; }
.case-print img { aspect-ratio: auto; max-height: min(66vh, 640px); object-fit: contain; background: #fff; }
.case-print::after { background: #ffdf54d9; }
.case-note, .case:nth-child(2n) .case-note { width: min(480px, 92%); margin: -54px 3% 0 auto; padding: clamp(18px, 2.6vw, 30px); transform: rotate(-.8deg); z-index: 2; }
.case:nth-child(2n) .case-note { margin: -54px auto 0 3%; transform: rotate(.8deg); }
.case-note > p:not(.case-kind):not(.case-tools) { margin-top: 6px; }
.case h3 { font-size: clamp(1.9rem, 3.4vw, 3rem); }

/* archive cards: ink on paper, kraft-friendly */
.drawer-body { background: #5a3a22; border-color: #7c5130; }
.archive-title { background: #17345f; }
.gallery-head { rotate: -.8deg; }

/* sound is a quiet icon, off by default */
.pencil-case { padding: 4px; background: #1d2433; }
.tool--sound span { display: none; }
.tool--sound { min-width: 44px; justify-content: center; padding: 6px; }

/* single static tape strip */
.tape-run { height: 64px; margin-bottom: -10px; }
.tape-strip--blue { top: 12px; }
.tape-strip p { animation: none; width: auto; justify-content: center; }
/* ════════════════════ TOOLBOX full width, ABOUT notebook, PROCESS strip ════════════════════ */
.desk { grid-template-columns: 1fr; }
.desk-sheet { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.5fr); gap: 20px clamp(20px, 4vw, 56px); align-items: center; rotate: -.4deg; }
.desk-sheet .sticker-sheet { margin: 0; }
.sticker-reset { grid-column: 1 / -1; justify-self: start; margin-top: 0; }
@media (max-width: 800px) { .desk-sheet { grid-template-columns: 1fr; } }

/* about me: an open notebook */
.about-me { margin: 64px 0 40px; }
.notebook { position: relative; display: grid; grid-template-columns: 1fr 1fr; border-radius: 6px 14px 14px 6px; background: #fffdf7; box-shadow: 0 4px 0 #a9987a, 0 16px 34px #00000033; }
.nb-page { position: relative; min-height: 360px; padding: clamp(26px, 4vw, 52px) clamp(22px, 3.4vw, 46px) 34px; background: var(--kraft-tex); }
.nb-page--left { border-radius: 6px 0 0 6px; background-color: #fffdf7; box-shadow: inset -14px 0 14px -14px #0000001f; }
.nb-page--right { border-radius: 0 14px 14px 0; background-color: #fffdf7; box-shadow: inset 14px 0 14px -14px #0000001f; }
.spiral { position: absolute; z-index: 3; top: 18px; bottom: 18px; left: calc(50% - 9px); display: flex; flex-direction: column; justify-content: space-between; width: 18px; }
.spiral i { display: block; height: 7px; border-radius: 4px; background: #46506a; box-shadow: 0 1px 0 #fff8, 0 2px 3px #0005; }
.about-me .script { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
.about-me h2 { margin: 0 0 18px; font-family: Bricolage, Onest, sans-serif; font-size: clamp(2rem, 3.8vw, 3.4rem); line-height: 1; color: var(--ink); }
.facts { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.facts li { display: flex; gap: 10px; align-items: flex-start; min-height: 34px; padding-top: 5px; color: #263c5e; font-size: 1rem; line-height: 29px; }
.facts li svg { flex: none; width: 22px; height: 22px; margin-top: 3px; fill: none; stroke: var(--hot); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.facts b { margin-right: 4px; color: var(--ink); }
.nb-label { margin-top: 4px; color: #6a5a3a; font-size: .75rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.nb-now { position: relative; margin: 2px 0 22px; padding-left: 46px; color: var(--ink); font: 800 clamp(1.4rem, 2.4vw, 2rem)/1.2 Bricolage, Onest, sans-serif; }
.nb-now--big { font-size: clamp(1.7rem, 3vw, 2.6rem); }
.cube { position: absolute; left: 0; top: -4px; width: 36px; height: 36px; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.dot { position: absolute; left: 6px; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: #2fb26a; box-shadow: 0 0 0 5px #2fb26a2e; }
.nb-text { max-width: 380px; margin-bottom: 20px; color: #385275; line-height: 34px; }
.nb-page .button { margin-top: 2px; }
.notebook .tape--tl { top: -10px; left: 24px; }
@media (max-width: 800px) {
  .notebook { grid-template-columns: 1fr; }
  .spiral { display: none; }
  .nb-page--left { border-radius: 6px 6px 0 0; box-shadow: none; }
  .nb-page--right { border-radius: 0 0 14px 14px; box-shadow: none; border-top: 2px dashed #b9c4d6; min-height: 0; }
}

/* process: six steps pinned on a line */
.process { margin: 56px 0 48px; }
.process-head { margin-bottom: 38px; text-align: center; }
.process-head .script { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
.process-head h2 { margin: 0; font-family: Bricolage, Onest, sans-serif; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1; color: var(--ink); }
.steps { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin: 0; padding: 30px 0 0; list-style: none; }
.steps::before { position: absolute; top: 12px; left: -2%; right: -2%; height: 3px; background: #7a5532; border-radius: 2px; box-shadow: 0 3px 3px #00000022; content: ""; }
.step { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 26px 14px 18px; border-radius: 3px; background: #fffdf7; box-shadow: var(--paper-shadow); rotate: var(--tilt, 0deg); transform-origin: 50% 0; }
.step:nth-child(odd) { --tilt: -1.4deg; }
.step:nth-child(even) { --tilt: 1.2deg; margin-top: 14px; }
.step .line-clip { top: -14px; }
.step-no { color: #c0310c; font: 800 .8rem/1 Onest, sans-serif; letter-spacing: .14em; }
.step-scene { width: 100%; height: auto; margin: 4px 0; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.step-scene .o { stroke: var(--hot); }
.step-scene .f { fill: #fffdf7; stroke: var(--ink); }
.step-scene .f2 { fill: var(--hot); stroke: none; }
.step h3 { font: 800 1.25rem/1.1 Bricolage, Onest, sans-serif; color: var(--ink); }
.step p:last-child { color: #385275; font-size: .88rem; line-height: 1.4; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; } .steps::before { display: none; } .step:nth-child(even) { margin-top: 0; } }
@media (max-width: 640px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 12px; } }

/* entrance: draw on when scrolled into view */
.step-scene :is(path, rect, circle)[pathLength] { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js-desk2 .notebook:not(.is-in) { opacity: 0; transform: translateY(34px) rotate(1.6deg); }
.notebook.is-in { animation: slide-onto-desk 700ms var(--ease-out) both; }
.js-desk2 .notebook:not(.is-in) :is(.facts svg, .cube) { stroke-dashoffset: 1; }
.notebook.is-in :is(.facts svg, .cube) { animation: draw 380ms ease-out both; }
.notebook.is-in .facts li:nth-child(1) svg { animation-delay: .6s; }
.notebook.is-in .facts li:nth-child(2) svg { animation-delay: .8s; }
.notebook.is-in .facts li:nth-child(3) svg { animation-delay: 1s; }
.notebook.is-in .facts li:nth-child(4) svg { animation-delay: 1.2s; }
.notebook.is-in .cube { animation-delay: .9s; animation-duration: 700ms; }
.notebook .dot { animation: pulse-dot 2.4s ease-in-out infinite; }
@keyframes pulse-dot { 50% { box-shadow: 0 0 0 9px #2fb26a00; } }
.js-desk2 .process:not(.is-in) .step { opacity: 0; }
.js-desk2 .process:not(.is-in) .step-scene :is(path, rect, circle)[pathLength] { stroke-dashoffset: 1; }
.process.is-in .step { animation: drop-step 640ms var(--ease-out) calc(var(--n) * 140ms) both; }
.process.is-in .step-scene :is(path, rect, circle)[pathLength] { animation: draw 900ms ease-out calc(var(--n) * 140ms + 350ms) both; }
@keyframes drop-step { from { opacity: 0; translate: 0 -26px; rotate: calc(var(--tilt) * 4); } to { opacity: 1; translate: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  .notebook.is-in, .process.is-in .step, .process.is-in .step-scene *, .notebook.is-in :is(.facts svg, .cube), .notebook .dot { animation: none; }
}


/* ════════════════════ DARTS: one thrown at each process card ════════════════════ */
.step { --t: calc(1400ms + var(--n) * 450ms); }
.hole, .dart { position: absolute; z-index: 3; left: var(--x); top: var(--y); pointer-events: none; }
.hole { width: 30px; height: 30px; margin: -15px 0 0 -15px; filter: drop-shadow(0 1px 1px #0003); }
.hole svg { display: block; width: 100%; height: 100%; }
.dart { z-index: 4; width: clamp(78px, 8.2vw, 118px); margin-top: calc(clamp(78px, 8.2vw, 118px) * -.154); color: var(--c); transform-origin: 0 50%; rotate: var(--a); filter: drop-shadow(2px 4px 2px #00000066); }
.dart svg { display: block; width: 100%; height: auto; transform-origin: 0 50%; }

@keyframes dart-fly {
  0% { opacity: 0; translate: calc(cos(var(--a)) * 300px) calc(sin(var(--a)) * 300px); scale: 1.35; }
  25% { opacity: 1; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}
@keyframes dart-wobble { 0% { rotate: 0deg; } 18% { rotate: 7deg; } 38% { rotate: -5deg; } 58% { rotate: 3deg; } 78% { rotate: -1.4deg; } 100% { rotate: 0deg; } }
@keyframes hole-in { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }
@keyframes card-hit { 0% { transform: rotate(0); } 16% { transform: rotate(3.6deg); } 36% { transform: rotate(-2.6deg); } 58% { transform: rotate(1.4deg); } 80% { transform: rotate(-.6deg); } 100% { transform: rotate(0); } }

.js-desk2 .process:not(.is-in) :is(.dart, .hole) { opacity: 0; }
.process.is-in .dart { animation: dart-fly 380ms cubic-bezier(.55, 0, .9, .6) var(--t) both; }
.process.is-in .dart svg { animation: dart-wobble 820ms ease-out calc(var(--t) + 380ms) both; }
.process.is-in .hole { animation: hole-in 140ms ease-out calc(var(--t) + 370ms) both; }
.process.is-in .step { animation: drop-step 640ms var(--ease-out) calc(var(--n) * 140ms) both, card-hit 760ms ease-out calc(var(--t) + 380ms) both; }
@media (max-width: 640px) { .dart { width: 72px; margin-top: -11px; } .hole { width: 24px; height: 24px; margin: -12px 0 0 -12px; } }
@media (prefers-reduced-motion: reduce) {
  .process.is-in :is(.dart, .dart svg, .hole) { animation: none; }
  .process.is-in .step { animation: none; }
}

/* Desk darts and the paper target */
.dart-game {
  display: grid;
  grid-template-columns: clamp(82px, 12vw, 114px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  max-width: 390px;
  margin-top: 20px;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--paper-shadow);
}
.dart-target {
  display: block;
  align-self: start;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  cursor: crosshair;
  touch-action: pinch-zoom;
}
.dart-target svg { display: block; width: 100%; }
.dart-score { font-size: .86rem; line-height: 1.35; }
.dart-count { margin-top: 4px; font-weight: 700; font-variant-numeric: tabular-nums; }
.bullseye-link { display: inline-grid; align-items: center; min-height: 44px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.dart-layer { position: absolute; z-index: 3; inset: 0; overflow: clip; pointer-events: none; }
.desk-dart {
  --dart-width: clamp(48px, 7vw, 74px);
  position: absolute;
  width: var(--dart-width);
  margin-top: calc(var(--dart-width) * -.154);
  color: var(--hot);
  transform-origin: 0 50%;
  filter: drop-shadow(1px 3px 1px #00000055);
}
.desk-dart:nth-child(3n + 2) { color: var(--sun); }
.desk-dart:nth-child(3n) { color: var(--ink); }
.desk-dart svg { display: block; width: 100%; }
.desk-dart.is-stuck::before { position: absolute; top: calc(50% - 2px); left: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); content: ""; }
.dart-scrap { position: absolute; width: 8px; height: 5px; background: var(--paper); box-shadow: 1px 1px #00000044; }
.dart-scrap:nth-child(3n + 2) { background: var(--sun); }
.dart-scrap:nth-child(3n) { background: var(--hot); }
.desk.is-in .sticker.sticker--sharpshooter { --c: var(--sun); --t: var(--ink); --r: -4deg; animation: none; }

/* Astana paper tag */
.astana-clock {
  display: grid;
  gap: 2px;
  padding: 9px 14px;
  border: 1px solid #a9987a;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--paper-shadow);
}
.astana-clock time { margin-inline-start: 6px; font-variant-numeric: tabular-nums; }
.astana-status { font-weight: 400; }
@media (max-width: 540px) {
  .site-footer { flex-wrap: wrap; }
  .astana-clock { order: 1; flex-basis: 100%; }
}

/* Scrapbook easter eggs */
.photo-trigger { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.photo-trigger, .paperclip, .paper-flight { touch-action: manipulation; }
.photo.is-selfie { outline: 2px dashed var(--ink); outline-offset: 3px; }
.paper-rocket { display: none; width: 100%; height: 100%; filter: drop-shadow(1px 3px 2px #0000004d); }
.paper-flight.is-rocket span { display: none; }
.paper-flight.is-rocket .paper-rocket { display: block; }
.flight-greeting {
  position: fixed;
  z-index: 5;
  padding: 6px 13px;
  border: 1px solid var(--ink);
  border-radius: 16px 16px 16px 5px;
  background: var(--paper);
  box-shadow: var(--paper-shadow);
  color: var(--ink);
  font: 400 1.75rem/1 Allura, cursive;
  pointer-events: none;
  translate: -50% 0;
  transform: rotate(-4deg);
}
@media (prefers-reduced-motion: reduce) {
  .paper-flight { inset: auto 16px 18px auto; animation: none; }
}
@media (max-width: 700px) and (prefers-reduced-motion: reduce) {
  .paper-flight { inset: auto auto calc(72px + env(safe-area-inset-bottom)) 10px; }
}

.case-preview { cursor: pointer; }

/* Marker ink follows the mouse without intercepting the desk. */
.cursor-trail { position: fixed; z-index: 6; inset: 0; width: 100%; height: 100%; color: var(--ink); pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .cursor-trail { display: none; }
}

/* Scratch-off facts in the About notebook */
.nb-page--left .nb-text { margin-top: 18px; }
.scratch-card {
  max-width: 490px;
  padding: clamp(12px, 3vw, 22px);
  border: 1px dashed #a9987a;
  background: var(--paper);
  color: var(--ink);
}
.scratch-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 12px; }
.scratch-controls p { font-size: .9rem; }
.scratch-reveal[aria-disabled="true"] { cursor: default; }
.scratch-area { position: relative; overflow: clip; border: 1px solid #a9987a; background: var(--paper); }
.scratch-facts { display: grid; gap: 10px; margin: 0; padding: 14px 16px; }
.scratch-facts dt { font-size: .8rem; font-weight: 700; }
.scratch-facts dd { margin: 0; font-family: Bricolage, Onest, sans-serif; font-size: clamp(1.04rem, 2vw, 1.4rem); font-weight: 800; }
.scratch-coating {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: pinch-zoom;
  transition: opacity 240ms var(--ease-out);
}
.scratch-coating.is-cleared { opacity: 0; pointer-events: none; }

/* Paper notes unfold underneath the featured projects */
.case:has(.case-story) .case-note { margin-top: -12px; }
.case-story { margin-top: 14px; border-top: 1px dashed #a9987a; }
.case-story summary { min-height: 44px; padding: 10px 6px; color: var(--ink); font-weight: 800; cursor: pointer; }
.case-story summary::marker { color: #9d2d15; }
.case-story dl { display: grid; gap: 10px; margin: 0; padding: 2px 6px 8px; }
.case-story dl > div { display: grid; grid-template-columns: minmax(60px, .26fr) minmax(0, 1fr); gap: 8px; }
.case-story dt { color: #9d2d15; font-weight: 800; }
.case-story dd { margin: 0; color: var(--ink); }
.case-story[open] dl { animation: unfold-project 230ms var(--ease-out) both; transform-origin: top; }
@keyframes unfold-project { from { opacity: 0; transform: translateY(-5px) scaleY(.96); } }

/* Case screenshots */
.demo-frame { width: 100%; min-width: 0; overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius-control); background: var(--paper); }
.demo-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0 6px; padding-inline: 7px; }
.demo-bar a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-inline-start: auto; font-size: .8rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.demo-viewport { background: #ebe5d9; }
.demo-frame:has(.case-preview[aria-pressed="false"]:not([hidden])) .demo-viewport { aspect-ratio: 2.3; overflow: clip; }
.case-print .demo-viewport img { display: block; width: 100%; height: auto; max-height: none; aspect-ratio: auto; }
.case-preview { min-height: 44px; padding: 4px 7px; border: 0; background: var(--paper); color: var(--ink); font-size: .8rem; font-weight: 750; text-align: start; }
.case-preview:focus-visible { outline-offset: -4px; }
.case-preview[aria-pressed="true"] { box-shadow: inset 0 -3px var(--sun); }
@media (hover: hover) {
  .case-preview:hover { text-decoration: underline; text-underline-offset: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .scratch-coating { pointer-events: none; transition: none; }
  .case-story[open] dl { animation: none; }
}

/* Local guest-note board */
.note-wall {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(0, 1.2fr);
  align-items: start;
  gap: clamp(16px, 4vw, 48px);
  padding: clamp(16px, 4vw, 44px);
  background: var(--kraft-tex) #c89f72;
  color: var(--ink);
  box-shadow: var(--paper-shadow);
}
.note-compose { min-width: 0; padding: clamp(14px, 2.5vw, 27px); background: var(--paper); box-shadow: var(--paper-shadow); }
.note-compose h2 { font: 800 clamp(1.95rem, 3.5vw, 3.2rem)/1.06 Bricolage, Onest, sans-serif; }
.note-compose > p { margin-top: 6px; font-size: .9rem; }
.note-form { display: grid; gap: 6px; margin-top: 14px; }
.note-form label { font-weight: 800; }
.note-form :is(input, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #6f85a0;
  border-radius: 3px;
  background: var(--paper);
  color: inherit;
  font: inherit;
}
.note-form textarea { resize: vertical; }
.note-form label[for="note-message"] { margin-top: 4px; }
.note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; margin-top: 4px; }
.note-actions output, .note-status { font-size: .83rem; }
.note-actions output { font-variant-numeric: tabular-nums; }
.note-status { min-height: 1.5em; }
.note-board { min-width: 0; }
.note-empty { padding: 12px; border: 1px dashed #795b3d; color: #3b2410; }
.note-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(155px, 100%), 1fr)); align-items: start; gap: 18px; margin: 0; padding: 4px; list-style: none; }
.guest-note {
  position: relative;
  min-width: 0;
  padding: 17px 14px 12px;
  background: var(--sun);
  box-shadow: var(--paper-shadow);
  rotate: -2deg;
  overflow-wrap: anywhere;
}
.guest-note:nth-child(2n) { background: var(--paper); rotate: 1.6deg; }
.guest-note::before { position: absolute; top: -5px; left: calc(50% - 16px); width: 32px; height: 12px; background: #a9c6f0b8; rotate: -3deg; content: ""; }
.guest-note-text { white-space: pre-wrap; }
.guest-note-author { margin-top: 8px; font-size: .85rem; font-weight: 800; }
.guest-note.is-fresh { animation: stick-note 230ms var(--ease-out) both; transform-origin: top center; }
@keyframes stick-note { from { opacity: 0; transform: translateY(-7px) rotate(-3deg) scale(.96); } }
@media (max-width: 650px) {
  .note-wall { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .guest-note.is-fresh { animation: none; }
}


/* ════════════════════ LIFE NOTEBOOK: a real flipping notebook ════════════════════ */
.life { margin: 64px 0 40px; }
.life-head { margin-bottom: 34px; text-align: center; }
.life-head .script { color: #9d2d15; font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
.life-head h2 { margin: 0; font-family: Bricolage, Onest, sans-serif; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1; color: var(--ink); }
.hand { font-family: Allura, cursive; font-weight: 400; color: var(--pen); }

/* stage + book frame */
.fb-stage { container-type: inline-size; position: relative; padding: 20px 0 56px; perspective: 2600px; outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.fb-stage--spread { --pw: min(470px, calc((100cqw - 90px) / 2)); --ph: calc(var(--pw) * 1.32); }
.fb-stage--pad { --pw: min(100cqw - 16px, 430px); --ph: calc(var(--pw) * 1.74); padding-top: 34px; }
.fb-book { position: relative; width: calc(var(--pw) * 2); height: var(--ph); margin: 0 auto; transition: translate 900ms cubic-bezier(.6, .05, .25, 1); }
.fb-stage--pad .fb-book { width: var(--pw); }
.fb-stage--spread .fb-book.is-closed { translate: calc(var(--pw) * -.5) 0; }
.fb-book:focus-visible { outline: 3px solid var(--hot); outline-offset: 14px; border-radius: 8px; }

/* back cover board with the page stack showing at the edges */
.fb-board { position: absolute; z-index: 0; top: -9px; left: 50%; width: calc(var(--pw) + 11px); height: calc(var(--ph) + 18px); border-radius: 3px 12px 12px 3px; background: #1d3f78; box-shadow: 0 3px 0 #0f2750, 0 22px 40px #0000004d; }
.fb-stack { position: absolute; top: 9px; left: 0; width: var(--pw); height: var(--ph); border-radius: 0 4px 4px 0; background: #fffdf7; box-shadow: 1px 1px 0 #e4dac2, 2px 2px 0 #fffdf7, 3px 3px 0 #ddd1b6, 4px 4px 0 #fffdf7, 5px 5px 0 #d3c6a8; }
.fb-stage--pad .fb-board { left: -6px; top: -12px; width: calc(var(--pw) + 12px); height: calc(var(--ph) + 20px); border-radius: 8px; }
.fb-stage--pad .fb-stack { left: 6px; top: 12px; border-radius: 4px; }

/* leaves: a sheet with a front and a back face */
.fb-leaf { position: absolute; top: 0; left: 50%; width: var(--pw); height: var(--ph); transform-origin: 0 50%; transform-style: preserve-3d; will-change: transform; }
.fb-stage--pad .fb-leaf { left: 0; transform-origin: 50% 0; }
.fb-face { container-type: inline-size; position: absolute; inset: 0; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fffdf7; }
.fb-face--back { transform: rotateY(180deg); }
.fb-stage--pad .fb-face--back { transform: rotateX(180deg); }
.fb-face::after { position: absolute; inset: 0; z-index: 9; background: #1d2433; opacity: var(--sf, 0); pointer-events: none; content: ""; }
.fb-face--back::after { opacity: var(--sb, 0); }
.fb-face--front { border-radius: 0 6px 6px 0; }
.fb-face--back { border-radius: 6px 0 0 6px; }

/* ruled paper, margin line, gutter shadow */
.fb-page { position: relative; height: 100%; padding: 9% 9% 8% 12%; font-size: 3.35cqw; line-height: 1.5; background-color: #fffdf7; background-image: var(--ruled); background-size: 100% 7.2cqw; background-position: 0 8cqw; }
.fb-face--front .fb-page { box-shadow: inset 26px 0 24px -22px #00000038; }
.fb-face--back .fb-page { padding: 9% 12% 8% 9%; box-shadow: inset -26px 0 24px -22px #00000038; }
.fb-face--front .fb-page::before { position: absolute; top: 0; bottom: 0; left: 8%; width: 2px; background: #ef8f7a80; content: ""; }
.fb-face--back .fb-page::before { position: absolute; top: 0; bottom: 0; right: 8%; width: 2px; background: #ef8f7a80; content: ""; }
.fb-num { position: absolute; bottom: 3.5%; font: 400 5.4cqw/1 Allura, cursive; color: #6a5a3a; }
.fb-face--front .fb-num { right: 7%; }
.fb-face--back .fb-num { left: 7%; }
.fb-stage--pad .fb-face--front { border-radius: 4px; }
.fb-stage--pad .fb-page { padding-top: 13%; font-size: 3.9cqw; }
.fb-stage--pad .fb-face--front .fb-page { box-shadow: inset 0 22px 20px -20px #00000030; }

/* hard cover: one bigger leaf, the inside of the cover is the first left page */
.fb-leaf--cover { top: -9px; width: calc(var(--pw) + 11px); height: calc(var(--ph) + 18px); }
.fb-leaf--cover .fb-face--front { border-radius: 3px 12px 12px 3px; background: #1d3f78; box-shadow: inset 0 0 0 1px #0f2750; }
.fb-leaf--cover .fb-face--back { padding: 9px 0 9px 11px; border-radius: 12px 3px 3px 12px; background: #1d3f78; }
.fb-leaf--cover .fb-face--back .fb-page { border-radius: 4px 0 0 4px; box-shadow: inset -26px 0 24px -22px #00000038, -1px 1px 0 #e4dac2, -2px 2px 0 #fffdf7, -3px 3px 0 #ddd1b6, -4px 4px 0 #fffdf7; }
.fb-stage--pad .fb-leaf--cover { top: -12px; left: -6px; width: calc(var(--pw) + 12px); height: calc(var(--ph) + 20px); }
.fb-stage--pad .fb-leaf--cover .fb-face--front { border-radius: 8px; }
.endpaper, .sheet-back { height: 100%; }
.fb-leaf--cover .fb-face--front .fb-page { padding: 0; background: none; box-shadow: none; }
.fb-leaf--cover .fb-face--front .fb-page::before { display: none; }
.endpaper { background: #1d3f78; }

.cover { container-type: inline-size; position: relative; display: grid; place-items: center; align-content: center; gap: 6cqw; height: 100%; padding: 10%; }
.cover-stitch { position: absolute; inset: 3.5%; border: 2px dashed #ffffff40; border-radius: 6px; pointer-events: none; }
.cover-label { padding: 5cqw 8cqw 6cqw; border-radius: 3px; background: #fffdf7; box-shadow: 0 3px 0 #0f2750, 0 10px 16px #0006; text-align: center; rotate: -1.6deg; }
.cover-label .hand { margin: 0; color: var(--hot); font-size: 9cqw; line-height: 1; }
.cover-title { margin: 1cqw 0 2cqw; font: 800 13cqw/1 Bricolage, Onest, sans-serif; color: var(--ink); }
.cover-year { margin: 0; color: #6a5a3a; font: 800 max(11.5px, 2.8cqw)/1 Onest, sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.cover-band { position: absolute; top: -2%; bottom: -2%; right: 11%; width: 4.2cqw; background: var(--hot); box-shadow: -2px 0 0 #00000066, 2px 0 0 #00000066; }
.cover-sticker { position: absolute; display: grid; place-items: center; border-radius: 50%; box-shadow: 0 2px 0 #0003, 0 6px 10px #0004; font-weight: 800; }
.cover-sticker--sun { top: 9%; left: 10%; width: 22cqw; height: 22cqw; background: var(--sun); color: #3a2a00; font: 400 6.4cqw/1 Allura, cursive; rotate: -14deg; }
.cover-sticker--hot { bottom: 12%; left: 14%; width: 12cqw; height: 12cqw; background: #fffdf7; color: var(--hot); font-size: 7cqw; rotate: 12deg; }
.cover-open { position: absolute; bottom: 6%; right: 20%; margin: 0; color: #fffdf7; font: 400 7cqw/1 Allura, cursive; animation: cover-nudge 2.4s ease-in-out infinite; }
@keyframes cover-nudge { 50% { translate: -6px 0; } }

/* ribbon bookmark hanging from the spine; index tabs on the edge */
.fb-ribbon { position: absolute; z-index: 300; left: calc(50% + 14px); bottom: -58px; width: 16px; height: 86px; background: var(--hot); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 84%, 0 100%); transform-origin: 50% 0; animation: ribbon-sway 4.5s ease-in-out infinite; pointer-events: none; }
.is-closed .fb-ribbon { left: calc(50% + 6px); }
@keyframes ribbon-sway { 0%, 100% { rotate: 2deg; } 50% { rotate: -3deg; } }
.fb-tabs { position: absolute; z-index: 1; top: 7%; left: calc(50% + var(--pw)); display: grid; gap: 6px; }
.fb-tab { width: 84px; padding: 9px 8px 9px 18px; border: 0; border-radius: 0 7px 7px 0; background: var(--c); color: var(--t, #fff); font: 800 .72rem/1 Onest, sans-serif; letter-spacing: .04em; text-align: left; box-shadow: 0 2px 0 #0002; cursor: pointer; translate: -12px 0; transition: translate 200ms var(--ease-out); }
.fb-tab:hover, .fb-tab.is-active { translate: 0 0; }
.fb-tab:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.is-closed .fb-tabs { opacity: 0; pointer-events: none; }
.fb-tabs { transition: opacity 300ms; }

/* notepad rings across the top */
.fb-rings { position: absolute; z-index: 400; top: -24px; left: 6%; right: 6%; display: flex; justify-content: space-between; pointer-events: none; }
.fb-rings i { width: 12px; height: 36px; border: 3px solid #46506a; border-radius: 8px; background: transparent; box-shadow: 0 2px 2px #0004; }

/* photos taped onto the pages */
.snap { position: relative; width: 100%; margin: 0 auto; rotate: var(--r, 0deg); filter: drop-shadow(0 5px 4px #00000045); }
.snap-img { display: block; width: 100%; padding: 0; border: 2.2cqw solid #fffdf7; background: #fffdf7; cursor: default; }
button.snap-img { cursor: zoom-in; }
.snap-img img { display: block; width: 100%; height: auto; max-height: 64cqw; object-fit: cover; }
.snap--tall .snap-img img { max-height: 88cqw; object-position: center 40%; }
.snap--mini { width: 52%; }
.snap--mini .snap-img img { aspect-ratio: 4 / 5; }
.snap-cap { margin: 2cqw 0 0; font-size: 7cqw; line-height: 1; text-align: center; }
.tape-bit { position: absolute; z-index: 3; top: -3cqw; width: 22cqw; height: 6.4cqw; background: #a9c6f0c4; box-shadow: 0 1px 2px #0000001a; clip-path: polygon(0 0, 4% 14%, 0 28%, 4% 42%, 0 56%, 4% 70%, 0 84%, 4% 100%, 100% 100%, 96% 86%, 100% 72%, 96% 58%, 100% 44%, 96% 30%, 100% 16%, 96% 0); }
.tape-bit--l { left: -6cqw; rotate: -32deg; }
.tape-bit--r { right: -6cqw; rotate: 30deg; background: #ffb59ec4; }
.tape-bit--top { left: calc(50% - 11cqw); rotate: -3deg; }
.hand-date { margin: 0 0 5cqw; font-size: 9cqw; line-height: 1; }
.entry-left { display: flex; flex-direction: column; justify-content: center; height: 100%; }

/* right pages: text, stamps, marker */
.pg-date { margin: 0 0 1.5cqw; color: #6a5a3a; font-size: 2.6cqw; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.fb-page h3 { margin: 0 0 3.6cqw; font: 800 9.6cqw/1 Bricolage, Onest, sans-serif; color: var(--ink); }
.pg-stamp { display: inline-block; margin: 0 0 4cqw; padding: 1.2cqw 3.6cqw 1.5cqw; border: .7cqw solid var(--hot); border-radius: 1.2cqw; color: #c0310c; font: 800 4.2cqw/1.2 Bricolage, Onest, sans-serif; letter-spacing: .06em; text-transform: uppercase; rotate: -4deg; box-shadow: inset 0 0 0 .5cqw #fffdf7, inset 0 0 0 .8cqw #e7472255; }
.pg-stamp--gold { border-color: #8a5a00; background: var(--sun); color: #3a2a00; box-shadow: none; }
.pg-copy { margin: 0 0 5cqw; color: #385275; line-height: 7.2cqw; }
.pg-copy mark { padding: 0 .2em; background: #ffdf54b0; color: inherit; }
.entry-right, .contents, .next-page { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; height: 100%; }

.cert-thumb { position: relative; display: grid; justify-items: center; gap: 1cqw; width: 46cqw; padding: 2cqw 2cqw 1cqw; border: 0; background: #fffdf7; box-shadow: 0 2px 0 #00000021, 0 8px 14px #00000033; rotate: 3deg; cursor: zoom-in; transition: rotate 250ms var(--ease-out), translate 250ms var(--ease-out); }
.cert-thumb:hover { rotate: 0deg; translate: 0 -4px; }
.cert-thumb img { width: 100%; height: auto; max-height: 40cqw; object-fit: cover; object-position: top; }
.cert-thumb .hand { font-size: 5.6cqw; line-height: 1; }
.cert-thumb:focus-visible, button.snap-img:focus-visible, .toc-go:focus-visible { outline: 3px solid var(--hot); outline-offset: 3px; }
.clip { position: absolute; z-index: 2; top: -4cqw; left: 16%; width: 6cqw; height: 13cqw; border: .8cqw solid #7d8796; border-radius: 4cqw; }

/* contents page */
.toc { display: grid; gap: 0; width: 100%; margin: 0; padding: 0; list-style: none; }
.toc-go { display: flex; align-items: baseline; gap: 2cqw; width: 100%; min-height: 7.2cqw; padding: 0; border: 0; background: none; color: var(--ink); font: 700 3.6cqw/7.2cqw Onest, sans-serif; text-align: left; cursor: pointer; }
.toc-go::before { width: 2.4cqw; height: 2.4cqw; flex: none; border-radius: 50%; background: var(--c); content: ""; translate: 0 -.2cqw; }
.toc-dots { flex: 1; border-bottom: 2px dotted #9aa7bd; translate: 0 -1cqw; }
.toc-badge { color: #6a5a3a; font-size: 2.8cqw; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.toc-go:hover .toc-title { color: var(--hot); }

/* owner, more, next pages */
.owner { display: grid; justify-items: center; align-content: center; gap: 2cqw; height: 100%; text-align: center; }
.owner-small { margin: 0; font-size: 7cqw; line-height: 1; }
.owner-name { margin: 0 0 4cqw; color: var(--hot); font-size: 12cqw; line-height: 1; }
.owner-return { margin: 4cqw 0 0; font-size: 6.6cqw; line-height: 1; }
.doodle-star { position: absolute; top: 10%; right: 12%; width: 9cqw; fill: none; stroke: var(--hot); stroke-width: 2.4; stroke-linejoin: round; rotate: 14deg; }
.more { display: grid; align-content: center; gap: 3cqw; height: 100%; }
.more-big { margin: 0; color: var(--hot); font-size: 13cqw; line-height: 1; rotate: -4deg; }
.doodle-arrow { width: 50cqw; fill: none; stroke: var(--pen); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; justify-self: end; }
.more-small { margin: 0; color: #385275; line-height: 7.2cqw; }

/* phone notepad: one page holds photo + text */
.pad-entry { display: flex; flex-direction: column; justify-content: center; gap: 2cqw; height: 100%; }
.pad-entry .entry-left, .pad-entry .entry-right, .pad-entry .more, .pad-entry .next-page { height: auto; }
.pad-entry .hand-date { margin-bottom: 3cqw; font-size: 8cqw; }
.pad-entry .snap { width: 86%; }
.pad-entry .snap-img img { max-height: 42cqw; }
.pad-entry .snap--tall .snap-img img { max-height: 48cqw; }
.pad-entry h3 { margin-bottom: 2.5cqw; }
.pad-entry .pg-stamp { margin-bottom: 2.5cqw; }
.pad-entry .pg-copy { margin-bottom: 3cqw; }
.pad-entry .cert-thumb { width: 34cqw; }
.pad-entry .cert-thumb img { max-height: 18cqw; }
.pad-entry .more-big { font-size: 11cqw; }
.pad-entry .doodle-arrow { width: 34cqw; }

/* controls */
.fb-controls { display: grid; grid-template-columns: auto auto auto; justify-content: center; align-items: center; gap: 10px 18px; margin-top: 6px; }
.fb-controls .button { min-width: 56px; padding-inline: 18px; font-size: 1.2rem; }
.fb-controls .button:disabled { opacity: .4; cursor: default; }
.fb-count { min-width: 190px; margin: 0; color: var(--ink); font-weight: 800; text-align: center; }
.fb-hint { grid-column: 1 / -1; margin: 0; color: #4b5f7d; font-size: .86rem; text-align: center; }

/* without JS: the entries as simple sheets */
.life-source { display: grid; gap: 24px; }
.life-source .entry { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 28px; border-radius: 6px; background: #fffdf7; box-shadow: var(--paper-shadow); }

/* certificate viewer */
.cert-dialog { width: min(92vw, 880px); max-height: 92vh; padding: 20px 20px 22px; border: 0; border-radius: 6px; background: #fffdf7; color: var(--ink); box-shadow: 0 6px 0 #a9987a, 0 30px 60px #0008; overflow: auto; }
.cert-dialog::backdrop { background: #102c54d9; }
.cert-dialog[open] { animation: cert-in 380ms var(--ease-out) both; }
.cert-dialog h3 { margin: 0 44px 14px 0; font: 800 1.5rem/1.1 Bricolage, Onest, sans-serif; }
.cert-dialog img { display: block; width: auto; max-width: 100%; max-height: calc(92vh - 110px); height: auto; margin: 0 auto; border: 1px solid #d8cdb4; }
.cert-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 50%; background: #fffdf7; color: var(--ink); font: 700 1.6rem/1 Onest, sans-serif; cursor: pointer; }
.cert-close:hover { background: var(--sun); }
@keyframes cert-in { from { opacity: 0; transform: translateY(-24px) rotate(-2.5deg) scale(.94); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .fb-book, .fb-tab, .snap, .cert-thumb { transition: none; }
  .fb-ribbon, .cover-open, .cert-dialog[open] { animation: none; }
}


/* ════════════════════ DESK EXTRAS (desk-extras.js) ════════════════════ */

/* ───── A4. Contact grid: copy + darts left, links + brief right, postcard bottom-left ───── */
.contact.surface {
  grid-template-columns: minmax(0, 1fr) minmax(0, .95fr);
  grid-template-areas: "copy links" "copy brief" "card brief";
  grid-template-rows: auto auto 1fr;
  align-items: start;
  column-gap: clamp(26px, 4.5vw, 64px);
  row-gap: 26px;
  padding-bottom: clamp(36px, 5vw, 64px);
}
.contact-copy { grid-area: copy; }
.contact-links { grid-area: links; }
.brief { grid-area: brief; }
.postcard { grid-area: card; }

/* ───── A1. Brief builder: a sheet clipped to the kraft ───── */
.brief {
  margin: 8px 0 0;
  padding: 30px clamp(16px, 2.4vw, 26px) 20px;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--radius-panel);
}
.brief-clip { position: absolute; top: -20px; left: calc(50% - 35px); width: 70px; height: 40px; filter: drop-shadow(0 2px 1px #0003); }
.brief h3 { margin: 0 0 14px; font: 800 clamp(1.35rem, 2.2vw, 1.7rem)/1.05 Bricolage, Onest, sans-serif; letter-spacing: -.01em; }
.brief-group { margin: 0 0 12px; padding: 0; border: 0; }
.brief-group legend { margin-bottom: 7px; padding: 0; color: #3f5577; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.brief-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.brief-chip {
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid #7b8798;
  border-radius: var(--radius-control);
  background: var(--paper);
  color: var(--ink);
  font: 700 .86rem/1.1 Onest, sans-serif;
  cursor: pointer;
}
@media (hover: hover) {
  .brief-chip:hover { border-color: var(--ink); }
}
.brief-chip:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
.brief-chip[aria-pressed="true"] { border-color: var(--ink); background: var(--sun); color: var(--ink); }
.brief-preview {
  margin: 16px 0 14px;
  padding: 12px 14px 10px;
  border: 1px solid #e2d8c2;
  background-color: var(--desk);
}
.brief-name { display: block; color: #3f5577; font-size: .78rem; font-weight: 800; }
.brief-name span { font-weight: 500; }
.brief input {
  width: 100%;
  min-height: 40px;
  margin: 2px 0 8px;
  padding: 4px 2px;
  border: 0;
  border-bottom: 2px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 600 1rem Onest, sans-serif;
}
.brief input::placeholder { color: #56667e; }
.brief input:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
.brief-label { color: #3f5577; font-size: .78rem; font-weight: 800; }
.brief-message { min-height: 52px; margin-top: 3px; color: var(--pen); font-size: 1.02rem; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.brief-message.is-empty { color: #55677f; font-weight: 500; font-style: italic; }
.brief-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.brief .brief-send { --fill: var(--sun); --button-shadow: #b68334; color: #2a2415; }
.brief .brief-copy { --fill: var(--paper); --button-shadow: #a9987a; color: var(--ink); border-color: #cbbd9f; }
.brief .button:disabled { cursor: not-allowed; background: var(--desk); color: var(--muted); border-color: var(--rule); }
.brief .button:disabled:active { transform: none; }

.brief-hint { margin-top: 9px; color: #3f5577; font-size: .82rem; }

/* ───── A2. Astana postcard ───── */
.postcard {
  --pc-sky: #15325f; --pc-far: #1d6580; --pc-mid: #2a5590; --pc-near: #232c5a;
  --pc-win: #ffe7a3; --pc-star: #f4e6b0; --pc-moon: #f3e5b5; --pc-sun: #ffdf54;
  --pc-tower: #e3c47f; --pc-tower-light: #f6ecd2; --pc-orb: #e6c983; --pc-orb-shade: #c9a65e;
  width: min(100%, 520px);
  margin: 4px 0 0;
  rotate: -2.6deg;
}
.postcard[data-phase="morning"] { --pc-sky: #cfe3f2; --pc-far: #9cc4d6; --pc-mid: #6e98c6; --pc-near: #3f5f93; --pc-win: #ffffff; }
.postcard[data-phase="day"] { --pc-sky: #9fcbee; --pc-far: #86b9cf; --pc-mid: #5b8bc0; --pc-near: #35558a; --pc-win: #ffffff; }
.postcard[data-phase="evening"] { --pc-sky: #f2b98a; --pc-far: #d98c6e; --pc-mid: #9a5d74; --pc-near: #4a345f; --pc-win: #ffd98a; --pc-sun: #e74722; }
.pc-frame { position: relative; padding: 10px; background: var(--paper); box-shadow: 0 3px 0 #00000021, 0 14px 28px #00000040; }
.pc-frame::before {
  position: absolute; z-index: 2; top: -15px; left: calc(50% - 64px);
  width: 128px; height: 32px;
  background: #ffdf54d9;
  clip-path: polygon(0 0, 3% 25%, 0 50%, 3% 75%, 0 100%, 100% 100%, 97% 75%, 100% 50%, 97% 25%, 100% 0);
  rotate: 3deg;
  content: "";
}
.pc-art { display: block; width: 100%; height: auto; }
.pc-art :is(.pc-sky, .pc-layer, .pc-win, .pc-perf) { transition: fill 900ms ease, stroke 900ms ease; }
.pc-sky { fill: var(--pc-sky); }
.pc-far { fill: var(--pc-far); }
.pc-mid { fill: var(--pc-mid); }
.pc-near { fill: var(--pc-near); }
.pc-layer { transition: transform 320ms cubic-bezier(.2, .8, .3, 1); }
.pc-win { fill: var(--pc-win); transition: fill-opacity 500ms ease; }
.pc-win.is-off { fill-opacity: 0; }
.postcard:not([data-phase="night"]) .pc-win { fill-opacity: .3; }
.postcard[data-phase="evening"] .pc-win:not(.is-off) { fill-opacity: .9; }
.pc-stars use { fill: var(--pc-star); animation: pc-twinkle 3.4s ease-in-out calc(var(--i) * -.41s) infinite; }
.pc-moon { fill: var(--pc-moon); }
.pc-sun circle { fill: var(--pc-sun); }
.pc-sun path { fill: none; stroke: var(--pc-sun); stroke-width: 5; stroke-linecap: round; }
.postcard[data-phase="night"] .pc-sun, .postcard:not([data-phase="night"]) :is(.pc-moon, .pc-stars) { display: none; }
.pc-tw { fill: none; stroke: var(--pc-tower); stroke-width: 3; stroke-linecap: round; }
.pc-tw--light { stroke: var(--pc-tower-light); stroke-width: 2; }
.pc-orb { fill: var(--pc-orb); }
.pc-orb-shade { fill: var(--pc-orb-shade); }
.pc-ring { fill: none; stroke: var(--pc-tower-light); stroke-width: 2.2; }
.pc-base { fill: var(--pc-tower-light); }
.pc-crumple { mix-blend-mode: multiply; opacity: .5; pointer-events: none; }
.pc-grain { opacity: .55; pointer-events: none; }
.pc-fold { fill: none; stroke: #fff; stroke-width: 1.3; stroke-linecap: round; opacity: .55; }
.pc-perf { fill: none; stroke: var(--pc-sky); stroke-width: 7; stroke-dasharray: 0 9; stroke-linecap: round; }
.pc-postmark { fill: none; stroke: #102c54; stroke-width: 2.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pc-postmark text { fill: #102c54; stroke: none; font: 800 13.5px Onest, sans-serif; text-anchor: middle; }
.postcard.is-stamped .pc-postmark { opacity: .82; animation: pc-stamp 560ms cubic-bezier(.22, 1, .36, 1) both; }
.pc-note { display: grid; gap: 2px; width: fit-content; margin: 16px 0 0 18px; color: var(--ink); rotate: 2deg; }
.pc-time { font: 400 2.1rem/1 Allura, cursive; }
.pc-time time { font-variant-numeric: tabular-nums; }
.pc-status { color: #0a1f3f; font-size: .86rem; font-weight: 700; }
@keyframes pc-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes pc-stamp {
  0% { opacity: 0; transform: scale(2.3) rotate(-22deg); }
  55% { opacity: .9; transform: scale(.93) rotate(3deg); }
  100% { opacity: .82; transform: none; }
}

/* ───── A3. Desk props (decorative, never clickable) ───── */
.contact.surface > .contact-props { position: absolute; z-index: 1; inset: 0; pointer-events: none; }
.prop { position: absolute; }
.prop--mug { left: calc(50% - 170px); bottom: 26px; width: 86px; }
.prop--pencil { left: clamp(20px, 4vw, 56px); top: 26px; width: 170px; rotate: -8deg; filter: drop-shadow(1px 3px 1px #00000040); }
.prop--clip { top: -8px; right: clamp(40px, 9vw, 120px); width: 18px; rotate: 14deg; }
.steam { fill: none; stroke: #fffdf7; stroke-width: 3.5; stroke-linecap: round; opacity: 0; animation: steam 3.2s ease-in-out calc(var(--s, 0) * 1s) infinite; }
@keyframes steam { 0% { opacity: 0; translate: 0 10px; } 40% { opacity: .8; } 100% { opacity: 0; translate: 0 -12px; } }
  position: absolute; z-index: 3;
  padding: 8px 14px 6px;
  background: var(--sun);
  color: #2a2415;
  font: 400 1.75rem/1 Allura, cursive;
  box-shadow: 0 2px 0 #b6833466, 0 8px 14px #00000033;
  rotate: -6deg;
  pointer-events: none;
  left: clamp(30px, 4vw, 56px);
  bottom: clamp(34px, 4vw, 52px);
}

/* ───── B5. Scroll progress strip ───── */
.scroll-strip { --p: 0; position: fixed; z-index: 32; inset: 0 0 auto; height: 5px; background: #fffdf7; box-shadow: 0 1px 0 #00000026; pointer-events: none; }
.scroll-strip i { display: block; height: 100%; background: var(--hot); transform: scaleX(var(--p)); transform-origin: 0 50%; }
.scroll-strip svg { position: absolute; top: 0; left: calc(var(--p) * (100% - 22px)); width: 22px; height: 15px; rotate: 8deg; }

/* ───── B6. Desk lamp + evening veil ───── */
.night-veil { position: fixed; z-index: 29; inset: 0; background: #0b1a33; opacity: 0; pointer-events: none; transition: opacity 700ms ease; }
.is-evening .night-veil { opacity: .16; }
.tool--lamp { min-width: 44px; justify-content: center; padding: 6px; }
.tool--lamp span { display: none; }
.tool--lamp .lamp-on { opacity: 0; }
.is-evening .tool--lamp .lamp-on { opacity: 1; }
.tool--lamp[data-mode="night"] { background: #ffdf54; color: #2a2415; }
.tool--lamp[data-mode="day"] { background: #e9eef7; color: #1d2433; }

/* ───── B7. "Now" note ───── */
.now-note { display: flex; gap: 6px; max-width: 380px; margin: 0; padding: 8px 14px; background: var(--paper); color: var(--ink); box-shadow: var(--paper-shadow); rotate: -1.2deg; overflow: hidden; }
.now-note b { flex: none; color: #b3300f; }
.now-line { display: inline-block; transition: opacity 260ms ease, translate 260ms ease; }
.now-line.is-leaving { opacity: 0; translate: 0 -8px; }

/* ───── B8. First-visit stamp ───── */
.intro-stamp { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; pointer-events: none; }
.intro-stamp[hidden] { display: none; }
.intro-stamp span {
  padding: 12px 26px 10px;
  border: 6px double #c0310c;
  background: #fffdf7e6;
  color: #c0310c;
  font: 800 clamp(2.4rem, 8vw, 4.6rem)/1 Bricolage, Onest, sans-serif;
  letter-spacing: .02em;
  text-transform: uppercase;
  rotate: -8deg;
  opacity: 0;
}
.intro-stamp.is-on span { animation: intro-stamp 1200ms cubic-bezier(.22, 1, .36, 1) both; }
@keyframes intro-stamp {
  0% { opacity: 0; transform: scale(2.4); }
  18% { opacity: 1; transform: scale(.94); }
  28% { transform: scale(1); }
  78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.03); }
}

/* ───── extras: tablet + phone ───── */
@media (max-width: 1100px) { .prop--pencil { display: none; } }
@media (max-width: 860px) {
  .contact.surface { grid-template-columns: 1fr; grid-template-areas: "copy" "links" "brief" "card"; grid-template-rows: none; }
  .postcard { justify-self: center; }
  .prop--mug { left: auto; right: 16px; bottom: 14px; }
}
@media (max-width: 700px) {
  .prop--clip { display: none; }
  .prop--mug { right: 12px; bottom: 10px; width: 58px; }
  .brief { rotate: 0deg; padding-inline: 14px; }
  .postcard { rotate: -1.4deg; margin-bottom: 40px; }
  .pc-time { font-size: 1.85rem; }
}
@media (max-width: 540px) {
  .now-note { order: 2; flex-basis: 100%; max-width: none; }
}

/* ───── extras: reduced motion = still life ───── */
@media (prefers-reduced-motion: reduce) {
  .brief-chip, .pc-layer, .pc-win, .night-veil, .now-line { transition: none; }
  .pc-stars use, .steam { animation: none; }
  .steam { opacity: .55; }
  .postcard .pc-postmark { opacity: .82; animation: none; }
  .intro-stamp { display: none; }
}
@media (max-width: 700px) {
  /* extras: keep the Now note clear of the fixed desk tools */
  .site-footer { padding-bottom: 64px; }
}

/* ════════════════════════════════════════════════════════════════════
   Living desk (card-desk.js)
   Movable paper cards. Position, tilt and lift live in custom properties
   set by the script: --cd-x, --cd-y (offset), --cd-r (resting turn),
   --cd-t (tilt while dragging), --cd-s (lift scale), --cd-z (stack order).
   Shadows stay neutral: black at low alpha, shifted down.
   ════════════════════════════════════════════════════════════════════ */

/* 1. Movable cards */
[data-movable] { position: relative; z-index: var(--cd-z, auto); }
/* :root raises specificity over the entrance animations (.process.is-in .step etc.);
   once a card has been moved its entrance animation is finished for good. */
:root [data-movable].cd-moved {
  transform: translate(var(--cd-x, 0px), var(--cd-y, 0px)) rotate(calc(var(--cd-r, 0deg) + var(--cd-t, 0deg))) scale(var(--cd-s, 1));
  animation: none;
}
[data-movable].cd-lifted { filter: drop-shadow(0 16px 12px rgb(0 0 0 / .2)); }
[data-movable].cd-settling { transition: transform 260ms var(--ease-out), filter 260ms var(--ease-out); }
[data-movable]:focus-visible { outline: 3px solid var(--pen, #1d3f78); outline-offset: 4px; }
html.cd-grabbing, html.cd-grabbing * { cursor: grabbing; user-select: none; }
@media (hover: hover) and (pointer: fine) {
  /* Process cards keep their dart cursor from the existing pointer hints. */
  [data-movable]:not(.step) { cursor: grab; }
}

/* The facts in About become small paper slips so they read as cards. */
.facts li[data-movable] { width: fit-content; max-width: 100%; margin-top: 6px; padding: 2px 12px 3px 8px; border-radius: 2px; background: var(--paper, #fffdf7); box-shadow: 0 2px 0 rgb(0 0 0 / .08), 0 4px 8px rgb(0 0 0 / .08); }

/* Paperclip handle: touch and pen only (28px icon, 44px touch area). */
.cd-handle { display: none; }
@media (hover: none), (pointer: coarse) {
  [data-movable] { touch-action: pan-y; }
  .cd-handle {
    position: absolute;
    z-index: 4;
    right: 6px;
    bottom: 6px;
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--paper, #fffdf7);
    color: var(--ink);
    box-shadow: 0 2px 4px rgb(0 0 0 / .18);
    touch-action: none;
  }
  .cd-handle::before { position: absolute; inset: -8px; content: ""; }
  .cd-handle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .facts li[data-movable] { padding-right: 44px; }
  .facts li[data-movable] .cd-handle { top: 50%; bottom: auto; margin-top: -14px; }
}
@media (prefers-reduced-motion: reduce) {
  [data-movable].cd-settling { transition: none; }
}

/* 2. Pins, stacks, Tidy up, Remember my layout, Shake (card-desk.js) */
@property --cd-sway { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
:root [data-movable].cd-moved {
  transform: translate(var(--cd-x, 0px), var(--cd-y, 0px)) rotate(calc(var(--cd-r, 0deg) + var(--cd-t, 0deg) + var(--cd-sway))) scale(var(--cd-s, 1));
}
/* A pinned card hangs from its pin (top left) and sways ±1° every 4 s. */
:root [data-movable].cd-pinned { transform-origin: 14px 10px; animation: cd-sway 4s ease-in-out infinite; }
@keyframes cd-sway { 0%, 100% { --cd-sway: -1deg; } 50% { --cd-sway: 1deg; } }
[data-movable].cd-tidying { transition: transform 600ms var(--ease-out); }

.cd-pin {
  position: absolute;
  z-index: 5;
  top: -10px;
  left: -10px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6b7a90;
  cursor: pointer;
}
.cd-pin::before { position: absolute; inset: -8px; content: ""; } /* 44px target */
.cd-pin svg { width: 20px; height: 20px; fill: var(--paper, #fffdf7); stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 2px 1px rgb(0 0 0 / .22)); }
.cd-pin[aria-pressed="true"] { color: var(--hot, #e74722); }
.cd-pin[aria-pressed="true"] svg { fill: var(--hot, #e74722); }
.cd-pin:hover { color: var(--ink); }
.cd-pin:focus-visible { outline: 3px solid var(--pen, #1d3f78); outline-offset: 1px; }
.cd-pinned { cursor: default; }
/* The fact slips are short: the pin sits on the right end. */
.facts li[data-movable] .cd-pin { top: 50%; right: -12px; left: auto; margin-top: -14px; }
.facts li[data-movable] { padding-right: 22px; }

.tool--tidy, .tool--remember { justify-content: center; }
.tool--tidy[hidden], .tool--remember[hidden] { display: none; }
@media (max-width: 700px) {
  .tool--tidy, .tool--remember { min-width: 44px; padding: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  :root [data-movable].cd-pinned { animation: none; }
  [data-movable].cd-tidying { transition: none; }
}
@media (hover: none), (pointer: coarse) {
  /* Fact slips on touch: clip handle left of the pin. */
  .facts li[data-movable] { padding-right: 56px; }
  .facts li[data-movable] .cd-handle { right: 20px; }
}
/* Keep host styles (e.g. .facts li svg: red stroke, dash draw-in) off the handle and pin icons. */
:root :is(.cd-handle, .cd-pin) svg { flex: none; margin: 0; stroke-dasharray: none; stroke-dashoffset: 0; animation: none; }
:root .cd-handle svg { width: 17px; height: 17px; stroke: currentColor; stroke-width: 2; }
:root .cd-pin svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; }

/* 3. Handwritten notes, quiet desk life, evening light (card-desk.js) */
/* Marker note on a project: Allura in --pen, slightly turned; the underline draws in 400ms. */
.cd-note {
  position: absolute;
  z-index: 6;
  top: -4px;
  right: 4%;
  display: grid;
  justify-items: center;
  color: var(--pen, #1d3f78);
  font: 400 clamp(1.6rem, 2.6vw, 2.1rem)/1 Allura, cursive;
  white-space: nowrap;
  rotate: -5deg;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--ease-out);
}
.cd-note-line { width: 112px; height: 13px; margin-top: -2px; }
.cd-note-line path { fill: none; stroke: var(--pen, #1d3f78); stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 400ms var(--ease-out); }
:is(.cd-note-on, :focus-within) > .cd-note { opacity: 1; }
:is(.cd-note-on, :focus-within) > .cd-note .cd-note-line path { stroke-dashoffset: 0; }
@media (hover: hover) {
  :hover > .cd-note { opacity: 1; }
  :hover > .cd-note .cd-note-line path { stroke-dashoffset: 0; }
}

/* Fly and paper scrap: fixed layer above the content, below the evening veil and the toolbar. */
.cd-ambient { position: fixed; z-index: 28; inset: 0; overflow: hidden; pointer-events: none; }
.cd-fly, .cd-scrap { position: absolute; top: 0; left: 0; will-change: transform; }
.cd-fly { display: block; padding: 10px; margin: -10px; pointer-events: auto; cursor: pointer; } /* 34px target around a 14px fly */
.cd-fly svg { display: block; width: 14px; height: 14px; }
.cd-scrap svg { display: block; width: 22px; height: auto; filter: drop-shadow(0 3px 2px rgb(0 0 0 / .16)); }

/* Laptop cursor on the desk */
.laptop-cursor { animation: cd-blink 1.1s steps(1) infinite; }
@keyframes cd-blink { 50% { opacity: 0; } }

/* Evening light: one flat warm sheet, multiplied onto the desk. No gradient, no blur. */
.desk-warm { position: fixed; z-index: 29; inset: 0; background: #ffb74d; mix-blend-mode: multiply; opacity: 0; pointer-events: none; transition: opacity 700ms ease; }
.is-warm .desk-warm { opacity: .1; }

@media (prefers-reduced-motion: reduce) {
  .cd-note, .cd-note-line path, .desk-warm { transition: none; }
  .cd-note-line path { stroke-dashoffset: 0; }
  .laptop-cursor { animation: none; }
  .cd-ambient { display: none; }
}

/* Typography polish: avoid a lone last word on paragraphs (detector "straggler" advisories). */
p, figcaption, dd { text-wrap: pretty; }

/* ════════════════════════════════════════════════════════════════════
   Toolbar as a desk label: one flat cream plate (like the MORE BUILDS
   label and the project cards), 1px ink outline, 1px dividers between
   items. Muted brass (the drawer handle colour) marks only what is on.
   Overrides the earlier dark .pencil-case tray and .tool buttons.
   ════════════════════════════════════════════════════════════════════ */
:root .pencil-case {
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #1d2b44;
  border-radius: 7px;
  background: #f4efe6;
  box-shadow: 0 2px 0 rgb(0 0 0 / .18), 0 8px 16px rgb(0 0 0 / .16);
  rotate: -.6deg; /* sits on the desk like the other labels */
}
:root .tool {
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #1d2b44;
  font: 800 .8rem/1 Onest, sans-serif;
  letter-spacing: .02em;
  box-shadow: none;
}
:root .tool + .tool { border-left: 1px solid #1d2b4440; } /* thin divider */
:root .tool svg { box-sizing: content-box; flex: none; width: 18px; height: 18px; padding: 0; border-radius: 0; background: none; color: currentColor; }
:root .tool:hover { background: #ebe3d4; }
:root .tool:active { translate: 0 1px; box-shadow: none; }
:root :is(.tool--sound, .tool--lamp) { min-width: 44px; padding: 0 13px; }
/* active only: muted brass */
:root .tool[aria-pressed="true"], :root .tool--lamp[data-mode="night"] { background: #e8d49a; color: #1d2b44; box-shadow: inset 0 -3px 0 #d5b25a; }
:root .tool--sound[aria-pressed="false"] { background: transparent; color: #5d6880; }
:root .tool--sound[aria-pressed="false"] svg { background: none; }
:root .tool--lamp[data-mode="day"] { background: transparent; color: #1d2b44; }
:root .tool:focus-visible { position: relative; z-index: 1; outline: 2px solid #1d2b44; outline-offset: -4px; }
@media (max-width: 700px) {
  :root .tool { min-width: 44px; padding: 0 12px; }
}

/* Shake: a darker-brown pill on the archive drawer's right corner, gold outline, neutral shadow. */
.cabinet { position: relative; }
.cd-shake {
  position: absolute;
  z-index: 3;
  right: 30px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 5px 18px 5px 5px;
  border: 2px solid #c7a24c;
  border-radius: 999px;
  background: #6b4122;
  color: #fff3da;
  font: 800 .9rem/1 Onest, sans-serif;
  box-shadow: 0 3px 0 rgb(0 0 0 / .35), 0 8px 14px rgb(0 0 0 / .28);
  cursor: pointer;
  transition: background 160ms var(--ease-out), translate 140ms var(--ease-out);
}
.cd-shake[hidden] { display: none; }
.cd-shake svg { flex: none; width: 18px; height: 18px; padding: 6px; border-radius: 50%; background: #fff3da; color: #6b4122; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; box-sizing: content-box; }
.cd-shake:hover { background: #5a3619; }
.cd-shake:active { translate: 0 2px; box-shadow: 0 1px 0 rgb(0 0 0 / .35), 0 3px 6px rgb(0 0 0 / .28); }
.cd-shake:focus-visible { outline: 3px solid #ffdf54; outline-offset: 3px; }
@media (max-width: 700px) {
  /* The drawer front wraps on phones: Shake sits under the drawer instead of on it. */
  .cd-shake { position: static; display: flex; margin: 14px auto 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cd-shake { transition: none; }
}

/* Flaticon UIcons: filled glyph paths, so no stroke; credit line in the footer. */
.icon-credit { font-weight: 600; }
.icon-credit a { min-height: 0; display: inline; text-decoration: underline; text-underline-offset: 2px; }

/* Surfaces, actions and layout for the main reading path */
.contact-link--telegram, .brief .brief-send { --fill: var(--sun); color: var(--ink); }
:is(.contact-link, .brief .button)::before { content: none; }
:is(.contact-link, .brief .button):active { transform: translateY(1px); }
@media (hover: hover) {
  :is(.contact-link, .brief .button:not(:disabled)):hover { border-color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
}
.skip-link { z-index: 33; }
:is(.desk-sheet, .note-compose, .note-board, .step) { border: 1px solid var(--rule); box-shadow: none; }
.process-head { margin-bottom: 21px; text-align: start; }
.step { background: var(--paper); }

.project-gallery {
  --gallery-background: #f1eee7;
  --gallery-rule: #c8c1b4;
  isolation: isolate;
  margin-top: 0;
  padding: clamp(20px, calc(3.8vw + 1px), 49px);
  border: 0;
  background: none;
  box-shadow: none;
}
.project-gallery::before {
  position: absolute;
  z-index: -1;
  inset: 0 calc(50% - 50vw);
  background: var(--gallery-background);
  content: "";
}
.gallery-head {
  width: auto;
  margin: 0 0 clamp(18px, 3vw, 36px);
  padding: 0 0 15px;
  border-bottom: 1px solid var(--gallery-rule);
  background: none;
  box-shadow: none;
  rotate: none;
}
.gallery-head h2 { font-size: clamp(2.2rem, 4.1vw, 3.65rem); line-height: 1; letter-spacing: -.035em; }
.gallery-head::before, .gallery-head::after { content: none; }
.case-line { gap: clamp(24px, 4vw, 44px); }
.case, .case:nth-child(2n) {
  --lean: 0deg;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(16px, 2.5vw, 32px);
  padding: 17px 0 0;
}
.case-print { padding: 8px; border: 1px solid var(--gallery-rule); border-radius: var(--radius-panel); box-shadow: none; }
.case-print::after { content: none; }
.case-note, .case:nth-child(2n) .case-note {
  width: auto;
  margin: 0;
  padding: clamp(14px, 2vw, 24px);
  border: 1px solid var(--gallery-rule);
  border-radius: var(--radius-panel);
  background: var(--paper);
  box-shadow: none;
  transform: none;
}
.case-note::before, .case-note::after { content: none; }
.case:focus-within { z-index: 3; }

.contact.surface {
  grid-template-areas: "copy brief" "links brief" "card brief" "darts darts";
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  row-gap: 18px;
  padding: clamp(18px, 4vw, 50px);
  border: 1px solid var(--rule);
  border-radius: var(--radius-panel);
  background: #e4d2b9;
  box-shadow: none;
}
.contact h2 { margin: 0; max-width: 13ch; font: 800 clamp(2.15rem, 4.25vw, 4.1rem)/1 Bricolage, Onest, sans-serif; letter-spacing: -.035em; }
.reply-time { margin-top: 9px; color: var(--muted); font-weight: 650; }
.contact-links { gap: 8px; }
.contact-link:not(.contact-link--telegram) { --fill: var(--paper); color: var(--ink); border-color: #8b735b; }
.contact-link .icon { width: 18px; height: 18px; }
.brief { margin: 0; padding-top: 22px; }
.brief h3 { margin-bottom: 6px; }
.brief-intro { margin: 0 0 16px; color: var(--muted); font-size: .88rem; }
.dart-game { grid-area: darts; display: grid; margin-top: 6px; border: 1px solid #b29a7f; border-radius: var(--radius-panel); box-shadow: none; }

.site-footer { flex-wrap: wrap; }
@media (max-width: 860px) {
  .contact.surface { grid-template-columns: 1fr; grid-template-areas: "copy" "links" "brief" "card" "darts"; grid-template-rows: none; }
  .contact h2 { max-width: 18ch; }
}
@media (max-width: 700px) {
  html { scroll-padding-bottom: calc(65px + env(safe-area-inset-bottom)); }
  .case, .case:nth-child(2n) { grid-template-columns: 1fr; padding-top: 12px; }
  .step .dart { width: 46px; }
}


/* ════════════════════ Scroll scene: About collage → Projects (scroll-scene.js) ════════════════════
   One progress value, --scene (0…1), is written by scroll-scene.js on #works and .desk-world.
   Three overlapping phases are derived from it here:
     1. the desk clears: pencil and eraser slide to the nearest edge      p 0 → .5
     2. a kraft folder flap lifts off the first case                      p .25 → .75
     3. the first case assembles: print + clip, then the description     p .45 → 1
   Without html.scene-on (no JavaScript, reduced motion, direct links to #works or a project,
   or focus inside the first case) nothing below applies and the page is simply assembled.
   Only transform and opacity move. The wrappers carry the motion, because .obj owns `translate`
   (desk-world.js), .case owns `transform` (card-desk.js) and .case-print / .case-note have their own. */
.scene-shift { display: block; }
.scene-wrap { min-width: 0; }
.scene-wrap--print { position: relative; }
.scene-wrap--note { position: relative; z-index: 2; }
.scene-flap { display: none; }

html.scene-on :is(#works, .desk-world) {
  --amp: 1;
  /* phase progress, clamped */
  --p1: clamp(0, var(--scene, 1) * 2, 1);
  --p2: clamp(0, (var(--scene, 1) - .25) * 2, 1);
  --p3a: clamp(0, (var(--scene, 1) - .45) / .3, 1);
  --p3b: clamp(0, (var(--scene, 1) - .6) / .4, 1);
  /* smoothstep easing: t² (3 − 2t) */
  --e1: calc(var(--p1) * var(--p1) * (3 - 2 * var(--p1)));
  --e2: calc(var(--p2) * var(--p2) * (3 - 2 * var(--p2)));
  --e3a: calc(var(--p3a) * var(--p3a) * (3 - 2 * var(--p3a)));
  --e3b: calc(var(--p3b) * var(--p3b) * (3 - 2 * var(--p3b)));
  /* the clip's snap: a short triangle that peaks at p = .7 */
  --snap: max(0, min((var(--scene, 1) - .66) * 25, (.74 - var(--scene, 1)) * 25));
}

/* Phase 1. Screen-space slide: undo the object's own rotate, slide, rotate back, then tilt a little. */
html.scene-on .scene-shift--left {
  transform: rotate(calc(-1 * var(--r))) translateX(calc(var(--e1) * var(--amp) * -46px)) rotate(var(--r)) rotate(calc(var(--e1) * var(--amp) * -8deg));
}
html.scene-on .scene-shift--right {
  transform: rotate(calc(-1 * var(--r))) translateX(calc(var(--e1) * var(--amp) * 46px)) rotate(var(--r)) rotate(calc(var(--e1) * var(--amp) * 8deg));
}

/* Phase 2. The folder flap: same kraft, texture and tab as the About folder. Decorative only. */
html.scene-on #project-practiceflow-landing .scene-wrap--print { perspective: 1600px; }
html.scene-on .scene-flap {
  position: absolute;
  z-index: 3;
  inset: -10px -8px -8px;
  display: block;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  transform: rotate(var(--lean)) rotateX(calc(var(--e2) * -170deg));
  pointer-events: none;
}
.scene-flap__face {
  position: absolute;
  inset: 0;
  border-radius: 4px 4px 18px 18px;
  backface-visibility: hidden;
  opacity: calc(1 - clamp(0, (var(--p2) - .55) / .4, 1));
}
.scene-flap__front {
  display: grid;
  place-items: center;
  background: var(--kraft-tex) var(--kraft, #c89f72);
  box-shadow: inset 0 0 0 1px #ffffff40, inset 0 -6px 0 #0000000f, 0 3px 0 #0000001f, 0 14px 26px #00000033;
}
.scene-flap__back {
  background: var(--kraft-tex) #d6b48a;
  box-shadow: inset 0 0 0 1px #ffffff40, inset 0 6px 0 #0000000f;
  transform: rotateX(180deg);
}
.scene-flap__name { color: var(--pen, #1d3f78); font: 400 clamp(2.4rem, 6vw, 4.6rem)/1 Allura, cursive; rotate: -4deg; }
.scene-flap__tab {
  position: absolute;
  top: calc(100% - 1px);
  left: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 26px 2px 18px;
  border-radius: 0 0 16px 13px;
  background: #cfa77b;
  color: #4a3016;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.scene-flap__tab span { color: #2b1c0e; font-weight: 800; }

/* Phase 3. The print and its clip arrive together, then the description slides in. */
html.scene-on #project-practiceflow-landing .scene-wrap--print {
  transform-origin: 50% 0;
  transform: translateY(calc((1 - var(--e3a)) * var(--amp) * -14px)) rotate(calc((1 - var(--e3a)) * var(--amp) * -3deg));
}
html.scene-on #project-practiceflow-landing .line-clip {
  opacity: clamp(0, (var(--scene, 1) - .45) * 10, 1);
  transform: translateY(calc((1 - var(--e3a)) * -8px + var(--snap) * var(--amp) * 5px));
}
html.scene-on #project-practiceflow-landing .scene-wrap--note {
  opacity: var(--e3b);
  transform: translateX(calc((1 - var(--e3b)) * var(--amp) * 32px));
}

/* The other two cases: only a light reveal of the description sheet, once, on IntersectionObserver. */
/* --reveal-y feeds the shared `translate` of .case-note (see "Tactile paper" below), so the hover lift and
   this reveal never fight over the same property. */
html.scene-on .case:not(#project-practiceflow-landing) .case-note { opacity: 0; --reveal-y: 12px; }
html.scene-on .case.scene-noted:not(#project-practiceflow-landing) .case-note { opacity: 1; --reveal-y: 0px; } /* same :not(#id) as the hiding rule, or the id there outranks this one and the note never shows */

/* Phones: half the amplitude, the description comes from below, a shorter flap. */
@media (max-width: 700px) {
  html.scene-on :is(#works, .desk-world) { --amp: .5; }
  html.scene-on #project-practiceflow-landing .scene-wrap--print { perspective: 900px; }
  html.scene-on .scene-flap { bottom: auto; height: 74%; }
  .scene-flap__face { border-radius: 4px 4px 14px 14px; }
  html.scene-on #project-practiceflow-landing .scene-wrap--note {
    transform: translateY(calc((1 - var(--e3b)) * 32px * var(--amp)));
  }
}
/* Safety net; scroll-scene.js also drops html.scene-on when reduced motion is switched on. */
@media (prefers-reduced-motion: reduce) {
  .scene-flap { display: none !important; }
}


/* ════════════════════ Scroll scene 2: Projects → Archive drawer (scroll-scene.js) ════════════════════
   --drawer-scene (0…1) is written on .cabinet while html.scene-drawer is on.
     label "More builds" is stuck on                      p 0 → .3
     the drawer is pulled forward, the handle gets a tug  p .1 → .55 (tug peaks near .52)
     the three top cards rise out of the drawer, staggered p .3 → .85
     "Pull to open" appears                                p .72 → 1
   Cards move with `translate` / `rotate` on .archive-paper: card-desk.js owns the card's transform
   and the closed-drawer peek owns .archive-paper's transform. Only while the drawer is closed. */
html.scene-drawer .cabinet {
  --dw: var(--drawer-scene, 1);
  --dw-a: clamp(0, var(--dw) / .3, 1);
  --dw-b: clamp(0, (var(--dw) - .1) / .45, 1);
  --dw-c1: clamp(0, (var(--dw) - .3) / .35, 1);
  --dw-c2: clamp(0, (var(--dw) - .4) / .35, 1);
  --dw-c3: clamp(0, (var(--dw) - .5) / .35, 1);
  --dw-d: clamp(0, (var(--dw) - .72) / .28, 1);
  /* ease-out cubic: 1 − (1 − t)³, things decelerate as they settle */
  --dw-ea: calc(1 - (1 - var(--dw-a)) * (1 - var(--dw-a)) * (1 - var(--dw-a)));
  --dw-eb: calc(var(--dw-b) * var(--dw-b) * (3 - 2 * var(--dw-b)));
  --dw-e1: calc(1 - (1 - var(--dw-c1)) * (1 - var(--dw-c1)) * (1 - var(--dw-c1)));
  --dw-e2: calc(1 - (1 - var(--dw-c2)) * (1 - var(--dw-c2)) * (1 - var(--dw-c2)));
  --dw-e3: calc(1 - (1 - var(--dw-c3)) * (1 - var(--dw-c3)) * (1 - var(--dw-c3)));
  --dw-ed: calc(1 - (1 - var(--dw-d)) * (1 - var(--dw-d)) * (1 - var(--dw-d)));
  /* the handle's tug: rises from .38, holds around .52, lets go by .66 */
  --dw-tug: max(0, min((var(--dw) - .38) * 7, (.66 - var(--dw)) * 7, 1));
}
html.scene-drawer .cabinet .archive-title {
  opacity: var(--dw-ea);
  transform: translateX(calc((1 - var(--dw-ea)) * -28px)) rotate(calc((1 - var(--dw-ea)) * -5deg));
}
html.scene-drawer .cabinet .drawer-front {
  transform-origin: 50% 0;
  transform: translateY(calc((1 - var(--dw-eb)) * -10px)) scale(calc(.975 + .025 * var(--dw-eb)));
}
html.scene-drawer .cabinet .drawer-handle {
  transform-origin: 50% 0;
  transform: perspective(160px) rotateX(calc(var(--dw-tug) * 42deg));
}
html.scene-drawer .cabinet .drawer-hint {
  opacity: var(--dw-ed);
  transform: translateX(calc((1 - var(--dw-ed)) * -12px));
}
html.scene-drawer .cabinet.is-closed .archive-case:nth-child(1) { --dw-e: var(--dw-e1); --dw-r: -4deg; }
html.scene-drawer .cabinet.is-closed .archive-case:nth-child(2) { --dw-e: var(--dw-e2); --dw-r: 3deg; }
html.scene-drawer .cabinet.is-closed .archive-case:nth-child(3) { --dw-e: var(--dw-e3); --dw-r: -2deg; }
/* the sheet and its pushpin (card-desk.js) rise together; the pin shows once the sheet is nearly up */
html.scene-drawer .cabinet.is-closed .archive-case:nth-child(-n + 3) > :is(.archive-paper, .cd-pin) { translate: 0 calc((1 - var(--dw-e)) * 130px); }
html.scene-drawer .cabinet.is-closed .archive-case:nth-child(-n + 3) > .archive-paper { rotate: calc((1 - var(--dw-e)) * var(--dw-r)); }
html.scene-drawer .cabinet.is-closed .archive-case:nth-child(-n + 3) > .cd-pin { opacity: clamp(0, (var(--dw-e) - .6) * 2.5, 1); }


/* ════════════════════ Scroll scene 3: → Contact, the postcard is stamped (scroll-scene.js) ════════════════════
   --stamp-scene (0…1) is written on .postcard while html.scene-stamp is on.
     a rubber stamp swings in from the upper right         p 0 → .35
     it lines up above the postmark                         p .35 → .62
     it presses: the ink appears, the rubber squashes      p .62 → .77 (contact at .72)
     it lifts away and fades                                p .8 → 1
   The stamp and its shadow are added by scroll-scene.js, aria-hidden, never clickable.
   Without the scene the postmark appears as before (desk-extras.js › postcard). */
.pc-rubber, .pc-rubber-shadow { display: none; }
html.scene-stamp .postcard {
  --st: var(--stamp-scene, 1);
  --st-amp: 1;
  --st-a: clamp(0, var(--st) / .35, 1);
  --st-b: clamp(0, (var(--st) - .35) / .27, 1);
  --st-c: clamp(0, (var(--st) - .62) / .1, 1);
  --st-d: clamp(0, (var(--st) - .8) / .2, 1);
  --st-ea: calc(1 - (1 - var(--st-a)) * (1 - var(--st-a)) * (1 - var(--st-a)));
  --st-eb: calc(var(--st-b) * var(--st-b) * (3 - 2 * var(--st-b)));
  --st-ec: calc(var(--st-c) * var(--st-c));
  --st-ed: calc(var(--st-d) * var(--st-d) * (3 - 2 * var(--st-d)));
  --st-squash: max(0, min((var(--st) - .715) * 40, (.765 - var(--st)) * 40, 1));
  --st-ink: clamp(0, (var(--st) - .715) / .02, 1);
  --st-spread: clamp(0, (var(--st) - .72) / .06, 1);
  /* horizontal offset, shared by the stamp and its shadow */
  --st-x: calc(((1 - var(--st-ea)) * 170px + var(--st-ed) * 70px) * var(--st-amp));
}
html.scene-stamp .pc-rubber,
html.scene-stamp .pc-rubber-shadow {
  position: absolute;
  /* the postmark's centre: (86, 76) in the 600 × 380 artwork, inside the frame's 10px padding */
  left: calc(10px + (100% - 20px) * .1433);
  top: calc(10px + (100% - 20px) * .2);
  display: block;
  pointer-events: none;
}
html.scene-stamp .pc-rubber {
  z-index: 4;
  width: clamp(80px, 22%, 124px);
  translate: -50% -100%;
  transform-origin: 50% 100%;
  transform:
    translate(var(--st-x), calc((-170px * (1 - var(--st-ea)) - 56px * (1 - var(--st-eb)) - 14px * (1 - var(--st-ec)) - 190px * var(--st-ed)) * var(--st-amp)))
    rotate(calc(16deg * (1 - var(--st-ea)) + 8deg * var(--st-ed)))
    scale(calc(1 + .03 * var(--st-squash)), calc(1 - .07 * var(--st-squash)));
  opacity: calc(clamp(0, var(--st) * 8, 1) * (1 - clamp(0, (var(--st) - .84) / .12, 1)));
  filter: drop-shadow(0 3px 2px #00000040);
}
html.scene-stamp .pc-rubber-shadow {
  z-index: 3;
  width: clamp(64px, 17%, 100px);
  aspect-ratio: 4;
  border-radius: 50%;
  background: #000;
  filter: blur(5px);
  translate: -50% -50%;
  transform: translate(calc(var(--st-x) * .6), 5px) scale(calc(1.8 - .7 * var(--st-eb) - .1 * var(--st-ec)));
  /* the shadow is gone quickly once the stamp lifts, so it never reads as a smudge */
  opacity: calc((.05 + .2 * var(--st-eb) + .1 * var(--st-ec)) * (1 - clamp(0, (var(--st) - .79) / .07, 1)) * clamp(0, var(--st) * 8, 1));
}
/* the ink follows the press instead of the timed slap */
html.scene-stamp .postcard .pc-postmark {
  animation: none;
  opacity: calc(.82 * var(--st-ink));
  transform: scale(calc(1.06 - .06 * var(--st-spread)));
}

/* Phones: shorter travel. The drawer cards rise the same way (one column, one card shows). */
@media (max-width: 700px) {
  html.scene-stamp .postcard { --st-amp: .6; }
}
/* Safety net; scroll-scene.js also ends every scene when reduced motion is switched on. */
@media (prefers-reduced-motion: reduce) {
  .pc-rubber, .pc-rubber-shadow { display: none !important; }
}


/* ════════════════════ Tactile paper: hover and press ════════════════════
   Paper you can pick up: on hover a sheet rises a few pixels, straightens a little and its shadow
   grows downward (neutral black, low alpha). Tape lifts at the corner, binder clips tighten, pins rise
   and press in, buttons sink on press. Hover only with a fine pointer; presses work everywhere.
   Property ownership (nothing here touches it):
     [data-movable] transform → card-desk.js; .case-print / .case-note transform → their own lean;
     .step translate / rotate → its entrance animations (fill: both), so steps lift with `scale`;
     .postcard rotate → its own tilt; first-case wrappers → the scroll scene. */
:root {
  --paper-shadow-up: 0 3px 4px #0000001c, 0 16px 28px #00000026;
  --tactile: 240ms var(--ease-out);
}
.case-print, .case-note, .pc-frame {
  transition: translate var(--tactile), rotate var(--tactile), box-shadow var(--tactile);
}
.case-print, .pc-frame { translate: 0 var(--lift-y, 0px); }
.case-note { translate: 0 calc(var(--reveal-y, 0px) + var(--lift-y, 0px)); }
html.scene-on .case:not(#project-practiceflow-landing) .case-note {
  transition: opacity 520ms var(--ease-out), translate var(--tactile), rotate var(--tactile), box-shadow var(--tactile);
}
.step { transition: scale var(--tactile), box-shadow var(--tactile); }
.pc-frame::before { transition: translate var(--tactile), rotate var(--tactile), scale var(--tactile); }
.case-print .line-clip, .step .line-clip { transition: translate var(--tactile); }
.drawer-body .archive-paper { transition: transform 420ms var(--ease-out), box-shadow var(--tactile); }

/* Hover, fine pointers only. Shadows deepen for everyone; movement only without reduced motion.
   Not while a card is being dragged: card-desk.js has its own lifted look (.cd-lifted). */
@media (hover: hover) and (pointer: fine) {
  html:not(.cd-grabbing) :is(.case-print, .case-note):hover,
  html:not(.cd-grabbing) .step:not(.cd-lifted):hover { box-shadow: var(--paper-shadow-up); }
  .drawer-body .archive-paper:hover { box-shadow: 0 4px 4px #00000030, 0 20px 26px #00000047; }
  .postcard:hover .pc-frame { box-shadow: 0 4px 5px #0000001f, 0 26px 40px #0000003b; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  /* a sheet rises off the board; the big screenshot stays level, the smaller note turns a touch */
  html:not(.cd-grabbing) :is(.case-print, .case-note):hover { --lift-y: -4px; }
  html:not(.cd-grabbing) .case-note:hover { rotate: .5deg; }
  html:not(.cd-grabbing) .case:nth-child(2n) .case-note:hover { rotate: -.5deg; }
  html:not(.cd-grabbing) .case-print:hover .line-clip { translate: 0 1px; }

  html:not(.cd-grabbing) .step:not(.cd-lifted):hover { scale: 1.025; }
  html:not(.cd-grabbing) .step:not(.cd-lifted):hover .line-clip { translate: 0 1px; }

  .postcard:hover .pc-frame { --lift-y: -5px; }
  .postcard:hover .pc-frame::before { translate: 0 -2px; rotate: 5deg; scale: 1.03 1.1; }

  /* pins rise toward the finger, the drawer handle swings up ready to be pulled */
  .cd-pin:hover svg { translate: 0 -1px; filter: drop-shadow(0 4px 2px rgb(0 0 0 / .26)); }
  .drawer-front:hover .drawer-handle { rotate: x 30deg; transform-origin: 50% 0; }
}

/* Presses, every pointer: pins push into the paper, controls sink with their shadow. */
.cd-pin svg { transition: translate 140ms var(--ease-out), scale 140ms var(--ease-out), filter 140ms var(--ease-out); }
.cd-pin:active svg { translate: 0 1px; scale: .86; filter: drop-shadow(0 1px 0 rgb(0 0 0 / .3)); }
.drawer-handle { transition: rotate var(--tactile); }
.drawer-front { transition: translate 120ms var(--ease-out); }
.drawer-front:active { translate: 0 3px; }
.brief-chip { box-shadow: 0 2px 0 #00000017; transition: translate 120ms var(--ease-out), box-shadow 120ms var(--ease-out), border-color 160ms var(--ease-out); }
.brief-chip:active { translate: 0 2px; box-shadow: 0 0 0 #00000017; }
.case-preview { transition: translate 120ms var(--ease-out); }
.case-preview:active { translate: 0 1px; }
@media (prefers-reduced-motion: no-preference) {
  /* pinning a card: the pin is pushed in once */
  .cd-pin[aria-pressed="true"] svg { animation: pin-push 300ms var(--ease-out); }
}
@keyframes pin-push {
  0% { scale: 1.12; translate: 0 -3px; }
  45% { scale: .84; translate: 0 1px; }
  100% { scale: 1; translate: 0 0; }
}


/* ════════════════════ Process: room at the sides of the desk ════════════════════
   The step cards may travel the full width of the desk ([data-desk-bleed], card-desk.js).
   On wide screens the empty sides get a few desk props in the style of .desk-world:
   flat colours, neutral drop shadows, decorative and never clickable, always under the cards. */
.process { position: relative; }
.process-props { display: none; }
@media (min-width: 1500px) {
  .process-props { position: absolute; z-index: 0; inset: 0; display: block; pointer-events: none; }
}
.desk-prop { position: absolute; display: block; filter: drop-shadow(0 2px 1px #00000033) drop-shadow(0 6px 8px #0000002e); }
.desk-prop svg { display: block; width: 100%; height: auto; }
.desk-prop--ruler { top: 4%; right: calc(100% + clamp(70px, 7vw, 150px)); width: 44px; rotate: -9deg; }
.desk-prop--pad { top: 56%; right: calc(100% + clamp(24px, 2.6vw, 60px)); width: 118px; rotate: 7deg; }
.desk-prop--sharpener { top: 8%; left: calc(100% + clamp(40px, 4vw, 96px)); width: 110px; rotate: -12deg; }
.desk-prop--ring { top: 50%; left: calc(100% + clamp(16px, 2.4vw, 56px)); width: 140px; filter: none; } /* a stain has no shadow */

/* ───────────────────────────────────────────────────────────────────────────
   Desk sides: stationery down both edges of the page
   On wide screens the page column (1180px) leaves bare desk at both sides. These .desk-world
   objects (index.html › "Desk sides") fill it: sticky notes, notebooks, receipts, a ruler,
   tape, clips, stamps. Each is centred in its margin and never wider than ~3/4 of it, so it
   stays clear of the column at any width from 1500px up. They are ordinary .obj elements:
   desk-world.js gives them the same parallax (translate) and they share the soft shadow.
   Works, About me and the note board carry data-desk-bleed, so cards can be dragged out here.
   ─────────────────────────────────────────────────────────────────────────── */
.obj--side { display: none; }
@media (min-width: 1500px) {
  .obj--side {
    --mw: calc((100% - 1180px) / 2);
    --ww: min(var(--w), calc(var(--mw) * .74));
    display: block;
    width: var(--ww);
    left: calc(var(--mw) / 2 - var(--ww) / 2);
  }
  .obj--side.obj--r { left: calc(100% - var(--mw) / 2 - var(--ww) / 2); }
}
/* The Projects board paints its own panel across the whole width (#works::before, z-index -1),
   which would cover .desk-world, so the stationery beside it lives inside #works in .works-props:
   first in the section, so the cases and the cabinet paint over it. --top is measured in #works. */
.works-props { display: none; }
@media (min-width: 1500px) {
  .works-props { position: absolute; z-index: 0; inset: 0; display: block; pointer-events: none; }
  .works-props .desk-prop {
    --mw: calc((100vw - 1180px) / 2 - 8px); /* side margin; 8px is about half a scrollbar */
    --ww: min(var(--w), calc(var(--mw) * .74));
    top: var(--top);
    width: var(--ww);
    rotate: var(--r);
  }
  .works-props .desk-prop--l { left: calc(var(--mw) / -2 - var(--ww) / 2); }
  .works-props .desk-prop--r { left: calc(100% + var(--mw) / 2 - var(--ww) / 2); }
}

/* ───────────────────────────────────────────────────────────────────────────
   Header: folder dividers
   The links are index tabs sticking up from behind a kraft folder edge, in page order
   (Work, About, Wins, Process), each in its own paper colour and resting at a slightly
   different height. Hover or keyboard focus pulls a tab up out of the folder. The wordmark has
   a small caption. "Get in touch" is a postage stamp with a dashed perforation line, keeping
   the button's press. The header is not sticky,
   so there is no "current section" state. Phones (≤700px) keep the dock for navigation.
   ─────────────────────────────────────────────────────────────────────────── */
.wordmark-name { font-size: clamp(1.35rem, 2.5vw, 1.6rem); font-weight: 800; line-height: 1; letter-spacing: -.055em; }
.wordmark small { margin-top: 3px; color: #102c54a6; font-size: .62rem; font-weight: 700; line-height: 1.05; letter-spacing: .14em; text-transform: uppercase; }

.header-nav { position: relative; z-index: 0; align-self: end; align-items: flex-end; gap: 4px; padding: 0 16px; font-size: .88rem; font-weight: 700; }
.header-nav::after { /* the folder edge, in front of the tabs */
  position: absolute; z-index: 2; inset: auto 0 0; height: 11px;
  border-radius: 3px 3px 2px 2px;
  background: var(--kraft-tex) #c89f72;
  box-shadow: 0 1px 0 #00000026, 0 4px 6px #0000002b;
  content: "";
}
.header-nav a {
  --tab: #f6dc7a;
  position: relative; z-index: 1;
  display: grid; align-items: start;
  min-height: 46px; margin-bottom: 4px; padding: 8px 17px 0; /* bottom edge stays behind the 11px folder edge at rest (≤3px) and pulled (−6px) */
  border-radius: 10px 10px 0 0;
  background: var(--tab);
  box-shadow: 0 -1px 2px #0000001f;
  color: var(--ink);
  translate: 0 calc(var(--rest, 0px) + var(--pull, 0px));
}
.header-nav a:nth-child(2) { --tab: #c7dcf2; --rest: 2px; }
.header-nav a:nth-child(3) { --tab: #f4bfca; --rest: 1px; }
.header-nav a:nth-child(4) { --tab: #e3cba5; --rest: 3px; }
@media (hover: hover) and (pointer: fine) { .header-nav a:hover { background: var(--tab); } }
.header-nav a:focus-visible { --pull: -6px; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .header-nav a { transition: translate 170ms var(--ease-out); }
  @media (hover: hover) and (pointer: fine) { .header-nav a:hover { --pull: -6px; } }
  .header-nav a:active { --pull: -2px; }
}

.site-header .header-cta { --fill: var(--paper); --button-shadow: #cfc4b1; rotate: 1.5deg; background: var(--paper); color: var(--ink); border-color: #e3dccd; } /* beats the shared yellow :is(.button, …) rule */
.header-cta::after { position: absolute; inset: 4px; border: 1.5px dashed #e74722; border-radius: 7px; content: ""; pointer-events: none; }
.header-cta .icon { color: #e74722; }

@media (max-width: 930px) { .header-nav a { padding-inline: 12px; } .wordmark small { display: none; } }

/* ───────────────────────────────────────────────────────────────────────────
   Buttons: dark outline and a solid lip underneath
   Only the edge changes: every button keeps its own fill, size, text and press. The outline is
   the button's own border recoloured plus a 1px ring drawn as a shadow, so it reads as a 2px
   line without changing any size or the page height; the hard bottom shadow is the same dark.
   :root raises specificity over the per-button border colours above; disabled buttons keep theirs.
   ─────────────────────────────────────────────────────────────────────────── */
:root { --btn-line: #1b2036; }
:root :is(.button, .brief-chip) { border-color: var(--btn-line); }
:root .button::before { box-shadow: 0 0 0 1px var(--btn-line), 0 4px 0 1px var(--btn-line); }
/* contact links and the brief's buttons draw no ::before, so the ring and lip sit on the element */
:root :is(.contact-link, .brief .button) { box-shadow: 0 0 0 1px var(--btn-line), 0 4px 0 1px var(--btn-line); }
:root :is(.contact-link, .brief .button):active { transform: translateY(3px); box-shadow: 0 0 0 1px var(--btn-line), 0 1px 0 1px var(--btn-line); }
:root .brief-chip { box-shadow: 0 0 0 1px var(--btn-line), 0 3px 0 1px var(--btn-line); }
:root .brief-chip:active { translate: 0 2px; box-shadow: 0 0 0 1px var(--btn-line), 0 1px 0 1px var(--btn-line); }
:root .brief .button:disabled, :root .brief .button:disabled:active { transform: none; border-color: var(--rule); box-shadow: 0 0 0 1px var(--rule), 0 4px 0 1px var(--rule); }
/* The same edge on the bottom toolbar (one outlined tray), the drawer's Shake pill and the
   header's folder tabs (each tab ringed; the kraft folder edge gets the outline and the lip). */
:root .pencil-case { border-color: var(--btn-line); box-shadow: 0 0 0 1px var(--btn-line), 0 4px 0 1px var(--btn-line); }
:root .cd-shake { border-color: var(--btn-line); box-shadow: 0 4px 0 var(--btn-line); }
:root .cd-shake:active { box-shadow: 0 2px 0 var(--btn-line); }
:root .header-nav a { box-shadow: 0 0 0 2px var(--btn-line); }
:root .header-nav::after { box-shadow: 0 0 0 2px var(--btn-line), 0 4px 0 2px var(--btn-line); }

/* ───────────────────────────────────────────────────────────────────────────
   Performance: looping animations on HTML layers
   Chrome cannot run an animation on an SVG element on the GPU, so a loop there redraws the page
   on every frame. The starburst's wobble and the coffee steam now animate an HTML wrapper with
   the same keyframes and timing; the drawings are unchanged. Steam travel was 10 / −12 SVG units,
   i.e. scaled by the mug's width / 120 (86px → .717, 58px on phones → .483).
   idle-motion.js also pauses every loop while it is off screen.
   ─────────────────────────────────────────────────────────────────────────── */
.burst-wobble { display: block; }
.piece--burst .burst { animation: none; }
.piece--burst .burst-wobble { animation: wobble 3.6s ease-in-out infinite; }

.prop--steam { --k: calc(86 / 120); aspect-ratio: 120 / 150; }
.steam-puff { position: absolute; inset: 0; opacity: 0; animation: steam-puff 3.2s ease-in-out calc(var(--s, 0) * 1s) infinite; }
.steam-puff svg { display: block; width: 100%; height: 100%; overflow: visible; }
.steam-puff .steam { opacity: 1; animation: none; }
@keyframes steam-puff { 0% { opacity: 0; translate: 0 calc(10px * var(--k)); } 40% { opacity: .8; } 100% { opacity: 0; translate: 0 calc(-12px * var(--k)); } }
@media (max-width: 700px) { .prop--steam { --k: calc(58 / 120); } }
@media (prefers-reduced-motion: reduce) {
  .piece--burst .burst-wobble { animation: none; }
  .steam-puff { animation: none; opacity: .55; }
}
