/*
Theme Name: Jaap de Wit — Musicus
Theme URI: https://jaapdewitmusicus.nl/
Author: Jaap de Wit
Description: Bespoke WordPress theme for Jaap de Wit — componist, organist en klavecinist. Klassiek-typografisch ontwerp in perkament en brons, met volledige WooCommerce-ondersteuning voor de bladmuziekwinkel. Werkt samen met de plugin "Jaap de Wit — Companion" voor nieuwsberichten, jaartallen en productvelden.
Version: 1.1.0
Requires at least: 6.3
Tested up to: 6.8
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: jaap-de-wit
Tags: custom-colors, custom-logo, custom-menu, featured-images, translation-ready, e-commerce, two-columns, right-sidebar, block-styles, wide-blocks
WC requires at least: 8.0
WC tested up to: 9.9
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
	/* Palette — straight from the design */
	--jdw-bg: #f4eee1;
	--jdw-bg-alpha: rgba(244, 238, 225, 0.94);
	--jdw-surface: #faf5e9;
	--jdw-ink: #241e15;
	--jdw-ink-soft: #3a342a;
	--jdw-muted: #544c3d;
	--jdw-faint: #8b8272;
	--jdw-accent: #8a6428;
	--jdw-accent-light: #c9a45c;
	--jdw-selection: #e7dbbc;
	--jdw-danger: #7a2f22;
	--jdw-success: #4a5f3a;

	/* Rules & borders, all derived from the ink */
	--jdw-rule: rgba(36, 30, 21, 0.25);
	--jdw-rule-soft: rgba(36, 30, 21, 0.14);
	--jdw-border: rgba(36, 30, 21, 0.16);
	--jdw-border-strong: rgba(36, 30, 21, 0.28);
	--jdw-accent-rule: rgba(138, 100, 40, 0.5);

	/* On the dark band */
	--jdw-on-dark: #f4eee1;
	--jdw-on-dark-muted: #cfc6b2;

	/* Type */
	--jdw-font-body: "EB Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--jdw-font-display: "Cormorant Garamond", "EB Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;

	/* Fluid type scale — desktop values match the design 1:1 */
	--jdw-fs-eyebrow: 13px;
	--jdw-fs-eyebrow-sm: 12px;
	--jdw-fs-h1-hero: clamp(2.375rem, 1.4rem + 4.2vw, 4.125rem); /* 38 → 66px */
	--jdw-fs-h1-page: clamp(2.125rem, 1.45rem + 2.9vw, 3.375rem); /* 34 → 54px */
	--jdw-fs-h2: clamp(1.75rem, 1.3rem + 1.9vw, 2.625rem); /* 28 → 42px */
	--jdw-fs-h2-sm: clamp(1.6875rem, 1.35rem + 1.5vw, 2.5rem); /* 27 → 40px */
	--jdw-fs-h3: clamp(1.375rem, 1.2rem + 0.75vw, 1.6875rem); /* 22 → 27px */
	--jdw-fs-card-title: clamp(1.3125rem, 1.2rem + 0.5vw, 1.5rem); /* 21 → 24px */
	--jdw-fs-lead: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem); /* 17 → 20px */
	--jdw-fs-body-lg: clamp(1.0625rem, 1rem + 0.2vw, 1.1875rem); /* 17 → 19px */
	--jdw-fs-body: clamp(1rem, 0.97rem + 0.15vw, 1.125rem); /* 16 → 18px */
	--jdw-fs-sm: 1rem; /* 16px */
	--jdw-fs-xs: 0.9375rem; /* 15px */
	--jdw-fs-2xs: 0.875rem; /* 14px */

	/* Layout */
	--jdw-gutter: clamp(20px, 5.2vw, 72px);
	--jdw-max: 1320px;
	--jdw-max-narrow: 1176px;
	--jdw-max-prose: 74ch;
	--jdw-section-y: clamp(56px, 7vw, 96px);
	--jdw-header-h: 74px;

	/* Motion */
	--jdw-ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. Reset & base
   ========================================================================== */

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--jdw-header-h) + 16px);
}

body {
	margin: 0;
	padding: 0;
	background: var(--jdw-bg);
	color: var(--jdw-ink);
	font-family: var(--jdw-font-body);
	font-size: var(--jdw-fs-body);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

::selection {
	background: var(--jdw-selection);
	color: var(--jdw-ink);
}

img,
svg,
video,
canvas,
iframe,
embed,
object {
	max-width: 100%;
}

img,
svg,
video {
	height: auto;
	display: block;
}

figure {
	margin: 0;
}

a {
	color: var(--jdw-accent);
	text-decoration: none;
	transition: color 0.16s var(--jdw-ease);
}

a:hover,
a:focus {
	color: var(--jdw-ink);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--jdw-accent);
	outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--jdw-font-display);
	font-weight: 500;
	line-height: 1.15;
	margin: 0 0 0.5em;
	text-wrap: pretty;
	color: var(--jdw-ink);
}

h1 {
	font-size: var(--jdw-fs-h1-page);
	line-height: 1.08;
}

h2 {
	font-size: var(--jdw-fs-h2);
}

h3 {
	font-size: var(--jdw-fs-h3);
}

h4 {
	font-size: 1.375rem;
}

