/* ==========================================================================
   Pixel Term
   Solid colours only: white (#ffffff) and black (#000000), inverted in dark
   mode. No gradients, no shadows, no tinted greys.
   ========================================================================== */

:root {
	--bg: #ffffff;
	--fg: #000000;
	--max: 1100px;
	color-scheme: light;
}

html[data-theme="dark"] {
	--bg: #000000;
	--fg: #ffffff;
	color-scheme: dark;
}

/* ---- Base ---- */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--bg);
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--fg);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.6;
}

img,
svg {
	max-width: 100%;
}

img {
	height: auto;
	display: block;
}

a {
	color: var(--fg);
	text-decoration: underline;
	text-underline-offset: 3px;
}

a:hover {
	text-decoration-thickness: 2px;
}

:focus-visible {
	outline: 2px solid var(--fg);
	outline-offset: 3px;
}

/* ---- Headings: standard sizes ---- */
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	font-weight: 700;
	line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5, h6 { font-size: 1rem; }

p {
	margin: 0 0 1em;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pt-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	padding: 10px 16px;
	background: var(--fg);
	color: var(--bg);
	z-index: 1001;
}

.pt-skip:focus {
	left: 0;
}

/* ---- Layout ---- */
.pt-container {
	width: 100%;
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 20px;
}

.pt-section {
	padding: 64px 0;
}

.pt-section + .pt-section {
	border-top: 1px solid var(--fg);
}

.pt-section__more {
	margin: 24px 0 0;
}

.pt-lead {
	font-size: 1.125rem;
	max-width: 62ch;
}

.pt-lead p:last-child {
	margin-bottom: 0;
}

.pt-eyebrow {
	margin: 0 0 4px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.pt-grid {
	display: grid;
	gap: 24px;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	margin-top: 24px;
}

/* ---- Header ---- */
.pt-header {
	border-bottom: 1px solid var(--fg);
	background: var(--bg);
}

.pt-header__inner {
	display: flex;
	align-items: center;
	gap: 24px;
	min-height: 72px;
}

.pt-brand {
	font-size: 1.25rem;
	font-weight: 700;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}

.pt-brand__logo {
	max-height: 40px;
	width: auto;
}

.pt-nav {
	margin-left: auto;
}

.pt-nav__list {
	display: flex;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pt-nav a {
	text-decoration: none;
	padding: 4px 0;
}

.pt-nav a:hover,
.pt-nav .current-menu-item > a,
.pt-nav a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.pt-menu-toggle {
	display: none;
	padding: 8px 14px;
	border: 2px solid var(--fg);
	background: var(--bg);
	color: var(--fg);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

/* ---- Dark mode switch ---- */
.pt-switch {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 4px;
	border: 0;
	background: transparent;
	color: var(--fg);
	font: inherit;
	font-size: 0.875rem;
	cursor: pointer;
}

.pt-switch__track {
	position: relative;
	flex: none;
	width: 44px;
	height: 24px;
	border: 2px solid var(--fg);
	border-radius: 999px;
	background: var(--bg);
}

.pt-switch__thumb {
	position: absolute;
	top: 2px;
	left: 2px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--fg);
	transition: transform 0.2s ease;
}

.pt-switch__state {
	min-width: 2.4em;
	font-weight: 700;
	text-align: left;
}

.pt-on { display: none; }

html[data-theme="dark"] .pt-on { display: inline; }
html[data-theme="dark"] .pt-off { display: none; }

html[data-theme="dark"] .pt-switch__track {
	background: var(--fg);
}

html[data-theme="dark"] .pt-switch__thumb {
	background: var(--bg);
	transform: translateX(20px);
}

/* ---- Fixed WhatsApp / Messenger buttons ---- */
.pt-chat {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 1000;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pt-chat__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 18px;
	border: 2px solid var(--fg);
	border-radius: 999px;
	background: var(--fg);
	color: var(--bg);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
}

.pt-chat__btn:hover {
	background: var(--bg);
	color: var(--fg);
	text-decoration: none;
}

.pt-chat__btn:focus-visible {
	outline-offset: 4px;
}

.pt-chat__icon {
	flex: none;
}

/* ---- Buttons ---- */
.pt-btn {
	display: inline-block;
	padding: 12px 24px;
	border: 2px solid var(--fg);
	border-radius: 0;
	background: var(--fg);
	color: var(--bg);
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}

.pt-btn:hover {
	background: var(--bg);
	color: var(--fg);
	text-decoration: none;
}

.pt-btn--ghost {
	background: var(--bg);
	color: var(--fg);
}

.pt-btn--ghost:hover {
	background: var(--fg);
	color: var(--bg);
}

.pt-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

/* ---- Hero ---- */
.pt-hero__grid {
	display: grid;
	gap: 40px;
	align-items: center;
}

.pt-hero__grid.has-media {
	grid-template-columns: 1.1fr 0.9fr;
}

.pt-hero__media img {
	width: 100%;
	border: 1px solid var(--fg);
}

/* ---- Cards ---- */
.pt-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--fg);
	padding: 24px;
}

