/* =====================================================================
   CAPPY COOKING page styles  (public/css/cappy-cooking.css)
   Loaded after /css/site.css on /cappy-cooking/ only.
   Adds the game's own cosy kitchen palette (from the Cappy Cooking UI):
   cream paper, chocolate ink, mint scallops, pink buttons, thick rounded
   outlines and a solid drop shadow. These sit inside the studio's dark
   starfield frame, like a cartridge's title screen inside the cabinet.
   ===================================================================== */

.cappy-page {
  --cc-cream: #fbeedd;
  --cc-card: #fffaf2;
  --cc-ink: #4a3127;
  --cc-soft: #7a5a4b;
  --cc-mint: #bfe3c4;
  --cc-pink: #e0546b;
  --cc-pink-deep: #c23a55; /* white text on this passes AA (5.2:1) */
  --cc-pink-soft: #f6a8b6;
  --cc-yellow: #ffe39a;
  --cc-stripe-a: #fde6d8;
  --cc-stripe-b: #fbdccb;
  --cc-peach: #f6cdbb;
  --cc-round: "Fredoka", ui-rounded, "Trebuchet MS", system-ui, sans-serif;
  --cc-drop: 0 5px 0 var(--cc-ink);
}

/* ---------- shared cosy surfaces ---------- */
.cc-paper {
  color: var(--cc-ink);
  background: repeating-linear-gradient(90deg, var(--cc-stripe-a) 0 40px, var(--cc-stripe-b) 40px 80px);
  border: 4px solid var(--edge);
  box-shadow: inset 0 0 0 4px var(--cc-ink), var(--shadow-lg);
  position: relative;
}
.cc-paper--scallop { padding-top: 34px; }
.cc-paper--scallop::before { /* mint awning, like the game's menus */
  content: ""; position: absolute; left: 4px; right: 4px; top: 4px; height: 26px;
  background:
    radial-gradient(circle at 20px 0, var(--cc-mint) 19px, transparent 20px) 0 0 / 40px 26px repeat-x;
  pointer-events: none;
}
.cc-paper a:not(.btn) { color: var(--cc-pink); }
.cc-paper a:not(.btn):hover { color: var(--cc-ink); }
.cc-paper :focus-visible { outline-color: var(--cc-ink); }

/* ---------- hero (title screen) ---------- */
.cc-hero { padding: 28px 0 56px; }
.cc-hero .hud { margin-bottom: 20px; }
.cc-hud__live { color: var(--pink); }
.cc-hud__live::before { content: "\25CF"; margin-right: 6px; animation: blink 1s steps(1) infinite; }
.cc-screen {
  display: grid; gap: 28px; align-items: center;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  padding: 52px 32px 36px;
}
.cc-screen__title { text-align: center; }
.cc-logo { width: min(100%, 420px); height: auto; margin: 0 auto; filter: drop-shadow(0 5px 0 rgba(74, 49, 39, .25)); }
.cc-tagline {
  font-family: var(--cc-round); font-weight: 600;
  font-size: clamp(19px, 2.4vw, 23px); line-height: 1.35;
  color: var(--cc-ink); max-width: 30ch; margin: 18px auto 0;
}
.cc-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 16px; margin-top: 24px; }
.cc-cta .btn--lg { animation: cc-pulse 1.2s steps(2) infinite; }
.cc-cta .btn--lg:hover, .cc-cta .btn--lg:focus-visible { animation: none; }
@keyframes cc-pulse { 50% { box-shadow: inset -3px -3px 0 rgba(0,0,0,.25), inset 3px 3px 0 rgba(255,255,255,.35), 4px 4px 0 var(--edge), 0 0 0 6px rgba(224, 84, 107, .3); } }
.cc-btn-cream { --b: var(--cc-card); --c-ink: var(--cc-ink); }
.cc-press { margin-top: 18px; font-family: var(--font-pixel); font-size: 10px; letter-spacing: 1px; color: var(--cc-soft); }
.cc-credit { font-family: var(--cc-round); font-weight: 600; color: var(--cc-pink); font-size: 18px; margin-top: 12px; }