h5,
h6 {
	font-size: 1.125rem;
	font-family: var(--jdw-font-body);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

p {
	margin: 0 0 1.1em;
	text-wrap: pretty;
}

p:last-child {
	margin-bottom: 0;
}

ul,
ol {
	margin: 0 0 1.2em;
	padding-left: 1.35em;
}

li {
	margin-bottom: 0.35em;
}

hr {
	border: 0;
	border-top: 1px solid var(--jdw-rule);
	margin: 2.5rem 0;
}

blockquote {
	margin: 0 0 2rem;
	padding: clamp(18px, 3vw, 26px) clamp(20px, 3.5vw, 32px);
	border-left: 2px solid var(--jdw-accent);
	background: var(--jdw-surface);
	font-family: var(--jdw-font-display);
	font-style: italic;
	font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
	line-height: 1.4;
	color: var(--jdw-ink);
}

blockquote p:last-child {
	margin-bottom: 0;
}

blockquote cite {
	display: block;
	margin-top: 0.7em;
	font-family: var(--jdw-font-body);
	font-style: normal;
	font-size: var(--jdw-fs-2xs);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--jdw-accent);
}

code,
kbd,
pre,
samp {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
	font-size: 0.9em;
}

code {
	background: var(--jdw-surface);
	border: 1px solid var(--jdw-border);
	padding: 0.1em 0.35em;
}

pre {
	background: var(--jdw-surface);
	border: 1px solid var(--jdw-border);
	padding: 1.25rem;
	overflow-x: auto;
	line-height: 1.5;
}

pre code {
	background: none;
	border: 0;
	padding: 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.6rem;
	font-size: var(--jdw-fs-sm);
}

th,
td {
	text-align: left;
	padding: 0.7em 0.9em;
	border-bottom: 1px solid var(--jdw-rule-soft);
}

th {
	font-family: var(--jdw-font-body);
	font-weight: 400;
	font-size: var(--jdw-fs-eyebrow-sm);
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--jdw-accent);
	border-bottom-color: var(--jdw-rule);
}

/* ==========================================================================
   3. Utilities & primitives
   ========================================================================== */

.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--jdw-surface);
	clip-path: none;
	color: var(--jdw-ink);
	display: block;
	font-size: 0.875rem;
	height: auto;
	left: 12px;
	line-height: normal;
	padding: 14px 22px;
	text-decoration: none;
	top: 12px;
	width: auto;
	z-index: 100000;
	border: 1px solid var(--jdw-ink);
}

.jdw-shell {
	width: 100%;
	max-width: var(--jdw-max);
	margin-inline: auto;
	padding-inline: var(--jdw-gutter);
}

.jdw-shell--narrow {
	max-width: calc(var(--jdw-max-narrow) + var(--jdw-gutter) * 2);
}

.jdw-eyebrow {
	display: block;
	font-family: var(--jdw-font-body);
	font-size: var(--jdw-fs-eyebrow);
	font-weight: 400;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--jdw-accent);
	line-height: 1.4;
}

.jdw-eyebrow--sm {
	font-size: var(--jdw-fs-eyebrow-sm);
	letter-spacing: 0.22em;
}

/* Rule + eyebrow (+ optional italic gloss) that opens most sections */
.jdw-section-head {
	display: flex;
	align-items: baseline;
	gap: clamp(12px, 2vw, 24px);
	flex-wrap: wrap;
	border-top: 1px solid var(--jdw-rule);
	padding-top: 22px;
	margin-bottom: 44px;
}

.jdw-section-head--tight {
	margin-bottom: 8px;
}

.jdw-section-head__gloss {
	font-family: var(--jdw-font-display);
	font-style: italic;
	font-size: 1.375rem;
	color: var(--jdw-muted);
}

/* Buttons -------------------------------------------------------------- */

.jdw-btn,
.jdw-prose .wp-block-button__link,
button.jdw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--jdw-ink);
	color: var(--jdw-bg);
	border: 1px solid var(--jdw-ink);
	border-radius: 0;
	cursor: pointer;
	padding: 16px 32px;
	font-family: var(--jdw-font-body);
	font-size: var(--jdw-fs-2xs);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.18s var(--jdw-ease), border-color 0.18s var(--jdw-ease), color 0.18s var(--jdw-ease);
}

.jdw-btn:hover,
.jdw-btn:focus,
.jdw-prose .wp-block-button__link:hover {
	background: var(--jdw-accent);
	border-color: var(--jdw-accent);
	color: var(--jdw-bg);
}

.jdw-btn--sm {
	padding: 11px 18px;
	font-size: var(--jdw-fs-eyebrow-sm);
	letter-spacing: 0.16em;
}

.jdw-btn--md {
	padding: 9px 18px;
	font-size: 13px;
	letter-spacing: 0.16em;
}

.jdw-btn--accent {
	background: var(--jdw-accent);
	border-color: var(--jdw-accent);
}

.jdw-btn--accent:hover,
.jdw-btn--accent:focus {
	background: var(--jdw-ink);
	border-color: var(--jdw-ink);
}

.jdw-btn--ghost {
	background: transparent;
	color: var(--jdw-ink);
	border-color: var(--jdw-border-strong);
}

.jdw-btn--ghost:hover,
.jdw-btn--ghost:focus {
	background: var(--jdw-ink);
	border-color: var(--jdw-ink);
	color: var(--jdw-bg);
}

/* Outline button used on the dark bundle band */
.jdw-btn--outline-light {
	background: none;
	color: var(--jdw-on-dark);
	border: 1px solid var(--jdw-accent-light);
}

