@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;800;900&display=swap");
@import url("fontawesome-all.min.css");

/*
	Matikus Games — Custom Design System
	"Game Jam" aesthetic: warm, colorful, Nunito Bold, gaming UI components
*/

/* ===========================
   DESIGN TOKENS
   =========================== */

:root {
	/* Color Palette */
	--mg-cream:      #EEF6EA;

	/* Background Gradient */
	--mg-bg-from:    #F2FAE8;
	--mg-bg-to:      #8DC47E;
	--mg-white:      #FFFFFF;
	--mg-panel:      #FAFEF6;
	--mg-dark:       #2C4A2C;
	--mg-muted:      #5A7A5A;

	/* Accent Colors */
	--mg-teal:       #3DAA88;
	--mg-teal-dark:  #2D9A78;
	--mg-coral:      #FF6B6B;
	--mg-amber:      #FFD166;
	--mg-purple:     #9B5DE5;

	/* Shadow */
	--mg-shadow-sm:  0 2px 8px rgba(28, 51, 32, 0.07);
	--mg-shadow-md:  0 4px 24px rgba(28, 51, 32, 0.12);

	/* Border Radius */
	--mg-radius:     0.75rem;
	--mg-radius-sm:  0.4rem;

	/* Easing */
	--mg-bounce:     cubic-bezier(0.34, 1.56, 0.64, 1);
	--mg-ease:       cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   RESET
   =========================== */

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	font-size: 100%;
}

body {
	-webkit-text-size-adjust: none;
	overflow-y: scroll;
}

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

ul,
ol {
	list-style: none;
}

a {
	text-decoration: none;
}

/* ===========================
   BASE / TYPOGRAPHY
   =========================== */

body,
input,
textarea,
select {
	font-family: 'Nunito', sans-serif;
	font-weight: 400;
	color: var(--mg-dark);
	font-size: 1.0625rem;
	line-height: 1.7;
}

body {
	background: radial-gradient(ellipse at 60% 30%, var(--mg-bg-from) 0%, var(--mg-bg-to) 100%);
	background-attachment: fixed;
	min-height: 100vh;
}

input,
textarea,
select {
	background-color: var(--mg-cream);
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: 'Nunito', sans-serif;
	color: var(--mg-dark);
	line-height: 1.2;
}

h1 {
	font-weight: 900;
	font-size: 2.8rem;
	letter-spacing: -0.02em;
}

h2 {
	font-weight: 800;
	font-size: 1.9rem;
	letter-spacing: -0.01em;
}

h3,
h4,
h5,
h6 {
	font-weight: 700;
	font-size: 1.15rem;
}

@media screen and (max-width: 736px) {
	h1 { font-size: 2rem; }
	h2 { font-size: 1.5rem; }
	h3, h4, h5, h6 { font-size: 1.05rem; }
}

@media screen and (max-width: 360px) {
	h1 { font-size: 1.7rem; }
	h2 { font-size: 1.3rem; }
}

strong,
b {
	font-weight: 700;
}

em,
i {
	font-style: italic;
}

p,
ul,
ol,
dl,
table,
blockquote,
form {
	margin-bottom: 1.5em;
}

p:last-child,
ul:last-child,
ol:last-child,
dl:last-child {
	margin-bottom: 0;
}

hr {
	border: none;
	border-top: 1px solid rgba(28, 51, 32, 0.12);
	margin: 2rem 0;
	padding: 0;
}

blockquote {
	border-left: 4px solid var(--mg-teal);
	padding: 0.75em 1.5em;
	font-style: italic;
	color: var(--mg-muted);
}

sub {
	position: relative;
	top: 0.5em;
	font-size: 0.8em;
}

sup {
	position: relative;
	top: -0.5em;
	font-size: 0.8em;
}

br.clear {
	clear: both;
}

/* ===========================
   LINKS
   =========================== */

a {
	color: var(--mg-teal);
	transition: color 200ms var(--mg-ease);
}

a:hover {
	color: var(--mg-teal-dark);
}

