/* Buggy Games: the site's look. Ladybug red and ink on warm paper; JetBrains Mono for headings. */
@font-face { font-family: "JetBrains Mono"; src: url(./fonts/JetBrainsMono-Regular.ttf); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(./fonts/JetBrainsMono-ExtraBold.ttf); font-weight: 800; font-display: swap; }

:root {
	--red: #e10a0a;
	--red-deep: #b30000;
	--ink: #141414;
	--text: #2a2a2a;
	--muted: #6b6b6b;
	--paper: #faf7f2;
	--card: #ffffff;
	--line: #e7e1d8;
	--shadow: 0 1px 2px rgba(0,0,0,.05), 0 8px 24px rgba(0,0,0,.06);
	--radius: 18px;
	--mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
	--sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		--red: #ff3b30;
		--red-deep: #ff5a50;
		--ink: #f4f1ec;
		--text: #d9d5cf;
		--muted: #9a958e;
		--paper: #121110;
		--card: #1c1b19;
		--line: #2e2c29;
		--shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
	}
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
	margin: 0;
	background: var(--paper);
	color: var(--text);
	font: 17px/1.6 var(--sans);
	-webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--red-deep); }
h1, h2, h3 { font-family: var(--mono); font-weight: 800; color: var(--ink); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 6vw, 64px); }
h2 { font-size: clamp(26px, 3.6vw, 38px); }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* header */
.site-header {
	position: sticky; top: 0; z-index: 10;
	background: color-mix(in srgb, var(--paper) 82%, transparent);
	backdrop-filter: saturate(1.4) blur(14px);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 18px var(--mono); letter-spacing: .04em; }
.brand:hover { color: var(--ink); }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--red); }
.btn {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 18px; border-radius: 999px;
	background: var(--red); color: #fff; text-decoration: none; font-weight: 600; font-size: 15px;
	border: 0; cursor: pointer; transition: transform .15s ease, background .15s ease;
}
.btn:hover { background: var(--red-deep); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--red); color: var(--red); }
.btn svg { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 640px) { .nav a:not(.btn) { display: none; } }

/* hero */
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 7vw, 80px); position: relative; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.hero h1 .accent { color: var(--red); }
.hero .lede { font-size: clamp(18px, 2vw, 21px); color: var(--muted); max-width: 34em; }
.hero-logo { justify-self: center; width: min(340px, 80%); filter: drop-shadow(0 24px 40px rgba(225,10,10,.25)); animation: bob 6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-10px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .hero-logo { animation: none; } html { scroll-behavior: auto; } }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
/* ladybug spots in the background */
.spots::before, .spots::after {
	content: ""; position: absolute; border-radius: 50%; background: var(--red); opacity: .07; z-index: -1;
}
.spots::before { width: 420px; height: 420px; right: -120px; top: -140px; }
.spots::after { width: 180px; height: 180px; left: -60px; bottom: -40px; }
@media (max-width: 820px) {
	.hero .wrap { grid-template-columns: 1fr; }
	.hero-logo { grid-row: 1; width: 180px; }
}

/* sections */
section { padding: clamp(40px, 7vw, 80px) 0; }
.eyebrow { font: 800 13px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 10px; }
.section-head { margin-bottom: 32px; }
.section-head p { color: var(--muted); max-width: 40em; }

/* game cards */
.games { display: grid; gap: 28px; }
.game {
	display: grid; grid-template-columns: 1fr 1fr; gap: 0;
	background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
	overflow: hidden; border: 1px solid var(--line);
}
.game:nth-child(even) .game-media { order: 2; }
.game-body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; }
.game-body h2 { margin-bottom: .25em; }
.game-body h2 a { color: inherit; text-decoration: none; }
.game-body h2 a:hover { color: var(--red); }
.tagline { font-weight: 600; color: var(--ink); font-size: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; padding: 0; list-style: none; }
.tags li { margin: 0; font: 600 12px var(--mono); padding: 5px 10px; border-radius: 999px; background: color-mix(in srgb, var(--red) 10%, transparent); color: var(--red-deep); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 18px; }
.badges img { height: 44px; width: auto; }
.badges .soon { opacity: .4; }
.small-links { margin-top: auto; padding-top: 12px; font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 18px; }
.small-links a { color: var(--muted); }
.small-links a:hover { color: var(--red); }
.credit { font-size: 14px; color: var(--muted); margin: 10px 0 0; }

