/* ==========================================================================
   Kiln — WordPress theme marketplace.
   Graphite-black void (not Nova's indigo cast), glass panels with a
   gradient-border reveal on hover instead of ambient neon glow, and a
   five-stop spectrum gradient — violet through rose — standing in for
   "every style has a home here" rather than any single accent hue.
   Bricolage Grotesque + Manrope + DM Mono (numerals/badges only).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:root {
	--void:      oklch(12% 0.006 260);
	--void-deep: oklch(7%  0.005 260);
	--void-soft: oklch(17% 0.008 260);
	--surface:   oklch(20% 0.01  260 / .6);
	--surface-solid: oklch(15% 0.008 260);

	--ink:      oklch(96% 0.004 260);
	--ink-soft: oklch(76% 0.008 260);
	--ink-dim:  oklch(58% 0.01  260);
	--line:     oklch(85% 0.01 260 / .14);
	--line-strong: oklch(90% 0.01 260 / .26);

	/* ── Five-stop spectrum — the catalogue's whole pitch in one gradient. ── */
	--spec-1: oklch(58% 0.24 300);  /* violet  */
	--spec-2: oklch(58% 0.22 260);  /* blue    */
	--spec-3: oklch(74% 0.14 195);  /* teal    */
	--spec-4: oklch(80% 0.15 80);   /* gold    */
	--spec-5: oklch(68% 0.22 22);   /* coral   */
	--spectrum: linear-gradient(90deg, var(--spec-1), var(--spec-2), var(--spec-3), var(--spec-4), var(--spec-5));
	--spectrum-glow: oklch(60% 0.2 280 / .45);

	--display: 'Bricolage Grotesque', 'Segoe UI', sans-serif;
	--body-f:  'Manrope', -apple-system, 'Segoe UI', sans-serif;
	--mono:    'DM Mono', ui-monospace, 'SFMono-Regular', monospace;

	--radius: 22px;
	--radius-sm: 12px;
	--lw: 1px;
	--lw-2: 1.5px;
	--blur: 20px;
	--ease: cubic-bezier(.16,1,.3,1);
	--ease-spring: cubic-bezier(.34,1.56,.64,1);
	--container: 1360px;
	--gutter: clamp(20px, 4vw, 64px);
}

html { background: var(--void-deep); }
body { background: transparent; color: var(--ink); }
body {
	margin: 0;
	font-family: var(--body-f);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--spec-1); color: var(--void-deep); }

.container { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); position: relative; }

/* ── Type scale: 16 → 20 → 25 → 31 → 39 → 49 → 61 (1.25 ratio) ── */
h1, h2, h3, h4, .display {
	font-family: var(--display);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.08;
	margin: 0;
	color: var(--ink);
	text-shadow: 0 2px 22px oklch(7% 0.005 260 / .35);
}
h1, .h1 { font-size: clamp(2.6rem, 5.4vw, 3.8rem); font-weight: 800; }
h2, .h2 { font-size: clamp(2rem, 3.4vw, 2.45rem); }
h3, .h3 { font-size: 1.55rem; }
h4, .h4 { font-size: 1.25rem; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
	font-family: var(--mono);
	font-size: .78rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--ink-dim);
	display: inline-flex;
	align-items: center;
	gap: .6em;
}
.eyebrow::before {
	content: '';
	width: 22px; height: var(--lw-2);
	background: var(--spectrum);
	display: inline-block;
	border-radius: 2px;
}

.lede { font-size: clamp(1.05rem, 1.3vw, 1.2rem); color: var(--ink-soft); max-width: 60ch; }

.text-gradient {
	background: var(--spectrum);
	background-size: 200% 100%;
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

/* ── Skip link ── */
.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute; width: 1px; word-wrap: normal;
}
.skip-link.screen-reader-text:focus {
	background: var(--void-deep); color: var(--ink);
	clip: auto; clip-path: none; height: auto; width: auto;
	padding: 14px 20px; left: var(--gutter); top: 14px;
	z-index: 2100; font-family: var(--mono); font-size: .85rem;
	border: var(--lw) solid var(--spec-2);
	border-radius: var(--radius-sm);
}

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--spec-3); outline-offset: 3px; }

/* ==========================================================================
   Glass panel + gradient-border-on-hover utility
   ========================================================================== */

.panel {
	background: var(--surface);
	backdrop-filter: blur(var(--blur));
	-webkit-backdrop-filter: blur(var(--blur));
	border: var(--lw) solid var(--line);
	border-radius: var(--radius);
}