/* key art in a camera viewfinder */
.cc-viewfinder { position: relative; margin: 0; }
.cc-viewfinder__frame {
  position: relative; background: var(--cc-card); padding: 8px;
  border: 4px solid var(--cc-ink); border-radius: 22px; box-shadow: var(--cc-drop);
}
.cc-viewfinder__frame img { border-radius: 14px; width: 100%; }
.cc-viewfinder__frame::before, .cc-viewfinder__frame::after { /* REC corners */
  content: ""; position: absolute; width: 28px; height: 28px; pointer-events: none;
  border: 4px solid var(--cc-pink);
}
.cc-viewfinder__frame::before { left: -14px; top: -14px; border-right: 0; border-bottom: 0; }
.cc-viewfinder__frame::after { right: -14px; bottom: -14px; border-left: 0; border-top: 0; }
.cc-rec {
  position: absolute; left: 28px; top: -17px; z-index: 2;
  font-family: var(--font-pixel); font-size: 10px; letter-spacing: 1px;
  background: var(--cc-pink-deep); color: #fff; padding: 6px 9px;
  border: 3px solid var(--cc-ink); border-radius: 10px;
}
.cc-viewfinder figcaption { font-size: 19px; color: var(--cc-soft); text-align: center; margin-top: 12px; }

/* Big Like mini game: starts right on top of the key art's drawn Big Like heart
   (heart centre is about 41% across, 44% down the art), so it reads as "catch this one" */
