/*
Theme Name: Ranjeet Soft
Theme URI: https://ranjeetsoft.com
Author: Ranjeet
Description: A custom theme for an independent app and game studio. Shows apps and games as shelf cartridges, with per-app privacy pages for store submissions, a services page for client work, and a blog.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ranjeetsoft
Tags: portfolio, one-column, custom-menu, custom-logo, featured-images, blog
*/

/* ------------------------------------------------------------------
   Tokens
   Palette: petrol ink on pale sage paper, with four cartridge-spine
   inks that identify each release. Type: Bricolage Grotesque for
   display, IBM Plex Sans for reading, IBM Plex Mono for data.
------------------------------------------------------------------ */

:root {
	--ink: #14252b;
	--ink-soft: #3d5760;
	--ink-faint: #6e858c;
	--paper: #e7e9e1;
	--paper-lift: #f3f4ef;
	--case: #fbfbf8;
	--line: #cdd2c7;

	--spine-1: #e4513b;
	--spine-2: #2f7d74;
	--spine-3: #e9b44c;
	--spine-4: #6b6ac4;

	--accent: var(--spine-1);

	--font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
	--font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

	--step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.84rem);
	--step-0: clamp(1rem, 0.97rem + 0.15vw, 1.09rem);
	--step-1: clamp(1.2rem, 1.12rem + 0.4vw, 1.45rem);
	--step-2: clamp(1.5rem, 1.32rem + 0.9vw, 2.1rem);
	--step-3: clamp(2rem, 1.6rem + 2vw, 3.2rem);
	--step-4: clamp(2.6rem, 1.7rem + 4.4vw, 5.6rem);

	--gutter: clamp(1.25rem, 4vw, 3rem);
	--measure: 66ch;
	--radius: 14px;
	--shelf-shadow: 0 1px 0 var(--line), 0 12px 28px -18px rgba(20, 37, 43, 0.55);
}

/* ------------------------------------------------------------------
   Base
------------------------------------------------------------------ */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: var(--step-0);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

img,
svg,
video {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-underline-offset: 0.22em;
	text-decoration-thickness: 1px;
}

a:hover {
	text-decoration-color: var(--accent);
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.03;
	letter-spacing: -0.025em;
	margin: 0 0 0.5em;
	text-wrap: balance;
}

h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
h4 { font-size: var(--step-1); }

p { margin: 0 0 1.1em; }

:focus-visible {
	outline: 3px solid var(--spine-4);
	outline-offset: 3px;
	border-radius: 3px;
}

::selection {
	background: var(--spine-3);
	color: var(--ink);
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
	background: var(--ink);
	color: var(--paper);
	padding: 0.7rem 1.1rem;
}

.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

/* ------------------------------------------------------------------
   Layout helpers
------------------------------------------------------------------ */

.wrap {
	width: min(1180px, 100% - (var(--gutter) * 2));
	margin-inline: auto;
}

.wrap--narrow {
	width: min(760px, 100% - (var(--gutter) * 2));
}

.section {
	padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--tight {
	padding-block: clamp(2.5rem, 5vw, 4rem);
}

.section--dark {
	background: var(--ink);
	color: var(--paper);
}

.section--dark a { color: var(--paper); }

.section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 2.5rem;
	padding-bottom: 0.9rem;
	border-bottom: 2px solid var(--ink);
}

.section--dark .section-head { border-bottom-color: rgba(231, 233, 225, 0.35); }

.section-head h2 { margin: 0; }

/* Shelf label: a mono strip that carries real data, not decoration. */
.label {
	font-family: var(--font-mono);
	font-size: var(--step--1);
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ink-faint);
	margin: 0;
}

.section--dark .label { color: #94a8ad; }

/* ------------------------------------------------------------------
   Buttons
------------------------------------------------------------------ */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	font-family: var(--font-mono);
	font-size: var(--step--1);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 500;
	text-decoration: none;
	padding: 0.85rem 1.4rem;
	border: 2px solid var(--ink);
	border-radius: 999px;
	background: transparent;
	color: var(--ink);
	cursor: pointer;
	transition: transform 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.btn:hover {
	transform: translateY(-2px);
	background: var(--ink);
	color: var(--paper);
}

.btn--solid {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

.btn--solid:hover {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}

.section--dark .btn {
	border-color: var(--paper);
	color: var(--paper);
}

.section--dark .btn:hover {
	background: var(--paper);
	color: var(--ink);
}

.section--dark .btn--solid {
	background: var(--spine-3);
	border-color: var(--spine-3);
	color: var(--ink);
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------ */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--paper) 88%, transparent);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--line);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 70px;
}