.grad-border {
	position: relative;
	border-radius: var(--radius);
}
.grad-border::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	padding: var(--lw-2);
	background: var(--spectrum);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity .4s var(--ease);
	pointer-events: none;
}
.grad-border:hover::before, .grad-border:focus-within::before { opacity: 1; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: .55em;
	font-family: var(--body-f);
	font-weight: 700;
	font-size: .95rem;
	padding: .95em 1.7em;
	border-radius: 999px;
	transition: transform .35s var(--ease-spring), box-shadow .3s var(--ease), background .3s var(--ease);
	white-space: nowrap;
}
.btn--primary {
	background: var(--spectrum);
	background-size: 200% 100%;
	color: var(--void-deep);
	box-shadow: 0 8px 30px var(--spectrum-glow);
}
.btn--primary:hover { background-position: 100% 0; box-shadow: 0 10px 40px var(--spectrum-glow); }
.btn--ghost {
	background: var(--surface);
	border: var(--lw) solid var(--line-strong);
	color: var(--ink);
}
.btn--ghost:hover { border-color: var(--spec-3); }
.btn--sm { padding: .7em 1.3em; font-size: .85rem; }

/* Magnetic pointer-follow — translate driven by JS custom properties. */
.magnetic { --mx: 0px; --my: 0px; transform: translate(var(--mx), var(--my)); }

/* ==========================================================================
   Badges — tech-stack tags, price tags (DM Mono, used sparingly for numerals/badges only)
   ========================================================================== */

.badge {
	display: inline-flex;
	align-items: center;
	gap: .5em;
	font-family: var(--mono);
	font-size: .74rem;
	letter-spacing: .03em;
	padding: .4em .85em;
	border-radius: 999px;
	background: var(--void-soft);
	border: var(--lw) solid var(--line);
	color: var(--ink-soft);
}
.badge-row { display: flex; flex-wrap: wrap; gap: .5em; }

.price-tag {
	font-family: var(--mono);
	font-weight: 500;
	font-size: 1.3rem;
	color: var(--ink);
}
.price-tag small { font-size: .6em; color: var(--ink-dim); font-weight: 400; }

/* ==========================================================================
   Header / nav
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 500;
	padding-block: 18px;
	background: oklch(9% 0.006 260 / .72);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: var(--lw) solid var(--line);
}
.site-header__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: .6em; font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.brand__mark {
	width: 30px; height: 30px;
	border-radius: 9px;
	background: var(--spectrum);
	background-size: 200% 200%;
	animation: kln-mark-shift 6s ease-in-out infinite;
	flex-shrink: 0;
}
@keyframes kln-mark-shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@media (prefers-reduced-motion: reduce) { .brand__mark { animation: none; } }

.nav__list { display: flex; align-items: center; gap: 2.1em; list-style: none; margin: 0; padding: 0; }
.nav__list a {
	font-size: .95rem; font-weight: 600; color: var(--ink-soft);
	position: relative; padding-block: 4px;
	transition: color .25s var(--ease);
}
.nav__list a::after {
	content: ''; position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
	background: var(--spectrum); border-radius: 2px;
	transition: right .35s var(--ease);
}
.nav__list a:hover { color: var(--ink); }
.nav__list a:hover::after { right: 0; }

.header__cta { display: flex; align-items: center; gap: 14px; }
.nav-toggle { display: none; }

/* ── Mobile nav — a sibling of <header>, NOT a descendant of it, since
   .site-header's backdrop-filter establishes a containing block for any
   position:fixed descendant (per spec, same rule as `filter`), which would
   otherwise confine this panel's fixed positioning to the ~80px-tall header
   box instead of the viewport. Kept as its own element for that reason. ── */
.mobile-nav {
	position: fixed;
	inset: 0;
	z-index: 900;
	background: var(--void-deep);
	display: flex;
	flex-direction: column;
	padding: 96px var(--gutter) 40px;
	transform: translateY(-12px);
	opacity: 0;
	pointer-events: none;
	transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.mobile-nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.mobile-nav__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5em; }
.mobile-nav__list a { font-family: var(--display); font-size: 1.4rem; font-weight: 700; color: var(--ink); }
.mobile-nav__close { position: absolute; top: 18px; right: var(--gutter); width: 42px; height: 42px; border-radius: 10px; background: var(--surface); border: var(--lw) solid var(--line); display: inline-flex; align-items: center; justify-content: center; }

@media (max-width: 860px) {
	.nav__list { display: none; }
	.nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 10px; background: var(--surface); border: var(--lw) solid var(--line); }
	.nav-toggle svg { width: 18px; height: 18px; }
	.header__cta .btn--ghost { display: none; }
}

/* ==========================================================================
   Hero + 3D carousel mount
   ========================================================================== */

.hero { position: relative; padding-block: clamp(64px, 10vw, 120px) clamp(80px, 11vw, 140px); overflow: clip; }
/* Soft left-anchored scrim: darkens just enough behind the hero copy for
   readability, fading to nothing by the carousel so that side stays ablaze. */
/* Faint left scrim keeps the headline crisp over the starfield + words. */
.hero::before {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(100deg, oklch(7% 0.005 260 / .3) 0%, transparent 46%);
	pointer-events: none;
	z-index: 0;
}
/* Hero content sits above the word field, but is click-through in its empty
   areas so the words behind it stay reachable — only its real controls
   (buttons/links/inputs/the carousel) capture the pointer. */
