/* A Watched Kettle Never Boils: the website, as the game's fridge door. */

@font-face { font-family: "Anton"; src: url("fonts/Anton-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/Caveat-Variable.ttf") format("truetype"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/CourierPrime-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Courier Prime"; src: url("fonts/CourierPrime-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Arvo"; src: url("fonts/Arvo-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
	color-scheme: light;
	--cream: #fbf3e2;
	--paper: #f4ecd8;
	--ink: #3a2a1c;
	--tea: #6b3f26;
	--fridge: #8f8e31;
	--fridge-light: #a3a23f;
	--fridge-dark: #6c6b20;
	--wall: #b38d5f;
	--wall-dark: #8a6a43;
	--sticky: #f7e27a;
	--red: #b5261e;
	--type: "Courier Prime", "Courier New", monospace;
	--hand: "Caveat", "Segoe Print", cursive;
	--poster: "Anton", Impact, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--wall); }

body {
	margin: 0;
	min-height: 100vh;
	background:
		repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.03) 0 2px, transparent 2px 46px),
		linear-gradient(var(--wall), var(--wall-dark));
	color: var(--ink);
	font-family: var(--type);
	font-size: 18px;
	line-height: 1.45;
	padding: 28px 16px 0;
}

a { color: var(--tea); }
a:hover { color: var(--red); }

/* --- The fridge door ---------------------------------------------------- */

.door {
	position: relative;
	max-width: 1120px;
	margin: 0 auto;
	padding: 48px 64px 64px;
	border-radius: 26px 26px 18px 18px;
	background:
		radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
		linear-gradient(160deg, var(--fridge-light), var(--fridge) 40%, var(--fridge-dark));
	box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25), inset 0 -6px 12px rgba(0, 0, 0, 0.15), 0 18px 40px rgba(40, 25, 10, 0.35);
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 36px 40px;
	align-items: start;
}