/* ===========================
   BUTTONS (.mg-btn)
   =========================== */

.mg-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	font-family: 'Nunito', sans-serif;
	font-weight: 800;
	font-size: 0.9rem;
	letter-spacing: 0.03em;
	color: var(--mg-white);
	background-color: var(--mg-teal);
	border: none;
	border-radius: var(--mg-radius-sm);
	padding: 0.6em 1.4em;
	cursor: pointer;
	transition:
		background-color 150ms var(--mg-ease),
		transform 150ms var(--mg-bounce),
		box-shadow 150ms var(--mg-ease);
	text-decoration: none;
}

.mg-btn:hover {
	background-color: var(--mg-teal-dark);
	color: var(--mg-white);
	transform: scale(1.03);
	box-shadow: 0 4px 16px rgba(75, 184, 154, 0.35);
}

.mg-btn:active {
	transform: scale(0.98);
}

@media screen and (max-width: 736px) {
	.mg-btn {
		width: auto;
	}
}

/* ===========================
   FONTAWESOME ICONS
   =========================== */

.icon {
	text-decoration: none;
	position: relative;
}

.icon:before {
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
	display: inline-block;
	font-style: normal;
	font-variant: normal;
	text-rendering: auto;
	line-height: 1;
	text-transform: none !important;
	font-family: 'Font Awesome 5 Free';
	font-weight: 400;
}

.icon.solid:before {
	font-weight: 900;
}

.icon.brands:before {
	font-family: 'Font Awesome 5 Brands';
}

.icon:before {
	line-height: inherit;
}

.icon > .label {
	display: none;
}

/* ===========================
   NAVIGATION (#mg-nav)
   =========================== */

#mg-nav {
	position: sticky;
	top: 0;
	z-index: 100;
	display: flex;
	justify-content: center;
	gap: 0.15rem;
	padding: 0.6rem 1rem;
	background: transparent;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(28, 51, 32, 0.10);
}

.mg-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.8rem;
	font-family: 'Nunito', sans-serif;
	font-weight: 800;
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--mg-muted);
	border-bottom: 3px solid transparent;
	border-radius: var(--mg-radius-sm) var(--mg-radius-sm) 0 0;
	transition:
		color 120ms var(--mg-ease),
		transform 120ms var(--mg-bounce),
		border-color 200ms var(--mg-ease);
	outline: none;
	text-decoration: none;
}

.mg-nav__link:before {
	font-size: 1.05em;
}

.mg-nav__link:hover {
	color: var(--mg-teal);
	transform: translateY(-2px);
}

.mg-nav__link.mg-nav__link--active {
	color: var(--mg-teal);
	border-bottom-color: var(--mg-teal);
}

.mg-nav__label {
	display: inline;
}

@media screen and (max-width: 980px) {
	.mg-nav__label {
		display: none;
	}

	.mg-nav__link {
		font-size: 1.3rem;
		padding: 0.45rem 0.65rem;
		gap: 0;
	}
}

@media screen and (max-width: 736px) {
	#mg-nav {
		gap: 0;
		padding: 0.45rem 0.5rem;
		justify-content: space-around;
	}

	.mg-nav__link {
		font-size: 1.15rem;
		padding: 0.4rem 0.5rem;
		flex: 1;
		justify-content: center;
	}
}

/* ===========================
   WRAPPER (#mg-wrapper)
   =========================== */

#mg-wrapper {
	max-width: 56rem;
	margin: 0 auto;
	min-height: 100vh;
	padding: 0 1.5rem 4rem;
	display: flex;
	flex-direction: column;
	opacity: 1;
	transition:
		padding-top 380ms ease,
		opacity 400ms var(--mg-ease);
}

body.mg-loading #mg-wrapper {
	opacity: 0;
}

body.mg-loading *,
body.mg-loading *::before,
body.mg-loading *::after {
	animation: none !important;
	transition: none !important;
}

@media screen and (max-width: 1280px) {
	#mg-wrapper {
		max-width: calc(100% - 4rem);
	}
}