.hero > .container { position: relative; z-index: 2; pointer-events: none; }
.hero .container a, .hero .container button, .hero .container input,
.hero .container textarea, .hero .container summary, .hero__stage { pointer-events: auto; }
/* Soft dark halo keeps hero copy crisp over the now-brighter aurora — large,
   low-opacity blur so it reads as an atmospheric glow, not a boxy shadow. */
.hero__title, .hero .lede, .hero .eyebrow, .hero__stats, .manifesto__title, .manifesto__sub {
	text-shadow: 0 4px 40px oklch(7% 0.005 260 / .55), 0 2px 10px oklch(7% 0.005 260 / .45);
}
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero__title { margin-block: .5em .4em; text-wrap: balance; }
.hero__stats { display: flex; flex-wrap: wrap; gap: clamp(24px, 4vw, 48px); margin-top: 2.2em; }
.stat__value { font-family: var(--mono); font-size: 2rem; font-weight: 500; }
.stat__label { font-size: .82rem; color: var(--ink-dim); margin-top: .3em; }

@media (max-width: 900px) {
	.hero__grid { grid-template-columns: 1fr; }
	.hero__stage { order: -1; max-width: 420px; margin-inline: auto; }
}

/* The carousel sits on a lit pedestal: a soft spectrum spotlight blooms
   behind it, and a mirrored floor-glow pools beneath — reading as a gallery
   object under exhibition lighting rather than a widget in a box. */
.hero__stage {
	position: relative;
	border-radius: var(--radius);
	isolation: isolate;
}
/* The square stage is only needed for the 3D ring; when the plain <img> grid
   fallback stands alone (no-WebGL / pre-activation) the stage sizes to the
   grid so the 4:3 screenshots are never squeezed into portrait cells. */
.hero__stage.is-active { aspect-ratio: 1 / 1; }
.hero__stage::before {
	content: '';
	position: absolute; inset: -18% -12% -8% -12%;
	background: radial-gradient(50% 50% at 50% 42%, var(--spectrum-glow), transparent 70%);
	filter: blur(30px);
	opacity: .8;
	z-index: -1;
	animation: kln-pedestal 8s ease-in-out infinite alternate;
}
.hero__stage::after {
	content: '';
	position: absolute; left: 8%; right: 8%; bottom: -6%; height: 22%;
	background: radial-gradient(60% 100% at 50% 0%, oklch(70% 0.16 280 / .35), transparent 72%);
	filter: blur(14px);
	z-index: -1;
	pointer-events: none;
}
@keyframes kln-pedestal { 0% { opacity: .55; transform: scale(.96); } 100% { opacity: .9; transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .hero__stage::before { animation: none; } }
.hero__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__stage-fallback {
	display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
}
/* 4:3 cells matching the real screenshot ratio → object-fit:cover no longer
   crops (cell aspect == image aspect). Full themes, nothing sliced off. */
.hero__stage-fallback img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); display: block; }
/* Once the 3D ring is live the canvas overlays a square stage; hide the grid. */
.hero__stage.is-active .hero__stage-fallback { position: absolute; inset: 0; display: none; }
.hero__hint { text-align: center; font-family: var(--mono); font-size: .74rem; color: var(--ink-dim); margin-top: 14px; }

/* ==========================================================================
   Sections / headers
   ========================================================================== */

section { padding-block: clamp(72px, 9vw, 140px); }
.section__head { max-width: 62ch; margin-bottom: clamp(40px, 5vw, 64px); }
.section__head.center { max-width: 68ch; margin-inline: auto; text-align: center; }

/* ==========================================================================
   Catalogue — filter pills + product grid + card
   ========================================================================== */

.filter-row { display: flex; flex-wrap: wrap; gap: .6em; margin-bottom: 40px; }
.filter-pill {
	font-size: .85rem; font-weight: 600; padding: .55em 1.2em;
	border-radius: 999px; border: var(--lw) solid var(--line-strong);
	background: var(--surface); color: var(--ink-soft);
	transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.filter-pill:hover { color: var(--ink); border-color: var(--spec-3); }
.filter-pill.is-active { background: var(--spectrum); color: var(--void-deep); border-color: transparent; }

.catalogue-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .catalogue-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .catalogue-grid { grid-template-columns: 1fr; } }

.product-card {
	display: flex; flex-direction: column;
	padding: 14px;
	transition: transform .5s var(--ease-spring), box-shadow .5s var(--ease);
	will-change: transform;
}
/* Each card lights up in its OWN theme's real signature colour on hover
   (--accent, set per-card in template-parts/product-card.php) — the whole
   "every style has a home here" pitch made tactile: hovering the grid is
   like walking a gallery where each piece glows in its own light. */
.product-card:hover { box-shadow: 0 24px 70px -28px var(--accent, var(--spectrum-glow)); }
.product-card.grad-border::before { background: var(--accent, var(--spectrum)); }
.product-card__media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; }
/* Live WebGL hover-distortion canvas (kiln-hover-gl.js) — hops in as a child of
   the hovered card's media, sits over the img but below the accent glow. */
