/* Short Stack */
:root { --wood: #b88a55; --paper: #fbf6ea; --ink: #2b1d12; --muted: #7a6450; --batter: #f1e1b6; --brown: #6e3b17; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #a87b4b; overflow: hidden; overscroll-behavior: none; }
body { font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); -webkit-tap-highlight-color: transparent; }
#counter { position: fixed; inset: 0; touch-action: none; }
#gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* hit areas sit over the 3D objects; invisible, but real buttons for keyboards and screen readers */
#hits { position: absolute; inset: 0; pointer-events: none; }
.hit { position: absolute; pointer-events: auto; border: 0; padding: 0; margin: 0; background: transparent; border-radius: 50%; cursor: pointer; transform: translate(-50%, -50%); }
.hit:focus { outline: none; }
.hit:focus-visible { outline: 3px solid rgba(255, 244, 214, .9); outline-offset: 4px; }
.hit[data-idle] { cursor: default; }
#hit-knob { cursor: grab; touch-action: none; }
#hit-knob:active { cursor: grabbing; }

/* the loading screen: the griddle preheating; water drops skitter once it's hot */
#loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at 45% 42%, #2a221c 0%, #15110e 60%, #0d0a08 100%); transition: opacity .5s ease, visibility .5s; }
#loader.gone { opacity: 0; visibility: hidden; }
#loader .iron { position: relative; width: min(64vw, 520px); aspect-ratio: 16 / 10; border-radius: 14px; background: radial-gradient(ellipse at 40% 38%, #2b2723 0%, #161412 70%); box-shadow: inset 0 0 0 6px #0b0a09, inset 0 0 40px rgba(0, 0, 0, .7), 0 20px 50px rgba(0, 0, 0, .5); overflow: hidden; }
#loader .iron::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 55%, rgba(255, 120, 40, var(--heat, 0)) 0%, transparent 65%); mix-blend-mode: screen; transition: --heat .4s; }
#loader i { position: absolute; width: 13px; height: 13px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff 0 18%, rgba(220, 235, 255, .75) 30%, rgba(160, 190, 220, .35) 70%, transparent 72%); opacity: 0; transform: scale(.4); transition: opacity .3s, transform .3s; }
#loader i.on { opacity: 1; transform: scale(1); animation: skitter 1.1s ease-in-out infinite alternate; }
#loader i:nth-child(1) { left: 22%; top: 30%; } #loader i:nth-child(2) { left: 61%; top: 24%; animation-delay: -.3s; }
#loader i:nth-child(3) { left: 44%; top: 55%; animation-delay: -.6s; } #loader i:nth-child(4) { left: 75%; top: 62%; animation-delay: -.2s; }
#loader i:nth-child(5) { left: 30%; top: 72%; animation-delay: -.8s; } #loader i:nth-child(6) { left: 52%; top: 38%; animation-delay: -.5s; }
#loader i:nth-child(7) { left: 14%; top: 52%; animation-delay: -.1s; } #loader i:nth-child(8) { left: 84%; top: 36%; animation-delay: -.7s; }
#loader i:nth-child(9) { left: 64%; top: 80%; animation-delay: -.4s; }
@keyframes skitter { 0% { translate: 0 0; } 33% { translate: 7px -3px; } 66% { translate: -4px 5px; } 100% { translate: 5px 2px; } }