@media screen and (max-width: 980px) {
	#mg-wrapper {
		max-width: calc(100% - 3rem);
		padding: 0 0 3rem;
	}
}

@media screen and (max-width: 736px) {
	#mg-wrapper {
		max-width: 100%;
		padding: 0 0 2.5rem;
	}
}

/* ===========================
   MAIN (#mg-main)
   =========================== */

#mg-main {
	position: relative;
	overflow: hidden;
	width: 100%;
	transition:
		min-height 350ms var(--mg-ease),
		max-height 350ms var(--mg-ease);
}

/* ===========================
   PANELS (.mg-panel)
   =========================== */

.mg-panel {
	position: relative;
	width: 100%;
	background: var(--mg-panel);
	border-radius: var(--mg-radius);
	box-shadow: var(--mg-shadow-md);
	padding: 2.5rem;
	border-top: 4px solid var(--mg-teal);
	margin-bottom: 0;
	transition:
		opacity 300ms var(--mg-ease),
		transform 300ms var(--mg-bounce);
}

/* Per-panel accent border colors */
#home         { border-top-color: var(--mg-teal); }
#current      { border-top-color: var(--mg-coral); }
#devlog       { border-top-color: var(--mg-amber); }
#newsletter   { border-top-color: var(--mg-purple); }
#recommendations { border-top-color: var(--mg-teal); }

.mg-panel.mg-panel--inactive {
	opacity: 0;
	transform: translateY(8px);
}

/* ===========================
   PANEL NAVIGATION ARROWS
   =========================== */

.mg-panel__nav-next {
	display: block;
	position: absolute;
	top: 50%;
	right: 0;
	transform: translateY(-50%);
	width: 2.75rem;
	height: 2.75rem;
	background: rgba(28, 51, 32, 0.65);
	color: var(--mg-white);
	text-align: center;
	line-height: 2.75rem;
	font-size: 1.35rem;
	z-index: 2;
	text-decoration: none;
	border-radius: var(--mg-radius-sm) 0 0 var(--mg-radius-sm);
	transition:
		top 120ms ease-out,
		width 150ms var(--mg-ease),
		padding-right 150ms var(--mg-ease),
		background 150ms var(--mg-ease);
}

.mg-panel__nav-next span {
	display: block;
	text-indent: -9999px;
}

.mg-panel__nav-next:hover {
	width: 3.25rem;
	padding-right: 0.25rem;
	background: rgba(75, 184, 154, 0.85);
}

@media screen and (max-width: 736px) {
	.mg-panel {
		padding: 1.75rem 1.25rem;
		border-radius: var(--mg-radius-sm);
	}
}

/* ===========================
   HERO PANEL (.mg-panel--hero)
   =========================== */

.mg-panel--hero {
	padding: 0;
	overflow: hidden;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: stretch;
	min-height: 22rem;
}