.product-card__media > canvas.kln-distort { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.product-card__media::after {
	content: ''; position: absolute; inset: 0; z-index: 2;
	background: radial-gradient(120% 100% at 50% 100%, var(--accent, transparent), transparent 60%);
	opacity: 0; mix-blend-mode: screen; transition: opacity .5s var(--ease); pointer-events: none;
}
.product-card:hover .product-card__media::after { opacity: .5; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), filter .6s var(--ease); filter: saturate(.9); }
.product-card:hover .product-card__media img { transform: scale(1.06); filter: saturate(1.12); }
.product-card__featured {
	position: absolute; top: 12px; left: 12px;
	font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
	padding: .4em .8em; border-radius: 999px;
	background: var(--void-deep); color: var(--ink); border: var(--lw) solid var(--line-strong);
}
.product-card__body { padding: 18px 8px 8px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.product-card__tagline { color: var(--ink-soft); font-size: .92rem; flex: 1; }
.product-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; }

/* ==========================================================================
   Featured strip
   ========================================================================== */

.featured-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 980px) { .featured-strip { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }

/* Featured = a framed "browser preview" of the theme (wide, top-aligned — the
   screenshot shows in full, no portrait crop) that lights up in the theme's
   own accent on hover. Distinct from the flat catalogue card above it. */
.featured-card {
	position: relative; display: block; padding: 14px; border-radius: var(--radius);
	background: var(--surface);
	backdrop-filter: blur(var(--blur)); -webkit-backdrop-filter: blur(var(--blur));
	border: var(--lw) solid var(--line);
	transition: transform .5s var(--ease-spring), box-shadow .5s var(--ease), border-color .5s var(--ease);
}
.featured-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 28px 80px -30px var(--accent, var(--spectrum-glow));
	border-color: color-mix(in oklch, var(--accent, var(--spec-3)) 55%, transparent);
}
.featured-card__tag { position: absolute; top: 24px; right: 24px; z-index: 2; background: var(--void-deep); }
.featured-frame { border-radius: var(--radius-sm); overflow: hidden; border: var(--lw) solid var(--line-strong); }
.featured-frame__bar { display: flex; align-items: center; padding: 9px 12px; background: var(--void-soft); border-bottom: var(--lw) solid var(--line); }
.featured-frame__dots { display: inline-flex; gap: 5px; }
.featured-frame__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.featured-frame__dots i:nth-child(1) { background: var(--spec-5); }
.featured-frame__dots i:nth-child(2) { background: var(--spec-4); }
.featured-frame__dots i:nth-child(3) { background: var(--spec-3); }
.featured-frame__shot { overflow: hidden; }
/* height:auto lets the full screenshot show at its real ratio — no crop.
   (An explicit height attr on the img would otherwise pin it and defeat this.) */
.featured-frame__shot img { width: 100%; height: auto; display: block; transition: transform .6s var(--ease); }
.featured-card:hover .featured-frame__shot img { transform: scale(1.05); }
.featured-card__body { padding: 16px 8px 6px; display: flex; flex-direction: column; gap: 8px; }
.featured-card__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.featured-card__tagline { color: var(--ink-soft); font-size: .92rem; }

/* ==========================================================================
   Pricing / licensing band
   ========================================================================== */

.pricing-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.pricing-band__panel { padding: clamp(32px, 4vw, 48px); }
.pricing-list { list-style: none; margin: 1.4em 0 0; padding: 0; display: grid; gap: 14px; }
.pricing-list li { display: flex; align-items: center; gap: .8em; color: var(--ink-soft); }
.pricing-list svg { flex-shrink: 0; color: var(--spec-3); }
@media (max-width: 860px) { .pricing-band { grid-template-columns: 1fr; } }

/* ==========================================================================
   FAQ accordion (native <details>)
   ========================================================================== */

