/*
Theme Name: Angry Pixel
Author: Angry Pixel, Lda.
Description: The Angry Pixel studio site.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: angrypixel
*/

/* Studio = square and pixel-stepped, like the mascot's head. Game = round, on the game's own board. */
@font-face { font-family: Fredoka; font-weight: 600; font-display: swap; src: url(assets/fonts/Fredoka-SemiBold.ttf) format("truetype"); }
@font-face { font-family: Fredoka; font-weight: 700; font-display: swap; src: url(assets/fonts/Fredoka-Bold.ttf) format("truetype"); }

:root {
	--ink: #070a12;
	--panel: #111a2e;
	--blue: #2c82f2;
	--sky: #6fd0fb;
	--paper: #eef4ff;
	--soft: #a4b5d2;
	--board: #453727;
	--cream: #ffdfa8;
	--ember: #c4530f;
	--display: Fredoka, "Arial Rounded MT Bold", system-ui, sans-serif;
	--body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--gutter: max(20px, calc((100vw - 1120px) / 2));
	--px: 8px;
	--stepped: polygon(0 var(--px), var(--px) var(--px), var(--px) 0, calc(100% - var(--px)) 0, calc(100% - var(--px)) var(--px), 100% var(--px), 100% calc(100% - var(--px)), calc(100% - var(--px)) calc(100% - var(--px)), calc(100% - var(--px)) 100%, var(--px) 100%, var(--px) calc(100% - var(--px)), 0 calc(100% - var(--px)));
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 17px/1.6 var(--body); overflow-x: hidden; }
img, video, canvas { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.08; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--sky); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 9; background: var(--paper); color: var(--ink); padding: 8px 14px; }

.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: 18px var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; }
.brand-word { width: 150px; }
.menu { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; padding: 0; }
.menu a { display: inline-block; padding: 8px 0; color: var(--paper); font-weight: 600; text-decoration: none; }
.menu a:hover { color: var(--sky); text-decoration: underline; }

.btn { display: inline-block; padding: 13px 28px; color: #fff; font: 600 19px/1.2 var(--display); text-decoration: none; clip-path: var(--stepped); background: #1f6fe0; transition: background .15s, transform .15s; }
.btn:hover { background: #185bbb; transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: -7px; }

.hero { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 32px; padding: 40px var(--gutter) 104px; }
.hero-text { display: grid; gap: 22px; justify-items: start; min-width: 0; }
.hero h1 { font-size: clamp(42px, 6vw, 72px); letter-spacing: -.01em; }
.hero p { font-size: 20px; color: var(--soft); max-width: 30em; }
.mascot { all: unset; cursor: pointer; justify-self: center; }
.mascot img { width: min(500px, 100%); }
.mascot:focus-visible { outline: 3px solid var(--sky); outline-offset: 8px; }
.mascot.angry img { animation: growl .45s linear; }
@keyframes growl {
	0%, 100% { transform: none; }
	15% { transform: scale(1.07) translate(-8px, 2px) rotate(-2deg); }
	35% { transform: scale(1.09) translate(8px, -2px) rotate(2deg); }
	55% { transform: scale(1.07) translate(-6px, 1px) rotate(-1deg); }
	78% { transform: scale(1.03) translate(5px, 0) rotate(1deg); }
}

/* The board's top edge is notched like the mascot's head. */
.orbs { --n: 28px; background-color: var(--board); background-image: repeating-linear-gradient(45deg, rgba(0,0,0,.08) 0 110px, transparent 110px 220px), repeating-linear-gradient(-45deg, rgba(0,0,0,.08) 0 110px, transparent 110px 220px); color: #fff6e6; clip-path: polygon(0 var(--n), 12% var(--n), 12% 0, 30% 0, 30% var(--n), 64% var(--n), 64% 0, 88% 0, 88% var(--n), 100% var(--n), 100% 100%, 0 100%); padding: 96px 0 88px; }
.orbs-in { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 48px; padding: 0 var(--gutter); }
.orbs-text { display: grid; gap: 18px; justify-items: start; max-width: 32em; min-width: 0; }
.orbs .game-icon { width: 112px; border-radius: 25px; }
.orbs-title { font-size: clamp(72px, 12vw, 148px); color: var(--cream); line-height: .95; }
.lead { font: 600 24px/1.3 var(--display); }
.status { display: inline-block; font-weight: 600; color: var(--cream); border: 2px solid currentColor; border-radius: 99px; padding: 7px 18px; }
.stores { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.stores img { height: 52px; width: auto; }
.stores .play img { height: 77px; margin: -12px; max-width: none; }

.clip { width: min(300px, 78vw); border-radius: 28px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }

.game-row { display: flex; flex-wrap: wrap; align-items: center; gap: 36px; padding: 80px var(--gutter); }
.game-row > div { display: grid; gap: 16px; justify-items: start; flex: 1 1 300px; min-width: 0; }
.game-row h1, .game-row h2 { font-size: clamp(44px, 7vw, 72px); }
.game-row .game-icon { width: 200px; clip-path: var(--stepped); --px: 14px; }

.text { max-width: 760px; margin: 0 auto; padding: 40px 20px 88px; }
.text h1 { font-size: clamp(36px, 6vw, 56px); margin-bottom: 24px; }
.prose { overflow-wrap: break-word; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-weight: 600; font-size: 26px; margin-top: 44px; }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose details { background: var(--panel); padding: 16px 22px; clip-path: var(--stepped); }
.prose summary { font: 600 19px/1.4 var(--display); cursor: pointer; }
.prose summary:focus-visible { outline-offset: -2px; }
.prose details[open] summary { margin-bottom: 8px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding: 36px var(--gutter) 44px; color: var(--soft); font-size: 15px; }
.foot .menu a { font-weight: 400; color: var(--soft); padding: 2px 0; }

@media (max-width: 820px) {
	.hero, .orbs-in { grid-template-columns: minmax(0, 1fr); }
	.hero { padding-top: 12px; padding-bottom: 72px; }
	.mascot { order: -1; }
	.mascot img { width: min(320px, 70vw); }
	.orbs { --n: 16px; padding-top: 64px; }
	.orbs-in { justify-items: start; }
	.clip { justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.mascot.angry img { animation: none; }
	.btn { transition: none; }
}
