/*
Theme Name: Corentis
Description: Blokthema op basis van het Corentis huisstijlhandboek 1.0. Kleuren, typografie, marges en vormtaal (donkere rail, coral seam, dunne regels) zijn vastgelegd in theme.json.
Author: Corentis
Requires at least: 6.6
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: corentis
*/

:root {
	--corentis-seam: 6px;
	--corentis-hairline: rgba(38, 54, 61, 0.2);
	/* Lijn tekst uit met de linkerrand van de 75rem-container, ook op brede schermen. */
	--corentis-edge: max(var(--wp--custom--gutter), calc((100vw - var(--wp--style--global-wide-size)) / 2));
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Geen automatische ruimte tussen header, main en footer: secties bepalen hun eigen ritme (8-punts). */
body .wp-site-blocks > * {
	margin-block-start: 0;
	margin-block-end: 0;
}

/* Lopende tekst: maximaal ~65 tekens per regel. */
.corentis-main p,
.corentis-band p {
	max-width: var(--wp--custom--measure);
}

.corentis-main .wp-block-post-content li {
	max-width: var(--wp--custom--measure);
}

.corentis-main .wp-block-search {
	max-width: var(--wp--custom--measure);
}

/* ---------- Typografie ---------- */

.corentis-label,
.is-style-corentis-label {
	font-size: var(--wp--preset--font-size--label);
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.4;
	text-transform: uppercase;
}

body .corentis-label + *,
body .is-style-corentis-label + * {
	margin-block-start: var(--wp--preset--spacing--20);
}

.corentis-section :is(h1, h2),
.corentis-page-head :is(h1, h2),
.corentis-band :is(h1, h2) {
	max-width: 24ch;
}

/* ---------- Links en focus ---------- */

a:where(:not(.wp-element-button)) {
	text-decoration-line: underline;
	text-decoration-color: var(--wp--preset--color--teal);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.2em;
}

a:where(:not(.wp-element-button)):hover {
	text-decoration-thickness: 4px;
}

:focus-visible {
	outline: 3px solid var(--wp--preset--color--coral);
	outline-offset: 3px;
}

.has-charcoal-background-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--white);
}

/* Coral is een accent: op donkere vlakken krijgt de knop bij hover een lichte tint. */
.has-charcoal-background-color .wp-element-button:hover,
.has-charcoal-background-color .wp-element-button:focus,
.has-charcoal-background-color .wp-element-button:active {
	background-color: var(--wp--preset--color--white);
	color: var(--wp--preset--color--charcoal);
}

/* ---------- Dunne regels ---------- */

.wp-block-separator {
	background: none;
	border: 0;
	border-top: 1px solid var(--corentis-hairline);
	height: 0;
	opacity: 1;
}

.has-charcoal-background-color .wp-block-separator {
	border-top-color: rgba(255, 255, 255, 0.24);
}

/* Geen ronde kaarten of schaduwen. */
.wp-block-quote {
	border: 0;
	padding: 0;
}

/* ---------- Header ---------- */

.corentis-header {
	border-bottom: 1px solid var(--corentis-hairline);
}

.corentis-logo,
.corentis-logo img {
	display: block;
	margin: 0;
	height: auto;
}

.corentis-logo a {
	display: block;
	text-decoration: none;
}

.corentis-header .wp-block-navigation .wp-block-navigation-item__content {
	text-decoration: none;
	padding-block: 0.25rem;
}

.corentis-header .wp-block-navigation .wp-block-navigation-item__content:hover,
.corentis-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--coral);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.5em;
}

@media (max-width: 781px) {
	.corentis-header .wp-block-buttons {
		display: none;
	}
}

/* ---------- Rail + coral seam ---------- */

.wp-block-columns.corentis-hero.is-layout-flex {
	gap: 0;
	margin-block: 0;
}

.corentis-hero > .wp-block-column {
	margin: 0;
}

.corentis-rail {
	border-right: var(--corentis-seam) solid var(--wp--preset--color--coral);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-block: clamp(3rem, 8vw, 6rem);
	padding-inline: clamp(1.5rem, 5vw, 4.5rem);
	padding-inline-start: var(--corentis-edge);
}

