/* CatKraft: the game's daytime look (sky blue, meadow green, parchment panels with brown pixel
   borders, wordmark yellow) on the Arcade Night kit's fonts and arcade.js (motion button, signup). */

@font-face { font-family: "Press Start 2P"; src: url(kit/fonts/PressStart2P.woff2) format("woff2"); font-display: swap; }
@font-face { font-family: "Rubik"; src: url(kit/fonts/Rubik.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }

:root { --bg: #7cc4f0; --sky: #6fbdf0; --haze: #d8eef8; --grass: #5fae3c; --grass2: #3f8a2a; --soil: #8a5a32; --paper: #f6e6bf; --paper2: #fbf2da; --wood: #7a4a21; --ink: #3b2410; --sun: #ffd24a; --turnip: #a14fb5; --px: 4px; color-scheme: light; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--grass); }
body { margin: 0; color: var(--ink); font: 400 18px/1.6 "Rubik", system-ui, sans-serif; overflow-x: hidden; background: linear-gradient(var(--sky), var(--haze) 690px, var(--grass) 690px); }
h1, h2, h3, .btn, .tag, .menu a, .form-msg { font-family: "Press Start 2P", ui-monospace, monospace; font-weight: 400; }
h1, h2, h3 { margin: 0; line-height: 1.4; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--sun); color: var(--ink); font-weight: 600; padding: 12px; }
.skip:focus { top: 12px; }

/* A pixel border: square notches at the corners, like the game's panels. */
.px, .card, .pic, .board, .screen, .intro, .btn, .platforms .btn { box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink), calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink); }

/* Nav: the wordmark, links, the motion button and the signup button. */
nav { position: sticky; top: 0; z-index: 20; background: rgba(246,230,191,.94); border-bottom: var(--px) solid var(--ink); }
nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 66px; }
.brand img { height: 34px; width: auto; image-rendering: pixelated; }
.menu { display: flex; gap: 8px; align-items: center; }
.menu a:not(.btn) { text-decoration: none; padding: 8px 10px; font-size: 11px; color: var(--wood); }
.menu a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.menu .btn { padding: 11px 14px; font-size: 11px; }
@media (max-width: 1000px) { .menu a:not(.btn) { display: none; } }
.menu .btn .short { display: none; }
@media (max-width: 760px) { .menu .btn .long { display: none; } .menu .btn .short { display: inline; } }
@media (max-width: 420px) { .brand img { height: 26px; } .menu .btn { padding: 10px 10px; } }

.motion-toggle { font: 600 14px "Rubik", sans-serif; color: var(--wood); background: transparent; border: 3px solid var(--wood); border-radius: 0; padding: 8px 12px; min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.motion-toggle:hover { background: rgba(122,74,33,.1); }
.motion-toggle .icon { width: 12px; height: 12px; display: inline-block; background: currentColor; clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }
.motion-toggle[aria-pressed="true"] .icon { clip-path: polygon(0 0, 100% 50%, 0 100%); }
@media (max-width: 520px) { .motion-toggle .label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); } }