.pt-card > :last-child {
	margin-bottom: 0;
}

.pt-card--media {
	padding: 0;
}

.pt-card__media img {
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-bottom: 1px solid var(--fg);
}

.pt-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 20px;
}

.pt-card__body > :last-child {
	margin-bottom: 0;
}

.pt-card__action {
	margin-top: auto;
	padding-top: 12px;
}

/* ---- Developers ---- */
.pt-dev__avatar {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 96px;
	height: 96px;
	margin-bottom: 16px;
	border: 2px solid var(--fg);
	border-radius: 50%;
	overflow: hidden;
	font-size: 1.5rem;
	font-weight: 700;
}

.pt-dev__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ---- Closing banner ---- */
.pt-cta {
	text-align: center;
}

.pt-cta .pt-lead {
	margin-left: auto;
	margin-right: auto;
}

/* ---- Contact ---- */
.pt-contact {
	display: grid;
	gap: 40px;
	margin-top: 32px;
}

.pt-contact.has-two {
	grid-template-columns: 1fr 1.4fr;
}

.pt-details {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pt-details li {
	padding: 12px 0;
	border-top: 1px solid var(--fg);
}

.pt-details li:last-child {
	border-bottom: 1px solid var(--fg);
}

.ptm-contact label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.ptm-contact input[type="text"],
.ptm-contact input[type="email"],
.ptm-contact textarea {
	display: block;
	width: 100%;
	padding: 12px;
	border: 2px solid var(--fg);
	border-radius: 0;
	background: var(--bg);
	color: var(--fg);
	font: inherit;
}

.ptm-notice {
	margin-bottom: 20px;
	padding: 12px 16px;
	border: 2px solid var(--fg);
	font-weight: 600;
}

/* ---- Posts and editor content ---- */
.pt-post {
	padding: 24px 0;
	border-top: 1px solid var(--fg);
}

.pt-content {
	margin-top: 24px;
}

.pt-content > :last-child {
	margin-bottom: 0;
}

.pt-content img {
	margin: 1em 0;
}

.nav-links {
	display: flex;
	gap: 16px;
	margin-top: 32px;
}

.nav-links .current {
	font-weight: 700;
	text-decoration: underline;
}

/* ---- Footer ---- */
.pt-footer {
	border-top: 1px solid var(--fg);
	padding: 32px 0;
	font-size: 0.875rem;
}

.pt-footer__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
}

.pt-footer p {
	margin: 0;
}

/* ---- Small screens ---- */
@media (max-width: 768px) {
	.pt-section {
		padding: 40px 0;
	}

	.pt-hero__grid.has-media,
	.pt-contact.has-two {
		grid-template-columns: 1fr;
	}

	.pt-header__inner {
		flex-wrap: wrap;
		gap: 12px;
		padding-top: 12px;
		padding-bottom: 12px;
	}

	.pt-brand {
		order: 1;
		margin-right: auto;
	}

	.pt-switch {
		order: 2;
	}

	.pt-menu-toggle {
		display: inline-block;
		order: 3;
	}

	.pt-nav {
		display: none;
		order: 4;
		flex-basis: 100%;
		margin-left: 0;
	}

	.pt-nav.is-open {
		display: block;
	}

	.pt-nav__list {
		flex-direction: column;
		gap: 0;
	}

	.pt-nav__list a {
		display: block;
		padding: 12px 0;
		border-top: 1px solid var(--fg);
	}

	/* Keep the switch label for screen readers, show only ON / OFF. */
	.pt-switch__label {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

@media (max-width: 600px) {
	.pt-chat {
		right: 14px;
		bottom: 14px;
	}

	.pt-chat__btn {
		width: 52px;
		height: 52px;
		padding: 0;
	}

	.pt-chat__label {
		position: absolute;
		width: 1px;
		height: 1px;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}
}

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