/* What's Cookin' (studio-site/cookin/): the previews the studio is making right now.
   The idea: the kitchen's order tickets. The first screen is an order ticket on a flat sky with Pearl cooking on top; then
   "On the stove", one row per promoted dish (a still picture of its site beside its name, the whole row a link); then
   Pearl's kitchen and the invitation.
   The studio's butter, ink and pink, its Bricolage and Inter, its hard ink outlines. Type sizes: the ticket title, the
   section heading, the dish name, the lede, and text. */

.ck {
  --m: clamp(1rem, 2.2vw, 2rem);
  /* The content's widest (Andre, 2026-11-21: on a wide screen it sat off-centre). Each band's colour still runs edge to
     edge; its content keeps to --page in the middle, by its side padding (--edge), so nothing else changes below it. */
  --page: 84rem;
  --edge: max(var(--m), calc((100% - var(--page)) / 2));
  --t-h2: clamp(2.25rem, 4.2vw, 4rem);
  --t-name: clamp(1.375rem, 1.9vw, 1.875rem);
  --t-lede: clamp(1.1875rem, 1.5vw, 1.375rem);
  --t-text: 1.0625rem;
  --line: 3px solid var(--ink);
  background: var(--butter);
  color: var(--ink);
}

/* ---------- header: wordmark, three links, on the sky ---------- */
.ck-top { position: absolute; inset: 0 0 auto; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem var(--edge); color: var(--ink); }
.ck-brand { white-space: nowrap; display: inline-flex; align-items: center; gap: .55rem; font: 700 var(--t-lede)/1 var(--pixel); text-decoration: none; color: inherit; }
.ck-nav { display: flex; gap: 1.5rem; white-space: nowrap; }
.ck-nav a { font-weight: 600; font-size: var(--t-text); text-decoration: none; padding: .55rem 0; color: inherit; }
.ck-nav a:hover { text-decoration: underline; text-underline-offset: .25em; }
@media (max-width: 560px) { .ck-nav { gap: 1rem; } .ck-nav a:nth-child(2) { display: none; } .ck-brand { font-size: var(--t-text); } }

/* ---------- hero: the order ticket on a flat sky, Pearl on top ---------- */
.ck-hero { position: relative; min-height: 100svh; display: grid; place-items: center; padding: clamp(10rem, 18vw, 13rem) var(--m) 3rem; background: var(--sky); overflow: hidden; }
.ck-ticket {
  position: relative; width: min(46rem, 100%); padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--butter); border: var(--line); box-shadow: 8px 8px 0 var(--pink); /* taste-skill-ignore: the brand's hard offset outline (--pop) */
}
.ck-title { margin: 0; text-align: center; text-wrap: balance; font: 800 clamp(3rem, 8.2vw, 6.75rem)/.92 var(--display); letter-spacing: -.04em; }
/* Pearl, in her chef's hat, sits on the ticket's top edge and flips her spatula */
.ck-pet-hero { position: absolute; bottom: calc(100% - 3px); left: 50%; width: clamp(6.5rem, 12vw, 9.5rem); translate: -50% 0; }
.ck-pearl { display: block; width: 100%; height: auto; overflow: visible; transform-origin: 50% 100%; }
/* petting her (cookin.js): a squash and a bounce, and a few pixel hearts (styles.css .heart) */
.ck-pet { display: block; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ck-pet .heart { left: 40%; top: 10%; }
.ck-pet-stove .heart { top: -6%; } /* above her hat, so they show on the pink from the start */
.ck-spatula { transform-box: view-box; transform-origin: -1px 13px; }
/* at the stove Pearl sits 46 across and 26 down, so her paw is there */
.ck-kitchen .ck-spatula { transform-origin: 45px 39px; }
.ck-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: clamp(1.5rem, 3vw, 2.25rem) 0 0; font-size: var(--t-text); line-height: 1.3; }
.ck-facts dt { font-weight: 700; }
.ck-facts dd { margin: .25rem 0 0; }
.ck-lede { margin: 1.5rem 0 0; max-width: 34ch; font-size: var(--t-lede); line-height: 1.4; }
.ck-ticket-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; margin-top: clamp(1.75rem, 3vw, 2.5rem); font-size: var(--t-text); }
.ck-credit { font-weight: 600; }
.ck-jump { justify-self: end; font-weight: 700; text-underline-offset: .25em; }
.ck-jump:hover { color: var(--blue); }
@media (max-width: 640px) {
  .ck-facts { grid-template-columns: 1fr; gap: .75rem; }
  .ck-ticket-foot { grid-template-columns: 1fr; justify-items: start; }
  .ck-ticket-foot .ck-btn { width: 100%; }
  .ck-jump { justify-self: start; }
  .ck-credit { display: none; }
}