.corentis-rail .wp-element-button {
	margin-block-start: var(--wp--preset--spacing--10);
}

.corentis-hero__media {
	display: flex;
}

.corentis-hero__media .wp-block-cover {
	flex: 1;
	min-height: 100%;
}

@media (max-width: 781px) {
	.corentis-hero__media .wp-block-cover {
		min-height: 16rem !important;
	}

	.corentis-rail {
		border-right: 0;
		border-bottom: var(--corentis-seam) solid var(--wp--preset--color--coral);
		padding-inline-start: var(--wp--custom--gutter);
	}
}

/* Paginatemplate met rail: titel links, inhoud rechts. */
.corentis-hero--page .corentis-rail {
	justify-content: flex-start;
}

.corentis-hero--page .corentis-rail .wp-block-post-title {
	position: sticky;
	top: var(--wp--preset--spacing--40);
	max-width: 12ch;
	overflow-wrap: break-word;
}

.corentis-hero--page .corentis-page-body {
	padding-block: clamp(3rem, 6vw, 6rem);
	padding-inline: clamp(1.5rem, 4vw, 4rem) var(--wp--custom--gutter);
}

/* ---------- Pagina's ---------- */

.corentis-main {
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--70);
}

.corentis-main--flush {
	padding-block: 0;
}

.corentis-section {
	padding-block: var(--wp--preset--spacing--70);
}

.wp-block-columns.corentis-values.is-layout-flex {
	gap: var(--wp--preset--spacing--40);
	margin-block-start: var(--wp--preset--spacing--60);
}

.corentis-value {
	border-top: 1px solid var(--corentis-hairline);
	padding-block-start: var(--wp--preset--spacing--30);
}

.corentis-number {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	line-height: 1;
	margin-block-end: var(--wp--preset--spacing--30);
}

/* Donkere band (call-to-action). */
body .wp-block-group.corentis-band {
	padding-block: var(--wp--preset--spacing--70);
	padding-inline: var(--corentis-edge);
}

/* ---------- Berichtenlijst: dunne regels, geen kaarten ---------- */

.corentis-post-list .wp-block-post-template {
	margin: 0;
	padding: 0;
}

.corentis-post-row {
	display: grid;
	grid-template-columns: 12rem 1fr;
	gap: 0 var(--wp--preset--spacing--40);
	border-top: 1px solid var(--corentis-hairline);
	padding-block: var(--wp--preset--spacing--40);
}

.corentis-post-list .wp-block-post:last-child .corentis-post-row {
	border-bottom: 1px solid var(--corentis-hairline);
}

.corentis-post-row .wp-block-post-date {
	padding-block-start: 0.25rem;
	margin: 0;
}

body .corentis-post-row .corentis-label + * {
	margin-block-start: 0;
}

body .corentis-post-row .wp-block-post-excerpt {
	margin-block-start: var(--wp--preset--spacing--10);
}

.corentis-post-row .wp-block-post-title {
	margin: 0;
}

.corentis-post-row .wp-block-post-title a {
	text-decoration: none;
}

.corentis-post-row .wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--coral);
	text-decoration-thickness: 3px;
	text-underline-offset: 0.2em;
}

.corentis-post-list .wp-block-query-pagination {
	margin-block-start: var(--wp--preset--spacing--50);
}

@media (max-width: 781px) {
	.corentis-post-row {
		grid-template-columns: 1fr;
	}
}

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

.corentis-footer {
	border-top: 1px solid rgba(255, 255, 255, 0.24);
	padding-block: var(--wp--preset--spacing--60) var(--wp--preset--spacing--40);
}

.corentis-logo-tile {
	width: fit-content;
	padding: var(--wp--preset--spacing--10);
}

.corentis-footer .wp-block-navigation {
	font-size: var(--wp--preset--font-size--base);
}

.corentis-footer .wp-block-navigation .wp-block-navigation-item__content {
	text-decoration: none;
}

.corentis-footer .wp-block-navigation .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--coral);
	text-decoration-thickness: 2px;
	text-underline-offset: 0.3em;
}