.mg-hero__content {
	padding: 2.5rem 2rem 2.5rem 2.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.mg-hero__content h1 {
	margin-bottom: 0.5rem;
	transition: text-shadow 200ms var(--mg-ease);
}

.mg-hero__content h1:hover {
	text-shadow: 0 0 24px rgba(75, 184, 154, 0.45);
}

.mg-hero__content header p {
	color: var(--mg-muted);
	font-size: 1rem;
	margin-top: 0.3rem;
	margin-bottom: 0;
}

.mg-hero__media {
	width: 17rem;
	position: relative;
	flex-shrink: 0;
}

.mg-hero__cta {
	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
}

.mg-hero__cta img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.mg-hero__cta-arrow {
	display: block;
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 2.75rem;
	height: 2.75rem;
	background: rgba(28, 51, 32, 0.65);
	color: var(--mg-white);
	text-align: center;
	line-height: 2.75rem;
	font-size: 1.35rem;
	z-index: 1;
	border-radius: var(--mg-radius-sm) 0 0 var(--mg-radius-sm);
	transition:
		width 150ms var(--mg-ease),
		padding-right 150ms var(--mg-ease),
		background 150ms var(--mg-ease);
}

.mg-hero__cta-arrow:before {
	position: relative;
	top: 0.1em;
}

.mg-hero__cta-arrow span {
	display: block;
	text-indent: -9999px;
}

.mg-hero__cta:hover .mg-hero__cta-arrow {
	width: 3.25rem;
	padding-right: 0.25rem;
	background: rgba(75, 184, 154, 0.85);
}

@media screen and (max-width: 980px) {
	.mg-panel--hero {
		grid-template-columns: 1fr;
		min-height: auto;
	}

	.mg-hero__content {
		padding: 2.5rem 2rem 2rem;
		text-align: center;
		align-items: center;
	}

	.mg-hero__media {
		width: 100%;
		height: 22rem;
		position: relative;
	}

	.mg-hero__cta {
		position: relative;
		display: block;
		width: 100%;
		height: 22rem;
	}
}

@media screen and (max-width: 736px) {
	.mg-hero__content {
		padding: 2rem 1.5rem 1.5rem;
	}

	.mg-hero__cta {
		height: 18rem;
	}
}

/* ===========================
   GRID (.mg-grid-2)
   =========================== */

.mg-grid-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.25rem;
}

@media screen and (max-width: 736px) {
	.mg-grid-2 {
		grid-template-columns: 1fr;
	}
}

/* ===========================
   IMAGES (.mg-img-fit)
   =========================== */

.mg-img-fit {
	display: block;
	width: 100%;
	overflow: hidden;
	border-radius: var(--mg-radius-sm);
}

.mg-img-fit img {
	display: block;
	width: 100%;
	height: auto;
	transition: transform 220ms var(--mg-ease);
}

.mg-img-fit:hover img,
.mg-img-fit img:hover {
	transform: scale(1.02);
}

/* ===========================
   SECTION / ARTICLE / HEADER
   =========================== */

section {
	margin-bottom: 2.5rem;
}

section:last-child {
	margin-bottom: 0;
}

article section:last-child {
	margin-bottom: 0;
}

header {
	margin-bottom: 1.25rem;
}

header > p {
	color: var(--mg-muted);
	font-size: 1rem;
	margin: 0.35em 0 0 0;
}

/* ===========================
   LISTS
   =========================== */

ul {
	list-style: disc;
	padding-left: 1.25em;
}

ul li {
	padding-left: 0.35em;
	margin-bottom: 0.3em;
}

ol {
	list-style: decimal;
	padding-left: 1.5em;
}

ol li {
	padding-left: 0.25em;
}

/* ===========================
   FORMS
   =========================== */