.faq-list { display: grid; gap: 12px; max-width: 78ch; }
.faq-item { border: var(--lw) solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq-item summary {
	cursor: pointer; list-style: none; padding: 20px 24px;
	display: flex; align-items: center; justify-content: space-between; gap: 16px;
	font-weight: 700; font-family: var(--display);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { flex-shrink: 0; transition: transform .3s var(--ease); }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item__body { padding: 0 24px 22px; color: var(--ink-soft); }

/* ==========================================================================
   CTA band
   ========================================================================== */

.cta-band {
	position: relative;
	border-radius: var(--radius);
	padding: clamp(48px, 7vw, 96px) clamp(24px, 5vw, 64px);
	text-align: center;
	overflow: hidden;
	background: var(--void-soft);
}
.cta-band::before {
	content: '';
	position: absolute; inset: -40%;
	background: var(--spectrum);
	filter: blur(90px);
	opacity: .35;
}
.cta-band__inner { position: relative; z-index: 1; }
.cta-band .btn { margin-top: 1.6em; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { border-top: var(--lw) solid var(--line); padding-block: 56px 32px; margin-top: 40px; }
.footer__grid { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 32px; }
@media (max-width: 780px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
.footer__col h4 { font-size: 1rem; margin-bottom: 1em; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7em; }
.footer__col a { color: var(--ink-soft); font-size: .92rem; transition: color .2s var(--ease); }
.footer__col a:hover { color: var(--ink); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: var(--lw) solid var(--line); font-size: .85rem; color: var(--ink-dim); flex-wrap: wrap; }

/* ==========================================================================
   Enquiry dialog (native <dialog>)
   ========================================================================== */

dialog.enquiry-dialog {
	width: min(480px, calc(100vw - 40px));
	padding: 0;
	border: var(--lw) solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--surface-solid);
	color: var(--ink);
}
dialog.enquiry-dialog::backdrop { background: oklch(5% 0.01 260 / .7); backdrop-filter: blur(6px); }
.enquiry-dialog__inner { padding: clamp(24px, 4vw, 36px); }
.enquiry-dialog__close { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--void-soft); }
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field textarea {
	background: var(--void-soft); border: var(--lw) solid var(--line-strong); border-radius: var(--radius-sm);
	padding: .8em 1em; color: var(--ink);
}
.field input:focus, .field textarea:focus { border-color: var(--spec-3); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: .88rem; margin-top: 10px; min-height: 1.4em; }
.form-status.is-error { color: var(--spec-5); }
.form-status.is-success { color: var(--spec-3); }

/* ==========================================================================
   Single product page — marketplace-grade detail layout
   ========================================================================== */

.product { padding-block: 40px clamp(64px, 8vw, 120px); }

.breadcrumb { font-family: var(--mono); font-size: .78rem; color: var(--ink-dim); display: flex; flex-wrap: wrap; gap: .6em; align-items: center; }
.breadcrumb a { color: var(--ink-dim); transition: color .2s var(--ease); }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb [aria-current] { color: var(--ink-soft); }

.product-head { margin: 28px 0 clamp(28px, 4vw, 44px); max-width: 60ch; }
.product-head .lede { margin-top: .6em; }

.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(28px, 4vw, 56px); align-items: start; }
.product-main { min-width: 0; display: grid; gap: clamp(40px, 5vw, 64px); }
.product-block h2 { margin-bottom: .8em; }

/* ── Framed live preview — a browser-chrome mock around the screenshot ── */
.preview-frame { margin: 0; border-radius: var(--radius); overflow: hidden; border: var(--lw) solid var(--line-strong); background: var(--surface-solid); box-shadow: 0 30px 80px -40px oklch(0% 0 0 / .8), 0 0 0 1px var(--line) inset; }
.preview-frame__bar { display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: var(--void-soft); border-bottom: var(--lw) solid var(--line); }
.preview-frame__dots { display: inline-flex; gap: 7px; }
.preview-frame__dots i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.preview-frame__dots i:nth-child(1) { background: var(--spec-5); }
.preview-frame__dots i:nth-child(2) { background: var(--spec-4); }
.preview-frame__dots i:nth-child(3) { background: var(--spec-3); }
.preview-frame__url { flex: 1; font-family: var(--mono); font-size: .76rem; color: var(--ink-dim); background: var(--void-deep); border-radius: 999px; padding: .4em 1em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.preview-frame__live { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; color: var(--void-deep); background: var(--spec-3); padding: .35em .7em; border-radius: 999px; }
.preview-frame__shot { position: relative; display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; overflow: hidden; }
.preview-frame__shot img { width: 100%; height: auto; display: block; transition: transform .6s var(--ease); }
.preview-frame__shot:hover img { transform: scale(1.03); }
.preview-frame__cta { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: .4em; font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); background: oklch(8% 0.01 260 / .55); opacity: 0; transition: opacity .35s var(--ease); backdrop-filter: blur(2px); }
.preview-frame__shot:hover .preview-frame__cta, .preview-frame__shot:focus-visible .preview-frame__cta { opacity: 1; }

/* ── Highlights grid ── */
.highlight-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .highlight-grid { grid-template-columns: 1fr; } }
.highlight-grid li { display: flex; gap: .7em; align-items: flex-start; padding: 16px; border: var(--lw) solid var(--line); border-radius: var(--radius-sm); background: var(--surface); }
.highlight-grid svg { flex-shrink: 0; color: var(--accent, var(--spec-3)); margin-top: 1px; }
.highlight-grid span { font-size: .92rem; color: var(--ink-soft); }

/* ── Overview prose ── */
.product-overview { max-width: 72ch; }
.product-overview p { color: var(--ink-soft); }

/* ── What's included ── */
.incl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 62ch; }
.incl-list li { display: flex; gap: .8em; align-items: flex-start; color: var(--ink-soft); }
.incl-list svg { flex-shrink: 0; color: var(--spec-3); margin-top: 2px; }

