/*
Theme Name: PSK Holding
Theme URI: https://pskghana.com/
Author: People Should Know Ghana
Author URI: https://pskghana.com/
Description: First-day-cover holding page for People Should Know Ghana. A single pre-launch cover carrying the brand mark, the launch date as a postal cancellation, and a live countdown.
Version: 1.0.0
Requires at least: 6.0
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: psk-holding
*/

/* ------------------------------------------------------------------ *
 * Inter — self-hosted variable subset (weights 100–900)
 * ------------------------------------------------------------------ */
@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url('assets/fonts/inter-var-latin.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ------------------------------------------------------------------ *
 * Tokens
 * ------------------------------------------------------------------ */
:root {
	--navy: #002B5B;
	--blue: #0066FF;
	--blue-tint: #7FB3FF;
	--paper: #F1EADF;
	--white: #FFFFFF;

	--hairline: rgba(0, 43, 91, 0.18);
	--ink-soft: rgba(0, 43, 91, 0.86);
	--ink-rule: rgba(0, 43, 91, 0.42);

	--edge: 14px;
	--pad: clamp(1.1rem, 4vw, 3rem);
	--shout: clamp(2.15rem, 6.4vw, 5.25rem);
	--stamp-w: clamp(158px, 15vw, 190px);

	--sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ------------------------------------------------------------------ *
 * Reset & page shell
 * ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
	-webkit-text-size-adjust: 100%;
	scrollbar-color: rgba(0, 43, 91, 0.45) var(--paper);
	scrollbar-width: thin;
}

body {
	margin: 0;
	padding: var(--edge);
	min-height: 100svh;
	display: flex;
	background: var(--paper);
	color: var(--navy);
	font-family: var(--sans);
	font-synthesis-weight: none;
	font-feature-settings: 'cv05' 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	caret-color: var(--navy);
}

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

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

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

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb {
	background: rgba(0, 43, 91, 0.45);
	border: 3px solid var(--paper);
	border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--navy); }

/* ------------------------------------------------------------------ *
 * Airmail chevron border — bands the viewport like an envelope edge
 * ------------------------------------------------------------------ */
.airmail {
	position: fixed;
	inset: 0;
	z-index: 60;
	pointer-events: none;
}

.airmail i { position: absolute; display: block; }

.airmail i:nth-child(1),
.airmail i:nth-child(2) { left: 0; right: 0; height: var(--edge); }

.airmail i:nth-child(3),
.airmail i:nth-child(4) { top: var(--edge); bottom: var(--edge); width: var(--edge); }

.airmail i:nth-child(1),
.airmail i:nth-child(2) {
	background: repeating-linear-gradient(
		-45deg,
		var(--navy) 0 11px,
		var(--white) 11px 22px,
		var(--blue) 22px 33px,
		var(--white) 33px 44px
	);
}

.airmail i:nth-child(3),
.airmail i:nth-child(4) {
	background: repeating-linear-gradient(
		45deg,
		var(--navy) 0 11px,
		var(--white) 11px 22px,
		var(--blue) 22px 33px,
		var(--white) 33px 44px
	);
}

/* ------------------------------------------------------------------ *
 * Cover scaffold
 * ------------------------------------------------------------------ */
.cover {
	flex: 1;
	display: flex;
	min-width: 0;
	min-height: calc(100svh - var(--edge) * 2);
}

