/* Zee Prime — main stylesheet.
   Tokens mirror the old Elementor Kit (see CLAUDE.md / theme.json).
   Breakpoints: mobile ≤767, tablet 768–1024, desktop 1025–2399, widescreen ≥2400. */

:root {
	--zp-base: #F1F1F1;
	--zp-surface: #E0E0E0;
	--zp-text: #000000;
	--zp-accent: #C4A7FB;
	--zp-btn-bg: rgba(230, 230, 230, 0.4);
	--zp-btn-bg-hover: rgba(196, 167, 251, 0.16);
	--zp-btn-border: rgba(196, 167, 251, 0.3);
	--zp-container: 1140px;
	--zp-pad: 48px;
}

* { color-scheme: light; box-sizing: border-box; }

body {
	margin: 0;
	background: var(--zp-base);
	color: var(--zp-text);
	font-family: 'Neue Haas Grotesk Display Pro', Arial, Helvetica, sans-serif;
	font-size: 18px;
	line-height: 1.2;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-weight: 400; margin: 0 0 0.5em; }
h1 { font-size: 48px; line-height: 1; }
h2 { font-size: 40px; line-height: 1.1; }
p { margin: 0 0 1.5em; }

a { color: var(--zp-accent); transition: all 0.3s; text-decoration: none; }
a:hover { color: var(--zp-text); }

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

.lora-accent {
	font-family: Lora, Georgia, serif;
	font-style: italic;
	font-weight: 400;
	font-size: 58px;
	line-height: 1.1;
	color: var(--zp-accent);
}

.screen-reader-text {
	position: absolute;
	clip-path: inset(50%);
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ── Buttons ─────────────────────────────────────────────────── */

.zp-button {
	position: relative;
	display: inline-block;
	color: var(--zp-text);
	background: var(--zp-btn-bg);
	border: 1px solid var(--zp-btn-border);
	border-radius: 8px;
	padding: 16px 64px 16px 24px;
	font-size: 18px;
	line-height: 1.2;
	backdrop-filter: blur(60px);
	-webkit-backdrop-filter: blur(60px);
	overflow: hidden;
}

.zp-button::before {
	content: "";
	position: absolute;
	right: 28px;
	top: 50%;
	transform: translateY(-50%);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--zp-accent);
	z-index: 1;
}

.zp-button::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: radial-gradient(ellipse at top, rgba(196, 167, 251, 0.7) -100%, transparent 60%);
}

.zp-button:hover { background: var(--zp-btn-bg-hover); color: var(--zp-text); }

/* Accent CTA (header / homepage "For Investors") — no dot, tighter pill */
.zp-button--investors {
	background: var(--zp-accent);
	border: none;
	border-radius: 16px;
	padding: 10px 24px;
	box-shadow:
		0 -1px 0.4px 0 rgba(0, 0, 0, 0.2) inset,
		0 1px 0.4px 0 var(--zp-accent) inset,
		0 0 14px 0 rgba(255, 255, 255, 0.2);
	background-image: linear-gradient(129deg, transparent 27.79%, #ADB5D3 136.5%);
}

.zp-button--investors::before, .zp-button--investors::after { content: none; }

.zp-button--investors:hover {
	background-color: #B37BE8;
	box-shadow: 0 0 40px 0 rgba(179, 123, 232, 0.4);
	color: var(--zp-text);
}

.zp-button--home {
	background-color: rgba(196, 167, 251, 0.66);
	border-radius: 8px;
	box-shadow:
		0 -1px 0.4px 0 rgba(0, 0, 0, 0.2) inset,
		0 1px 0.4px 0 #C7D3FF inset,
		0 0 14px 0 rgba(255, 255, 255, 0.2);
}

.zp-button--home:hover {
	background-color: #7B92E8;
	box-shadow: 0 0 40px 0 rgba(167, 185, 251, 0.4);
}

/* ── Header (inner pages) ────────────────────────────────────── */

.zp-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 1000;
	padding: 52px var(--zp-pad);
	background: linear-gradient(180deg, var(--zp-base) 50%, rgba(255, 255, 255, 0) 100%);
}

.zp-header__inner {
	max-width: var(--zp-container);
	margin-inline: auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 32px;
}