/* the one button shape: square, ink, lifts on hover */
.ck-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 3.25rem; padding: .8rem 1.4rem;
  border: var(--line); border-radius: 0; background: var(--ink); color: var(--butter); font: 700 var(--t-text)/1.1 var(--body);
  text-decoration: none; white-space: nowrap; transition: transform .2s var(--spring), background-color .2s, color .2s;
}
.ck-btn:hover { background: var(--pink); color: var(--ink); transform: translate(-2px, -2px); }
.ck-btn:active { transform: scale(.97); }
.ck-btn--paper { background: var(--butter); color: var(--ink); border-color: var(--butter); }
.ck-close .ck-btn--paper { border-color: var(--ink); }
.ck-btn--paper:hover { background: var(--pink); border-color: var(--pink); }
.ck [hidden] { display: none !important; }

/* ---------- on the stove: one row per dish, the whole row a link ---------- */
.ck-stove { padding: clamp(5rem, 9vw, 8rem) var(--edge) clamp(5rem, 9vw, 8rem); background: var(--butter); }
.ck-stove-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.ck-h2 { margin: 0; font: 800 var(--t-h2)/.95 var(--display); letter-spacing: -.04em; }
.ck-stove-count { margin: 0; font-size: var(--t-text); font-weight: 600; }
/* the list keeps the brand's 3px outline top and bottom; between dishes a thin rule, so the rows read as one list */
.ck-plates { margin: 0; padding: 0; list-style: none; border-block: var(--line); }
.ck-plate + .ck-plate { border-top: 1.5px solid var(--ink); }
.ck-dish {
  display: grid; grid-template-columns: clamp(10rem, 19vw, 17rem) minmax(0, 1fr) auto auto; align-items: center; gap: clamp(1rem, 2.4vw, 2.5rem);
  padding: clamp(1.25rem, 2vw, 1.75rem) clamp(.75rem, 1.6vw, 1.5rem); color: var(--ink); text-decoration: none;
  transition: background-color .25s var(--ease), scale .2s var(--ease);
}
/* the top of the site, 4:3, always shown beside its name (never a picture on hover); on hover it lifts off the row
   onto the brand's hard ink offset, and the site inside eases in a touch */