/* (Everything on the door sits over the plastic letters.) */
.door > :not(.magnets):not(.handle) { position: relative; z-index: 1; }
.magnets { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

.handle {
	position: absolute;
	right: -14px;
	top: 18%;
	width: 18px;
	height: 220px;
	border-radius: 9px;
	background: linear-gradient(90deg, #d9d6c8, #9f9b88);
	box-shadow: 2px 4px 8px rgba(0, 0, 0, 0.3);
}

/* Plastic letters stuck about the door. */
.magnets span {
	position: absolute;
	left: var(--x);
	top: var(--y);
	transform: rotate(var(--r));
	font-family: "Arvo", Georgia, serif;
	font-weight: 700;
	font-size: 64px;
	line-height: 1;
	color: var(--c);
	text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25), 0 5px 7px rgba(0, 0, 0, 0.3);
	pointer-events: none;
	user-select: none;
}

/* The title in letter tiles, like the menu's. */
.title { grid-column: 1 / -1; }
.title h1 {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px 26px;
}
.title .word { display: inline-flex; gap: 6px; }
.title .tile {
	display: inline-grid;
	place-items: center;
	width: 1.25em;
	height: 1.35em;
	font-family: var(--type);
	font-weight: 700;
	font-size: clamp(30px, 4.6vw, 58px);
	line-height: 1;
	color: #2b2219;
	background: linear-gradient(#fffaf0, #f1e6cf);
	border-radius: 4px;
	box-shadow: 0 2px 0 rgba(0, 0, 0, 0.15), 0 6px 10px rgba(0, 0, 0, 0.25);
	transform: rotate(var(--r, 0deg)) translateY(var(--y, 0px));
}

/* Paper, pinned. */
.paper {
	position: relative;
	background: var(--paper);
	padding: 22px 26px;
	box-shadow: 0 6px 16px rgba(30, 20, 5, 0.3);
	transform: rotate(var(--tilt, -0.6deg));
}
.pinned::before {
	content: "";
	position: absolute;
	top: -10px;
	left: 50%;
	width: 22px;
	height: 22px;
	margin-left: -11px;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 35%, #9a9a9a, #4a4a4a);
	box-shadow: 0 3px 4px rgba(0, 0, 0, 0.35);
}
h2 { font-family: var(--type); font-weight: 700; font-size: 22px; letter-spacing: 0.04em; text-transform: uppercase; margin: 0 0 10px; }

.tagline {
	grid-column: 1 / -1;
	justify-self: center;
	max-width: 720px;
	font-size: 22px;
	text-align: center;
	--tilt: 0.5deg;
	margin: 6px 0 0;
}

/* The trailer, on an old telly. */
.telly {
	background: linear-gradient(#5a4632, #3d2e20);
	border-radius: 22px;
	padding: 18px 18px 46px;
	box-shadow: 0 12px 26px rgba(20, 12, 4, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.12);
	position: relative;
}
.telly .screen { border-radius: 14px; overflow: hidden; background: #111; aspect-ratio: 16 / 9; }
.telly video { display: block; width: 100%; height: 100%; object-fit: cover; }
.telly-knobs { position: absolute; right: 26px; bottom: 12px; display: flex; gap: 12px; }
.telly-knobs i { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #d8cdb5, #7b6c52); }

/* A sticky note. */
.sticky {
	background: var(--sticky);
	padding: 22px 24px 18px;
	transform: rotate(2deg);
	box-shadow: 0 10px 16px rgba(30, 20, 5, 0.28);
	font-family: var(--hand);
	font-size: 28px;
	line-height: 1.15;
	align-self: center;
}
.sticky p { margin: 0 0 6px; }
.sticky p:last-child { margin-bottom: 0; }
.sticky .big { font-family: var(--poster); font-size: 44px; letter-spacing: 0.02em; color: var(--red); text-transform: uppercase; line-height: 1; }

.rules { --tilt: -0.8deg; }
.rules ol { margin: 0; padding-left: 1.4em; }
.rules li { margin-bottom: 8px; }

/* Photos, pinned up. */
.photos { grid-column: 1 / -1; }
.photos .label { color: var(--cream); text-shadow: 0 2px 3px rgba(0, 0, 0, 0.35); margin-left: 6px; }
.photos ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px 26px;
}
.photos li {
	background: #fffdf8;
	padding: 10px 10px 4px;
	box-shadow: 0 8px 16px rgba(30, 20, 5, 0.3);
	transform: rotate(var(--r, 0deg));
	transition: transform 0.15s ease;
}
.photos li:hover { transform: rotate(0deg) scale(1.03); }
.photos button { all: unset; display: block; cursor: zoom-in; width: 100%; }
.photos button:focus-visible { outline: 3px solid var(--tea); outline-offset: 2px; }
.photos img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.photos span { display: block; font-family: var(--hand); font-size: 24px; padding: 4px 4px 2px; color: var(--ink); }

/* The kitchen diary notepad. */
.notepad {
	background: repeating-linear-gradient(transparent 0 30px, rgba(80, 110, 160, 0.25) 30px 31px), #fffdf6;
	padding: 34px 26px 22px;
	box-shadow: 0 8px 16px rgba(30, 20, 5, 0.3);
	position: relative;
	transform: rotate(1deg);
	font-family: var(--hand);
	font-size: 25px;
	line-height: 31px;
}
.notepad::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 16px;
	right: 16px;
	height: 10px;
	background: radial-gradient(circle, #555 3px, transparent 4px) 0 0 / 22px 10px repeat-x;
}
.notepad h2 { font-family: var(--hand); text-transform: none; font-size: 32px; color: var(--red); letter-spacing: 0; margin-bottom: 4px; }
.notepad ul { margin: 0; padding-left: 1.1em; }
.notepad .scrawl { list-style: none; margin-left: -1.1em; color: var(--red); transform: rotate(-2deg); }

.contact { --tilt: 0.9deg; grid-column: 1 / -1; justify-self: center; max-width: 640px; text-align: center; }
.contact a { font-weight: 700; font-size: clamp(14px, 3.8vw, 20px); overflow-wrap: anywhere; }
.contact .small { font-size: 16px; }

/* This page's own kettle: it only boils while you're not looking. */
.page-kettle {
	grid-column: 1 / -1;
	justify-self: center;
	display: flex;
	align-items: center;
	gap: 12px;
	background: rgba(30, 20, 5, 0.25);
	color: var(--cream);
	padding: 8px 16px;
	border-radius: 999px;
	font-size: 15px;
}
.therm { width: 10px; height: 38px; border-radius: 6px; background: #f2eadb; position: relative; overflow: hidden; box-shadow: inset 0 0 0 2px #6a5a44; }
.therm i { position: absolute; left: 0; right: 0; bottom: 0; height: 10%; background: #d02a1f; transition: height 0.6s ease; }

.floor { text-align: center; color: var(--cream); font-size: 15px; padding: 28px 16px 36px; }
.floor a { color: var(--cream); }

/* The big picture. */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(20, 12, 4, 0.85); }
.lightbox img { display: block; max-width: 96vw; max-height: 90vh; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.lightbox .close { position: absolute; top: 8px; right: 8px; font-size: 32px; line-height: 1; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--cream); color: var(--ink); cursor: pointer; }

/* --- Narrower ----------------------------------------------------------- */

@media (max-width: 900px) {
	.door { grid-template-columns: 1fr; padding: 36px 28px 44px; gap: 30px; }
	.photos ul { grid-template-columns: repeat(2, 1fr); }
	.magnets span { font-size: 46px; }
}

@media (max-width: 560px) {
	body { padding: 16px 10px 0; font-size: 17px; }
	.door { padding: 30px 16px 36px; border-radius: 18px; }
	.handle { display: none; }
	.magnets span:nth-child(n + 4) { display: none; }
	.magnets span { font-size: 38px; opacity: 0.85; }
	.title h1 { gap: 10px 14px; }
	.title .word { gap: 3px; }
	.tagline { font-size: 19px; }
	.photos ul { grid-template-columns: 1fr; }
	.sticky .big { font-size: 36px; }
}

@media (prefers-reduced-motion: reduce) {
	.photos li, .therm i { transition: none; }
}

/* --- The other pages: one column ---------------------------------------- */

.door.single { grid-template-columns: 1fr; max-width: 860px; }
.back { margin: 0; font-weight: 700; }
.back a { color: var(--cream); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4); }
.facts { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 6px 10px 6px 0; border-bottom: 1px dashed rgba(58, 42, 28, 0.25); }
.facts th { width: 42%; font-weight: 700; }
.downloads { columns: 2; padding-left: 1.2em; }
.small { font-size: 15px; }
@media (max-width: 560px) {
	.facts th, .facts td { display: block; width: auto; border: 0; padding: 0; }
	.facts td { padding-bottom: 10px; border-bottom: 1px dashed rgba(58, 42, 28, 0.25); margin-bottom: 8px; }
	.downloads { columns: 1; }
}