.jdw-btn--outline-light:hover,
.jdw-btn--outline-light:focus {
	background: var(--jdw-accent-light);
	border-color: var(--jdw-accent-light);
	color: var(--jdw-ink);
}

/* The italic text link with a hairline underline */
.jdw-link-italic {
	display: inline-block;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--jdw-accent-rule);
	cursor: pointer;
	padding: 0;
	font-family: var(--jdw-font-body);
	font-size: var(--jdw-fs-sm);
	font-style: italic;
	color: var(--jdw-accent);
	transition: color 0.16s var(--jdw-ease), border-color 0.16s var(--jdw-ease);
}

.jdw-link-italic:hover,
.jdw-link-italic:focus {
	color: var(--jdw-ink);
	border-bottom-color: var(--jdw-ink);
}

/* Static, non-interactive chip — "Uitverkocht" in the card footer */
.jdw-chip {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--jdw-border-strong);
	color: var(--jdw-faint);
	padding: 11px 18px;
	font-size: var(--jdw-fs-eyebrow-sm);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.1;
	flex: none;
}

/* Corner badge on a cover — "Uitverkocht" / "Aanbieding" */
.jdw-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	background: var(--jdw-danger);
	color: var(--jdw-bg);
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	padding: 6px 10px;
	pointer-events: none;
	margin: 0;
	line-height: 1.2;
}

.jdw-badge--accent {
	background: var(--jdw-accent);
}

/* Framed image — the offset brass rule behind the hero photo */
.jdw-frame {
	position: relative;
	min-width: 0;
	height: 100%;
	margin: 0;
}

.jdw-frame::before {
	content: "";
	position: absolute;
	inset: 22px -22px -22px 22px;
	border: 1px solid var(--jdw-accent);
	pointer-events: none;
}

.jdw-frame--plain::before {
	content: none;
}

.jdw-frame__inner,
.jdw-media {
	display: block;
	position: relative;
	overflow: hidden;
	height: 100%;
	background: var(--jdw-surface);
}

.jdw-frame__inner > img,
.jdw-media > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

/* A landscape image in a 3:4 cover frame is shown whole instead of cropped. */
.jdw-media--contain {
	border: 1px solid var(--jdw-rule-soft);
}

.jdw-media.jdw-media--contain > img {
	object-fit: contain;
	padding: 8%;
}

/* Image placeholder — mirrors <image-slot> in the design when no image is set */
.jdw-media--empty {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--jdw-surface);
	border: 1px dashed var(--jdw-border-strong);
	color: var(--jdw-faint);
	font-style: italic;
	font-size: var(--jdw-fs-xs);
	line-height: 1.4;
	text-align: center;
	padding: 18px;
	min-height: 120px;
	box-sizing: border-box;
}

.jdw-caption {
	font-size: var(--jdw-fs-2xs);
	font-style: italic;
	color: var(--jdw-faint);
	margin-top: 14px;
}

/* ==========================================================================
   4. Site frame — header & footer
   ========================================================================== */

.jdw-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.jdw-rule-top {
	border-top: 5px solid var(--jdw-ink);
}

.jdw-header {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
	row-gap: 12px;
	padding: 18px var(--jdw-gutter);
	background: var(--jdw-bg-alpha);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(36, 30, 21, 0.18);
}

.admin-bar .jdw-header {
	top: 32px;
}

/* Brand ---------------------------------------------------------------- */

.jdw-brand {
	display: flex;
	align-items: baseline;
	gap: 12px;
	background: none;
	border: none;
	padding: 0;
	color: var(--jdw-ink);
	text-decoration: none;
	flex: none;
}

.jdw-brand:hover .jdw-brand__name,
.jdw-brand:focus .jdw-brand__name {
	color: var(--jdw-accent);
}

.jdw-brand__name {
	font-family: var(--jdw-font-display);
	font-style: italic;
	font-size: clamp(1.375rem, 1.15rem + 0.6vw, 1.6875rem);
	font-weight: 500;
	line-height: 1.1;
	color: var(--jdw-ink);
	transition: color 0.16s var(--jdw-ease);
	white-space: nowrap;
}

.jdw-brand__kicker {
	font-size: var(--jdw-fs-eyebrow-sm);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--jdw-accent);
	white-space: nowrap;
}

.jdw-brand__logo img {
	max-height: 52px;
	width: auto;
}

/* Navigation ----------------------------------------------------------- */

/*
 * Brand and nav never shrink, so they can never overlap. When they do not fit
 * side by side, navigation.js switches the header to its compact form (below);
 * without the script the nav simply wraps onto a second row.
 */
.jdw-header__nav {
	display: flex;
	align-items: center;
	gap: clamp(18px, 2.4vw, 34px);
	flex: none;
	margin-left: auto;
}

.jdw-nav ul {
	display: flex;
	align-items: center;
	gap: clamp(18px, 2.4vw, 34px);
	list-style: none;
	margin: 0;
	padding: 0;
}

.jdw-nav li {
	margin: 0;
	position: relative;
}

.jdw-nav a {
	display: inline-block;
	font-family: var(--jdw-font-body);
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--jdw-ink);
	border-bottom: 1px solid transparent;
	padding-bottom: 2px;
	white-space: nowrap;
	transition: color 0.16s var(--jdw-ease), border-color 0.16s var(--jdw-ease);
}