form label {
	display: block;
	font-weight: 700;
	color: var(--mg-dark);
	margin-bottom: 0.75em;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form select,
form textarea {
	-webkit-appearance: none;
	appearance: none;
	border: 1px solid rgba(28, 51, 32, 0.15);
	border-radius: var(--mg-radius-sm);
	background: #EEF6EA;
	padding: 0.65em 0.9em;
	width: 100%;
	font-family: 'Nunito', sans-serif;
	transition:
		border-color 200ms var(--mg-ease),
		box-shadow 200ms var(--mg-ease);
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="password"]:focus,
form select:focus,
form textarea:focus {
	outline: none;
	border-color: var(--mg-teal);
	box-shadow: 0 0 0 3px rgba(75, 184, 154, 0.15);
}

form ::-webkit-input-placeholder { color: #9ca3af; }
form :-moz-placeholder            { color: #9ca3af; }
form ::-moz-placeholder           { color: #9ca3af; }
form :-ms-input-placeholder       { color: #9ca3af; }

/* ===========================
   TABLE
   =========================== */

table {
	width: 100%;
}

table.default tbody tr {
	border-bottom: 1px solid rgba(28, 51, 32, 0.10);
}

table.default td {
	padding: 0.5em 1em;
}

table.default th {
	text-align: left;
	font-weight: 700;
	padding: 0.5em 1em;
}

table.default thead {
	border-bottom: 2px solid rgba(28, 51, 32, 0.14);
}

/* ===========================
   FOOTER (#mg-footer)
   =========================== */

#mg-footer {
	text-align: center;
	padding: 2rem 0 0;
	font-size: 0.8rem;
	color: var(--mg-muted);
}

.mg-footer__links {
	list-style: none;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.2rem 0;
}

.mg-footer__links li {
	display: inline;
}

.mg-footer__links li:not(:last-child)::after {
	content: ' · ';
	color: rgba(107, 114, 128, 0.5);
	margin: 0 0.35em;
}

#mg-footer a {
	color: var(--mg-muted);
	transition: color 200ms var(--mg-ease);
}

#mg-footer a:hover {
	color: var(--mg-teal);
}

/* ===========================
   DEVLOG COMPONENTS
   =========================== */

.devlog-author-hero {
	margin-top: 2.5rem;
}

.devlog-author-image-wrapper {
	position: relative;
	width: 100%;
	max-width: 960px;
	margin: 0 auto;
	overflow: hidden;
	border-radius: var(--mg-radius);
}

.devlog-author-image {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.devlog-author-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom right,
		rgba(0, 0, 0, 0.6),
		rgba(0, 0, 0, 0.3)
	);
}

.devlog-author-text {
	position: absolute;
	top: 1.5rem;
	left: 1.5rem;
	max-width: 60%;
	color: #ffffff;
	z-index: 2;
}

.devlog-author-text h3 {
	margin: 0 0 0.5rem;
	font-size: 1.3rem;
	font-weight: 700;
	color: #ffffff;
}

.devlog-author-text p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.6;
}

@media screen and (max-width: 736px) {
	.devlog-author-text {
		top: 1rem;
		left: 1rem;
		max-width: 80%;
	}

	.devlog-author-text h3 {
		font-size: 1.1rem;
	}

	.devlog-author-text p {
		font-size: 0.9rem;
	}
}

/* ===========================
   KO-FI WRAPPER
   =========================== */

.kofi-wrapper {
	text-align: center;
}

/* ===========================
   RECO LIST
   =========================== */

.reco-list {
	list-style: none;
	padding: 0;
	margin: 1.5em 0;
}

.reco-list li {
	display: flex;
	align-items: center;
	padding: 0.7em 1em;
	border-radius: var(--mg-radius-sm);
	background: rgba(28, 51, 32, 0.04);
	margin-bottom: 0.6em;
	transition: background 150ms var(--mg-ease);
}

.reco-list li:hover {
	background: rgba(75, 184, 154, 0.07);
}

.reco-list .icon {
	margin-right: 0.75em;
	font-size: 1.3em;
	color: var(--mg-teal);
}

.reco-name {
	flex: 1;
	font-weight: 700;
}

.reco-list a {
	white-space: nowrap;
	font-weight: 800;
	font-size: 0.82rem;
	background: var(--mg-teal);
	color: var(--mg-white);
	padding: 0.28em 0.8em;
	border-radius: var(--mg-radius-sm);
	transition:
		background 150ms var(--mg-ease),
		transform 100ms var(--mg-bounce);
}

.reco-list a:hover {
	background: var(--mg-teal-dark);
	color: var(--mg-white);
	transform: scale(1.04);
}

/* ===========================
   PCLOUD BUTTON
   =========================== */

.pcloud-wrapper {
	text-align: center;
}

.pcloud-button {
	background: var(--mg-teal);
	color: #ffffff !important;
	border-radius: 999px;
	padding: 0.4em 1.4em;
	font-size: 0.9rem;
	font-weight: 800;
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	border: none;
	text-decoration: none;
	transition:
		background 150ms var(--mg-ease),
		transform 100ms var(--mg-bounce);
}

.pcloud-button:hover {
	background: var(--mg-teal-dark);
	color: #ffffff;
	transform: scale(1.03);
}

.pcloud-icon {
	height: 1.2em;
	width: auto;
	display: block;
}