.sheet {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
	animation: sheet-in 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sheet-in {
	from { opacity: 0; transform: translateY(16px); }
	to { opacity: 1; transform: none; }
}

.cover__grid {
	flex: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: clamp(2rem, 5vw, 4.5rem);
	padding: clamp(1.75rem, 4.5vh, 3.5rem) var(--pad);
}

/* ------------------------------------------------------------------ *
 * Lead column — logo label, the shout, the standfirst
 * ------------------------------------------------------------------ */
.lead { min-width: 0; }

.label {
	display: inline-block;
	background: var(--white);
	border: 1px solid var(--hairline);
	padding: 14px 22px;
}

.label img {
	display: block;
	width: clamp(148px, 17vw, 232px);
	height: auto;
}

.shout {
	margin: clamp(2rem, 5vh, 3.25rem) 0 clamp(0.9rem, 1.8vh, 1.25rem);
	font-size: var(--shout);
	font-weight: 900;
	line-height: 0.88;
	letter-spacing: -0.03em;
	text-shadow: none;
}

.shout__place { color: var(--blue); }

.standfirst {
	margin: 0;
	max-width: 34ch;
	font-size: clamp(1.0625rem, 1.5vw, 1.375rem);
	font-weight: 500;
	line-height: 1.45;
	color: var(--ink-soft);
}

/* ------------------------------------------------------------------ *
 * Postage — stamp struck by the cancellation postmark
 * ------------------------------------------------------------------ */
.postage {
	position: relative;
	width: calc(var(--stamp-w) * 1.674);
	margin-inline: auto;
	padding-left: calc(var(--stamp-w) * 0.674);
}

.stamp {
	display: block;
	width: var(--stamp-w);
	height: auto;
}

.stamp__field { fill: var(--white); }
.stamp__perf circle { fill: var(--paper); }
.stamp__frame { fill: none; stroke: var(--navy); stroke-width: 1.25; }

.stamp__micro,
.stamp__day,
.stamp__month,
.stamp__country { font-family: var(--sans); text-anchor: middle; }

.stamp__micro {
	fill: var(--navy);
	font-size: 9.5px;
	font-weight: 800;
	letter-spacing: 1.8px;
}

.stamp__day {
	fill: var(--navy);
	font-size: 76px;
	font-weight: 900;
	letter-spacing: -1px;
}

.stamp__rule { stroke: var(--navy); stroke-width: 1; }

.stamp__month {
	fill: var(--blue);
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 2px;
}

.stamp__country {
	fill: var(--navy);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 4.5px;
}

/* Struck across the stamp's left half: centre sits just off the stamp's
   lower-left so the rings cross the field while every stamp word stays clear. */
.postmark {
	position: absolute;
	left: calc(var(--stamp-w) * 0.08);
	top: calc(var(--stamp-w) * 0.437);
	width: calc(var(--stamp-w) * 0.926);
	height: auto;
	mix-blend-mode: multiply;
	pointer-events: none;
}

.pm-ring { fill: none; stroke: var(--navy); }
.pm-ring--outer { stroke-width: 3.2; }
.pm-ring--mid { stroke-width: 1.2; }
.pm-ring--inner { stroke-width: 1.4; }

.pm-drum line { stroke: var(--navy); stroke-width: 2; }

.pm-drum {
	transform-box: view-box;
	transform-origin: 100px 100px;
	animation: pm-drum 60s linear infinite;
}

@keyframes pm-drum { to { transform: rotate(360deg); } }

.pm-arc,
.pm-date,
.pm-year { font-family: var(--sans); }

.pm-arc { fill: var(--navy); font-weight: 800; }
.pm-arc--top { font-size: 12px; letter-spacing: 2.2px; }
.pm-arc--bot { font-size: 10.5px; letter-spacing: 1.6px; }

.pm-date {
	fill: var(--navy);
	font-size: 25px;
	font-weight: 900;
	letter-spacing: 0.5px;
}

.pm-year {
	fill: var(--navy);
	font-size: 15px;
	font-weight: 800;
	letter-spacing: 2.5px;
}

.postmark.slam { animation: pm-slam 0.52s cubic-bezier(0.16, 1, 0.3, 1) both; }

@keyframes pm-slam {
	from { transform: scale(1.55) rotate(-7deg); opacity: 0; }
	55% { opacity: 1; }
	to { transform: none; opacity: 1; }
}

.callout {
	display: flex;
	align-items: flex-start;
	gap: clamp(10px, 1.6vw, 16px);
	margin: calc(var(--stamp-w) * 0.24) 0 0;
	/* Hang into the empty column left of the stamp so the date sets on one line. */
	margin-left: calc(var(--stamp-w) * -0.674);
	font-size: clamp(11px, 0.9vw, 13px);
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--navy);
}