.brand {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: 1.22rem;
	letter-spacing: -0.03em;
	text-decoration: none;
}

.brand__mark {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: var(--accent);
	display: grid;
	place-items: center;
	color: #fff;
	font-family: var(--font-mono);
	font-size: 0.85rem;
	font-weight: 600;
	flex: none;
}

.brand img { max-height: 40px; width: auto; }

.nav__list {
	display: flex;
	align-items: center;
	gap: 1.6rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.nav__list a {
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	padding-block: 0.3rem;
	border-bottom: 2px solid transparent;
}

.nav__list a:hover,
.nav__list .current-menu-item > a {
	border-bottom-color: var(--accent);
}

.nav-toggle {
	display: none;
	background: none;
	border: 2px solid var(--ink);
	border-radius: 10px;
	padding: 0.45rem 0.6rem;
	cursor: pointer;
	color: var(--ink);
}

.nav-toggle span {
	display: block;
	width: 20px;
	height: 2px;
	background: currentColor;
	margin: 4px 0;
}

@media (max-width: 860px) {
	.nav-toggle { display: block; }

	.site-nav {
		position: absolute;
		inset: 100% 0 auto 0;
		background: var(--paper-lift);
		border-bottom: 1px solid var(--line);
		display: none;
		padding: 1rem var(--gutter) 1.5rem;
	}

	.site-nav.is-open { display: block; }

	.nav__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.9rem;
	}
}

/* ------------------------------------------------------------------
   Hero — the shelf
------------------------------------------------------------------ */

.hero {
	padding-block: clamp(3rem, 7vw, 6rem) clamp(3.5rem, 8vw, 6rem);
	border-bottom: 1px solid var(--line);
	overflow: hidden;
}

.hero__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: center;
}

.hero__title {
	margin: 0.6rem 0 1rem;
	font-size: var(--step-4);
	font-weight: 800;
	font-stretch: 92%;
}

.hero__title em {
	font-style: normal;
	color: var(--accent);
}

.hero__lede {
	font-size: var(--step-1);
	color: var(--ink-soft);
	max-width: 34ch;
	margin-bottom: 1.8rem;
}

/* The leaning stack of cases — the studio's shelf, seen from the front.
   Each case is a link to its release. Position comes from per-case custom
   properties so hover, focus, and the entrance animation can all reuse it. */
.stack {
	position: relative;
	/* Every case is absolutely positioned, so this box has no content to size
	   itself from. It needs an explicit width, or an auto margin would shrink
	   it to nothing. */
	width: 100%;
	aspect-ratio: 1 / 0.92;
	list-style: none;
	margin: 0;
	padding: 0;
}

.stack__case {
	position: absolute;
	width: 46%;
	aspect-ratio: 3 / 4;
	--rot: 0deg;
	--tx: 0%;
	--ty: 0%;
	left: 50%;
	top: 50%;
	/* The first translate centres the case on the shelf; the rest place it. */
	transform: translate(-50%, -50%) rotate(var(--rot)) translate(var(--tx), var(--ty));
}

.stack__case > a,
.stack__case > .stack__spine {
	display: block;
}

.stack__case > a,
.stack__case--empty {
	position: absolute;
	inset: 0;
	background: var(--case);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	box-shadow: 6px 10px 0 rgba(20, 37, 43, 0.12);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	text-decoration: none;
	transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.3s ease;
}

.stack__spine {
	height: 16px;
	flex: none;
	border-bottom: 2px solid var(--ink);
}

.stack__case img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.stack__case:nth-child(1) { --rot: -9deg; --tx: -46%; --ty: 4%; z-index: 1; }
.stack__case:nth-child(2) { --rot: 3deg; --tx: 2%; --ty: -6%; z-index: 3; }
.stack__case:nth-child(3) { --rot: 12deg; --tx: 50%; --ty: 8%; z-index: 2; }

.stack__case:nth-child(1) .stack__spine { background: var(--spine-2); }
.stack__case:nth-child(2) .stack__spine { background: var(--spine-1); }
.stack__case:nth-child(3) .stack__spine { background: var(--spine-3); }

/* Pull a case out of the stack, the way you would to read its label. */
.stack__case:hover,
.stack__case:focus-within {
	z-index: 6;
	transform:
		translate(-50%, -50%)
		rotate(calc(var(--rot) * 0.3))
		translate(var(--tx), calc(var(--ty) - 5%))
		scale(1.06);
}

.stack__case:hover > a,
.stack__case:focus-within > a {
	box-shadow: 10px 18px 0 rgba(20, 37, 43, 0.16);
}