.zp-header__logo { display: block; line-height: 0; }
.zp-header__logo img { width: 210px; height: auto; }

.zp-header__nav { display: flex; align-items: center; gap: 24px; }

.zp-header__link { color: var(--zp-text); font-size: 20px; line-height: 1; }
.zp-header__link:hover { color: var(--zp-accent); }

/* ── Footer ──────────────────────────────────────────────────── */

.zp-footer { padding: 0 var(--zp-pad) 48px; }

.zp-footer__divider {
	border: 0;
	border-top: 1px solid var(--zp-surface);
	margin: 32px 0;
}

.zp-footer__cols {
	display: flex;
	justify-content: space-between;
	gap: 64px;
	flex-wrap: wrap;
}

.zp-footer__subscribe { flex: 0 1 33%; min-width: 300px; }

.zp-footer__links {
	display: flex;
	justify-content: space-between;
	gap: 48px;
	flex: 0 1 500px;
}

.zp-footer__menu { display: flex; flex-direction: column; gap: 6px; }
.zp-footer__menu a { color: var(--zp-text); font-size: 18px; }
.zp-footer__menu a:hover { color: var(--zp-accent); }

.zp-footer__meta { display: flex; gap: 48px; justify-content: space-between; }
.zp-footer__copy { margin: 0; font-size: 18px; }

.zp-footer__wordmark {
	display: block;
	width: 100%;
	opacity: 0.31;
	margin-top: 100px;
}

/* ── Subscribe forms ─────────────────────────────────────────── */

.zp-subscribe-label { font-size: 18px; font-weight: 300; margin-bottom: 16px; }

.zp-subscribe-row { display: flex; gap: 24px; align-items: stretch; }

.zp-subscribe-field {
	flex: 0 1 280px;
	min-width: 0;
	border-bottom: 1px solid #3a3a3a;
	display: flex;
	align-items: center;
}

.zp-subscribe-field input {
	width: 100%;
	background: transparent;
	border: 0;
	outline: none;
	font: 300 16px/1.4 inherit;
	font-family: inherit;
	color: #444;
	padding: 8px 0;
}

.zp-subscribe-field input::placeholder { color: #444; }
.zp-subscribe-field input:focus { color: var(--zp-text); }

.zp-subscribe-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	flex: 0 0 auto;
	min-width: 200px;
	background: none;
	border: 1px solid #3a3a3a;
	border-radius: 12px;
	color: #3a3a3a;
	font: 300 15px/1 inherit;
	font-family: inherit;
	padding: 16px;
	cursor: pointer;
	transition: all 0.3s;
}

