/* Grace Islay Hope Art. Colours are picked from Grace's own work:
   egg-yolk yellow, sky-blue canvas, sage from the hare fabric, biro ink. */
:root {
  --paper: #fbf6ea;
  --paper-2: #f3ecdb;
  --card: #fffdf7;
  --ink: #1d2026;
  --ink-2: #4c5260;
  --muted: #6d7280;
  --yolk: #f5c62b;
  --sky: #8fd3f0;
  --sage: #a3bd73;
  --coral: #f07b5a;
  --line: #e4dac3;
  --shadow: 0 1px 2px rgb(29 32 38 / .06), 0 8px 24px rgb(29 32 38 / .10);
  --shadow-lift: 0 2px 4px rgb(29 32 38 / .08), 0 18px 40px rgb(29 32 38 / .16);
  --radius: 14px;
  --max: 1180px;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
  --hand: "Caveat", "Bradley Hand", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font: 18px/1.6 var(--body);
  color: var(--ink);
  background-color: var(--paper);
  /* rough canvas-paper grain */
  position: relative;
  min-height: 100vh;
  overflow-x: clip;
  display: flex;
  flex-direction: column;
}
main { flex: 1; overflow-x: clip; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.02; letter-spacing: -.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h3 { font-size: 1.3rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }
.hand { font-family: var(--hand); font-weight: 600; font-size: 1.6em; line-height: 1; letter-spacing: 0; }
.lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--ink-2); max-width: 38ch; }
.muted { color: var(--muted); }
.eyebrow { font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: .78rem; color: var(--muted); margin-bottom: .8em; }
.eyebrow a { text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(251 246 234 / .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.15rem; text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.nav { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--ink-2); transition: background .15s, color .15s; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
@media (max-width: 560px) {
  .brand-name .full { display: none; }
  .nav a { padding: 8px 10px; font-size: .95rem; }
}

section { padding: clamp(48px, 8vw, 96px) 0; }

/* Buttons */
.button { display: inline-flex; align-items: center; gap: .5em; background: var(--ink); color: var(--paper); padding: 14px 24px; border-radius: 999px; text-decoration: none; font: inherit; font-weight: 700; border: 2px solid var(--ink); cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; box-shadow: 4px 4px 0 var(--yolk); -webkit-tap-highlight-color: transparent; }
.button:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--yolk); }
.button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--yolk); }
.button.ghost { background: transparent; color: var(--ink); box-shadow: none; }
.button.ghost:hover { background: var(--card); }
.button.yolk { background: var(--yolk); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.button.yolk:hover { box-shadow: 6px 6px 0 var(--ink); }
.button[disabled] { opacity: .5; pointer-events: none; }

/* Hero */
.hero { padding-top: clamp(28px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 80px); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(3.2rem, 10vw, 7.4rem); line-height: .92; margin-bottom: .3em; }
.hero h1 .line { display: block; }
.hero .hand { color: var(--coral); display: inline-block; transform: rotate(-4deg); margin-bottom: .2em; }
.squiggle { position: relative; display: inline-block; z-index: 0; }
.squiggle svg { position: absolute; left: -4%; bottom: -.08em; width: 108%; height: .32em; z-index: -1; overflow: visible; }
.squiggle path { stroke: var(--yolk); stroke-width: 14; fill: none; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.2s .4s cubic-bezier(.6,.1,.3,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

/* Collage of taped pieces */
.collage { position: relative; aspect-ratio: 1 / 1.02; max-width: 560px; width: 100%; justify-self: center; }
.collage .piece { position: absolute; display: block; background: var(--card); padding: 10px 10px 34px; box-shadow: var(--shadow); border-radius: 4px; transition: transform .35s cubic-bezier(.3,1.4,.5,1), box-shadow .35s; text-decoration: none; animation: drop .7s cubic-bezier(.3,1.3,.5,1) backwards; }
.collage .piece img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 2px; background: var(--paper-2); }
.collage .piece figcaption { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-family: var(--hand); font-size: 1.3rem; line-height: 1; }
.collage .piece::before { content: ""; position: absolute; top: -12px; left: 50%; width: 84px; height: 24px; margin-left: -42px; background: rgb(245 198 43 / .72); transform: rotate(-3deg); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }
.collage .piece:nth-child(2)::before { background: rgb(143 211 240 / .75); transform: rotate(4deg); }
.collage .piece:nth-child(3)::before { background: rgb(163 189 115 / .75); transform: rotate(-6deg); }
.collage .piece:hover, .collage .piece:focus-visible { transform: rotate(0) scale(1.04); box-shadow: var(--shadow-lift); z-index: 5; }
.collage .p1 { width: 52%; left: 2%; top: 6%; transform: rotate(-6deg); animation-delay: .05s; }
.collage .p2 { width: 46%; right: 0; top: 0; transform: rotate(5deg); animation-delay: .18s; }
.collage .p3 { width: 44%; left: 30%; bottom: 0; transform: rotate(-2deg); animation-delay: .31s; z-index: 2; }
@keyframes drop { from { opacity: 0; translate: 0 -30px; } }
.sticker { position: absolute; z-index: 6; right: 4%; bottom: 18%; width: 96px; height: 96px; border-radius: 50%; background: var(--coral); color: #fff; display: grid; place-items: center; text-align: center; font-family: var(--hand); font-size: 1.35rem; line-height: .95; transform: rotate(12deg); box-shadow: var(--shadow); animation: spin-in .9s .6s cubic-bezier(.3,1.5,.5,1) backwards; }
@keyframes spin-in { from { transform: rotate(-120deg) scale(0); } }

/* Ticker */
.ticker { background: var(--ink); color: var(--paper); overflow: hidden; padding: 16px 0; transform: rotate(-1.2deg); margin: 0 -10px; }
.ticker-track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker span { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 3vw, 2rem); white-space: nowrap; padding-right: .6em; }
.ticker span i { font-style: normal; color: var(--yolk); padding-left: .6em; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* About */
.about .wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.about-art { position: relative; }
.about-art img { border-radius: var(--radius); box-shadow: var(--shadow); transform: rotate(-2deg); max-width: 420px; width: 100%; }
.about-art .note { position: absolute; right: -6%; top: 8%; background: var(--yolk); padding: 14px 16px; border-radius: 4px; font-family: var(--hand); font-size: 1.5rem; line-height: 1; transform: rotate(6deg); box-shadow: var(--shadow); max-width: 160px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 24px 0 0; }
.chips li { padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; font-weight: 700; background: var(--card); }
.chips li:nth-child(5n+1) { background: var(--yolk); }
.chips li:nth-child(5n+2) { background: var(--sky); }
.chips li:nth-child(5n+3) { background: var(--sage); }
.chips li:nth-child(5n+4) { background: #f8c7b6; }

/* Latest strip */
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head h2 { margin: 0; }

/* Gallery: masonry columns keep each piece at its true shape */
.gallery { columns: 3 280px; column-gap: 22px; }
.gallery .tile { break-inside: avoid; margin: 0 0 22px; }
.tile { display: block; width: 100%; padding: 0; border: 0; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); cursor: zoom-in; text-align: left; font: inherit; color: inherit; transition: transform .25s cubic-bezier(.3,1.3,.5,1), box-shadow .25s; animation: rise .5s cubic-bezier(.2,.9,.3,1) backwards; }
.tile:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow-lift); }
.tile:nth-child(even):hover { transform: translateY(-4px) rotate(.4deg); }
.tile img { width: 100%; height: auto; background: var(--paper-2); }
.tile .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px 16px; }
.tile .meta strong { font-family: var(--display); font-size: 1.12rem; letter-spacing: -.01em; }
.tile .meta span { font-size: .82rem; color: var(--muted); white-space: nowrap; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
.gallery-empty { text-align: center; color: var(--muted); padding: 40px 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; }
.filters button { font: inherit; font-weight: 600; font-size: .95rem; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgb(20 22 26 / .94); display: none; color: #fff; }
.lightbox.open { display: grid; grid-template-rows: 1fr auto; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.lightbox figure { margin: 0; display: grid; place-items: center; padding: 56px 64px 8px; min-height: 0; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgb(0 0 0 / .5); }
.lightbox .caption { padding: 14px clamp(16px, 4vw, 32px) max(24px, env(safe-area-inset-bottom)); text-align: center; }
.lightbox .caption h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0 0 .2em; }
.lightbox .caption p { margin: 0; color: rgb(255 255 255 / .75); }
.lightbox button { position: absolute; border: 0; background: rgb(255 255 255 / .12); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover { background: rgb(255 255 255 / .24); }
.lightbox .close { top: 12px; right: 12px; }
.lightbox .prev { left: 12px; top: 50%; translate: 0 -50%; }
.lightbox .next { right: 12px; top: 50%; translate: 0 -50%; }
@media (max-width: 640px) { .lightbox figure { padding: 64px 8px 8px; } .lightbox .prev, .lightbox .next { top: auto; bottom: 18px; translate: none; } }

/* Single piece pages */
.piece-page .wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.piece-page .feature { width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
.piece-page .details { position: sticky; top: 100px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.pager a { text-decoration: none; font-weight: 700; }
.pager a:hover { text-decoration: underline; }

/* Videos */

/* Footer */
.site-footer { background: var(--ink); color: rgb(251 246 234 / .8); padding: 48px 0 calc(40px + env(safe-area-inset-bottom)); margin-top: 40px; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.site-footer .sign { font-family: var(--hand); font-size: 2rem; color: var(--yolk); line-height: 1; }
.site-footer p { margin: 0; }
.site-footer a { color: var(--paper); }

@media (max-width: 860px) {
  .hero .wrap, .about .wrap, .piece-page .wrap { grid-template-columns: 1fr; }
  .collage { max-width: 440px; }
  .about-art { order: -1; justify-self: center; }
  .piece-page .details { position: static; }
}

/* ---------------------------------------------------------------------------
   Messy studio: paint splats, brush strokes, tape and drips. */
.splat { position: absolute; z-index: 0; pointer-events: none; background: center / contain no-repeat; width: var(--s, 220px); aspect-ratio: 1; opacity: var(--o, .9); rotate: var(--r, 0deg); }
.splat.yolk { background-image: url(/images/splats/yolk-1.svg); }
.splat.yolk2 { background-image: url(/images/splats/yolk-2.svg); }
.splat.sky { background-image: url(/images/splats/sky-1.svg); }
.splat.sky2 { background-image: url(/images/splats/sky-2.svg); }
.splat.coral { background-image: url(/images/splats/coral-1.svg); }
.splat.coral2 { background-image: url(/images/splats/coral-2.svg); }
.splat.sage { background-image: url(/images/splats/sage-1.svg); }
.splat.sage2 { background-image: url(/images/splats/sage-2.svg); }
.splat.ink { background-image: url(/images/splats/ink-1.svg); }
.splat.ink2 { background-image: url(/images/splats/ink-2.svg); }
.splat { animation: splat-in .5s cubic-bezier(.3,1.6,.5,1) backwards, float var(--fd, 14s) ease-in-out var(--fdelay, 0s) infinite alternate; will-change: transform; }
@keyframes splat-in { from { scale: .2; opacity: 0; } }
@keyframes float { from { translate: 0 0; } to { translate: var(--fx, 6px) var(--fy, -10px); } }
section, .hero { position: relative; }
section > .wrap, .hero > .wrap { position: relative; z-index: 1; }
@media (max-width: 860px) { .splat { --s: 140px !important; } }

/* brush-stroke highlight under headings */
.brush { position: relative; z-index: 0; white-space: nowrap; }
.brush::after { content: ""; position: absolute; z-index: -1; left: -6%; right: -6%; bottom: .02em; height: .5em; background: url(/images/brush.svg) center / 100% 100% no-repeat; }
.brush.sky::after { filter: hue-rotate(160deg) saturate(.7) brightness(1.05); }

/* hero: paint-smeared title */
.hero h1 .line:nth-child(2) { color: transparent; -webkit-text-stroke: 2px var(--ink); }
.squiggle svg { height: .42em; }
.squiggle path { stroke-width: 22; }

/* ticker becomes a torn strip of paint */
.ticker { clip-path: polygon(0 12%, 4% 0, 9% 10%, 15% 2%, 22% 9%, 30% 1%, 38% 11%, 47% 3%, 55% 10%, 63% 0, 71% 9%, 80% 2%, 88% 11%, 95% 3%, 100% 9%, 100% 90%, 96% 100%, 90% 89%, 82% 98%, 74% 90%, 66% 100%, 58% 91%, 49% 99%, 41% 88%, 33% 98%, 25% 90%, 17% 100%, 9% 91%, 3% 99%, 0 90%); padding: 22px 0; }

/* gallery tiles pinned to the studio wall with tape */
.tile { position: relative; overflow: visible; border-radius: 6px; padding: 10px 10px 0; rotate: -.8deg; }
.gallery .tile:nth-child(3n+2) { rotate: .9deg; }
.gallery .tile:nth-child(3n) { rotate: -.3deg; }
.tile img { border-radius: 2px; }
.tile .meta { padding: 12px 6px 14px; }
.tile::before { content: ""; position: absolute; z-index: 2; top: -10px; left: 50%; width: 78px; height: 22px; margin-left: -39px; background: rgb(245 198 43 / .7); rotate: -4deg; box-shadow: 0 1px 2px rgb(0 0 0 / .1); }
.gallery .tile:nth-child(3n+2)::before { background: rgb(143 211 240 / .75); rotate: 5deg; }
.gallery .tile:nth-child(3n)::before { background: rgb(240 123 90 / .6); rotate: -2deg; }
.tile:hover, .gallery .tile:nth-child(n):hover { rotate: 0deg; transform: translateY(-4px) scale(1.02); }

/* thumbprints of paint on the about photo */
.about-art img { max-width: 360px; }

/* footer drips down from the top */
.site-footer { position: relative; margin-top: 90px; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: -40px; height: 42px; background: url(/images/drips.svg) center / 100% 100% no-repeat; }
.site-footer::after { content: ""; position: absolute; right: 8%; top: -70px; width: 90px; aspect-ratio: 1; background: url(/images/splats/yolk-2.svg) center / contain no-repeat; }

.button { box-shadow: 4px 4px 0 var(--coral); }
.button:hover { box-shadow: 6px 6px 0 var(--coral); }
.button:active { box-shadow: 1px 1px 0 var(--coral); }

/* ---------------------------------------------------------------------------
   Movement: a slowly drifting paper grain behind everything, splats that
   wobble when you poke them, and paint you can flick onto the page. */
body::before {
  content: ""; position: fixed; inset: -60px; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .11 0 0 0 0 .12 0 0 0 0 .15 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-drift 40s ease-in-out infinite alternate;
}
@keyframes grain-drift { from { transform: translate3d(0, 0, 0) rotate(0); } to { transform: translate3d(-40px, 30px, 0) rotate(.6deg); } }
.ticker { position: relative; z-index: 1; }
.site-footer { z-index: 1; }
.paint-layer { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.paint-layer .splat { animation: splat-in .45s cubic-bezier(.3,1.7,.5,1) backwards; transition: opacity 1.6s ease; }
.paint-layer .splat.fading { opacity: 0; }
.paint-drop { position: fixed; z-index: 90; width: 10px; height: 10px; border-radius: 50%; pointer-events: none; }

/* Small phones: the egg logo stands in for the name so the menu fits. */
@media (max-width: 400px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .brand-mark { width: 36px; height: 36px; }
  .nav { gap: 2px; }
}

/* Phones: two-up gallery so there's less scrolling. */
@media (max-width: 600px) {
  .gallery { columns: 2; column-gap: 12px; }
  .gallery .tile { margin-bottom: 16px; padding: 6px 6px 0; }
  .tile .meta { flex-direction: column; gap: 0; padding: 8px 4px 10px; }
  .tile .meta strong { font-size: .95rem; }
  .tile::before { width: 56px; margin-left: -28px; height: 18px; }
}

/* Protecting Grace's work: no dragging, long-press saving or selecting her
   pictures. It can't stop a screenshot, but it stops the easy ways. */
.tile img, .collage img, .lightbox img, .feature, .about-art img {
  -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; pointer-events: none;
}
.lightbox figure { position: relative; }
.lightbox figure::after { content: ""; position: absolute; inset: 0; } /* a clear sheet over the picture */
@media print {
  .tile img, .collage img, .lightbox img, .feature, .about-art img { visibility: hidden !important; }
  main::before { content: "Grace's artwork can be seen at graceislayhope.co.uk"; display: block; font: 700 18px sans-serif; margin: 20px; }
}

/* Four menu items on the smallest phones */
@media (max-width: 400px) { .nav a { padding: 7px 8px; font-size: .88rem; } }

/* Home page opener: wet paint to swipe clean (js/paint-cover.js) */
.pc-pending body::after { content: ""; position: fixed; inset: 0; z-index: 200; background: #f5c62b; }
body.covered { overflow: hidden; }
.paint-cover { position: fixed; inset: 0; z-index: 210; touch-action: none; transition: opacity .8s ease, scale .8s ease; }
.paint-cover canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.paint-cover canvas:active { cursor: grabbing; }
.paint-cover.clean { opacity: 0; scale: 1.06; pointer-events: none; }
.pc-hint { position: absolute; left: 50%; top: 50%; translate: -50% -50%; display: grid; justify-items: center; gap: 6px; pointer-events: none; text-align: center; transition: opacity .4s; }
.paint-cover.wiping .pc-hint { opacity: 0; }
.pc-sign { font-family: var(--display); font-weight: 800; font-size: clamp(2.4rem, 11vw, 5rem); line-height: 1; color: var(--ink); background: #fff; padding: .15em .45em .2em; border: 4px solid var(--ink); border-radius: 18px; rotate: -4deg; box-shadow: 6px 6px 0 var(--ink); text-transform: uppercase; letter-spacing: -.01em; }
.pc-say { font-family: var(--hand); font-size: clamp(1.8rem, 6vw, 2.6rem); color: #fff; text-shadow: 0 2px 0 var(--ink), 0 0 12px rgb(0 0 0 / .4); rotate: 3deg; margin-top: 10px; }
.pc-hand { animation: pc-wave 1.6s ease-in-out infinite; filter: drop-shadow(0 4px 6px rgb(0 0 0 / .3)); }
@keyframes pc-wave { 0%, 100% { translate: -40px 0; rotate: -12deg; } 50% { translate: 40px 6px; rotate: 10deg; } }
.pc-skip { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); font: inherit; font-weight: 700; padding: 10px 20px; border-radius: 999px; border: 2px solid var(--ink); background: #fff; color: var(--ink); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); }

/* "House lights": going to or from the Theatre, the page dims to dark, and
   the next page comes up out of the dark, instead of a hard cut. */
.house-fade, html.lights-up::after { content: ""; position: fixed; inset: 0; z-index: 400; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, #2a0a12, #14070a 60%, #0a0305); }
.house-fade { opacity: 0; transition: opacity .55s ease-in; }
.house-fade.down { opacity: 1; }
html.lights-up::after { animation: lights-up .9s ease-out .05s both; }
@keyframes lights-up { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }

/* sound on/off */
.sound-toggle { position: fixed; z-index: 95; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); width: 44px; height: 44px;
  display: grid; place-items: center; padding: 0; border-radius: 50%; border: 2px solid var(--ink); background: var(--card); color: var(--ink); cursor: pointer;
  box-shadow: 3px 3px 0 var(--yolk); opacity: .85; transition: opacity .15s, transform .15s; -webkit-tap-highlight-color: transparent; }
.sound-toggle:hover { opacity: 1; transform: translate(-1px, -1px); }
.sound-toggle svg { width: 22px; height: 22px; fill: currentColor; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sound-toggle svg path:first-child { stroke-width: 1; }
.theatre-page .sound-toggle { background: #1a0b06; color: var(--gold, #f1c24b); border-color: var(--gold, #f1c24b); box-shadow: 0 0 14px rgb(241 194 75 / .35); }

/* "Audio on!" painted on the home page in two brush sweeps; tap to hear the splats */
.paint-audio { display: block; margin-top: 18px; padding: 0; border: 0; background: none; cursor: pointer; rotate: -4deg; width: clamp(170px, 22vw, 230px);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: scale .2s, opacity .5s; }
.paint-audio[hidden] { display: none; }
.paint-audio svg { display: block; width: 100%; height: auto; overflow: visible; }
.paint-audio text { font-family: var(--hand); font-weight: 600; font-size: 50px; fill: var(--ink); }
.pa-sweep { fill: none; stroke: #fff; stroke-width: 34; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.pa-swash { fill: none; stroke: var(--yolk); stroke-width: 20; stroke-linecap: round; opacity: .85; stroke-dasharray: 1; stroke-dashoffset: 1; }
.pa-speaker { fill: var(--coral); stroke: var(--coral); stroke-width: 2; stroke-linecap: round; opacity: 0; }
.paint-audio.go .pa-swash { animation: pa-paint .55s cubic-bezier(.5,0,.3,1) .1s forwards; }
.paint-audio.go .s1 { animation: pa-paint .6s cubic-bezier(.5,0,.3,1) .45s forwards; }
.paint-audio.go .s2 { animation: pa-paint .6s cubic-bezier(.5,0,.3,1) .95s forwards; }
.paint-audio.go .pa-speaker { animation: pa-pop .4s cubic-bezier(.3,1.6,.5,1) 1.5s forwards; }
.paint-audio:hover { scale: 1.04; }
.paint-audio:active { scale: .97; }
.paint-audio.done { opacity: 0; scale: 1.15; pointer-events: none; }
@keyframes pa-paint { to { stroke-dashoffset: 0; } }
@keyframes pa-pop { from { opacity: 0; scale: .3; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) {
  .paint-audio .pa-swash, .paint-audio .pa-sweep { stroke-dashoffset: 0; animation: none !important; }
  .paint-audio .pa-speaker { opacity: 1; animation: none !important; }
}

/* ---------------------------------------------------------------------------
   The secret way into the studio (js/studio-door.js): a little door in the
   footer, a shower of paint, a TOP SECRET stamp, and the paint draining away
   as the studio opens. */
.secret-door { display: inline-flex; align-items: center; gap: 8px; color: var(--paper); text-decoration: none; padding: 4px 6px; border-radius: 10px; }
.secret-door svg { width: 30px; height: 39px; transition: transform .25s cubic-bezier(.3,1.6,.5,1); transform-origin: 50% 100%; }
.secret-door:hover svg, .secret-door:focus-visible svg { transform: rotate(-6deg) scale(1.08); }
.sd-sign { font: 800 .68rem/1 var(--display, inherit); letter-spacing: .14em; text-transform: uppercase; color: #ff6b6b; border: 2px solid currentColor; border-radius: 4px; padding: 4px 6px 3px; rotate: -7deg; opacity: .9; }
.paint-shower { position: fixed; inset: 0; z-index: 500; display: flex; overflow: hidden; }
.paint-shower i { position: relative; flex: 1 0 0; margin-right: -3px; height: 112%; background: var(--c) linear-gradient(90deg, rgb(255 255 255 / .2), transparent 35%, rgb(0 0 0 / .1)); border-radius: 0 0 45% 45% / 0 0 60px 60px; transform: translateY(-105%); animation: ps-pour .75s cubic-bezier(.55,0,.35,1) var(--d) forwards; }
.paint-shower i::after { content: ""; position: absolute; left: var(--dl); bottom: -34px; width: var(--w); height: 46px; background: inherit; border-radius: 45% 45% 50% 50% / 30% 30% 70% 70%; }
@keyframes ps-pour { to { transform: translateY(0); } }
.ps-stamp { position: absolute; left: 50%; top: 46%; translate: -50% -50%; rotate: -9deg; display: grid; justify-items: center; gap: 4px; padding: 14px 26px 12px; background: rgb(251 246 234 / .92); color: #c8102e; border: 5px solid currentColor; border-radius: 10px; font: 800 clamp(1.8rem, 7vw, 3.4rem)/1 var(--display, inherit); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 10px 30px rgb(0 0 0 / .25); opacity: 0; animation: ps-stamp .3s cubic-bezier(.5,1.8,.6,1) .8s forwards; }
.ps-stamp small { font: 600 clamp(1rem, 3.6vw, 1.5rem)/1 var(--hand, cursive); letter-spacing: 0; text-transform: none; color: var(--ink); }
@keyframes ps-stamp { from { opacity: 0; scale: 2.6; } to { opacity: 1; scale: 1; } }
.paint-shower.full i { transform: none; animation: none; }
.paint-shower.full .ps-stamp { opacity: 1; animation: none; }
.paint-shower.drain i { animation: ps-drain .9s cubic-bezier(.5,0,.75,0) var(--d) forwards; }
.paint-shower.drain .ps-stamp { animation: ps-drop .7s cubic-bezier(.5,0,.75,0) .15s forwards; }
@keyframes ps-drain { from { transform: none; } to { transform: translateY(110%); } }
@keyframes ps-drop { from { opacity: 1; } to { opacity: 0; translate: -50% 60vh; rotate: 8deg; } }
html.showering::after { content: ""; position: fixed; inset: 0; z-index: 499; background: linear-gradient(90deg, #f5c62b 0.000% 8.333%, #f07b5a 8.333% 16.667%, #8fd3f0 16.667% 25.000%, #a3bd73 25.000% 33.333%, #f5c62b 33.333% 41.667%, #1d2026 41.667% 50.000%, #f07b5a 50.000% 58.333%, #8fd3f0 58.333% 66.667%, #f5c62b 66.667% 75.000%, #a3bd73 75.000% 83.333%, #f07b5a 83.333% 91.667%, #8fd3f0 91.667% 100.000%); }