.stack:hover .stack__case:not(:hover) > a {
	box-shadow: 4px 7px 0 rgba(20, 37, 43, 0.08);
}

.stack__case > a:focus-visible {
	outline: 3px solid var(--spine-4);
	outline-offset: 4px;
}

.stack__fallback {
	flex: 1;
	display: grid;
	place-items: center;
	font-family: var(--font-mono);
	font-size: 0.68rem;
	line-height: 1.4;
	letter-spacing: 0.08em;
	color: var(--ink-faint);
	text-align: center;
	text-wrap: balance;
	overflow-wrap: anywhere;
	padding: 0.75rem 0.5rem;
	background: repeating-linear-gradient(
		135deg,
		var(--paper-lift),
		var(--paper-lift) 8px,
		var(--case) 8px,
		var(--case) 16px
	);
}

/* Entrance: the cases drop onto the shelf, one after another. */
@media (prefers-reduced-motion: no-preference) {
	.stack__case {
		animation: rs-case-drop 0.65s cubic-bezier(0.2, 0.8, 0.3, 1) backwards;
		transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
	}

	.stack__case:nth-child(1) { animation-delay: 0.05s; }
	.stack__case:nth-child(2) { animation-delay: 0.18s; }
	.stack__case:nth-child(3) { animation-delay: 0.31s; }
}

@keyframes rs-case-drop {
	from {
		opacity: 0;
		transform:
			translate(-50%, -50%)
			rotate(calc(var(--rot) * 2.2))
			translate(var(--tx), calc(var(--ty) + 22%))
			scale(0.92);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%) rotate(var(--rot)) translate(var(--tx), var(--ty));
	}
}

@media (max-width: 860px) {
	.hero__grid { grid-template-columns: 1fr; }
	.stack { width: min(360px, 100%); margin-inline: auto; order: -1; }
}

/* On a phone the shelf is narrower than the spread wants, so the outer cases
   would run past the edge. Pull them in and let each one sit a little wider. */
@media (max-width: 620px) {
	.stack__case { width: 50%; }
	.stack__case:nth-child(1) { --tx: -34%; --rot: -7deg; }
	.stack__case:nth-child(2) { --tx: 0%; }
	.stack__case:nth-child(3) { --tx: 34%; --rot: 9deg; }
}

/* ------------------------------------------------------------------
   Cartridge card — the signature element
------------------------------------------------------------------ */

.shelf {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
	gap: clamp(1.25rem, 2.5vw, 2rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.cart {
	position: relative;
	background: var(--case);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: var(--shelf-shadow);
}

.cart:hover,
.cart:focus-within {
	transform: translateY(-8px);
	box-shadow: 0 22px 34px -22px rgba(20, 37, 43, 0.7);
}

/* Spine colour is assigned per release in PHP, cycling the four inks. */
.cart__spine {
	height: 14px;
	flex: none;
	border-bottom: 2px solid var(--ink);
	background: var(--spine-1);
}

.cart--s2 .cart__spine { background: var(--spine-2); }
.cart--s3 .cart__spine { background: var(--spine-3); }
.cart--s4 .cart__spine { background: var(--spine-4); }

.cart__body {
	padding: 1.25rem 1.25rem 1rem;
	display: flex;
	gap: 1rem;
	align-items: flex-start;
	flex: 1;
}

.cart__icon {
	width: 62px;
	height: 62px;
	flex: none;
	border-radius: 14px;
	border: 2px solid var(--ink);
	object-fit: cover;
	background: var(--paper-lift);
}

.cart__icon--blank {
	display: grid;
	place-items: center;
	font-family: var(--font-mono);
	font-size: 1.3rem;
	color: var(--ink-faint);
}

.cart__title {
	font-size: 1.22rem;
	margin: 0 0 0.25rem;
	line-height: 1.15;
}

.cart__title a {
	text-decoration: none;
}

/* Let the whole card be the click target, keeping one real link for a11y. */
.cart__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.cart__tagline {
	margin: 0;
	font-size: 0.92rem;
	color: var(--ink-soft);
	line-height: 1.45;
}

.cart__strip {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.9rem;
	align-items: center;
	padding: 0.65rem 1.25rem;
	border-top: 2px solid var(--ink);
	background: var(--paper-lift);
	font-family: var(--font-mono);
	font-size: 0.72rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.cart__status {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}

.cart__status::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--spine-2);
}

.cart__status[data-status="beta"]::before { background: var(--spine-3); }
.cart__status[data-status="wip"]::before { background: var(--ink-faint); }

.cart__platforms {
	margin-left: auto;
	display: flex;
	gap: 0.5rem;
}

/* ------------------------------------------------------------------
   Filter bar (archive)
------------------------------------------------------------------ */

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 2.25rem;
}