.callout__rule {
	flex: 0 0 auto;
	width: clamp(26px, 4vw, 54px);
	height: 1px;
	margin-top: 0.62em;
	background: var(--ink-rule);
}

/* Set on two deliberate lines — an envelope endorsement never wraps by accident. */
.callout__text {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
}

/* ------------------------------------------------------------------ *
 * Franking band — one continuous readout
 * ------------------------------------------------------------------ */
.band {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: clamp(1rem, 3vw, 2.5rem);
	padding: clamp(1.1rem, 2.6vh, 1.75rem) var(--pad);
	background: var(--navy);
	color: var(--white);
}

.band__meta {
	margin: 0;
	padding-top: 0.7em;
	border-top: 1px solid rgba(127, 179, 255, 0.38);
	font-size: clamp(0.72rem, 1vw, 0.8125rem);
	font-weight: 800;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--blue-tint);
}

.readout {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: flex-end;
	gap: clamp(0.2rem, 0.8vw, 0.6rem);
	min-width: 0;
}

.unit { display: flex; flex-direction: column; min-width: 0; }

.num {
	display: block;
	font-size: clamp(1.15rem, 3.6vw, 3.4rem);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
	color: var(--white);
}

.num.tick { animation: tick 0.22s cubic-bezier(0.2, 0.8, 0.3, 1); }

@keyframes tick {
	from { opacity: 0.35; transform: translateY(-3px); }
	to { opacity: 1; transform: none; }
}

.sep {
	font-size: clamp(1.15rem, 3.6vw, 3.4rem);
	font-weight: 700;
	line-height: 1;
	color: rgba(127, 179, 255, 0.55);
	font-variant-numeric: tabular-nums;
}

.ulab {
	margin-top: 0.55em;
	font-size: clamp(9px, 0.72vw, 11px);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--blue-tint);
}

/* Live state at zero — the cover stays and declares the edition out */
.band__live { display: none; }

.band__now {
	display: block;
	font-size: clamp(1.6rem, 4.4vw, 3.4rem);
	font-weight: 900;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--white);
}

.band__sub {
	display: block;
	margin-top: 0.7em;
	font-size: clamp(0.72rem, 1vw, 0.8125rem);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--blue-tint);
}

[data-state='live'] .band__meta,
[data-state='live'] .readout { display: none; }

[data-state='live'] .band__live { display: block; }

[data-state='live'] .shout__place {
	animation: settle 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes settle {
	from { opacity: 0; transform: translateY(0.12em); }
	to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------ *
 * Narrow screens
 * ------------------------------------------------------------------ */
@media (max-width: 860px) {
	:root { --edge: 10px; }

	.cover__grid {
		grid-template-columns: 1fr;
		align-items: start;
		gap: clamp(2.75rem, 9vw, 4rem);
		padding-top: clamp(1.5rem, 5vh, 2.5rem);
		padding-bottom: clamp(2rem, 6vh, 3rem);
	}

	.band {
		flex-direction: column;
		align-items: stretch;
		gap: 1.15rem;
	}

	/* Phone width: units wrap cleanly if needed, numbers stay legible. */
	.readout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
		align-items: start;
		gap: 0.3rem;
		width: 100%;
	}

	.unit { align-items: center; min-width: 0; }
	.sep { text-align: center; }

	.num,
	.sep { font-size: clamp(1.15rem, 6vw, 1.9rem); }
	.ulab { font-size: 9px; letter-spacing: 0.06em; }
}

@media (max-width: 360px) {
	.num,
	.sep { font-size: 1.15rem; }
	.readout { gap: 0.18rem; }
	.ulab { font-size: 8px; letter-spacing: 0.03em; }
}

@media (max-width: 400px) {
	:root { --stamp-w: clamp(140px, 44vw, 158px); }
	.label { padding: 11px 16px; }
}

/* ------------------------------------------------------------------ *
 * Reduced motion — the cover is complete without any of it
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.sheet,
	.pm-drum,
	.num.tick,
	.postmark.slam,
	[data-state='live'] .shout__place {
		animation: none !important;
	}
}