/* the stack, fanned out over the counter: every pancake, in Mike's order */
#fan { position: fixed; inset: 0; z-index: 10; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; touch-action: pan-y; background: rgba(48, 30, 16, 0); transition: background .4s; }
#fan.open { background: rgba(48, 30, 16, .28); }
.fan-grid { position: relative; display: grid; grid-template-columns: repeat(var(--cols, 7), minmax(0, 1fr)); gap: var(--gap, 10px) var(--gap, 10px); padding: var(--pad, 28px); max-width: 1500px; margin: 0 auto; min-height: 100%; align-content: center; }
.fp { all: unset; position: relative; display: block; aspect-ratio: 1; cursor: pointer; border-radius: 50%; transform-origin: 50% 50%; will-change: transform; }
.fp img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(3px 6px 6px rgba(40, 20, 6, .45)) drop-shadow(1px 1px 1px rgba(40, 20, 6, .3)); pointer-events: none; user-select: none; -webkit-user-drag: none; }
.fp:hover img, .fp:focus-visible img { filter: drop-shadow(6px 14px 12px rgba(40, 20, 6, .45)) drop-shadow(1px 1px 1px rgba(40, 20, 6, .3)); }
.fp:focus-visible { outline: 3px solid rgba(255, 244, 214, .95); outline-offset: 3px; }
.fp .raw { display: block; width: 100%; height: 100%; border-radius: 50%; background: radial-gradient(circle at 45% 40%, #efdcae, #d9b77a 70%, #b98a4c 100%); }
@media (max-width: 700px) {
  .fan-grid { --cols: 3; --gap: 6px; --pad: 14px; align-content: start; padding-top: max(18px, env(safe-area-inset-top)); padding-bottom: 40px; }
}

/* a project: the real work, from the kit, on a sheet of baking parchment */
.sheet { border: 0; padding: 0; margin: auto; width: min(1080px, calc(100vw - 48px)); height: calc(100vh - 48px); height: calc(100dvh - 48px); max-width: none; max-height: none; background: var(--paper); color: var(--ink); border-radius: 6px; box-shadow: 0 30px 80px rgba(30, 14, 4, .55), 0 2px 0 rgba(255, 255, 255, .6) inset; overflow: hidden; }
.sheet::backdrop { background: rgba(30, 18, 8, .55); backdrop-filter: blur(2px); }
.sheet[open] { animation: lift .32s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes lift { from { transform: translateY(24px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-scroll { height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background:
  radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, .7), transparent 60%),
  repeating-linear-gradient(90deg, rgba(160, 120, 70, .035) 0 1px, transparent 1px 7px), var(--paper); }
.sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 18px; padding: 18px 22px 14px; background: linear-gradient(var(--paper) 78%, rgba(251, 246, 234, 0)); }
.sheet-pan { width: 84px; height: 84px; flex: none; object-fit: contain; filter: drop-shadow(2px 4px 4px rgba(60, 30, 8, .35)); }
.sheet-pan[src=""], .sheet-pan:not([src]) { visibility: hidden; }
.sheet-names { flex: 1; min-width: 0; }
.sheet-names h2 { margin: 0; font: 700 clamp(26px, 3.4vw, 40px)/1.05 Fraunces, Georgia, serif; letter-spacing: -.01em; color: #3a2210; }
.sheet-client { margin: 4px 0 0; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.sheet-close { flex: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #efe3c8; color: #4a2c14; font: 30px/46px system-ui, sans-serif; cursor: pointer; }
.sheet-close:hover { background: #e6d5b0; }
.sheet-close:focus-visible { outline: 3px solid #a8662c; outline-offset: 2px; }
.sheet-body { padding: 4px 26px 40px; --ab-fg: #2b1d12; --ab-muted: #7a6450; --ab-accent: #a8662c; --ab-chrome: 150px; }
.sheet-body .ab-lede { font: 500 19px/1.45 Fraunces, Georgia, serif; color: #3a2a1c; max-width: 52em; }
.sheet-body .ab-text { max-width: 52em; color: #3b2c20; }
.sheet-body .ab-heading { font: 700 21px/1.2 Fraunces, Georgia, serif; color: #4a2a12; margin-top: 8px; }
.sheet-body .ab-credits { padding-top: 14px; border-top: 1px dashed #d8c6a2; }
.sheet-body .ab-image img { box-shadow: 0 6px 18px rgba(60, 30, 8, .18); }
.sheet-body .ab-audio audio { max-width: 520px; }
.about-body { padding: 4px 26px 40px; max-width: 46em; }
.about-bio { font: 500 20px/1.45 Fraunces, Georgia, serif; color: #3a2a1c; margin: 0 0 20px; }
.about-links a { color: #8a4a17; font-weight: 600; margin-right: 18px; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.sheet-about { width: min(680px, calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 48px); }
.sheet-about .sheet-scroll { height: auto; max-height: calc(100dvh - 48px); }
@media (max-width: 700px) {
  .sheet { width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; }
  .sheet-head { padding: max(12px, env(safe-area-inset-top)) 14px 10px; gap: 12px; }
  .sheet-pan { width: 58px; height: 58px; }
  .sheet-body { padding: 2px 14px 40px; --ab-chrome: 110px; }
  .about-body { padding: 2px 16px 30px; }
  .sheet-about { height: fit-content; width: calc(100vw - 24px); border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) { .sheet[open] { animation: none; } #loader i.on { animation: none; } }