.game-media { background: #0d0d0d; position: relative; min-height: 320px; }
.game-media > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.strip { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 24px; height: 100%; align-items: center; scrollbar-width: thin; }
.strip img { scroll-snap-align: center; border-radius: 12px; flex: none; height: 360px; width: auto; }
.strip.landscape img { height: 220px; }

.awards { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.awards li { position: relative; padding-left: 24px; font-size: 15px; margin: 0; }
.awards li::before { content: "★"; color: var(--red); position: absolute; left: 0; }

@media (max-width: 860px) {
	.game { grid-template-columns: 1fr; }
	.game:nth-child(even) .game-media { order: 0; }
	.game-media { min-height: 0; aspect-ratio: 16 / 9; }
	.game-media:has(.strip) { aspect-ratio: auto; }
	.strip img { height: 300px; }
	.strip.landscape img { height: 180px; }
}

/* team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.member { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; text-align: center; box-shadow: var(--shadow); }
.member img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; box-shadow: 0 0 0 4px var(--paper), 0 0 0 6px var(--red); }
.member h3 { margin-bottom: 4px; }
.member p { color: var(--muted); margin: 0; font-size: 15px; }

/* contact */
.panel { background: var(--ink); color: var(--paper); border-radius: var(--radius); padding: clamp(28px, 5vw, 56px); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.panel h2, .panel h3 { color: var(--paper); }
.panel p { color: color-mix(in srgb, var(--paper) 75%, transparent); }
.panel a:not(.btn) { color: #ff6a60; }
.subscribe { display: flex; gap: 10px; flex-wrap: wrap; }
.subscribe input[type=email] {
	flex: 1 1 220px; padding: 12px 16px; border-radius: 999px; border: 1.5px solid color-mix(in srgb, var(--paper) 25%, transparent);
	background: transparent; color: var(--paper); font: inherit;
}
.subscribe input[type=email]::placeholder { color: color-mix(in srgb, var(--paper) 50%, transparent); }
.subscribe input[type=email]:focus { outline: none; border-color: var(--red); }
#subscriptionAnswer { margin-top: 10px; min-height: 1.6em; }
@media (max-width: 760px) { .panel { grid-template-columns: 1fr; } }

/* game page */
.page-hero { padding: clamp(40px, 7vw, 80px) 0 20px; }
.page-hero .tagline { font-size: clamp(19px, 2.2vw, 24px); max-width: 30em; }
.page-hero .shot { border-radius: var(--radius); box-shadow: var(--shadow); margin-top: 28px; width: 100%; }
.facts { color: var(--muted); font-size: 15px; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; padding: 0; list-style: none; }
.features li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin: 0; }
.features li b { display: block; color: var(--ink); font-family: var(--mono); font-size: 15px; margin-bottom: 4px; }
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; display: flex; gap: 14px; align-items: baseline; margin: 0; }
.steps li::before { content: counter(step); font: 800 14px var(--mono); color: #fff; background: var(--red); width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin-bottom: 10px; }
details summary { cursor: pointer; font-weight: 600; color: var(--ink); }
details[open] summary { margin-bottom: 8px; }
details p { margin: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 13px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; align-items: center; }
.site-footer .brand { font-size: 14px; }
.site-footer .brand img { width: 24px; height: 24px; }
.nav a.btn, .nav a.btn:hover { color: #fff; }
/* grid children may shrink below their content (the screenshot strips scroll instead) */
.game > *, .hero .wrap > *, .panel > *, .split > * { min-width: 0; }
@media (max-width: 860px) { .game, .hero .wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 400px) { .brand { font-size: 15px; } .site-header .btn { padding: 8px 14px; font-size: 14px; } }
/* the Discord mark, white on the red button */
.icon-discord { width: 20px; height: 20px; flex: none; filter: brightness(0) invert(1); }
/* the hero, centred: the big logo over the name */
.hero .hero-center { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; }
.hero-center .hero-logo { width: min(260px, 60%); }
.hero-center h1 { margin: 0; letter-spacing: .04em; }
.btn.icon-only { padding: 10px 14px; }
.btn.icon-only .icon-discord { width: 22px; height: 22px; }
.about { margin-top: 32px; text-align: center; }
.about p { margin: 0 0 .4em; }
.help-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.help-list li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin: 0; }
.help-list li b { color: var(--ink); }
/* the hero on one line: the logo beside the name */
.hero .hero-center { flex-direction: row; justify-content: center; gap: 20px; }
.hero-center .hero-logo { width: clamp(72px, 12vw, 120px); filter: drop-shadow(0 10px 24px rgba(225,10,10,.25)); }
.hero-center h1 { font-size: clamp(30px, 6vw, 56px); }
.hero:has(.hero-center) { padding: clamp(28px, 5vw, 56px) 0 clamp(8px, 2vw, 16px); }
.section-head h2 { color: var(--red); }
/* phones: no background spots and no glow behind the one-line logo (they clip into a band there) */
@media (max-width: 820px) {
	.hero:has(.hero-center)::before, .hero:has(.hero-center)::after { display: none; }
	.hero-center .hero-logo { filter: none; animation: none; }
}
/* a game card: its title and store links across the top, then the screenshots and the text */
.game-head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding: clamp(20px, 3vw, 32px) clamp(24px, 4vw, 44px); border-bottom: 1px solid var(--line); }
.game-head h2 { margin: 0; }
.game-head h2 a { color: inherit; text-decoration: none; }
.game-head h2 a:hover { color: var(--red); }
.game-head .badges { margin: 0; }
/* the one-line logo: no background spots and no glow on any screen (they were cut off at the hero's bottom) */
.hero:has(.hero-center)::before, .hero:has(.hero-center)::after { display: none; }
.hero-center .hero-logo { filter: none; }
/* screenshots as before the redesign: their old sizes, wrapping onto new rows, no sideways scrolling;
   a card is one column: title and store links, screenshots, text */
.game { grid-template-columns: minmax(0, 1fr); }
.game:nth-child(even) .game-media { order: 0; }
.game-media { background: none; min-height: 0; padding: clamp(20px, 3vw, 32px) clamp(24px, 4vw, 44px) 0; }
.game-media:has(.strip) { aspect-ratio: auto; }
.game-media > img { position: static; width: auto; height: auto; max-width: 100%; max-height: 360px; border-radius: 12px; }
.strip { flex-wrap: wrap; overflow: visible; padding: 0; height: auto; gap: 12px; align-items: flex-start; }
.strip img { height: 600px; width: auto; max-width: 100%; border-radius: 0; }
.strip.landscape img { height: 300px; }
@media (max-width: 860px) {
	.game-media { aspect-ratio: auto; }
	.strip img, .strip.landscape img { height: auto; width: 100%; }
}
/* screenshots share the card's width: one row on desktop, two per row on phones; centred */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; width: 100%; margin: 0 auto; }
.strip img, .strip.landscape img { width: 100%; height: auto; max-width: none; }
.game-media > img { margin: 0 auto; }
@media (max-width: 860px) {
	.strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
