/* Squishy Dig's pages, in the game's own look: home's indigo, the cards' cream, the
   ink line round everything, butter buttons, Fredoka. Every colour is the game's,
   read off its stills (tools/site/make_images.py). Nothing fetched from anywhere else. */
@font-face { font-family: "Fredoka"; src: url("/fonts/Fredoka-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
	--indigo: #5c4dd8;
	--indigo-deep: #4a3cc4;
	--lilac: #b8afff;
	--cream: #fff5db;
	--ink: #1c1638;
	--butter: #ffe066;
	--butter-shade: #f0b22a;
	--grape: #6c2c9a;
	--coral: #f47c62;
	--words: #3a3160;
	--line: 4px solid var(--ink);
	--round: 34px;
	--gutter: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; }
body {
	background: var(--indigo);
	color: var(--ink);
	font-family: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-weight: 500;
	font-size: 18px;
	line-height: 1.5;
	overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, .fredoka, button, .button { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-weight: 600; }
h2 { font-size: clamp(32px, 6vw, 48px); line-height: 1.05; margin: 0 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 22px; line-height: 1.15; margin: 0; }
p { margin: 0 0 14px; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }

/* butter, as the game draws its buttons: an ink line and a shade along the foot */
.button, button {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--butter); color: var(--ink);
	border: var(--line); border-radius: 20px;
	box-shadow: inset 0 -6px 0 var(--butter-shade);
	padding: 12px 26px 15px; font-size: 22px; line-height: 1;
	text-decoration: none; cursor: pointer; white-space: nowrap;
}
.button:active, button:active { box-shadow: inset 0 -2px 0 var(--butter-shade); transform: translateY(2px); }
.button:focus-visible, button:focus-visible, input:focus-visible, a:focus-visible { outline: 4px solid var(--butter); outline-offset: 3px; }

/* ---------- the top: home, as the game opens on it ---------- */
.hero { color: #fff; padding: 28px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1fr; gap: 6px; justify-items: center; text-align: center; }
.hero h1 { margin: 6px 0 0; width: min(78vw, 420px); }
.hero .stage { width: min(100%, 560px); margin: 4px 0 2px; }
.hero .lede { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-size: clamp(22px, 4.6vw, 28px); line-height: 1.25; max-width: 30ch; margin: 4px 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; padding: 0; margin: 18px 0 0; }
.chips li { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-size: 16px; padding: 6px 14px 7px; border-radius: 999px; background: var(--indigo-deep); border: 2px solid rgba(255, 255, 255, 0.35); }

/* the launch list: one field, and the button */
.launch { width: 100%; max-width: 480px; background: var(--cream); color: var(--ink); border: var(--line); border-radius: var(--round); padding: 20px 20px 16px; text-align: left; }
.launch label { display: block; font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-size: 21px; line-height: 1.2; margin: 0 0 12px; }
.launch .row { display: flex; gap: 10px; flex-wrap: wrap; }
.launch input[type="email"] {
	flex: 1 1 150px; min-width: 0; font: inherit; font-size: 18px; color: var(--ink);
	background: #fff; border: var(--line); border-radius: 18px; padding: 12px 16px;
}
.launch button { flex: 0 0 auto; }
.launch .fine { font-size: 15px; line-height: 1.4; color: var(--words); margin: 12px 2px 0; }
.launch .fine a { color: var(--grape); }
/* a field people never see, for the bots that fill in every field */
.launch .away { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- a section is a cream card on the indigo, as the game's cards are ---------- */
.sheet { background: var(--cream); border: 5px solid var(--ink); border-radius: 44px; padding: 40px 22px 34px; margin: 0 auto 26px; }
.sheet > header { text-align: center; max-width: 640px; margin: 0 auto 26px; }
.sheet > header p { color: var(--words); font-size: 19px; }
.sheet h2 { color: var(--grape); }
.on-indigo { color: #fff; padding: 30px 0 34px; }
.on-indigo > .wrap > header { text-align: center; max-width: 640px; margin: 0 auto 26px; }
.on-indigo > .wrap > header p { font-size: 19px; color: #ece9ff; }

/* the dig: three moments */
.three { display: grid; grid-template-columns: 1fr; gap: 18px; margin: 0; padding: 0; list-style: none; }
.three figure { margin: 0; }
.three img { border: var(--line); border-radius: 28px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; }
.three figcaption { margin: 12px 4px 0; color: var(--words); font-size: 17px; }
.three figcaption b { display: block; font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-weight: 600; color: var(--ink); font-size: 21px; margin-bottom: 2px; }

/* cards in a row that wraps, the last row centred */
.cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; list-style: none; margin: 0; padding: 0; }
.cards > li { flex: 0 1 calc(50% - 8px); min-width: 0; }

.world { background: var(--cream); color: var(--ink); border: var(--line); border-radius: 28px; overflow: hidden; height: 100%; }
.world img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-bottom: var(--line); }
.world div { padding: 12px 14px 14px; }
.world .host { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-size: 16px; color: var(--indigo); margin: 2px 0 6px; }
.world p { font-size: 15px; line-height: 1.38; color: var(--words); margin: 0; }

.pal { text-align: center; }
.pal img { border: var(--line); border-radius: 50%; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--cream); }
.pal h3 { margin-top: 10px; }
.pal .role { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-size: 16px; color: var(--indigo); margin: 0 0 4px; }
.pal p { font-size: 15px; line-height: 1.38; color: var(--words); margin: 0; }

.rare { text-align: center; }
.rare img { border: var(--line); border-radius: 26px; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.rare h3 { font-size: 19px; margin-top: 10px; color: #fff; }

/* the promises to grown-ups */
.promises { display: grid; grid-template-columns: 1fr; gap: 10px; list-style: none; padding: 0; margin: 0 auto 22px; max-width: 760px; }
.promises li { background: #fff; border: 3px solid var(--ink); border-radius: 20px; padding: 12px 16px; font-size: 17px; }
.promises b { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-weight: 600; }
.centre { text-align: center; }

.again { text-align: center; color: #fff; padding: 10px 0 40px; }
.again h2 { margin-bottom: 18px; }

/* the foot */
footer { color: #ece9ff; padding: 26px 0 44px; text-align: center; font-size: 15px; }
footer .mark { width: 150px; margin: 0 auto 12px; opacity: 0.95; }
footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 0 0 10px; font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-size: 17px; }
footer nav a { color: #fff; }

/* ---------- a page of words: grown-ups, privacy, thanks ---------- */
.words-top { padding: 22px 0 18px; }
.words-top .wrap { display: flex; align-items: center; justify-content: space-between; }
.words-top img { width: 150px; }
.words-top a.back { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; color: #fff; font-size: 17px; }
.words .sheet { max-width: 800px; padding: 36px 26px 30px; }
.words h1 { font-size: clamp(34px, 7vw, 50px); line-height: 1.05; margin: 0 0 14px; color: var(--grape); }
.words h2 { font-size: 26px; color: var(--indigo); margin: 28px 0 8px; }
.words p, .words li { font-size: 18px; line-height: 1.55; }
.words ul { margin: 0 0 14px; padding-left: 1.15em; }
.words li + li { margin-top: 5px; }
.words .lede { font-family: "Fredoka", ui-rounded, system-ui, sans-serif; font-size: 22px; line-height: 1.35; }
.words .launch { margin: 18px 0 8px; max-width: none; }

/* ---------- wider screens ---------- */
@media (min-width: 620px) {
	:root { --gutter: 24px; }
	.three { grid-template-columns: repeat(3, 1fr); }
	.cards > li { flex-basis: calc(33.333% - 11px); }
	.cards.pals > li, .cards.rares > li { flex-basis: calc(25% - 12px); }
	.promises { grid-template-columns: 1fr 1fr; }
	.sheet { padding: 48px 34px 40px; }
}
@media (min-width: 940px) {
	.hero { padding: 40px 0 56px; }
	.hero .wrap { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); grid-template-areas: "mark stage" "lede stage" "form stage" "chips stage"; align-items: center; justify-items: start; text-align: left; column-gap: 40px; }
	.hero h1 { grid-area: mark; width: 420px; align-self: end; }
	.hero .stage { grid-area: stage; width: 100%; max-width: 660px; justify-self: center; }
	.hero .lede { grid-area: lede; }
	.hero .launch { grid-area: form; }
	.hero .chips { grid-area: chips; justify-content: flex-start; align-self: start; width: 100%; }
	.cards.worlds > li { flex-basis: calc(25% - 12px); }
	.cards.rares > li { flex-basis: calc(16.666% - 14px); }
	.sheet { padding: 56px 48px 46px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