.zp-subscribe-btn:hover { color: var(--zp-text); border-color: #666; }
.zp-subscribe-btn:disabled { opacity: 0.5; cursor: wait; }

.zp-subscribe-msg { margin-top: 10px; font-size: 15px; }
.zp-subscribe-msg:empty { display: none; }
.zp-subscribe-msg.is-ok { color: #15803d; }
.zp-subscribe-msg.is-error { color: #dc2626; }

/* Hero card variant (writing page). Design ref: ai-debug-folder subscribe
   screenshot (2x crop) — frosted card, 2px white border, ghost button with
   a thin lilac border, arrow pushed to the far right. */
.zp-subscribe--card {
	background: rgba(221, 221, 221, 0.54);
	border: 2px solid #FFFFFF;
	border-radius: 26px;
	padding: 20px 40px 10px;
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.zp-subscribe--card .zp-subscribe-field { border-bottom-color: var(--zp-text); }
.zp-subscribe--card .zp-subscribe-field input { color: #444; }

.zp-subscribe--card .zp-subscribe-btn {
	background: rgba(230, 230, 230, 0.25);
	border: 1px solid rgba(196, 167, 251, 0.55);
	border-radius: 8px;
	color: var(--zp-text);
	font-size: 18px;
	font-weight: 400;
	gap: 32px;
	padding: 10px 24px;
}

.zp-subscribe--card .zp-subscribe-btn:hover {
	background: rgba(196, 167, 251, 0.16);
	border-color: var(--zp-accent);
	color: var(--zp-text);
}

/* ── Homepage (black canvas) ─────────────────────────────────── */

.zp-canvas { background: #000; color: #fff; }

.zp-home { min-height: 100vh; display: flex; flex-direction: column; padding: 0 20px; }

.zp-home__topbar {
	display: flex;
	justify-content: flex-end;
	margin-top: 50px;
	padding-right: 28px;
}

.zp-home__hero {
	flex: 1;
	min-height: 80vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.zp-home__art { width: 100%; max-width: 524px; height: auto; }

.zp-home__copy {
	width: 100%;
	max-width: 480px;
	text-align: center;
	color: #fff;
}

.zp-home__copy a:hover { color: #fff; }

.zp-home__planets {
	width: 100%;
	max-width: 300px;
	margin: 0 auto;
	line-height: 0;
	position: relative;
	overflow: hidden;
	filter: blur(1.2px);
	transform: translateX(-37px);
}

.zp-home__planets::after {
	content: "";
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient(
		to bottom,
		transparent 0, transparent 2px,
		rgba(0, 0, 0, 0.3) 2px, rgba(0, 0, 0, 0.3) 4px
	);
	pointer-events: none;
	z-index: 10;
}

.zp-home__planets svg { width: 100%; height: auto; }

/* ── Writing page ────────────────────────────────────────────── */

.zp-writing-hero {
	min-height: 50vh;
	padding: 280px var(--zp-pad);
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	background-color: var(--zp-base);
	background-size: cover;
	background-position: top;
	background-repeat: no-repeat;
}

.zp-writing-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--zp-base);
	opacity: 0.55;
}

/* Fade the hero's top and bottom edges into the page background so the
   header above and the facets below melt into it. */
.zp-writing-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(var(--zp-base) 0%, transparent 20%, transparent 80%, var(--zp-base) 100%);
}

.zp-writing-hero > * { position: relative; z-index: 2; }

/* ── Filter pills ────────────────────────────────────────────── */

.zp-pills {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0 24px;
	max-width: 1480px;
	margin-inline: auto;
	padding: 24px var(--zp-pad);
}

.zp-pill {
	color: #69727d;
	font-size: 18px;
	padding: 8px 0;
	border-bottom: 2px solid transparent;
}

.zp-pill:hover { color: var(--zp-accent); }

.zp-pill.is-active {
	color: var(--zp-accent);
	border-bottom-color: var(--zp-accent);
}

/* ── Post grid / cards ───────────────────────────────────────── */

.zp-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px;
	max-width: 1480px;
	margin-inline: auto;
	padding: 16px var(--zp-pad) 64px;
}

.zp-card { display: flex; flex-direction: column; }

/* Filter/entry choreography: cards rise + sharpen in a stagger (--zp-i is
   the loop index set by card.php). Combined with the cross-document view
   transition below, switching category pills reads as in-place filtering
   even though each pill is a real page load. */
@media (prefers-reduced-motion: no-preference) {
	.zp-grid .zp-card {
		animation: zp-card-in 0.45s cubic-bezier(0.22, 0.9, 0.3, 1) both;
		animation-delay: calc(var(--zp-i, 0) * 45ms);
	}

	@view-transition {
		navigation: auto;
	}
}

@keyframes zp-card-in {
	from {
		opacity: 0;
		transform: translateY(18px);
		filter: blur(5px);
	}
	to {
		opacity: 1;
		transform: none;
		filter: none;
	}
}

.zp-card__media {
	display: block;
	position: relative;
	background: #000;
	border-radius: 24px;
	overflow: hidden;
	line-height: 0;
	transition: box-shadow 0.3s;
}

/* Striped overlay. The old Elementor CSS pointed at a pattern file that
   404s on prod and staging alike, so the same look is drawn with a
   repeating gradient instead of a dead asset. */
.zp-card__media::before {
	content: "";
	display: block;
	position: absolute;
	inset: 0;
	z-index: 2;
	background-image: repeating-linear-gradient(
		to bottom,
		rgba(255, 255, 255, 0.35) 0px, rgba(255, 255, 255, 0.35) 1px,
		rgba(0, 0, 0, 0.35) 2px, rgba(0, 0, 0, 0.35) 3px,
		transparent 3px, transparent 4px
	);
	mix-blend-mode: overlay;
	border-radius: 24px;
	pointer-events: none;
}

/* Lilac wash over the grayscale image. */
.zp-card__media::after {
	content: "";
	display: block;
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: 24px;
	background: linear-gradient(189deg, rgba(196, 167, 251, 0.34) -6.58%, rgba(255, 255, 255, 0.34) 110.3%);
	pointer-events: none;
}

.zp-card__media img {
	width: 100%;
	height: 324px;
	object-fit: cover;
	filter: saturate(0%);
	border-radius: 24px;
}

.zp-card__media:hover { box-shadow: 0 0 180px 20px rgba(170, 188, 255, 0.25); }

.zp-card__body { padding: 20px; }

.zp-card__terms { color: var(--zp-accent); font-size: 18px; margin: 0 0 16px; }

.zp-card__title { font-size: 24px; line-height: 1.1; margin: 0 0 16px; }
.zp-card__title a { color: var(--zp-text); }
.zp-card__title a:hover { color: var(--zp-accent); }

.zp-card__excerpt { font-size: 18px; }
.zp-card__excerpt p { margin: 0; }

.zp-card[hidden] { display: none; }

/* ── Single post ─────────────────────────────────────────────── */

.zp-single {
	max-width: 790px; /* 750px content + 2 × 20px side padding */
	margin: 150px auto 0;
	padding: 0 20px;
}

.zp-article__hero { line-height: 0; margin-bottom: 24px; }
.zp-article__hero img { border-radius: 16px; width: 100%; height: auto; }

/* Prod parity: article pages sit on white (kit had body.single-post
   #ffffff !important — the "Erva" rule). */
body.single-post { background: #fff; }

.zp-article__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 32px;
	font-size: 18px;
}

/* Date / author chips (design ref: ai-debug-folder screenshot). */
.zp-chip {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	padding: 8px 16px;
	background: #F7F7F8;
	border: 1px solid #E4E4E9;
	border-radius: 12px;
	color: var(--zp-text);
	font-size: 14px;
	line-height: 1;
}

.zp-chip__icon { flex: none; }
.zp-chip__icon--calendar { width: 12.25px; height: 14px; color: var(--zp-text); }
.zp-chip__icon--user { width: 14px; height: 14px; color: var(--zp-accent); }

a.zp-chip--link:hover { border-color: var(--zp-accent); color: var(--zp-text); }

.zp-article__content h2 { margin-top: 1.5em; }
.zp-article__content ol, .zp-article__content ul { margin-bottom: 1.5em; }
.zp-article__content img { border-radius: 16px; }
.zp-article__content blockquote { margin: 0 0 1.5em; padding-left: 24px; border-left: 2px solid var(--zp-accent); }

/* Prev / next */
.zp-postnav {
	display: flex;
	justify-content: space-between;
	gap: 24px;
	max-width: 790px;
	margin: 50px auto;
	padding: 0 20px;
	font-size: 20px;
}

.zp-single .zp-postnav { padding: 0; }
.zp-postnav a { color: var(--zp-text); }
.zp-postnav a:hover { color: var(--zp-accent); }
.zp-postnav span[aria-hidden] { color: var(--zp-accent); }
.zp-postnav__next { text-align: right; }

/* Related */
.zp-related { margin: 64px 0 100px; }
.zp-related__title { font-size: 20px; line-height: 1; margin-bottom: 24px; }

.zp-related__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 35px 30px;
}

.zp-related__thumb { display: block; line-height: 0; margin-bottom: 12px; }
.zp-related__thumb img { border-radius: 16px; aspect-ratio: 1 / 0.93; object-fit: cover; width: 100%; }

.zp-related__item-title { font-size: 24px; line-height: 1; margin: 0 0 8px; }
.zp-related__item-title a { color: var(--zp-text); }
.zp-related__item-title a:hover { color: var(--zp-accent); }

.zp-related__date { font-size: 18px; line-height: 1.1; }

/* ── Pagination (writing + category archives) ────────────────── */

.zp-main .navigation.pagination {
	max-width: 1480px;
	margin-inline: auto;
	padding: 20px var(--zp-pad) 64px;
}

.zp-main .nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.zp-main .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 12px;
	background: rgba(230, 230, 230, 0.4);
	border: 1px solid rgba(196, 167, 251, 0.3);
	color: var(--zp-text);
	font-size: 14px;
	transition: background 0.2s;
}

.zp-main .page-numbers:hover { background: rgba(196, 167, 251, 0.16); color: var(--zp-text); }

.zp-main .page-numbers.current {
	background: var(--zp-accent);
	border-color: var(--zp-accent);
}

/* ── Archive head / 404 ──────────────────────────────────────── */

.zp-main--archive { padding-top: 150px; }
.zp-404 { min-height: 60vh; padding: 200px var(--zp-pad) 64px; }

/* ── Widescreen ≥2400 ────────────────────────────────────────── */
@media (min-width: 2400px) {
	body { font-size: 24px; }
	h1 { font-size: 64px; }
	h2 { font-size: 56px; }
	.lora-accent { font-size: 64px; }
	.zp-button { padding: 20px 80px 20px 32px; }
	.zp-button::before { right: 32px; }
	.zp-button--investors, .zp-button--home { padding: 10px 24px; }
	.zp-header { padding: 104px 96px; }
	.zp-header__link { font-size: 24px; }
	.zp-footer__wordmark { margin-top: 160px; }
}

/* ── Tablet ≤1024 ────────────────────────────────────────────── */
@media (max-width: 1024px) {
	:root { --zp-pad: 24px; }
	h1 { font-size: 40px; }
	h2 { font-size: 32px; }
	.lora-accent { font-size: 48px; }
	.zp-header { padding: 26px 24px; }
	.zp-writing-hero { padding: 220px 24px; }
	.zp-grid { grid-template-columns: repeat(2, 1fr); }
	.zp-related__grid { grid-template-columns: repeat(2, 1fr); }
	.zp-footer__wordmark { margin-top: 24px; }
}

/* ── Mobile ≤767 ─────────────────────────────────────────────── */
@media (max-width: 767px) {
	.zp-header__inner { flex-direction: column; align-items: center; }
	.zp-header__nav { justify-content: center; }
	.zp-header__link { font-size: 22px; }

	.zp-home__copy { width: 100%; max-width: 331px; }
	.zp-home__planets { transform: none; }

	.zp-writing-hero { min-height: 474px; padding: 120px 24px; }

	.zp-pills { justify-content: center; gap: 0 20px; }

	.zp-grid { grid-template-columns: 1fr; }
	.zp-related__grid { grid-template-columns: 1fr; }

	.zp-subscribe-row { flex-direction: column; gap: 12px; }
	.zp-subscribe-field { flex: 1 1 auto; }
	.zp-subscribe-btn { width: 100%; }

	.zp-footer__cols { flex-direction: column; }
	.zp-footer__links { flex-direction: column; gap: 24px; }

	.zp-single { margin-top: 120px; }
}

/* ── Short viewports (13–14" laptops) ─────────────────────────
   Two pages overflow the bottom edge on a 13" MacBook Air (~770–870px of
   usable viewport, less with a bookmarks bar). Both are keyed on HEIGHT, not
   width, so large-but-tall displays keep the intended design untouched.

   /writing/ — the hero's 280px vertical padding pushed the first row of cards
   to ~722px, so the page looked postless until you scrolled. Below these caps
   the hero's own min-height: 50vh takes over and it scales with the viewport.

   Homepage — the stack (topbar 105.6 + art 461.5 + copy 118.8 + the Pac-Man
   planets strip 143.6) totals ~830px, so the Pac-Man was clipped by the
   bottom edge. Height is reclaimed from the art and the surrounding
   whitespace, never from the Pac-Man itself — it is the element that has to
   stay whole. */
@media (max-height: 900px) {
	.zp-writing-hero { padding: 150px var(--zp-pad); }

	.zp-home__topbar { margin-top: 24px; }
	.zp-home__art { max-width: 460px; }
	.zp-home__copy p { margin-bottom: 18px; }
}

@media (max-height: 760px) {
	.zp-writing-hero { padding: 110px var(--zp-pad); }

	.zp-home__topbar { margin-top: 16px; }
	.zp-home__art { max-width: 400px; }
}