.ck-dish-pic {
  display: block; aspect-ratio: 4 / 3; border: var(--line); border-radius: .75rem; overflow: hidden; background: var(--white);
  transition: translate .3s var(--spring), box-shadow .3s var(--spring);
}
.ck-dish-pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: scale .5s var(--ease); }
.ck-dish-pic--none { background: var(--sky); }
.ck-dish-pic--none img { display: none; }
.ck-dish-text { display: grid; gap: .45rem; min-width: 0; }
.ck-dish-name { margin: 0; font: 800 var(--t-name)/1.05 var(--display); letter-spacing: -.02em; font-size: clamp(1.5rem, 2.6vw, 2.5rem); }
.ck-dish-fact, .ck-dish-time { font-size: var(--t-text); line-height: 1.35; }
.ck-dish-time { white-space: nowrap; }
.ck-dish-go {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 3.25rem; padding: .8rem 1.3rem; border: var(--line);
  background: var(--ink); color: var(--butter); font-weight: 700; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.ck-dish-go span { display: inline-block; transition: translate .25s var(--spring); }
/* hover only where there is a pointer: on a phone a tapped row would keep its colour when you come back */
@media (hover: hover) {
  .ck-dish:hover { background: var(--sky); }
  .ck-plate:nth-child(3n + 2) .ck-dish:hover { background: var(--pink); }
  .ck-plate:nth-child(3n + 3) .ck-dish:hover { background: var(--white); }
  .ck-dish:hover .ck-dish-go { background: var(--butter); color: var(--ink); }
  .ck-dish:hover .ck-dish-go span { translate: .3rem 0; }
  .ck-dish:hover .ck-dish-pic { translate: -3px -3px; box-shadow: 3px 3px 0 var(--ink); } /* taste-skill-ignore: the brand's hard offset outline */
  .ck-dish:hover .ck-dish-pic img { scale: 1.04; }
}
/* a press: the row sinks a hair and takes the sky */
.ck-dish:active { background: var(--sky); scale: .99; }
.ck-dish:focus-visible { outline-offset: -3px; }
@media (prefers-reduced-motion: reduce) {
  .ck-dish, .ck-dish-pic, .ck-dish-pic img { transition: background-color .25s; }
  .ck-dish:active, .ck-dish:hover .ck-dish-pic img { scale: none; }
  .ck-dish:hover .ck-dish-pic { translate: none; }
}
@media (max-width: 960px) {
  .ck-dish { grid-template-columns: clamp(8rem, 24vw, 12rem) minmax(0, 1fr) auto; }
  .ck-dish-time { display: none; }
}
@media (max-width: 640px) {
  .ck-stove-head { flex-direction: column; gap: .5rem; }
  /* the picture at the name's left, the facts under, the arrow alone at the end */
  .ck-dish { grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 1rem; padding: 1.25rem .75rem; }
  .ck-dish-pic { border-width: 2px; border-radius: .5rem; }
  .ck-dish-go { border-width: 2px; }
  .ck-dish-name { font-size: 1.375rem; }
  .ck-dish-fact { font-size: .9375rem; }
  .ck-dish-go { min-height: 2.75rem; min-width: 2.75rem; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  .ck-dish-go span { font-size: 1.25rem; }
}

/* ---------- the invitation: Pearl at the stove, the words beside her, on a pink field ---------- */
/* The drawing and the words as one pair, centred together: a grid of columns left the short text's side emptier. */
.ck-close { display: flex; justify-content: center; gap: clamp(2.5rem, 6vw, 6rem); align-items: center; padding: clamp(6rem, 12vw, 10rem) var(--edge); background: var(--pink); color: var(--ink); }
.ck-kitchen-wrap { flex: 0 1 46rem; min-width: 0; position: relative; }
/* overflow visible: the website flips up past the drawing's top edge */
.ck-kitchen { display: block; width: 100%; height: auto; overflow: visible; }
/* the button sits over Pearl (x 46–76, y 20–48 of the 80×46 drawing from y 4) */
.ck-pet-stove { position: absolute; left: 57.5%; top: 34.8%; width: 37.5%; height: 60.9%; }
.ck-k-pearl { transform-box: fill-box; transform-origin: 50% 100%; }
.ck-close-text { flex: 0 1 30rem; min-width: 0; display: grid; gap: 1.25rem; justify-items: start; }
.ck-close-text p { margin: 0; max-width: 34ch; font-size: var(--t-lede); line-height: 1.45; }
.ck-cake, .ck-steam { transform-box: fill-box; transform-origin: center; }
@media (max-width: 760px) {
  .ck-close { display: block; padding-block: 4rem; }
  .ck-kitchen-wrap { margin-bottom: 2.5rem; }
  .ck-close-text .ck-btn { width: 100%; }
}

/* ---------- footer: one quiet line on the ink ---------- */
.ck-foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 1.5rem; padding: 22svh var(--edge) 1.9rem; background: var(--ink); color: var(--butter); font-size: .9375rem; }
.ck-foot nav { display: flex; gap: 1.5rem; }
.ck-foot a { color: var(--butter); font-weight: 600; text-underline-offset: .25em; }
.ck-foot > span:last-child { justify-self: end; text-align: right; }
@media (max-width: 760px) { .ck-foot { grid-template-columns: 1fr; gap: .5rem; padding-top: 20svh; } .ck-foot > span:last-child { justify-self: start; text-align: left; } .ck-foot nav { flex-wrap: wrap; gap: .5rem 1.25rem; } }

/* ---------- motion ---------- */
.ck a:focus-visible, .ck button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
/* Pearl's tail has three frames (the home page's, cell for cell); only the first shows when nothing moves */
.ck-tail-b, .ck-tail-c { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  /* she's alive: blinks now and then, swishes her tail (both Pearls, out of step), and at the stove her eyes follow
     the website up out of the pan and back down */
  .ck-eyes { transform-box: fill-box; transform-origin: center; animation: ck-blink 5.2s 1.4s infinite; }
  .ck-kitchen .ck-eyes { animation: ck-blink 6s 3.1s infinite, ck-watch 2.4s var(--ease) infinite; }
  .ck-tail-a { animation: ck-tail-a 2.8s 1s infinite; }
  .ck-tail-b { animation: ck-tail-b 2.8s 1s infinite; }
  .ck-tail-c { animation: ck-tail-c 2.8s 1s infinite; }
  .ck-kitchen .ck-tail { animation-duration: 3.4s; animation-delay: 2.2s; }
  @keyframes ck-blink { 0%, 93%, 98%, 100% { transform: none; } 94%, 97% { transform: scaleY(.15); } }
  @keyframes ck-watch { 0%, 4%, 42%, 100% { translate: 0 0; } 12%, 26% { translate: -1px -1px; } }
  @keyframes ck-tail-a { 0%, 24.9% { opacity: 1; } 25%, 100% { opacity: 0; } }
  @keyframes ck-tail-b { 0%, 24.9%, 50%, 74.9% { opacity: 0; } 25%, 49.9%, 75%, 100% { opacity: 1; } }
  @keyframes ck-tail-c { 0%, 49.9%, 75%, 100% { opacity: 0; } 50%, 74.9% { opacity: 1; } }
  /* she cooks: the spatula flips up and back, twice, then rests a beat */
  .ck-spatula { animation: ck-flip 2.4s var(--ease) infinite; }
  @keyframes ck-flip { 0%, 40%, 100% { rotate: 0deg; } 10% { rotate: -28deg; } 20% { rotate: 6deg; } 30% { rotate: -20deg; } }
  .ck-pearl { animation: ck-bob 2.4s ease-in-out infinite; }
  /* the website flips out of the pan on the spatula's beat, and the pot steams */
  .ck-cake { animation: ck-toss 2.4s var(--ease) infinite; }
  @keyframes ck-toss { 0%, 45%, 100% { translate: 0 0; rotate: -6deg; } 15% { translate: 0 -5px; rotate: 170deg; } 30% { translate: 0 -2px; rotate: 354deg; } }
  .ck-steam { animation: ck-steam 2.8s ease-in-out infinite; }
  .ck-steam-2 { animation-delay: -1.4s; }
  @keyframes ck-steam { 0% { translate: 0 2px; opacity: 0; } 40% { opacity: 1; } 100% { translate: 0 -4px; opacity: 0; } }
  @keyframes ck-bob { 15%, 35% { translate: 0 -3px; } 0%, 50%, 100% { translate: 0 0; } }
  .ck-pearl.pet, .ck-k-pearl.pet { animation: ck-pet .55s var(--spring); }
  @keyframes ck-pet { 30% { transform: scale(1.07, .86); } 62% { transform: translateY(-12%) scale(.96, 1.06); } }
  /* each part of a section rises as it comes in, one after another (cookin.js adds .in) */
  .js .ck-up { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 75ms); }
  .js .ck-up.in { opacity: 1; transform: none; }
  @supports ((animation-timeline: view()) and (animation-range: entry)) {
    /* the ticket steps back as the stove comes up */
    .ck-ticket { animation: ck-away linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
    @keyframes ck-away { to { transform: scale(.86) rotate(-2deg); opacity: .4; } }
  }
}