.filter {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	padding: 0.5rem 0.95rem;
	border: 1.5px solid var(--line);
	border-radius: 999px;
	background: var(--case);
	color: var(--ink-soft);
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.filter:hover { border-color: var(--ink); color: var(--ink); }

.filter[aria-pressed="true"] {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}

.cart[hidden] { display: none; }

.shelf__empty {
	font-family: var(--font-mono);
	font-size: 0.9rem;
	color: var(--ink-soft);
	padding: 2rem 0;
}

/* ------------------------------------------------------------------
   Single app
------------------------------------------------------------------ */

.app-head {
	padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
	border-bottom: 1px solid var(--line);
}

.app-head__inner {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: clamp(1.25rem, 3vw, 2.25rem);
	align-items: start;
}

.app-head__icon {
	width: clamp(88px, 14vw, 132px);
	height: clamp(88px, 14vw, 132px);
	border-radius: 24px;
	border: 2px solid var(--ink);
	object-fit: cover;
	box-shadow: var(--shelf-shadow);
}

.app-head h1 {
	font-size: var(--step-3);
	margin: 0.2rem 0 0.4rem;
}

.app-head__tagline {
	font-size: var(--step-1);
	color: var(--ink-soft);
	max-width: var(--measure);
	margin-bottom: 1.4rem;
}

.spec {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1.4rem;
	list-style: none;
	padding: 0;
	margin: 0 0 1.6rem;
	font-family: var(--font-mono);
	font-size: 0.76rem;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: var(--ink-faint);
}

.spec strong {
	color: var(--ink);
	font-weight: 500;
}

@media (max-width: 620px) {
	.app-head__inner { grid-template-columns: 1fr; }
}

.shots {
	display: flex;
	gap: 1rem;
	overflow-x: auto;
	padding-bottom: 1rem;
	scroll-snap-type: x mandatory;
	margin-bottom: 2.5rem;
}

.shots img {
	flex: none;
	width: clamp(190px, 26vw, 260px);
	border-radius: var(--radius);
	border: 2px solid var(--ink);
	scroll-snap-align: start;
}

.app-body {
	max-width: var(--measure);
	font-size: 1.05rem;
}

.app-body h2 { font-size: var(--step-2); margin-top: 2rem; }
.app-body h3 { font-size: var(--step-1); margin-top: 1.6rem; }
.app-body ul, .app-body ol { padding-left: 1.2rem; }
.app-body li { margin-bottom: 0.4rem; }

.app-aside {
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	background: var(--case);
	padding: 1.4rem;
	margin-top: 2.5rem;
}

.app-aside h2 { font-size: var(--step-1); margin-top: 0; }

.app-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 300px);
	gap: clamp(2rem, 5vw, 3.5rem);
	align-items: start;
}

@media (max-width: 900px) {
	.app-layout { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------
   Services / capability list
------------------------------------------------------------------ */

.cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: clamp(1rem, 2.5vw, 1.75rem);
}

.card {
	background: var(--case);
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	padding: 1.6rem 1.5rem;
}

.card h3 {
	font-size: var(--step-1);
	margin-bottom: 0.5rem;
}

.card p {
	margin: 0;
	color: var(--ink-soft);
	font-size: 0.97rem;
}

.card__kicker {
	font-family: var(--font-mono);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--accent);
	display: block;
	margin-bottom: 0.7rem;
}

/* ------------------------------------------------------------------
   Posts
------------------------------------------------------------------ */

.posts {
	display: grid;
	gap: 0;
	list-style: none;
	padding: 0;
	margin: 0;
	border-top: 1px solid var(--line);
}

.post-row {
	display: grid;
	grid-template-columns: 130px minmax(0, 1fr);
	gap: 1.5rem;
	padding: 1.5rem 0;
	border-bottom: 1px solid var(--line);
	position: relative;
}

.post-row time {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--ink-faint);
	padding-top: 0.4rem;
}

.post-row h3 { margin: 0 0 0.35rem; font-size: var(--step-1); }
.post-row h3 a { text-decoration: none; }
.post-row h3 a::after { content: ""; position: absolute; inset: 0; }
.post-row p { margin: 0; color: var(--ink-soft); font-size: 0.97rem; }
.post-row:hover h3 { color: var(--accent); }

@media (max-width: 620px) {
	.post-row { grid-template-columns: 1fr; gap: 0.35rem; }
	.post-row time { padding-top: 0; }
}