.jdw-nav a:hover,
.jdw-nav a:focus {
	color: var(--jdw-accent);
}

.jdw-nav .current-menu-item > a,
.jdw-nav .current_page_item > a,
.jdw-nav .current-menu-ancestor > a,
.jdw-nav .current-product-ancestor > a,
.jdw-nav [aria-current="page"] {
	color: var(--jdw-accent);
	border-bottom-color: var(--jdw-accent);
}

/* Sub-menus */
.jdw-nav .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	display: block;
	min-width: 220px;
	margin-top: 12px;
	padding: 14px 20px;
	background: var(--jdw-surface);
	border: 1px solid var(--jdw-border);
	box-shadow: 0 16px 36px rgba(36, 30, 21, 0.14);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.18s var(--jdw-ease), transform 0.18s var(--jdw-ease), visibility 0.18s;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	z-index: 5;
}

.jdw-nav li:hover > .sub-menu,
.jdw-nav li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: none;
}

/* Cart button ---------------------------------------------------------- */

.jdw-cart-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.jdw-cart-link__count {
	font-feature-settings: "tnum";
	font-variant-numeric: tabular-nums;
}

/* Mobile toggle -------------------------------------------------------- */

.jdw-nav-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	background: none;
	border: 1px solid var(--jdw-border-strong);
	cursor: pointer;
	padding: 9px 14px;
	font-family: var(--jdw-font-body);
	font-size: 12px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--jdw-ink);
}

.jdw-nav-toggle__bars {
	position: relative;
	display: block;
	width: 18px;
	height: 1px;
	background: currentColor;
}

.jdw-nav-toggle__bars::before,
.jdw-nav-toggle__bars::after {
	content: "";
	position: absolute;
	left: 0;
	width: 18px;
	height: 1px;
	background: currentColor;
	transition: transform 0.2s var(--jdw-ease);
}

.jdw-nav-toggle__bars::before {
	top: -5px;
}

.jdw-nav-toggle__bars::after {
	top: 5px;
}

.jdw-nav-toggle[aria-expanded="true"] .jdw-nav-toggle__bars {
	background: transparent;
}

.jdw-nav-toggle[aria-expanded="true"] .jdw-nav-toggle__bars::before {
	transform: translateY(5px) rotate(45deg);
}

.jdw-nav-toggle[aria-expanded="true"] .jdw-nav-toggle__bars::after {
	transform: translateY(-5px) rotate(-45deg);
}

/* Compact header ------------------------------------------------------- */

/*
 * navigation.js adds .is-compact below 961px and whenever the brand and the
 * full nav do not fit on one row. This media query only covers the first paint
 * on small screens, before the script has run.
 */
@media (max-width: 960px) {
	.jdw-nav-toggle {
		display: inline-flex;
	}

	.jdw-header__nav {
		display: none;
	}
}

.jdw-header.is-compact {
	row-gap: 0;
}

.jdw-header.is-compact .jdw-brand {
	flex: 0 1 auto;
	min-width: 0;
}

.jdw-header.is-compact .jdw-brand__name {
	white-space: normal;
}

.jdw-header.is-compact .jdw-nav-toggle {
	display: inline-flex;
}

.jdw-header.is-compact .jdw-header__nav {
	display: none;
	order: 3;
	width: 100%;
	margin-left: 0;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	padding: 8px 0 16px;
	border-top: 1px solid var(--jdw-rule-soft);
	margin-top: 14px;
}

.jdw-header.is-compact .jdw-header__nav.is-open {
	display: flex;
}

.jdw-header.is-compact .jdw-nav ul {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.jdw-header.is-compact .jdw-nav li {
	border-bottom: 1px solid var(--jdw-rule-soft);
}

.jdw-header.is-compact .jdw-nav a {
	display: block;
	padding: 15px 0;
	border-bottom: 0;
	white-space: normal;
}

.jdw-header.is-compact .jdw-nav .current-menu-item > a,
.jdw-header.is-compact .jdw-nav .current_page_item > a,
.jdw-header.is-compact .jdw-nav [aria-current="page"] {
	border-bottom: 0;
}

.jdw-header.is-compact .jdw-nav .sub-menu {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	border: 0;
	background: none;
	margin: 0 0 10px;
	padding: 0 0 0 18px;
	min-width: 0;
}

.jdw-header.is-compact .jdw-cart-link {
	align-self: flex-start;
	margin-top: 14px;
}

/* Footer --------------------------------------------------------------- */

.jdw-footer {
	border-top: 1px solid var(--jdw-rule);
	margin-top: 24px;
	padding: 56px var(--jdw-gutter) 40px;
}

.jdw-footer__grid {
	max-width: var(--jdw-max-narrow);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.2fr 0.8fr 0.8fr;
	gap: 48px;
	align-items: start;
}

.jdw-footer__brand {
	font-family: var(--jdw-font-display);
	font-style: italic;
	font-size: 1.625rem;
	line-height: 1.2;
	margin-bottom: 10px;
}

.jdw-footer__tagline {
	font-size: var(--jdw-fs-sm);
	line-height: 1.6;
	color: var(--jdw-muted);
	margin: 0;
	max-width: 40ch;
}

.jdw-footer__heading {
	font-family: var(--jdw-font-body);
	font-size: var(--jdw-fs-eyebrow-sm);
	font-weight: 400;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--jdw-accent);
	margin: 0 0 14px;
}