.cc-biglike {
  position: absolute; right: calc(59% - 32px); bottom: calc(56% - 32px); z-index: 3;
  width: 64px; height: 64px; padding: 6px; cursor: pointer;
  background: var(--cc-card); color: var(--cc-pink);
  border: 4px solid var(--cc-ink); border-radius: 50%; box-shadow: var(--cc-drop);
  animation: cc-float 3.2s steps(8) infinite;
}
.cc-biglike svg { width: 100%; height: 100%; fill: currentColor; shape-rendering: crispEdges; display: block; }
.cc-biglike:hover { color: #ff3b62; }
.cc-biglike:focus-visible { outline: 3px solid var(--cc-ink); outline-offset: 4px; box-shadow: var(--cc-drop), 0 0 0 7px var(--cc-card); }
.cc-biglike.is-caught { animation: cc-pop .35s steps(3) forwards; pointer-events: none; }
.cc-biglike[hidden] { display: none; }
@keyframes cc-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes cc-pop { to { transform: scale(1.6); opacity: 0; } }

@media (max-width: 860px) {
  .cc-screen { grid-template-columns: 1fr; padding: 46px 18px 28px; gap: 30px; }
  .cc-viewfinder { order: 2; }
}
@media (max-width: 420px) {
  .cc-biglike { width: 52px; height: 52px; right: calc(59% - 26px); bottom: calc(56% - 26px); }
  .cc-cta .btn { width: 100%; }
}

/* ---------- pitch + live chat ---------- */
.cc-pitch { display: grid; gap: 32px; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .cc-pitch { grid-template-columns: 1fr; } }
.cc-pitch__text p { font-size: 24px; }
.cc-pitch__text .stats { margin-top: 26px; }
.cc-chat { padding: 18px 16px 18px; border-radius: 0; }
.cc-chat__head {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--cc-round); font-weight: 600; font-size: 18px; color: #fff;
  background: var(--cc-pink-deep); padding: 4px 14px; border: 3px solid var(--cc-ink); border-radius: 999px;
}
.cc-chat__list { list-style: none; margin-top: 14px; display: grid; gap: 8px; }
.cc-chat__list li {
  font-family: var(--cc-round); font-weight: 500; font-size: 17px; line-height: 1.3;
  background: var(--cc-card); border: 3px solid var(--cc-ink); border-radius: 16px; padding: 7px 12px;
}
.cc-chat__list b { display: block; font-weight: 600; font-size: 14px; color: var(--cc-soft); }
.cc-chat__list li:nth-child(1) b { color: #8a5220; }
.cc-chat__list li:nth-child(2) b { color: #3f7a4c; }
.cc-chat__list li:nth-child(3) b { color: #c23a55; }
.cc-chat__list li:nth-child(4) b { color: #5b56a8; }
.cc-chat__list .is-request { background: var(--cc-yellow); }
.cc-chat figcaption { font-size: 17px; color: var(--cc-soft); margin-top: 12px; }
.js .cc-chat__list li { animation: cc-msg .4s steps(4) both; }
.js .cc-chat__list li:nth-child(2) { animation-delay: .25s; }
.js .cc-chat__list li:nth-child(3) { animation-delay: .5s; }
.js .cc-chat__list li:nth-child(4) { animation-delay: .75s; }
.js .cc-chat__list li:nth-child(5) { animation-delay: 1s; }
@keyframes cc-msg { from { opacity: 0; transform: translateY(10px); } }

/* ---------- characters ---------- */
.cc-cast { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.cc-hero-card { display: flex; flex-direction: column; }
.cc-hero-card .card__media { aspect-ratio: 16 / 10; position: relative; }
.cc-hero-card .card__media img { object-position: var(--focus, center); }
.cc-nameplate {
  position: absolute; left: 12px; bottom: 12px;
  font-family: var(--font-pixel); font-size: 11px; letter-spacing: 1px;
  background: var(--c); color: var(--c-ink); padding: 7px 10px; border: 3px solid var(--edge); box-shadow: var(--shadow);
}
.cc-hero-card .chips { margin-top: 14px; }

/* ---------- how to play: recipe card ---------- */
.cc-recipe { padding: 44px 20px 28px; }
.cc-recipe__head { text-align: center; font-family: var(--cc-round); font-weight: 600; font-size: clamp(22px, 3.4vw, 30px); color: var(--cc-ink); }
.cc-recipe__sub { text-align: center; color: var(--cc-soft); font-size: 21px; margin-top: 4px; }
.cc-steps { list-style: none; counter-reset: step; display: grid; gap: 18px; margin-top: 26px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.cc-step {
  counter-increment: step;
  background: var(--cc-card); border: 4px solid var(--cc-ink); border-radius: 22px; box-shadow: var(--cc-drop);
  overflow: hidden; display: flex; flex-direction: column;
}
.cc-step img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 4px solid var(--cc-ink); }
.cc-step__body { padding: 14px 16px 18px; display: flex; gap: 12px; align-items: flex-start; }
.cc-step__body::before {
  content: counter(step); flex: none;
  display: grid; place-items: center; width: 38px; height: 38px;
  font-family: var(--font-pixel); font-size: 14px; color: var(--cc-ink);
  background: var(--cc-yellow); border: 3px solid var(--cc-ink); border-radius: 50%;
}
/* step 4: zoom into the key art's Big Like heart instead of repeating the whole picture */
.cc-step__zoom { overflow: hidden; aspect-ratio: 16 / 9; border-bottom: 4px solid var(--cc-ink); }
.cc-step__zoom img { height: 100%; border-bottom: 0; object-position: 41% 44%; transform: scale(2); transform-origin: 41% 44%; }
.cc-step:nth-child(even) .cc-step__body::before { background: var(--cc-pink-soft); }
.cc-step:nth-child(3n) .cc-step__body::before { background: var(--cc-mint); }
.cc-step p { font-family: var(--cc-round); font-weight: 500; font-size: 18px; line-height: 1.4; color: var(--cc-ink); }
.cc-step strong { font-weight: 600; }

/* ---------- gallery ---------- */
.cc-filter { justify-content: center; margin-bottom: 26px; }
.cc-filter [aria-pressed="true"] { --b: var(--c); color: var(--c-ink); box-shadow: inset -3px -3px 0 rgba(0,0,0,.25), inset 3px 3px 0 rgba(255,255,255,.35), var(--shadow); }
/* 2 columns, then 4. The key art tile is 2 wide (and 2 tall at 4 columns), so
   12 tiles + the key art always fill whole rows. */
.cc-gallery { list-style: none; display: grid; gap: 22px; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; }
.cc-gallery li[hidden] { display: none; }
.cc-gallery .shot { height: 100%; display: flex; flex-direction: column; }
.cc-gallery a { display: block; position: relative; color: inherit; }
.cc-gallery a img { aspect-ratio: 16 / 9; object-fit: cover; }
.cc-gallery a::after { /* zoom hint */
  content: "+"; position: absolute; right: 8px; top: 8px;
  width: 30px; height: 30px; display: grid; place-items: center;
  font-family: var(--font-pixel); font-size: 14px; color: var(--c-ink); background: var(--c);
  border: 3px solid var(--edge); opacity: 0; transition: opacity .1s steps(2);
}
.cc-gallery a:hover::after, .cc-gallery a:focus-visible::after { opacity: 1; }
.cc-gallery a:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.cc-gallery .is-wide { grid-column: span 2; }
.cc-gallery .is-wide a img { aspect-ratio: 3 / 2; }
@media (min-width: 900px) {
  .cc-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cc-gallery .is-wide { grid-row: span 2; }
  .cc-gallery .is-wide a { flex: 1; min-height: 0; }
  .cc-gallery .is-wide a img { height: 100%; aspect-ratio: auto; }
}

/* lightbox (js/cappy-cooking.js) */
.cc-lightbox {
  border: 4px solid var(--edge); padding: 0; background: var(--panel); color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--c), var(--shadow-lg);
  width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); margin: auto;
}
.cc-lightbox::backdrop { background: rgba(10, 8, 22, .85); }
.cc-lightbox__img { width: 100%; max-height: calc(100vh - 160px); object-fit: contain; background: var(--edge); }
.cc-lightbox__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.cc-lightbox__cap { font-size: 20px; color: var(--muted); flex: 1 1 220px; }
.cc-lightbox__nav { display: flex; gap: 10px; }

/* ---------- platforms ---------- */
.cc-platforms { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 820px) { .cc-platforms { grid-template-columns: 1fr; } }
.cc-platforms .ticklist li { font-size: 22px; }
.cc-specs { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; }
.cc-specs dt { font-family: var(--font-pixel); font-size: 10px; letter-spacing: 1px; color: var(--c); padding-top: 6px; }
.cc-specs dd { color: var(--ink); }
@media (max-width: 400px) { .cc-specs { grid-template-columns: 1fr; gap: 2px; } .cc-specs dd { margin-bottom: 10px; } }
.cc-device { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.cc-device img { width: 72px; height: 72px; border-radius: 18px; border: 3px solid var(--edge); box-shadow: var(--shadow); flex: none; }
.cc-device p { color: var(--muted); font-size: 20px; }

/* ---------- cross promo + final CTA ---------- */
@media (min-width: 821px) { .cc-next .game { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.cc-final { text-align: center; padding: 40px 20px 34px; }
.cc-final__icon { width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 24px; border: 4px solid var(--cc-ink); box-shadow: var(--cc-drop); }
.cc-final h2 { font-family: var(--cc-round); font-weight: 600; font-size: clamp(26px, 4.6vw, 40px); color: var(--cc-ink); line-height: 1.15; }
.cc-final p { color: var(--cc-soft); font-size: 22px; margin: 10px auto 0; max-width: 34ch; }
.cc-final .cc-cta { margin-top: 22px; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .cc-biglike, .cc-cta .btn--lg, .js .cc-chat__list li { animation: none !important; }
}

/* gallery: two columns on phones so the page stays short */
@media (max-width: 600px) {
  .cc-gallery { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cc-gallery .shot figcaption { font-size: 16px; line-height: 1.2; }
  .cc-filter .btn { flex: 1 1 auto; }
}