.entry {
	max-width: var(--measure);
	font-size: 1.06rem;
}

.entry h2 { font-size: var(--step-2); margin-top: 2rem; }
.entry h3 { font-size: var(--step-1); margin-top: 1.6rem; }
.entry ul, .entry ol { padding-left: 1.2rem; }
.entry li { margin-bottom: 0.4rem; }
.entry img { border-radius: var(--radius); border: 2px solid var(--ink); }

.entry blockquote {
	margin: 1.5rem 0;
	padding-left: 1.2rem;
	border-left: 4px solid var(--accent);
	font-size: 1.1rem;
	color: var(--ink-soft);
}

.entry code {
	font-family: var(--font-mono);
	font-size: 0.88em;
	background: var(--paper-lift);
	padding: 0.15em 0.4em;
	border-radius: 5px;
}

.entry pre {
	background: var(--ink);
	color: var(--paper);
	padding: 1.1rem;
	border-radius: var(--radius);
	overflow-x: auto;
}

.entry pre code { background: none; color: inherit; }

.entry table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.entry th,
.entry td {
	border: 1px solid var(--line);
	padding: 0.6rem 0.8rem;
	text-align: left;
}

.page-head {
	padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
	border-bottom: 1px solid var(--line);
}

.page-head h1 { margin-bottom: 0.4rem; font-size: var(--step-3); }

.page-head p {
	color: var(--ink-soft);
	max-width: var(--measure);
	margin: 0;
	font-size: var(--step-1);
}

.pagination {
	display: flex;
	gap: 0.5rem;
	margin-top: 2.5rem;
	font-family: var(--font-mono);
	font-size: 0.8rem;
}

.pagination .page-numbers {
	padding: 0.5rem 0.85rem;
	border: 1.5px solid var(--line);
	border-radius: 999px;
	text-decoration: none;
}

.pagination .current {
	background: var(--ink);
	border-color: var(--ink);
	color: var(--paper);
}

/* ------------------------------------------------------------------
   Contact form
------------------------------------------------------------------ */

.form {
	display: grid;
	gap: 1.1rem;
	max-width: 560px;
}

.field label {
	display: block;
	font-family: var(--font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--ink-soft);
	margin-bottom: 0.4rem;
}

.field input,
.field textarea,
.field select {
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	color: var(--ink);
	background: var(--case);
	border: 2px solid var(--ink);
	border-radius: 10px;
	padding: 0.75rem 0.9rem;
}

.field textarea { min-height: 150px; resize: vertical; }

.field--hp {
	position: absolute;
	left: -9999px;
}

.notice {
	border: 2px solid var(--ink);
	border-left-width: 8px;
	border-radius: 10px;
	padding: 0.9rem 1.1rem;
	background: var(--case);
	margin-bottom: 1.5rem;
	font-size: 0.97rem;
}

.notice--ok { border-left-color: var(--spine-2); }
.notice--error { border-left-color: var(--spine-1); }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------ */

.site-footer {
	background: var(--ink);
	color: var(--paper);
	padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.footer__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
	gap: 2.5rem;
	padding-bottom: 2.5rem;
	border-bottom: 1px solid rgba(231, 233, 225, 0.2);
}

.footer__grid h2 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.footer__grid p { color: #b6c4c8; max-width: 34ch; }

.footer__col h3 {
	font-family: var(--font-mono);
	font-size: 0.72rem;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #94a8ad;
	margin-bottom: 0.9rem;
}

.footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}

.footer__col a {
	text-decoration: none;
	font-size: 0.95rem;
	color: var(--paper);
}

.footer__col a:hover { color: var(--spine-3); }

.footer__base {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: space-between;
	padding-top: 1.5rem;
	font-family: var(--font-mono);
	font-size: 0.74rem;
	letter-spacing: 0.08em;
	color: #94a8ad;
}

/* ------------------------------------------------------------------
   Reveal on scroll
------------------------------------------------------------------ */

/* Scoped to .rs-js so content stays visible if the script never runs. */
@media (prefers-reduced-motion: no-preference) {
	.rs-js .reveal {
		opacity: 0;
		transform: translateY(18px);
		transition: opacity 0.5s ease, transform 0.5s ease;
	}

	.rs-js .reveal.is-in {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}

/* WordPress core alignment classes */
.alignwide { width: min(1100px, 100vw - 2rem); margin-inline: auto; }
.alignfull { width: 100vw; margin-left: calc(50% - 50vw); max-width: none; }
.aligncenter { margin-inline: auto; }
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.wp-caption-text { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-faint); }