.jdw-footer__nav ul {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: flex-start;
	list-style: none;
	margin: 0;
	padding: 0;
}

.jdw-footer__nav li {
	margin: 0;
}

.jdw-footer__nav a {
	font-size: var(--jdw-fs-sm);
	color: var(--jdw-ink);
}

.jdw-footer__nav a:hover,
.jdw-footer__nav a:focus {
	color: var(--jdw-accent);
}

.jdw-footer__contact {
	font-size: var(--jdw-fs-sm);
	line-height: 1.7;
	color: var(--jdw-muted);
}

.jdw-footer__contact a {
	color: var(--jdw-accent);
}

.jdw-footer__bottom {
	max-width: var(--jdw-max-narrow);
	margin: 40px auto 0;
	border-top: 1px solid var(--jdw-rule-soft);
	padding-top: 18px;
	font-size: var(--jdw-fs-2xs);
	color: var(--jdw-faint);
	display: flex;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.jdw-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 22px;
}

/* ==========================================================================
   5. Main & shared section rhythm
   ========================================================================== */

.jdw-main {
	flex: 1 0 auto;
	animation: jdw-fade-up 0.5s var(--jdw-ease) both;
}

@keyframes jdw-fade-up {
	from {
		opacity: 0;
		transform: translateY(14px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

.jdw-section {
	padding-block: var(--jdw-section-y);
}

.jdw-section--flush-top {
	padding-top: 0;
}

.jdw-section--flush-bottom {
	padding-bottom: 0;
}

/* Page header used by shop, bio, archives, single posts */
.jdw-page-head {
	padding-top: var(--jdw-section-y);
}

.jdw-page-head__eyebrow {
	margin-bottom: 18px;
}

.jdw-page-head__title {
	font-size: var(--jdw-fs-h1-page);
	line-height: 1.08;
	margin: 0 0 18px;
}

.jdw-page-head__intro {
	font-size: var(--jdw-fs-body-lg);
	line-height: 1.6;
	color: var(--jdw-muted);
	margin: 0;
	max-width: 62ch;
}

/* ==========================================================================
   6. Homepage
   ========================================================================== */

/* Hero ----------------------------------------------------------------- */

.jdw-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
	gap: clamp(40px, 5.5vw, 80px);
	align-items: center;
	padding-block: clamp(48px, 6.5vw, 88px) var(--jdw-section-y);
}

.jdw-hero__eyebrow {
	margin-bottom: 26px;
}

.jdw-hero__title {
	font-size: var(--jdw-fs-h1-hero);
	line-height: 1.06;
	margin: 0 0 28px;
}

.jdw-hero__text {
	font-size: var(--jdw-fs-lead);
	line-height: 1.6;
	color: var(--jdw-muted);
	margin: 0 0 40px;
	max-width: 52ch;
}

.jdw-hero__actions {
	display: flex;
	align-items: center;
	gap: clamp(18px, 2.4vw, 28px);
	flex-wrap: wrap;
}

.jdw-hero__media {
	height: clamp(340px, 42vw, 540px);
}

/* Series cards --------------------------------------------------------- */

.jdw-series {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}

.jdw-series__card {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	background: var(--jdw-surface);
	border: 1px solid var(--jdw-border);
	padding: 26px 26px 30px;
	color: var(--jdw-ink);
	text-decoration: none;
	transition: transform 0.18s var(--jdw-ease), box-shadow 0.18s var(--jdw-ease);
	height: 100%;
}

.jdw-series__card:hover,
.jdw-series__card:focus {
	transform: translateY(-3px);
	box-shadow: 0 14px 30px rgba(36, 30, 21, 0.12);
	color: var(--jdw-ink);
}

.jdw-series__media {
	width: 120px;
	height: 160px;
	margin-bottom: 22px;
	overflow: hidden;
	flex: none;
}

/* The card is one <a>, so its inner spans need to behave like blocks. */
.jdw-series__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
}

.jdw-series__tag {
	margin-bottom: 10px;
}

.jdw-series__title {
	display: block;
	font-family: var(--jdw-font-display);
	font-size: var(--jdw-fs-h3);
	font-weight: 500;
	line-height: 1.15;
	margin: 0 0 12px;
	text-wrap: pretty;
}

.jdw-series__desc {
	display: block;
	font-size: var(--jdw-fs-sm);
	line-height: 1.55;
	color: var(--jdw-muted);
	margin: 0 0 18px;
	text-wrap: pretty;
}

.jdw-series__more {
	display: block;
	margin-top: auto;
	font-style: italic;
	font-size: var(--jdw-fs-sm);
	color: var(--jdw-accent);
}

/* Bundle band ---------------------------------------------------------- */

.jdw-band {
	background: var(--jdw-ink);
	color: var(--jdw-on-dark);
	padding: clamp(48px, 6vw, 72px) var(--jdw-gutter);
}

.jdw-band__grid {
	max-width: var(--jdw-max-narrow);
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: clamp(32px, 4.5vw, 64px);
	align-items: center;
}

.jdw-band .jdw-eyebrow {
	color: var(--jdw-accent-light);
	margin-bottom: 18px;
}

.jdw-band__title {
	font-size: var(--jdw-fs-h2);
	line-height: 1.15;
	margin: 0 0 18px;
	color: var(--jdw-on-dark);
}

.jdw-band__text {
	font-size: var(--jdw-fs-body);
	line-height: 1.6;
	color: var(--jdw-on-dark-muted);
	margin: 0;
	max-width: 56ch;
}

.jdw-band__action {
	justify-self: end;
}

/* About block ---------------------------------------------------------- */

.jdw-about {
	display: grid;
	grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
	gap: clamp(40px, 5.5vw, 80px);
	align-items: center;
	padding-block: var(--jdw-section-y);
}

.jdw-about__media {
	height: clamp(300px, 34vw, 420px);
}

.jdw-about__eyebrow {
	margin-bottom: 22px;
}

.jdw-about__title {
	font-size: var(--jdw-fs-h2-sm);
	line-height: 1.15;
	margin: 0 0 22px;
}

.jdw-about__text {
	font-size: var(--jdw-fs-body);
	line-height: 1.65;
	color: var(--jdw-muted);
	margin: 0 0 30px;
}

.jdw-about__text p {
	margin-bottom: 0.8em;
}

/* News list ------------------------------------------------------------ */

.jdw-news__item {
	display: flex;
	align-items: baseline;
	gap: 20px;
	padding: 20px 0;
	border-bottom: 1px solid var(--jdw-rule-soft);
	flex-wrap: wrap;
}

.jdw-news__date {
	font-style: italic;
	color: var(--jdw-accent);
	font-size: var(--jdw-fs-xs);
	width: 110px;
	flex: none;
}

.jdw-news__body {
	font-size: var(--jdw-fs-body);
	flex: 1 1 260px;
	min-width: 0;
}

.jdw-news__body p {
	margin: 0;
}

.jdw-news__body p + p {
	margin-top: 0.5em;
}

.jdw-news__body a {
	color: var(--jdw-ink);
	border-bottom: 1px solid var(--jdw-accent-rule);
}

.jdw-news__body a:hover {
	color: var(--jdw-accent);
}

/* ==========================================================================
   7. Biografie template
   ========================================================================== */

.jdw-bio__title {
	max-width: 20ch;
	margin: 0 0 clamp(32px, 5vw, 56px);
}

.jdw-bio__grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	gap: clamp(40px, 6vw, 88px);
	align-items: start;
	padding-bottom: var(--jdw-section-y);
}