/* ── Specifications table ── */
.spec-table__wrap { overflow-x: auto; border: var(--lw) solid var(--line); border-radius: var(--radius-sm); }
.spec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec-table th, .spec-table td { text-align: left; padding: 14px 18px; vertical-align: top; }
.spec-table th { font-family: var(--mono); font-weight: 500; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-dim); width: 38%; white-space: nowrap; }
.spec-table td { color: var(--ink-soft); }
.spec-table tr + tr th, .spec-table tr + tr td { border-top: var(--lw) solid var(--line); }

/* ── Changelog / release ── */
.changelog { border: var(--lw) solid var(--line); border-radius: var(--radius-sm); padding: 20px 24px; background: var(--surface); }
.changelog__row { display: flex; gap: 1em; align-items: baseline; }
.changelog__ver { font-family: var(--mono); font-weight: 500; color: var(--accent, var(--spec-3)); flex-shrink: 0; }
.changelog__row span:last-child { color: var(--ink-soft); }
.changelog__note { font-size: .86rem; color: var(--ink-dim); margin: 1em 0 0; }

/* ── Sticky purchase panel ── */
.buy-panel-wrap { position: sticky; top: 92px; }
.buy-panel { padding: clamp(22px, 2.4vw, 30px); }
.buy-panel__price { font-family: var(--mono); font-weight: 500; font-size: 2.4rem; color: var(--ink); display: flex; flex-direction: column; margin-bottom: .7em; }
.buy-panel__price small { font-size: .34em; color: var(--ink-dim); font-weight: 400; letter-spacing: .04em; margin-top: .4em; }
.buy-panel__facts { list-style: none; margin: 1.4em 0 0; padding: 1.4em 0 0; border-top: var(--lw) solid var(--line); display: grid; gap: .8em; }
.buy-panel__facts li { display: flex; align-items: center; justify-content: space-between; gap: 1em; font-size: .88rem; }
.buy-panel__facts span { color: var(--ink-dim); }
.buy-panel__facts strong { color: var(--ink); font-weight: 600; text-align: right; }
.buy-panel__reassure { display: flex; gap: .6em; align-items: flex-start; margin: 1.4em 0 0; padding-top: 1.4em; border-top: var(--lw) solid var(--line); font-size: .8rem; color: var(--ink-dim); }
.buy-panel__reassure svg { flex-shrink: 0; color: var(--spec-3); margin-top: 1px; }

@media (max-width: 900px) {
	.product-layout { grid-template-columns: 1fr; }
	.buy-panel-wrap { position: static; order: -1; }
}

.product-content { max-width: 78ch; margin-top: 64px; }
.product-content h2 { margin-top: 1.6em; }
.related-heading { margin-bottom: 32px; }

/* ==========================================================================
   Archive / taxonomy grid, page, 404
   ========================================================================== */

.archive-head { text-align: center; max-width: 68ch; margin-inline: auto; margin-bottom: 56px; }
.page-content { max-width: 76ch; margin-inline: auto; padding-block: 40px; }
.not-found { text-align: center; padding-block: 100px; }

/* ==========================================================================
   Standard WP content classes (alignment, captions, gallery, sticky)
   ========================================================================== */

