/*
Theme Name: Podium Partners
Theme URI: https://podiumpartners.nl
Author: Nethues
Description: Block theme for the Podium Partners booking platform. Carries the shared design system that the individual band-site themes are reskinned from — override the theme.json palette and the logo, and nothing else needs to change.
Version: 0.2.4
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: podiumpartners
Tags: block-theme, full-site-editing, booking, music
*/

/* -------------------------------------------------------------------------
   Nearly everything lives in theme.json. This file holds only what
   theme.json cannot express: resets, focus handling, and the layout
   primitives the patterns rely on.
   ------------------------------------------------------------------------- */

:root {
	/* 1920 comp: 140px page gutter, 1640px content, 3 x 533px columns, 21px gutter. */
	--pp-page-gutter: clamp(20px, 7.29vw, 140px);
	--pp-header-height: 94px;
}

/* --- Optical sizing ---------------------------------------------------- */
/* DM Sans ships opsz 9..40, and browsers track that axis off the font size by
   default. Figma does not: it renders every size at opsz 14. Letting the
   browser track it made the 36px headings ~35px narrower than the comp —
   a constant error at every size, regardless of string length, which is what
   gave it away. Pinning the axis puts all three 36px headings within 1px.
   Measured: opsz auto 104.5px total error across them, opsz 14 just 1.9px. */
html {
	font-optical-sizing: none;
	font-variation-settings: "opsz" 14;
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@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;
	}
}

body {
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

/* --- Focus ------------------------------------------------------------- */
/* Lime on the dark bands is the only accent with enough contrast to serve
   as a focus ring on both the purple and the ink sections. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-lime);
	outline-offset: 2px;
	border-radius: var(--wp--custom--radius--xs);
}

/* Only suppress the ring for pointer users, never for keyboard. */
:where(a, button):focus:not(:focus-visible) {
	outline: none;
}

/* --- Skip link --------------------------------------------------------- */
.skip-link:focus {
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	padding: 12px 24px;
	z-index: 1000;
}

/* --- Media ------------------------------------------------------------- */
img, picture, video, canvas, svg {
	max-width: 100%;
	height: auto;
	display: block;
}

/* --- Headings: let display text wrap in balanced lines ----------------- */
:where(h1, h2, h3) {
	text-wrap: balance;
}

:where(p, li) {
	text-wrap: pretty;
}

/* --- Layout primitives the patterns use -------------------------------- */

/* The comp's 3-column grid. Collapses to 1 column below the tablet break. */
.pp-grid-3 {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--wp--custom--grid--gutter);
}

.pp-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--wp--custom--grid--gutter);
}

@media (max-width: 1024px) {
	.pp-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 781px) {
	.pp-grid-3,
	.pp-grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* Full-bleed band that still aligns its contents to the content column. */
.pp-band {
	padding-block: var(--wp--preset--spacing--90);
}

/* The hero is laid out in assets/css/sections.css, pinned to the comp. */

/* --- Cards ------------------------------------------------------------- */
.pp-card {
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	overflow: hidden;
	transition: transform var(--wp--custom--transition--base),
	            box-shadow var(--wp--custom--transition--base);
}

/* The image runs to the card edge; everything else is inset. Doing it here
   rather than padding the card keeps the full-bleed image without a negative
   margin fighting the border radius. */
.pp-card > *:not(.wp-block-post-featured-image) {
	padding-inline: var(--wp--preset--spacing--40);
}

.pp-card > .wp-block-post-featured-image {
	margin-bottom: var(--wp--preset--spacing--30);
}

.pp-card > :last-child {
	padding-bottom: var(--wp--preset--spacing--40);
}

.pp-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--wp--preset--shadow--lift);
}

/* A card with no featured image still needs a top inset. */
.pp-card > :first-child:not(.wp-block-post-featured-image) {
	padding-top: var(--wp--preset--spacing--40);
}

/* --- Pill / tag -------------------------------------------------------- */
.pp-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border-radius: var(--wp--custom--radius--pill);
	padding: 10px 20px;
	font-size: var(--wp--preset--font-size--sm);
	font-weight: 700;
	line-height: 1;
}

/* --- Dark-section inversions ------------------------------------------- */
/* theme.json cannot say "any heading inside a dark band turns white", so the
   two dark surfaces do it here rather than in every pattern. */
.has-contrast-background-color,
.has-black-background-color,
.has-primary-background-color {
	--pp-on-dark: var(--wp--preset--color--base);
}

:where(.has-contrast-background-color, .has-black-background-color, .has-primary-background-color)
	:where(h1, h2, h3, h4, h5, h6, p, li, figcaption) {
	color: var(--pp-on-dark, inherit);
}

/* A card dropped onto a dark band is light again, so undo the inversion. */
.pp-card :where(h1, h2, h3, h4, h5, h6, p, li) {
	color: inherit;
}

/* --- Block styles registered in functions.php ------------------------- */

/* Outlined button, used as the secondary action on the dark bands. */
.wp-block-button.is-style-pp-ghost > .wp-block-button__link {
	background: transparent;
	border: 1px solid currentColor;
	color: inherit;
}

.wp-block-button.is-style-pp-ghost > .wp-block-button__link:hover {
	background: var(--wp--preset--color--base);
	border-color: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
}

/* Lime is the attention colour; it only works with ink text on top. */
.wp-block-button.is-style-pp-lime > .wp-block-button__link {
	background: var(--wp--preset--color--accent-lime);
	color: var(--wp--preset--color--contrast);
}

.wp-block-button.is-style-pp-lime > .wp-block-button__link:hover {
	background: var(--wp--preset--color--accent-amber);
	color: var(--wp--preset--color--contrast);
}

/* Group block, card style. */
.wp-block-group.is-style-pp-card {
	border-radius: var(--wp--custom--radius--md);
	background: var(--wp--preset--color--base);
	color: var(--wp--preset--color--contrast);
	padding: var(--wp--preset--spacing--60);
}

/* Checklist used on the booking page. */
.wp-block-list.is-style-checkmark {
	list-style: none;
	padding-left: 0;
}

.wp-block-list.is-style-checkmark > li {
	position: relative;
	padding-left: 32px;
	margin-bottom: 12px;
}

.wp-block-list.is-style-checkmark > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 16px;
	height: 9px;
	border-left: 2px solid var(--wp--preset--color--accent-lime);
	border-bottom: 2px solid var(--wp--preset--color--accent-lime);
	transform: rotate(-45deg);
}

/* --- Navigation -------------------------------------------------------- */
.wp-block-navigation a:where(:not(.wp-element-button)) {
	text-decoration: none;
}

.wp-block-navigation a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--accent);
}

/* The overlay is styled here rather than through the block's
   overlayBackgroundColor / overlayTextColor attributes. Those put their colour
   classes on the responsive container, which wraps the desktop nav too — and
   WordPress then has the links inherit from it, painting them white on the
   white header. Styling the open state directly keeps the two apart. */
.wp-block-navigation__responsive-container.is-menu-open {
	background-color: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--60);
}

.wp-block-navigation__responsive-container.is-menu-open a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--base);
}

.wp-block-navigation__responsive-container.is-menu-open a:where(:not(.wp-element-button)):hover {
	color: var(--wp--preset--color--accent-lime);
}

.pp-artist-card .attachment-post-thumbnail {
object-position: top;
}

.wp-block-group.pp-detail__recensies {
	padding-bottom: 41px;
}

.pp-purple.gray {
	background-color: #efeef4;
	padding: 70px 0;
	margin-top: 41px !important;
}