.jdw-bio__grid--single {
	grid-template-columns: minmax(0, 1fr);
	max-width: var(--jdw-max-prose);
}

.jdw-bio__cta {
	margin: 40px 0 0;
}

.jdw-bio__aside-media {
	height: clamp(320px, 34vw, 400px);
	margin-bottom: 0;
}

.jdw-bio__aside-media + .jdw-caption {
	margin-bottom: 48px;
}

/* When there is no portrait the timeline still needs breathing room. */
.jdw-bio__aside > .jdw-timeline:first-child {
	border-top: 1px solid var(--jdw-rule);
}

.jdw-timeline {
	border-top: 1px solid var(--jdw-rule);
	padding-top: 20px;
}

.jdw-timeline__heading {
	margin-bottom: 22px;
}

.jdw-timeline__list {
	display: grid;
	grid-template-columns: 96px 1fr;
	row-gap: 16px;
	column-gap: 12px;
	font-size: var(--jdw-fs-sm);
	line-height: 1.5;
	margin: 0;
}

.jdw-timeline__year {
	font-style: italic;
	color: var(--jdw-accent);
	margin: 0;
}

.jdw-timeline__label {
	margin: 0;
}

/* ==========================================================================
   8. Prose (page/post content, product descriptions)
   ========================================================================== */

.jdw-prose {
	font-size: var(--jdw-fs-body-lg);
	line-height: 1.7;
	color: var(--jdw-ink-soft);
	max-width: var(--jdw-max-prose);
}

.jdw-prose--wide {
	max-width: none;
}

.jdw-prose > *:first-child {
	margin-top: 0;
}

.jdw-prose > *:last-child {
	margin-bottom: 0;
}

.jdw-prose p {
	margin: 0 0 1.15em;
}

.jdw-prose h2 {
	font-size: var(--jdw-fs-h2-sm);
	margin: 2em 0 0.65em;
}

.jdw-prose h3 {
	font-size: var(--jdw-fs-h3);
	margin: 1.8em 0 0.6em;
}

.jdw-prose h4 {
	margin: 1.6em 0 0.5em;
}

.jdw-prose a {
	border-bottom: 1px solid var(--jdw-accent-rule);
}

.jdw-prose a:hover {
	border-bottom-color: var(--jdw-ink);
}

.jdw-prose img {
	height: auto;
}

.jdw-prose figcaption,
.wp-caption-text,
.wp-element-caption {
	font-size: var(--jdw-fs-2xs);
	font-style: italic;
	color: var(--jdw-faint);
	margin-top: 12px;
}

.jdw-prose ul,
.jdw-prose ol {
	margin-bottom: 1.3em;
}

/* Core block alignment */
.alignleft {
	float: left;
	margin: 0.4em 2em 1.4em 0;
	max-width: 45%;
}

.alignright {
	float: right;
	margin: 0.4em 0 1.4em 2em;
	max-width: 45%;
}

.aligncenter {
	margin-inline: auto;
	text-align: center;
}

.jdw-prose .alignwide {
	width: min(100vw - var(--jdw-gutter) * 2, var(--jdw-max));
	max-width: none;
	margin-inline: calc(50% - min(50vw - var(--jdw-gutter), var(--jdw-max) / 2));
}

