/* higher dog: one field, one dog, cream pixel slabs. */
@font-face { font-family: "Pixelify Sans"; src: url("/fonts/pixelify-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("/fonts/pixelify-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/fonts/nunito-latin-800-normal.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --bg: #1F55E8; --ink: #3A2E25; --accent: #FFE14A;
  --sky: #1F55E8; --sky2: #3E7BF0; --sky3: #6FA3F5; --cloud: #FFFFFF; --cloud-shade: #C9D8F2;
  --grass: #4E9A1E; --cream: #EDE3CF; --slab-side: #8C7B66;
  --font-display: "Pixelify Sans", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --container: min(1320px, 100% - 2 * var(--s3));
}
body { background: linear-gradient(var(--sky) 0, var(--sky2) 60%, var(--sky3) 100%); color: #fff; overflow-x: hidden; }

/* ---------- slab buttons: generated slab picture, word on its face ---------- */
.slab, .go {
  position: relative; display: inline-grid; place-items: center; border: 0; padding: 0; margin: 0;
  background: none; color: var(--ink); text-decoration: none; cursor: pointer;
  font: 700 var(--label)/1 var(--font-display); letter-spacing: .02em; text-transform: uppercase;
  transition: transform .6s cubic-bezier(.2, .9, .3, 1.15);
  -webkit-tap-highlight-color: transparent;
}
.slab > img, .go > img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.slab > span, .go > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: .45em; padding: 0 1em 9% .6em; white-space: nowrap; }
.slab .mark { width: 22px; height: 22px; display: inline-block; }
@media (hover: hover) {
  .slab:hover, .go:hover { transform: translateY(-3px); transition-duration: .25s; }
}
.slab:active, .go:active { transform: translateY(4px) scale(.98); transition-duration: .035s; }
.slab.is-off { opacity: .5; cursor: not-allowed; }
.slab.is-off:hover, .slab.is-off:active { transform: none; }

/* ---------- the field (first screen) ---------- */
.field { position: relative; height: 100svh; min-height: 640px; max-height: 1300px; overflow: hidden; background: linear-gradient(#173CC8, #3864FA 40%, #89B1FB 60%, #4E9A1E 60%); }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.bowl { position: absolute; left: 0; top: 0; z-index: 1; padding: 0; border: 0; background: none; cursor: pointer; min-height: 0;
  border-radius: 40%; transition: opacity .3s ease-out; -webkit-tap-highlight-color: transparent; }
.bowl-tag { position: absolute; left: 50%; bottom: 100%; width: 132px; height: 40px; margin-left: -66px; font-size: 16px; pointer-events: none;
  transition: transform .25s cubic-bezier(.2, .9, .3, 1.3); }
.bowl-tag > span { padding-bottom: 7%; }
@media (hover: hover) { .bowl:hover .bowl-tag { transform: translateY(-5px); } }
.bowl:active .bowl-tag { transform: translateY(3px); transition-duration: .035s; }
.title { position: absolute; left: 47%; right: 3%; top: 7%; text-align: center; z-index: 2; }
.title h1 { margin: 0; line-height: 0; }
.title h1 img { width: 100%; height: auto; margin-inline: auto; }
.line { margin: .2em 0 0; font: 800 clamp(20px, 1.65vw, 34px)/1.25 var(--font-body); text-shadow: 0 2px 0 rgba(20, 50, 140, .55), 0 0 12px rgba(20, 50, 140, .45); }

.go { position: relative; display: grid; margin: clamp(24px, 4.5vh, 64px) auto 0; width: min(37vw, 720px); aspect-ratio: 1200 / 318; z-index: 2; }
.go > span { font-size: clamp(30px, 3.6vw, 70px); padding-bottom: 7%; padding-right: 3%; }

.ca-cloud { position: absolute; right: 1.5%; bottom: 1%; width: clamp(600px, 49vw, 960px); aspect-ratio: 1600 / 640; z-index: 2; }
.ca-cloud-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; animation: bob 7s ease-in-out infinite; }
.ca-body { position: absolute; left: 13%; right: 13%; top: 20%; display: grid; gap: var(--s2); color: var(--ink); }
.ca-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'label copy' 'ca ca'; align-items: center; gap: 6px var(--s2);
  background: url("/img/panel.webp") 0 0 / 100% 100% no-repeat; padding: 14px 26px 20px 22px; }
.ca-label { grid-area: label; font: 700 var(--label)/1 var(--font-display); text-transform: uppercase; }
[data-ca] { grid-area: ca; font: 800 16px/1.3 var(--font-body); color: var(--ink); min-width: 0; }
.slab-copy { grid-area: copy; width: 120px; height: 48px; }
.ca-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.slab-link { height: 56px; width: 100%; }
.slab-link > span { font-size: 16px; }
@keyframes bob { 50% { transform: translateY(-6px); } }

/* ---------- up here: the sky above ---------- */
.up { position: relative; overflow: hidden; padding: var(--s7) 0 var(--s7);
  background: url("/img/sky-high.webp") 50% 0 / cover no-repeat, linear-gradient(var(--sky), var(--sky3)); }