.alignleft { float: left; margin: .4em 1.6em 1em 0; }
.alignright { float: right; margin: .4em 0 1em 1.6em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption { max-width: 100%; }
.wp-caption img { display: block; }
.wp-caption-text { font-size: .85rem; color: var(--ink-dim); margin-top: .6em; }
.gallery-caption { font-size: .85rem; color: var(--ink-dim); }
.bypostauthor { }
.sticky { border-left: 2px solid var(--spec-3); padding-left: 1em; }

/* ==========================================================================
   Tilt (JS sets these via inline custom properties)
   ========================================================================== */

.tilt { --rx: 0deg; --ry: 0deg; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform .25s var(--ease); }

/* ==========================================================================
   Reveal-on-scroll (kiln-fx.js toggles .is-visible)
   ========================================================================== */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ==========================================================================
   ═══ EXHIBITION LAYER (v0.2.0) ═══
   The aggregator portal has to read as a design exhibition, not a catalogue.
   Everything below is an always-on atmosphere + orchestrated per-section
   moments, layered in a deliberate hierarchy so it's dense but never noisy:
     · ambient drift + grain  → quiet, barely-there mood (always on)
     · cursor + scroll bar     → subtle "this is a designed site" signals
     · scramble headings       → one-shot reveal per heading (not looping)
     · card accent glow        → on-demand (hover only)
     · marquee ribbon          → one kinetic band, not everywhere
     · hero carousel           → the single loudest showpiece
   ========================================================================== */

/* ── Signature ambient background — a real-time WebGL spectrum aurora
   (assets/js/kiln-bg.js) mounted site-wide. The CSS gradient mesh below it is
   the always-there base wash AND the no-WebGL fallback; the shader canvas
   layers on top of it, and a vignette + a legibility scrim sit above both so
   text stays readable over the richer, brighter backdrop. ── */
.kln-bg-canvas {
	position: fixed; inset: 0;
	width: 100%; height: 100%;
	z-index: -3;
	pointer-events: none;
	opacity: 0;
	/* Desaturated + held back so the cosmos reads as a quiet backdrop and never
	   competes with the foreground content. */
	filter: saturate(0.82);
	transition: opacity 1.2s ease;
}
.kln-bg-on .kln-bg-canvas { opacity: .6; }

/* ── Site-wide cursor glow halo (kiln-cursor-glow.js) — a soft, blurred,
   spectrum-tinted glow that trails the pointer with spring lag. Purely
   additive: the native cursor is never hidden (see the CREDITS-worthy incident
   in kiln-theme memory where a past custom cursor set `cursor:none` and broke
   wp-login — never repeat that here). Desktop fine-pointer only. ── */
.kln-cursor-glow {
	position: fixed; top: 0; left: 0;
	width: 620px; height: 620px;
	margin: -310px 0 0 -310px;
	border-radius: 50%;
	z-index: 2;
	pointer-events: none;
	opacity: 0;
	background: radial-gradient(circle,
		rgba(var(--glow-rgb, 139,60,232), .34) 0%,
		rgba(var(--glow-rgb, 139,60,232), .16) 32%,
		rgba(var(--glow-rgb, 139,60,232), .05) 58%,
		transparent 72%);
	filter: blur(18px);
	mix-blend-mode: screen;
	scale: var(--glow-scale, 1);
	transition: opacity .6s ease;
	will-change: transform;
}
.kln-cursor-glow.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce), (hover: none), (pointer: coarse) {
	.kln-cursor-glow { display: none; }
}

/* ── Floating word constellation (front-page.php hero) — theme names + style
   tags drifting over the starfield; hover highlights, click navigates. The
   field itself is click-through; only the words capture pointer events. ── */
.kln-wordfield { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }
/* Constellation line canvas (kiln-constellation.js) — sits behind the word
   tags and draws the connecting network + cursor links. */
.kln-wordfield > canvas.kln-wordlines { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.kln-word {
	position: absolute;
	z-index: 2;
	font-family: var(--mono);
	font-size: var(--size, 1rem);
	font-weight: 500;
	letter-spacing: .02em;
	color: var(--ink-soft);
	opacity: var(--op, .4);
	white-space: nowrap;
	text-decoration: none;
	pointer-events: auto;
	/* Framed node tag — bordered pill so each word reads as a network node. */
	padding: .3em .72em;
	border: 1px solid oklch(72% 0.03 280 / .30);
	border-radius: 999px;
	background: oklch(16% 0.03 280 / .42);
	translate: 0 0;
	transition: color .3s var(--ease), opacity .3s var(--ease), scale .3s var(--ease-spring),
		text-shadow .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease), box-shadow .3s var(--ease);
	animation: kln-word-drift var(--dur, 20s) ease-in-out var(--delay, 0s) infinite alternate;
	will-change: translate;
}
@keyframes kln-word-drift { to { translate: var(--dx, 0px) var(--dy, 0px); } }
/* Lit when the cursor passes near (driven by the constellation script). */
.kln-word.is-near {
	color: var(--ink);
	opacity: .92;
	border-color: oklch(70% 0.16 285 / .6);
	background: oklch(24% 0.07 285 / .5);
}
.kln-word:hover, .kln-word:focus-visible {
	color: var(--ink);
	opacity: 1;
	scale: 1.22;
	border-color: var(--spec-2, oklch(66% 0.2 285));
	background: oklch(28% 0.09 285 / .6);
	text-shadow: 0 0 24px var(--spec-2), 0 0 9px oklch(62% 0.2 285 / .85);
	box-shadow: 0 0 22px oklch(62% 0.2 285 / .45);
	z-index: 6;
	outline: none;
}
@media (prefers-reduced-motion: reduce) { .kln-word { animation: none; } }
/* The hero is too cramped on phones for a scattered word cloud — keep the
   clean starfield there and drop the words. */
@media (max-width: 760px) { .kln-wordfield { display: none; } }

.kln-ambient {
	position: fixed; inset: -25%;
	z-index: -4;
	pointer-events: none;
	background:
		radial-gradient(32% 42% at 16% 22%, oklch(58% 0.24 300 / .22), transparent 70%),
		radial-gradient(38% 40% at 84% 14%, oklch(58% 0.22 260 / .20), transparent 70%),
		radial-gradient(44% 46% at 78% 82%, oklch(74% 0.14 195 / .16), transparent 70%),
		radial-gradient(34% 40% at 22% 84%, oklch(80% 0.15 80 / .14), transparent 70%),
		radial-gradient(30% 34% at 52% 50%, oklch(68% 0.22 22 / .13), transparent 70%);
	animation: kln-drift 42s ease-in-out infinite alternate;
}
@keyframes kln-drift {
	0%   { transform: scale(1) rotate(0deg) translate3d(0,0,0); }
	100% { transform: scale(1.22) rotate(9deg) translate3d(2%, -2%, 0); }
}
/* Vignette + a soft central scrim keep body text legible over the aurora
   without flattening the drama at the edges. */