.jdw-prose > .wp-block-image,
.jdw-prose > figure {
	margin-block: 2em;
}

.wp-block-pullquote {
	border: 0;
	padding: 0;
}

.wp-block-separator {
	border-top: 1px solid var(--jdw-rule);
	border-bottom: 0;
	max-width: 100%;
}

.wp-block-table th,
.wp-block-table td {
	border: 0;
	border-bottom: 1px solid var(--jdw-rule-soft);
}

/* ==========================================================================
   9. Blog, archives, search, 404
   ========================================================================== */

.jdw-entry-list {
	display: grid;
	gap: 0;
	padding-bottom: var(--jdw-section-y);
}

.jdw-entry-teaser {
	display: grid;
	grid-template-columns: 200px minmax(0, 1fr);
	gap: clamp(20px, 3vw, 40px);
	align-items: start;
	padding: 32px 0;
	border-bottom: 1px solid var(--jdw-rule-soft);
}

.jdw-entry-teaser:first-child {
	border-top: 1px solid var(--jdw-rule);
}

.jdw-entry-teaser--no-media {
	grid-template-columns: minmax(0, 1fr);
}

.jdw-entry-teaser__media {
	display: block;
	height: auto;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--jdw-surface);
}

.jdw-entry-teaser__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.jdw-entry-teaser__body {
	min-width: 0;
}

.jdw-entry-teaser__title {
	font-size: var(--jdw-fs-h3);
	margin: 0 0 10px;
}

.jdw-entry-teaser__title a {
	color: var(--jdw-ink);
}

.jdw-entry-teaser__title a:hover {
	color: var(--jdw-accent);
}

.jdw-entry-meta {
	font-size: var(--jdw-fs-2xs);
	font-style: italic;
	color: var(--jdw-accent);
	margin: 0 0 12px;
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
}

.jdw-entry-teaser__excerpt {
	font-size: var(--jdw-fs-sm);
	line-height: 1.6;
	color: var(--jdw-muted);
	margin: 0 0 14px;
}

.jdw-single__header {
	padding-bottom: 8px;
}

.jdw-single__media {
	margin-bottom: clamp(28px, 4vw, 48px);
	overflow: hidden;
	max-height: 560px;
}

.jdw-single__img {
	width: 100%;
	max-height: 560px;
	object-fit: cover;
}

.jdw-single__content {
	padding-bottom: var(--jdw-section-y);
}

.jdw-single__footer {
	margin-top: 48px;
	padding-top: 20px;
	border-top: 1px solid var(--jdw-rule);
	font-size: var(--jdw-fs-xs);
	color: var(--jdw-muted);
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
}

.jdw-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-top: 40px;
	padding-top: 24px;
	border-top: 1px solid var(--jdw-rule);
}

.jdw-post-nav a {
	display: block;
	font-family: var(--jdw-font-display);
	font-size: 1.375rem;
	line-height: 1.25;
	color: var(--jdw-ink);
}

.jdw-post-nav a:hover {
	color: var(--jdw-accent);
}

.jdw-post-nav__label {
	display: block;
	font-family: var(--jdw-font-body);
	font-size: var(--jdw-fs-eyebrow-sm);
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--jdw-accent);
	margin-bottom: 8px;
}

.jdw-post-nav__next {
	text-align: right;
}

/* Pagination ----------------------------------------------------------- */

.jdw-pagination,
.woocommerce-pagination {
	margin-top: 48px;
	padding-top: 24px;
	border-top: 1px solid var(--jdw-rule);
}

.jdw-pagination .nav-links,
.woocommerce-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
	border: 0;
}

.woocommerce-pagination ul.page-numbers li {
	margin: 0;
	border: 0;
}

.jdw-pagination .page-numbers,
.woocommerce-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	min-height: 42px;
	padding: 0 12px;
	border: 1px solid var(--jdw-border-strong);
	color: var(--jdw-ink);
	font-size: var(--jdw-fs-xs);
	font-feature-settings: "tnum";
	transition: background-color 0.16s var(--jdw-ease), color 0.16s var(--jdw-ease), border-color 0.16s var(--jdw-ease);
}

.jdw-pagination .page-numbers:hover,
.woocommerce-pagination .page-numbers:hover {
	border-color: var(--jdw-ink);
	color: var(--jdw-ink);
}

.jdw-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers.current {
	background: var(--jdw-ink);
	border-color: var(--jdw-ink);
	color: var(--jdw-bg);
}

.jdw-pagination .page-numbers.dots,
.woocommerce-pagination .page-numbers.dots {
	border-color: transparent;
	min-width: 24px;
	padding: 0;
}

/* Search form ---------------------------------------------------------- */

.jdw-search-form {
	display: flex;
	gap: 0;
	max-width: 460px;
}

.jdw-search-form__field {
	flex: 1 1 auto;
	min-width: 0;
}

/* Empty states --------------------------------------------------------- */

.jdw-empty {
	padding-block: clamp(40px, 6vw, 72px) var(--jdw-section-y);
	max-width: 62ch;
}

.jdw-empty__title {
	font-size: var(--jdw-fs-h2-sm);
	margin: 0 0 18px;
}

.jdw-empty__text {
	font-size: var(--jdw-fs-body-lg);
	color: var(--jdw-muted);
	margin: 0 0 30px;
}