.bank { position: absolute; left: -8%; width: 116%; top: -6vw; height: 14vw; object-fit: fill; pointer-events: none; z-index: 0; }
.up { overflow: visible; overflow-x: clip; }
.up .container { position: relative; z-index: 1; }
.head { margin: 0 0 var(--s5); text-align: center; font: 700 clamp(44px, 5.5vw, 88px)/1 var(--font-display); text-transform: uppercase;
  color: var(--cream); text-shadow: 3px 3px 0 var(--slab-side), 6px 6px 0 rgba(30, 50, 120, .3); }
.head-ink { color: var(--ink); text-shadow: none; font-size: clamp(32px, 3.4vw, 56px); margin-bottom: var(--s3); }

.drift { position: absolute; pointer-events: none; opacity: .95; animation: drift 90s linear infinite; }
.d1 { width: 34vw; top: 4%; left: -6%; }
.d2 { width: 14vw; top: 30%; right: 2%; animation-duration: 70s; }
.d3 { width: 30vw; top: 58%; left: 2%; animation-duration: 110s; }
.d4 { width: 26vw; bottom: 3%; right: -4%; animation-duration: 80s; }
@keyframes drift { 50% { transform: translateX(-6vw); } }

.gallery { list-style: none; margin: 0 0 var(--s7); padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5) var(--s4); }
.meme { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: zoom-in;
  transition: transform .6s cubic-bezier(.2, .9, .3, 1.15); }
.meme-pic { position: absolute; inset: 12%; overflow: hidden; background: var(--grass); }
.meme-pic img { width: 100%; height: 100%; object-fit: cover; }
.meme-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
@media (hover: hover) { .meme:hover { transform: translateY(-6px) rotate(-1deg); transition-duration: .25s; } }
.meme:active { transform: translateY(3px); transition-duration: .035s; }
.meme-cap { margin: var(--s1) 0 0; text-align: center; font: 700 22px/1.1 var(--font-display); text-transform: uppercase; color: #fff; text-shadow: 2px 2px 0 rgba(30, 50, 120, .45); }

.lore { position: relative; width: min(980px, 100%); margin-inline: auto; aspect-ratio: 1200 / 540; }
.lore-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.lore-body { position: absolute; inset: 12% 14% 18% 10%; display: flex; flex-direction: column; justify-content: center; color: var(--ink); text-align: center; }
.lore-body p { margin: 0; font: 800 clamp(20px, 1.6vw, 26px)/1.35 var(--font-body); }
.lore-body .risk { margin-top: var(--s3); font: 600 16px/1.35 var(--font-body); opacity: .72; }

/* ---------- viewer ---------- */
.viewer { border: 0; padding: var(--s3); background: none; max-width: min(1100px, 100vw - 32px); width: 100%; color: #fff; }
.viewer::backdrop { background: rgba(31, 85, 232, .82); }
.viewer figure { margin: 0; }
.viewer img[data-viewer-img] { width: 100%; height: auto; max-height: 72vh; object-fit: contain; border: 10px solid var(--cream); box-shadow: 8px 8px 0 var(--slab-side); }
.viewer figcaption { margin-top: var(--s2); text-align: center; font: 700 32px/1 var(--font-display); text-transform: uppercase; }
.viewer-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 200px)); justify-content: center; gap: var(--s2); margin-top: var(--s3); }
.viewer-nav .slab { height: 56px; width: 100%; }

/* ---------- smaller screens ---------- */
@media (max-width: 1100px) and (min-width: 821px) {
  .ca-links { grid-template-columns: 1fr 1fr; } .ca-links .slab-link:first-child { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .field { height: auto; max-height: none; min-height: 0; background: none; }
  .scene { position: relative; height: 92svh; min-height: 560px; max-height: 900px; }
  .title { left: 4%; right: 4%; top: 3%; }
  .line { font-size: 19px; }
  .go { margin-top: 14px; width: 64vw; max-width: 360px; }
  .go > span { font-size: clamp(24px, 7vw, 40px); }
  .ca-cloud { position: relative; right: auto; bottom: auto; width: 100%; aspect-ratio: auto; padding: var(--s6) var(--s2) var(--s6);
    background: url("/img/cloud1.webp") 50% 55% / 230% auto no-repeat, url("/img/grass.webp") 50% 0 / cover; }
  .ca-cloud-img { display: none; }
  .ca-body { position: relative; inset: auto; padding: 0 2%; }
  .ca-links { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: var(--s4) var(--s3); }
  .meme-cap { font-size: 18px; }
  .lore { aspect-ratio: auto; padding: 14% 10% 18%; }
  .lore-body { position: relative; inset: auto; }
  .drift { width: 60vw; }
  .viewer-nav .slab > span { font-size: 14px; padding-inline: .5em; }
}
@media (max-width: 380px) {
  .slab-copy { width: 100px; }
  .gallery { gap: var(--s3) var(--s2); }
}

/* ---------- 404: only his legs are left in frame ---------- */
.lost-sky { position: relative; min-height: 100svh; display: grid; place-items: center; overflow: hidden; padding: var(--s5) var(--s2);
  background: url("/img/sky-high.webp") 50% 50% / cover no-repeat; }
.lost-legs { position: absolute; left: 6%; bottom: -2%; height: 190svh; width: auto; max-width: none; pointer-events: none; }
.lost-sky .lore { width: min(720px, 100%); z-index: 1; }
.lost-home { margin-top: var(--s3) !important; }
.lost-home .slab-link { width: 220px; height: 60px; }
@media (max-width: 820px) { .lost-legs { left: -30%; opacity: .9; } }