.kln-ambient__vignette {
	position: fixed; inset: 0; z-index: -2; pointer-events: none;
	background:
		radial-gradient(160% 140% at 50% 45%, transparent 62%, oklch(7% 0.005 260 / .34) 100%),
		linear-gradient(oklch(7% 0.005 260 / .1), oklch(7% 0.005 260 / .1));
}
@media (prefers-reduced-motion: reduce) { .kln-ambient { animation: none; } }

/* ── Film grain — static turbulence, softly blended, dead cheap. Gives the
   whole surface a cinematic, printed-plate texture. ── */
.kln-grain {
	position: fixed; inset: 0; z-index: 400; pointer-events: none;
	opacity: .05; mix-blend-mode: overlay;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
	background-size: 220px 220px;
}
@media (prefers-reduced-motion: reduce) { .kln-grain { opacity: .035; } }

/* ── Spectrum scroll-progress bar ── */
.kln-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 600;
	transform: scaleX(0); transform-origin: 0 50%;
	background: var(--spectrum);
	box-shadow: 0 0 12px var(--spectrum-glow);
	pointer-events: none;
	will-change: transform;
}

/* ── Scramble text — occupies its final width while decoding so nothing
   reflows; the glyphs settle left-to-right into the real string. ── */
[data-scramble] { --scramble-tint: var(--spec-3); }
/* Words are atomic inline-blocks (never break mid-word while decoding);
   individual chars stay plain inline so no extra break opportunities appear. */
[data-scramble] .kln-scramble-word { display: inline-block; white-space: nowrap; }
[data-scramble] .kln-scramble-char { display: inline; }
[data-scramble] .kln-scramble-char.is-scrambling { color: var(--scramble-tint); }

/* ── Velocity marquee ribbon — a kinetic band of theme names in huge outline
   type between sections, skewed live by scroll velocity for real momentum. ── */
.kln-ribbon {
	padding-block: clamp(28px, 5vw, 56px);
	overflow: hidden;
	border-block: var(--lw) solid var(--line);
	position: relative;
	--skew: 0deg;
}
.kln-ribbon__track {
	display: flex; gap: 3rem; width: max-content;
	animation: kln-marquee 32s linear infinite;
	transform: skewX(var(--skew));
	transition: transform .3s var(--ease);
	will-change: transform;
}
.kln-ribbon--rev .kln-ribbon__track { animation-duration: 40s; animation-direction: reverse; }
.kln-ribbon__item {
	font-family: var(--display); font-weight: 800;
	font-size: clamp(2.4rem, 7vw, 5.5rem);
	letter-spacing: -0.03em; line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1.2px var(--line-strong);
	display: inline-flex; align-items: center; gap: 3rem;
	white-space: nowrap;
	transition: color .4s var(--ease), -webkit-text-stroke-color .4s var(--ease);
}
.kln-ribbon__item::after { content: '✦'; -webkit-text-stroke: 0; color: var(--spec-1); font-size: .4em; }
.kln-ribbon:hover .kln-ribbon__item { color: var(--ink); -webkit-text-stroke-color: transparent; }
@keyframes kln-marquee { to { transform: translateX(-50%) skewX(var(--skew)); } }
@media (prefers-reduced-motion: reduce) {
	.kln-ribbon__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
}

/* ── Manifesto wall — the closing exhibition statement ── */
.manifesto { position: relative; text-align: center; overflow: hidden; }
.manifesto::before {
	content: '';
	position: absolute; left: 50%; top: 50%; width: 80%; height: 130%;
	transform: translate(-50%, -50%);
	background: radial-gradient(45% 45% at 50% 50%, var(--spectrum-glow), transparent 70%);
	filter: blur(70px);
	opacity: .5;
	pointer-events: none;
}
/* NB: max-width here must NOT use `ch` — `ch` resolves against this element's
   own (body-sized) font, not the huge title's, which collapsed it to a sliver. */
.manifesto__inner { position: relative; z-index: 1; max-width: min(880px, 92vw); margin-inline: auto; }
.manifesto__title {
	font-size: clamp(2.4rem, 6.5vw, 5rem);
	line-height: 1.04; letter-spacing: -0.03em; font-weight: 800;
	text-wrap: balance;
}
.manifesto__title em { font-style: normal; background: var(--spectrum); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: kln-hue 8s linear infinite; }
@keyframes kln-hue { to { background-position: 200% 0; } }
@media (prefers-reduced-motion: reduce) { .manifesto__title em { animation: none; } }
.manifesto__sub { max-width: 46ch; margin: 1.4em auto 0; color: var(--ink-soft); }
.manifesto__actions { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 2.4em; }