.jdw-404__code {
	font-family: var(--jdw-font-display);
	font-style: italic;
	font-size: clamp(4rem, 12vw, 9rem);
	line-height: 1;
	color: var(--jdw-accent-light);
	margin: 0 0 12px;
}

/* ==========================================================================
   10. Forms
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
	width: 100%;
	background: var(--jdw-surface);
	border: 1px solid var(--jdw-border-strong);
	border-radius: 0;
	color: var(--jdw-ink);
	font-family: var(--jdw-font-body);
	font-size: var(--jdw-fs-sm);
	line-height: 1.4;
	padding: 12px 14px;
	transition: border-color 0.16s var(--jdw-ease);
	-webkit-appearance: none;
	appearance: none;
}

select {
	background-image: linear-gradient(45deg, transparent 50%, var(--jdw-accent) 50%), linear-gradient(135deg, var(--jdw-accent) 50%, transparent 50%);
	background-position: calc(100% - 18px) calc(50% + 1px), calc(100% - 12px) calc(50% + 1px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
	padding-right: 38px;
}

textarea {
	min-height: 160px;
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--jdw-accent);
}

input::placeholder,
textarea::placeholder {
	color: var(--jdw-faint);
	font-style: italic;
	opacity: 1;
}

label {
	display: block;
	font-size: var(--jdw-fs-eyebrow-sm);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--jdw-accent);
	margin-bottom: 8px;
}

input[type="checkbox"],
input[type="radio"] {
	width: auto;
	accent-color: var(--jdw-accent);
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
	font-family: var(--jdw-font-body);
}

/* Comments ------------------------------------------------------------- */

.jdw-comments {
	margin-top: 56px;
	padding-top: 28px;
	border-top: 1px solid var(--jdw-rule);
}

.jdw-comments__title {
	font-size: var(--jdw-fs-h3);
	margin-bottom: 28px;
}

.jdw-comments .comment-list {
	list-style: none;
	margin: 0 0 40px;
	padding: 0;
}

.jdw-comments .comment-list ol.children {
	list-style: none;
	margin: 0;
	padding-left: clamp(16px, 4vw, 40px);
}

.jdw-comments .comment-body {
	padding: 20px 0;
	border-bottom: 1px solid var(--jdw-rule-soft);
}

.jdw-comments .comment-author {
	display: flex;
	align-items: center;
	gap: 12px;
	font-family: var(--jdw-font-display);
	font-size: 1.25rem;
}

.jdw-comments .comment-author img {
	border-radius: 50%;
}

.jdw-comments .comment-meta {
	font-size: var(--jdw-fs-2xs);
	font-style: italic;
	color: var(--jdw-faint);
	margin-bottom: 10px;
}

.jdw-comments .comment-respond {
	max-width: 640px;
}

.jdw-comments .comment-form p {
	margin-bottom: 18px;
}

.jdw-comments .comment-form .form-submit {
	margin-bottom: 0;
}

.jdw-comments .comment-reply-link {
	font-size: var(--jdw-fs-2xs);
	font-style: italic;
}

/* ==========================================================================
   11. Responsive
   ========================================================================== */

@media (max-width: 1024px) {
	.jdw-hero,
	.jdw-about,
	.jdw-bio__grid,
	.jdw-band__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.jdw-hero__media,
	.jdw-about__media {
		order: -1;
		height: clamp(280px, 52vw, 420px);
	}

	.jdw-frame::before {
		inset: 16px -16px -16px 16px;
	}

	.jdw-band__action {
		justify-self: start;
	}

	.jdw-bio__aside-media {
		max-width: 420px;
	}

	.jdw-series {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 960px) {
	.jdw-footer__grid {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 720px) {
	.jdw-series {
		grid-template-columns: minmax(0, 1fr);
	}

	.jdw-series__card {
		flex-direction: row;
		gap: 22px;
		align-items: flex-start;
		flex-wrap: wrap;
	}

	.jdw-series__media {
		margin-bottom: 0;
		width: 96px;
		height: 128px;
	}

	.jdw-series__body {
		flex: 1 1 220px;
		min-width: 0;
	}

	.jdw-footer__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 34px;
	}

	.jdw-entry-teaser {
		grid-template-columns: minmax(0, 1fr);
	}

	.jdw-entry-teaser__media {
		max-width: 320px;
	}

	.jdw-news__item {
		gap: 6px;
	}

	.jdw-news__date {
		width: auto;
		flex: 1 0 100%;
	}

	.jdw-post-nav {
		grid-template-columns: minmax(0, 1fr);
	}

	.jdw-post-nav__next {
		text-align: left;
	}

	.jdw-timeline__list {
		grid-template-columns: 84px 1fr;
	}

	blockquote {
		font-size: 1.25rem;
	}
}

@media (max-width: 480px) {
	.jdw-brand {
		flex-direction: column;
		gap: 2px;
	}

	.jdw-hero__actions .jdw-btn {
		width: 100%;
	}
}

/* Motion & print -------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}

	.jdw-series__card:hover,
	.jdw-card:hover {
		transform: none;
	}
}

@media print {
	.jdw-header,
	.jdw-footer,
	.jdw-nav-toggle,
	.jdw-pagination,
	.woocommerce-pagination,
	.jdw-shop-filter {
		display: none !important;
	}

	body {
		background: #fff;
		color: #000;
		font-size: 11pt;
	}

	.jdw-main {
		animation: none;
	}
}