/* Buttons: wordmark yellow on a dark step, pressed down when clicked. */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--sun); color: var(--ink); text-decoration: none; padding: 16px 20px; border: 0; border-radius: 0; font-size: 13px; line-height: 1.3; cursor: pointer; margin: var(--px); position: relative; top: 0; transition: top .08s; }
.btn::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 6px; background: rgba(59,36,16,.35); transition: bottom .08s; }
.btn:hover { top: -2px; }
.btn:active { top: 3px; }
.btn:active::after { bottom: -6px; }
.btn.leaf { background: #8fd16a; }
.btn.off { background: var(--paper2); color: var(--wood); cursor: not-allowed; top: 0; }
.btn.off::after { display: none; }
.btn[disabled] { opacity: .7; cursor: wait; }

/* Hero: the title screen in a frame under drifting clouds, the intro on a parchment card below. */
.hero { position: relative; padding: 40px 0 0; overflow: hidden; }
.sky { position: absolute; inset: 0; pointer-events: none; }
.cloud { position: absolute; width: 120px; height: 28px; background: #fff; opacity: .9; animation: cloud 70s linear infinite; }
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; }
.cloud::before { left: 20px; top: -16px; width: 48px; height: 16px; }
.cloud::after { left: 56px; top: -28px; width: 36px; height: 28px; }
.c1 { top: 70px; animation-delay: -10s; }
.c2 { top: 190px; transform: scale(.7); animation-duration: 95s; animation-delay: -60s; }
.c3 { top: 420px; transform: scale(1.3); animation-duration: 120s; animation-delay: -30s; }
@keyframes cloud { from { left: -200px; } to { left: 100%; } }
.hero .wrap { position: relative; z-index: 2; display: grid; justify-items: center; }
.screen { margin: 0; width: 100%; background: var(--sky); border: var(--px) solid var(--paper); }
.screen img { width: 100%; }
.intro { position: relative; margin: -60px 20px 0; max-width: 860px; background: var(--paper); padding: 32px clamp(20px, 4vw, 44px) 34px; text-align: center; }
.intro h1 { font-size: clamp(18px, 2.5vw, 30px); }
.intro h1 em { font-style: normal; color: var(--turnip); display: inline-block; animation: hop 2.6s steps(2) infinite; }
@keyframes hop { 0%, 80%, 100% { transform: translateY(0); } 90% { transform: translateY(-6px); } }
.intro p { font-size: 20px; margin: 18px auto 24px; max-width: 58ch; }
.ctas { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.grass { height: 48px; margin-top: 56px; background: linear-gradient(var(--grass), var(--grass)) 0 16px / 100% 32px no-repeat, repeating-linear-gradient(90deg, var(--grass) 0 8px, transparent 8px 16px, var(--grass) 16px 20px, transparent 20px 28px) 0 0 / 100% 16px no-repeat; }
@media (max-width: 700px) { .intro { margin: -24px 0 0; } .intro p { font-size: 18px; } }

/* Section titles. */
section { padding: 70px 0; }
.title { font-size: clamp(18px, 2.4vw, 28px); color: #fff; text-shadow: 3px 3px 0 var(--ink); }
.lede { font-size: 20px; max-width: 60ch; margin: 16px 0 40px; color: #fff; text-shadow: 2px 2px 0 rgba(59,36,16,.5); }

/* The trailer: one framed video on the grass, loaded only when someone presses play. */
.trailer { background: var(--grass); padding: 30px 0 0; }
.trailer .pic { max-width: 960px; }
.trailer video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--ink); image-rendering: pixelated; }

/* Features: a framed shot beside a parchment card, sides swapping down the page. */
.features { background: var(--grass); padding-top: 30px; }
.feature { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; align-items: center; margin: 0 0 56px; }
.feature:nth-of-type(even) .pic { order: 2; }
.pic { background: var(--wood); border: 6px solid var(--wood); margin: var(--px); }
.pic img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card { background: var(--paper); padding: 26px 28px; margin: var(--px); }
.card h3 { font-size: 16px; margin: 14px 0 10px; }
.card p { margin: 0; }
.tag { display: inline-block; font-size: 10px; background: var(--soil); color: #fff; padding: 6px 8px; }
@media (max-width: 900px) { .feature { grid-template-columns: 1fr; gap: 16px; } .feature:nth-of-type(even) .pic { order: 0; } }

/* Play together, and the family section: soil and parchment bands. */
.together { background: var(--soil); color: #fff; }
.together .wrap, .family .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px; align-items: center; }
.together p { font-size: 19px; }
.ticks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.ticks li { padding-left: 30px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 7px; width: 14px; height: 14px; background: var(--sun); box-shadow: 3px 3px 0 var(--ink); }
.family { background: var(--paper2); }
.family .title { color: var(--ink); text-shadow: 3px 3px 0 var(--sun); }
.family p { font-size: 19px; }
.family .wrap { grid-template-columns: 1fr 1.05fr; }
@media (max-width: 900px) { .together .wrap, .family .wrap { grid-template-columns: 1fr; } }

/* Downloads (coming soon) and the signup, on a notice board. */
.download { background: var(--grass2); }
.board { background: var(--paper); padding: clamp(24px, 5vw, 56px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; margin: var(--px); }
.board .title { color: var(--ink); text-shadow: 3px 3px 0 var(--sun); }
.board p { font-size: 19px; }
.platforms { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 22px 0 10px; }
.signup form { display: grid; gap: 14px; }
.signup label { font-weight: 600; font-size: 15px; display: grid; gap: 6px; }
.signup input { font: 500 18px "Rubik", sans-serif; padding: 13px 16px; border: var(--px) solid var(--ink); border-radius: 0; background: #fff; color: var(--ink); width: 100%; }
.signup input:focus { outline: 3px solid var(--turnip); outline-offset: 2px; }
.signup .btn { justify-self: start; }
.signup .trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup .notice { font-size: 15px; margin: 18px 0 0; }
.signup .notice a { font-weight: 600; }
.form-msg { font-size: 14px; line-height: 1.7; margin: 18px 0 0; }
.form-msg:empty { display: none; }
.form-msg.ok { background: #8fd16a; padding: 14px 16px; }
.form-msg.err { font: 600 18px "Rubik", sans-serif; background: #ffd9d2; color: #7a1a0a; padding: 12px 16px; border: 3px solid #7a1a0a; }
.sent form, .sent .notice { display: none; }
@media (max-width: 900px) { .board { grid-template-columns: 1fr; } }

/* Footer. */
footer { background: var(--grass2); color: #eaf6e0; padding: 10px 0 60px; font-size: 15px; }
footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; align-items: center; }
footer span:first-child { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
footer img { image-rendering: pixelated; }

/* The privacy page. */
.prose { padding: 50px 0 70px; }
.prose > * { max-width: 70ch; }
.prose h1 { font-size: 24px; margin-bottom: 20px; }
.prose h2 { font-size: 15px; margin: 30px 0 8px; }
.prose-page { background: var(--paper2); }
.prose-page footer { background: var(--soil); }

/* Motion: the button pauses the clouds and hops (html.still); reduced motion stops them unless
   the visitor presses play for this visit. */
.still .cloud, .still .intro h1 em { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html:not(.motion-opt-in) .cloud, html:not(.motion-opt-in) .intro h1 em { animation: none; }
  .btn { transition: none; }
}

/* The press kit: the fact sheet, logo and icon downloads, and the screenshots. */
.press { padding: 50px 0 70px; }
.press section { padding: 30px 0 0; }
.press h1 { font-size: 24px; }
.press h2 { font-size: 16px; margin: 40px 0 14px; }
.press section > p, .press .lede-dark, .press .ticks { max-width: 70ch; }
.lede-dark { font-size: 20px; margin: 16px 0 0; }
.press a { font-weight: 600; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 28px; margin: 0; padding: 22px 26px; background: var(--paper); max-width: 760px; box-shadow: 0 calc(-1 * var(--px)) 0 var(--ink), 0 var(--px) 0 var(--ink), calc(-1 * var(--px)) 0 0 var(--ink), var(--px) 0 0 var(--ink); }
.facts dt { font-weight: 700; color: var(--wood); }
.facts dd { margin: 0; }
.press .ticks li::before { top: 8px; }
.assets, .shots { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.assets { grid-template-columns: 2fr 1fr; align-items: end; }
.shots { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.assets li, .shots li { display: grid; gap: 10px; font-size: 16px; }
.assets img, .shots img { width: 100%; image-rendering: pixelated; }
.swatch { display: grid; place-items: center; padding: 20px; background: var(--paper); }
.swatch.blue { background: var(--sky); padding: 40px 30px; min-height: 100%; }
.assets li:last-child img { max-width: 240px; }
.shots a:has(img) { display: block; border: 6px solid var(--wood); }
.small { font-size: 15px; }
@media (max-width: 760px) { .assets { grid-template-columns: 1fr; } .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }
