/* Finnyclip: a mid-2000s games portal, rebuilt without the plug-ins. */

@font-face {
	font-family: 'Titan One';
	src: url('/fonts/titan-one-latin-400.woff2') format('woff2');
	font-weight: 400;
	font-display: swap;
}

:root {
	--navy: #06325e;
	--ocean-700: #0a5aa8;
	--ocean-500: #1b8be0;
	--ocean-300: #6cc4ff;
	--ocean-100: #e3f3ff;
	--foam: #bfe6ff;
	--sun-700: #b35400;
	--sun-500: #ff8a00;
	--sun-300: #ffc54a;
	--lemon: #ffd23a;
	--lime-700: #2f7d0a;
	--lime-500: #5cbf1a;
	--ink: #1d2a3a;
	--muted: #4a5b70;
	--line: #b9d8f0;
	--paper: #fff;

	--display: 'Titan One', 'Arial Rounded MT Bold', sans-serif;
	--body: Verdana, Tahoma, 'DejaVu Sans', sans-serif;

	/* Little rising bubbles, tiled like a 2007 page background. */
	--bubbles: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.22' stroke-width='2'%3E%3Ccircle cx='20' cy='24' r='9'/%3E%3Ccircle cx='84' cy='70' r='14'/%3E%3Ccircle cx='50' cy='104' r='5'/%3E%3Ccircle cx='104' cy='14' r='4'/%3E%3C/g%3E%3Cg fill='%23fff' fill-opacity='.35'%3E%3Ccircle cx='17' cy='20' r='2'/%3E%3Ccircle cx='79' cy='63' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html {
	scrollbar-color: var(--ocean-500) var(--ocean-100);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font: 14px/1.55 var(--body);
	color: var(--ink);
	background: var(--bubbles), linear-gradient(var(--ocean-300), var(--foam) 520px, #eaf7ff);
	background-color: #eaf7ff;
}

::selection { background: var(--lemon); color: var(--navy); }

a { color: var(--ocean-700); text-underline-offset: 2px; }
a:hover { color: var(--sun-700); }

:focus-visible {
	outline: 3px solid var(--sun-500);
	outline-offset: 2px;
	border-radius: 4px;
}

img { display: block; max-width: 100%; height: auto; }

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

.skip {
	position: absolute;
	left: 16px;
	top: -60px;
	z-index: 10;
	padding: 8px 14px;
	background: var(--lemon);
	color: var(--navy);
	font-weight: bold;
	border-radius: 0 0 8px 8px;
}
.skip:focus { top: 0; }

/* Utility strip */

.topbar {
	background: var(--navy);
	color: var(--foam);
	font-size: 12px;
}
.topbar-in {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
}
.topbar p { margin: 0; }
.topbar strong { color: var(--lemon); }

/* Masthead */

.masthead {
	background:
		var(--bubbles),
		radial-gradient(ellipse 60% 120% at 20% 0%, rgba(255, 255, 255, 0.35), transparent 60%),
		linear-gradient(#35a6ff, var(--ocean-500) 45%, var(--ocean-700));
	border-top: 1px solid #7cc8ff;
	overflow: hidden;
}
.masthead-in {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 150px;
	padding: 18px 0 12px;
}

.logo {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	text-decoration: none;
	color: var(--paper);
}
.logo-word, .logo-tld {
	font-family: var(--display);
	-webkit-text-stroke: 9px var(--navy);
	paint-order: stroke fill;
	text-shadow: 0 5px 8px rgba(3, 30, 60, 0.45);
}
.logo-word {
	font-size: 68px;
	line-height: 1;
	letter-spacing: 0.01em;
}
.logo-clip { color: var(--lemon); }
.logo-tld {
	font-size: 26px;
	-webkit-text-stroke-width: 6px;
	margin-left: 2px;
}
.logo-tag {
	flex-basis: 100%;
	margin: 8px 0 0 6px;
	font-size: 13px;
	font-style: italic;
	font-weight: bold;
	color: var(--paper);
	text-shadow: 0 1px 2px var(--navy);
}
.logo:hover { color: var(--paper); }

.finny {
	position: relative;
	display: flex;
	align-items: center;
	gap: 10px;
}
.finny-fish {
	width: 132px;
	flex: none;
	filter: drop-shadow(0 6px 6px rgba(3, 30, 60, 0.35));
	animation: bob 3.2s ease-in-out infinite;
}
.finny-eye {
	transform-origin: 83px 46px;
	animation: blink 5s infinite;
}
.finny-tail {
	transform-origin: 30px 52px;
	animation: wag 1.6s ease-in-out infinite;
}

.bubble {
	position: relative;
	width: 290px;
	padding: 10px 14px 10px;
	background: var(--paper);
	border: 2px solid var(--navy);
	border-radius: 16px;
	box-shadow: 0 4px 10px rgba(3, 30, 60, 0.3);
}
.bubble::after {
	/* The speech tail, pointing at Finny. */
	content: '';
	position: absolute;
	right: -13px;
	top: 42%;
	width: 20px;
	height: 20px;
	background: var(--paper);
	border: 2px solid var(--navy);
	border-left: 0;
	border-bottom: 0;
	transform: rotate(45deg) skew(12deg, 12deg);
}
.bubble p { margin: 0; }
.bubble-name {
	font-family: var(--display);
	color: var(--sun-700);
	font-size: 15px;
}
.bubble-tip {
	min-height: 3.1em;
	font-size: 13px;
	color: var(--ink);
}
.bubble-more {
	margin-top: 6px;
	padding: 0;
	border: 0;
	background: none;
	font: bold 12px var(--body);
	color: var(--ocean-700);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
}
.bubble-more:hover { color: var(--sun-700); }

.bubbles i {
	position: absolute;
	right: 4px;
	top: 38%;
	width: 10px;
	height: 10px;
	border: 2px solid rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	opacity: 0;
	animation: rise 4.5s ease-out infinite;
}
.bubbles i:nth-child(2) { width: 7px; height: 7px; animation-delay: 1.4s; right: 14px; }
.bubbles i:nth-child(3) { width: 13px; height: 13px; animation-delay: 2.9s; right: -2px; }

/* Tabs */

.tabs {
	background: var(--ocean-700);
	border-bottom: 1px solid var(--navy);
}
.tabs ul {
	display: flex;
	gap: 4px;
	margin-block: 0;
	padding: 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}
.tabs li { flex: none; }
.tabs a {
	display: block;
	margin-top: 6px;
	padding: 9px 22px 8px;
	font: 17px var(--display);
	color: var(--paper);
	text-decoration: none;
	text-shadow: 0 1px 1px var(--navy);
	background: linear-gradient(#4db2ff, #2994ea 50%, #1479cf 51%, #0f63b0);
	border: 1px solid var(--navy);
	border-bottom: 0;
	border-radius: 10px 10px 0 0;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.tabs a:hover {
	color: var(--paper);
	background: linear-gradient(#7fcaff, #45a8f5 50%, #2590e6 51%, #1a7ad0);
}
.tabs a[aria-current='page'] {
	color: var(--ocean-700);
	text-shadow: none;
	background: var(--paper);
	margin-bottom: -1px;
	padding-bottom: 9px;
}

/* The white site box */

.site {
	padding: 20px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0 0 14px 14px;
	box-shadow: 0 12px 28px rgba(6, 50, 94, 0.22);
}

.cols {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 300px;
	gap: 20px;
	align-items: start;
}

.panel {
	border: 1px solid var(--line);
	border-radius: 10px;
	background: linear-gradient(var(--paper), var(--ocean-100));
	overflow: hidden;
}
.panel + .panel { margin-top: 20px; }
.panel-bar {
	margin: 0;
	padding: 7px 14px 6px;
	font: 19px/1.3 var(--display);
	color: var(--paper);
	text-shadow: 0 1px 2px var(--navy);
	background: linear-gradient(#4db2ff, #2994ea 50%, #1479cf 51%, #0f63b0);
	border-bottom: 1px solid var(--navy);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.panel-bar--sun {
	color: #4a2200;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
	background: linear-gradient(#ffe487, var(--sun-300) 50%, #ffae1f 51%, #ff9a0a);
	border-bottom-color: var(--sun-700);
}
.panel-bar--lime {
	text-shadow: 0 1px 2px #174400;
	background: linear-gradient(#92e04f, #62bf22 50%, #469e12 51%, var(--lime-700));
	border-bottom-color: #1d5300;
}
.panel-bar .count { font-size: 15px; opacity: 0.85; }
.panel-note {
	margin: 0;
	padding: 0 14px 12px;
	font-size: 12px;
	color: var(--muted);
}

/* Game of the Week */

.gotw-body {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 22px;
	padding: 18px;
}
.gotw-thumb {
	position: relative;
	align-self: start;
	padding: 5px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: 0 4px 10px rgba(6, 50, 94, 0.2);
}
.gotw-thumb img { border-radius: 8px; }
.gotw-thumb:hover .play-overlay { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.game-title {
	margin: 0;
	font: 38px/1.1 var(--display);
	color: var(--ocean-700);
}
.gotw-genre {
	display: inline-block;
	margin: 8px 0 0;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: bold;
	color: var(--paper);
	background: var(--sun-700);
	border-radius: 999px;
}
.gotw-desc {
	margin: 12px 0 14px;
	max-width: 46ch;
	font-size: 15px;
}

.facts {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 18px;
}
.facts div {
	padding: 6px 12px;
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 8px;
}
.facts dt { font-size: 11px; color: var(--muted); }
.facts dd { margin: 0; font-weight: bold; color: var(--navy); }

/* Gel buttons */

.gel-btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 22px 12px 30px;
	font: 24px var(--display);
	color: var(--paper);
	text-decoration: none;
	text-shadow: 0 1px 2px #7a3500;
	background: linear-gradient(#ffd36b, #ffa11a 50%, #ff8a00 51%, #e86400);
	border: 1px solid var(--sun-700);
	border-radius: 14px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 4px 8px rgba(122, 53, 0, 0.35);
	cursor: pointer;
	transition: transform 120ms ease-out, box-shadow 120ms ease-out, filter 120ms ease-out;
}
.gel-btn svg { width: 22px; height: 22px; fill: currentColor; filter: drop-shadow(0 1px 1px #7a3500); }
.gel-btn:hover { color: var(--paper); filter: brightness(1.08) saturate(1.1); transform: translateY(-1px); }
.gel-btn:active { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 1px 2px rgba(122, 53, 0, 0.35); }

.gel-btn--lime {
	text-shadow: 0 1px 2px #174400;
	background: linear-gradient(#a6ea6b, #6cc72c 50%, #52ad17 51%, #37870b);
	border-color: #1d5300;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 3px 6px rgba(29, 83, 0, 0.3);
}
.gel-btn--small { padding: 8px 18px; font-size: 17px; border-radius: 10px; }

/* Sidebar */

.score-list {
	margin: 0;
	padding: 12px 14px 10px;
	list-style: none;
}
.score-list li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
}
.score-list li + li { border-top: 1px dashed var(--line); }
.score-list img {
	width: 48px;
	height: 48px;
	border-radius: 8px;
	border: 1px solid var(--line);
}
.score-list a { font: 16px var(--display); text-decoration: none; }
.score-list a:hover { text-decoration: underline; }
.score {
	margin: 1px 0 0;
	font-size: 12px;
	color: var(--muted);
}
.score b {
	font: 18px var(--display);
	color: var(--sun-700);
	font-variant-numeric: tabular-nums;
}

.friend p { margin: 12px 14px; }
.friend .gel-btn { margin: 0 14px; }
.friend .share-status { min-height: 1.5em; margin-top: 8px; font-size: 12px; color: var(--lime-700); font-weight: bold; }

/* All games */

.games { margin-top: 20px; }
.grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px 16px;
	margin: 0;
	padding: 18px;
	list-style: none;
}
.tile { font-size: 12px; }
.tile-link { display: block; text-decoration: none; }
.tile-thumb {
	position: relative;
	display: block;
	aspect-ratio: 1;
	padding: 3px;
	background: var(--paper);
	border: 2px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 3px 6px rgba(6, 50, 94, 0.15);
	transition: border-color 150ms ease-out, box-shadow 150ms ease-out;
}
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.tile-title {
	display: block;
	margin-top: 8px;
	font: 16px/1.2 var(--display);
	color: var(--ocean-700);
}
.tile-desc { margin: 4px 0 0; color: var(--ink); }
.tile-cat {
	display: inline-block;
	margin: 6px 0 0;
	padding: 1px 8px;
	font-size: 11px;
	font-weight: bold;
	color: var(--ocean-700);
	background: var(--ocean-100);
	border: 1px solid var(--line);
	border-radius: 999px;
}

.tile-link:hover .tile-thumb,
.tile-link:focus-visible .tile-thumb {
	border-color: var(--sun-500);
	box-shadow: 0 6px 14px rgba(179, 84, 0, 0.3);
	animation: wiggle 420ms ease-out;
}
.tile-link:hover .tile-title { color: var(--sun-700); }
.tile-link:hover .play-overlay,
.tile-link:focus-visible .play-overlay { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.play-overlay {
	position: absolute;
	left: 50%;
	top: 50%;
	display: grid;
	place-items: center;
	width: 38%;
	aspect-ratio: 1;
	max-width: 72px;
	background: linear-gradient(#ffd36b, #ffa11a 50%, #ff8a00 51%, #e86400);
	border: 3px solid var(--paper);
	border-radius: 50%;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
	opacity: 0;
	transform: translate(-50%, -50%) scale(0.6);
	transition: opacity 160ms ease-out, transform 220ms cubic-bezier(0.2, 1.6, 0.4, 1);
}
.play-overlay svg { width: 55%; fill: var(--paper); margin-left: 8%; }
.gotw-thumb .play-overlay { max-width: 96px; }

.burst {
	position: absolute;
	top: -12px;
	left: -12px;
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	font: 13px var(--display);
	color: #c40000;
	background: var(--lemon);
	clip-path: polygon(50% 0, 61% 17%, 80% 8%, 79% 29%, 99% 32%, 86% 49%, 100% 66%, 79% 70%, 80% 92%, 61% 83%, 50% 100%, 39% 83%, 20% 92%, 21% 70%, 0 66%, 14% 49%, 1% 32%, 21% 29%, 20% 8%, 39% 17%);
	transform: rotate(-14deg);
	animation: pulse 1.8s ease-in-out infinite;
}

.tile--soon .tile-thumb {
	display: grid;
	place-items: center;
	background: repeating-linear-gradient(-45deg, var(--ocean-100) 0 10px, #d3ebfd 10px 20px);
	border-style: dashed;
	box-shadow: none;
}
.tile--soon .tile-title { color: var(--muted); }
.tile--soon .tile-desc { color: var(--muted); }
.soon-mark {
	font: 58px/1 var(--display);
	color: var(--paper);
	-webkit-text-stroke: 7px var(--ocean-300);
	paint-order: stroke fill;
}

/* Footer */

.footer {
	margin-top: 36px;
	padding: 24px 0 30px;
	color: var(--foam);
	background: var(--bubbles), linear-gradient(var(--ocean-700), var(--navy) 60%);
	border-top: 3px solid var(--ocean-300);
	text-align: center;
	font-size: 12px;
}
.footer ul { margin: 0; padding: 0; list-style: none; }
.footer-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 0;
}
.footer-links li + li::before { content: '|'; margin: 0 10px; color: var(--ocean-300); }
.footer a { color: var(--paper); font-weight: bold; }
.footer a:hover { color: var(--lemon); }

.badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 18px 0 !important;
}
/* 88x31 buttons, the web's old trading cards. */
.badge {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	width: 88px;
	height: 31px;
	font: bold 10px/1 Verdana, Tahoma, sans-serif;
	text-transform: uppercase;
	color: var(--paper);
	border: 1px solid var(--paper);
	outline: 1px solid var(--navy);
	image-rendering: pixelated;
}
.badge b { padding: 3px 4px; background: var(--paper); }
.badge--a { background: linear-gradient(#e14b2b, #9b1d0b); }
.badge--a b { color: #9b1d0b; }
.badge--b { background: linear-gradient(#6cc72c, #2f7d0a); }
.badge--b b { color: var(--lime-700); }
.badge--c { background: linear-gradient(#5a5a5a, #1d1d1d); }
.badge--c b { color: #1d1d1d; }
.badge--d { background: linear-gradient(#ff9a1f, #c75a00); }
.badge--d b { color: #a44a00; }

.copyright { margin: 0; font-size: 13px; }

/* Motion */

@keyframes bob {
	0%, 100% { transform: translateY(0) rotate(-2deg); }
	50% { transform: translateY(-8px) rotate(2deg); }
}
@keyframes blink {
	0%, 93%, 100% { transform: scaleY(1); }
	95% { transform: scaleY(0.1); }
}
@keyframes wag {
	0%, 100% { transform: rotate(-6deg); }
	50% { transform: rotate(8deg); }
}
@keyframes rise {
	0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
	15% { opacity: 1; }
	100% { opacity: 0; transform: translate(-10px, -90px) scale(1.2); }
}
@keyframes wiggle {
	0%, 100% { transform: rotate(0); }
	25% { transform: rotate(-3deg) scale(1.03); }
	60% { transform: rotate(2deg) scale(1.03); }
}
@keyframes pulse {
	0%, 100% { transform: rotate(-14deg) scale(1); }
	50% { transform: rotate(-8deg) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation: none !important;
		transition: none !important;
	}
}

/* Small screens */

@media (max-width: 860px) {
	.cols { grid-template-columns: minmax(0, 1fr); }
	.masthead-in { flex-direction: column; align-items: flex-start; }
	.finny { align-self: flex-end; }
}

@media (max-width: 600px) {
	body { font-size: 14px; }
	.topbar-in { flex-direction: column; gap: 0; text-align: center; }
	.masthead-in { gap: 10px; min-height: 0; padding-top: 14px; }
	.logo-word { font-size: 48px; -webkit-text-stroke-width: 7px; }
	.logo-tld { font-size: 20px; -webkit-text-stroke-width: 5px; }
	.logo-tag { font-size: 12px; }
	.finny { align-self: stretch; justify-content: flex-end; }
	.bubble { width: auto; flex: 1; }
	.finny-fish { width: 92px; }
	.tabs li { flex: 1 1 auto; }
	.tabs a { padding: 8px 8px 7px; font-size: 13px; text-align: center; }
	.tabs a[aria-current='page'] { padding-bottom: 8px; }
	.site { padding: 12px; }
	.gotw-body { grid-template-columns: minmax(0, 1fr); padding: 14px; }
	.gotw-thumb { max-width: 320px; }
	.game-title { font-size: 32px; }
	.gel-btn { width: 100%; justify-content: center; }
	.friend .gel-btn { width: calc(100% - 28px); }
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 14px; }
}
