/*
Theme Name: MycoCyclo
Theme URI: https://mycocyclo.nl
Author: Evert Kervezee
Author URI: https://mycocyclo.nl
Description: Child theme van Twenty Twenty-Five voor MycoCyclo, Haarlem. Donker, aards ontwerp met Fraunces en Jost (zelf gehost).
Template: twentytwentyfive
Requires at least: 6.7
Requires PHP: 7.2
Version: 1.2.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mycocyclo
*/

/*
 * Aanvullende opmaak voor wat WordPress-blokken zelf niet kunnen.
 * Kleuren komen uit theme.json, via var(--wp--preset--color--...).
 */

/* Algemeen ----------------------------------------------------------- */

html {
	scroll-behavior: smooth;
}

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

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

/* Drieblad-logo voor de sitenaam. */
.mc-logo a {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--wp--preset--color--contrast);
}

.mc-logo a::before {
	content: "";
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	background-color: var(--wp--preset--color--accent-1);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12 C12 6.5 15.5 3 21 3.5 C18.5 7 15.5 10 12 12 Z'/%3E%3Cpath d='M12 12 C12 6.5 15.5 3 21 3.5 C18.5 7 15.5 10 12 12 Z' transform='rotate(120 12 12)'/%3E%3Cpath d='M12 12 C12 6.5 15.5 3 21 3.5 C18.5 7 15.5 10 12 12 Z' transform='rotate(240 12 12)'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12 C12 6.5 15.5 3 21 3.5 C18.5 7 15.5 10 12 12 Z'/%3E%3Cpath d='M12 12 C12 6.5 15.5 3 21 3.5 C18.5 7 15.5 10 12 12 Z' transform='rotate(120 12 12)'/%3E%3Cpath d='M12 12 C12 6.5 15.5 3 21 3.5 C18.5 7 15.5 10 12 12 Z' transform='rotate(240 12 12)'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mc-logo a:hover {
	color: #fff;
}

.mc-nav .wp-block-navigation-item__content {
	padding: 10px 0;
}

.mc-nav .wp-block-navigation-item__content:hover {
	color: #fff;
}

/* Contact als omlijnde pil. */
.mc-nav .mc-nav-pill .wp-block-navigation-item__content {
	padding: 10px 18px;
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
}

.mc-nav .mc-nav-pill .wp-block-navigation-item__content:hover {
	text-decoration: none;
	border-color: var(--wp--preset--color--accent-1);
}

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

.mc-footer .wp-block-site-title a,
.mc-footer p a {
	color: var(--wp--preset--color--contrast);
}

.mc-footer .wp-block-site-title a:hover,
.mc-footer p a:hover {
	color: #fff;
}

/* Knoppen ------------------------------------------------------------ */

.wp-block-button__link {
	min-height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.wp-block-button.is-style-outline > .wp-block-button__link:hover,
.wp-block-button.is-style-outline > .wp-block-button__link:focus-visible {
	background-color: transparent;
	color: #fff;
	border-color: var(--wp--preset--color--accent-1);
}

/* Knop met play-icoon ("Kijk de film"). */
.mc-play .wp-block-button__link::before {
	content: "";
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M10 8.5 L16 12 L10 15.5 Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M10 8.5 L16 12 L10 15.5 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Blokstijlen -------------------------------------------------------- */

/* Paragraaf → Bovenkop: kleine groene hoofdletters boven een kop. */
.is-style-eyebrow {
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.5;
	color: var(--wp--preset--color--accent-1);
}

.has-contrast-background-color .is-style-eyebrow {
	color: var(--wp--preset--color--accent-3);
}

.is-style-eyebrow + .wp-block-heading {
	margin-block-start: 1rem;
}

/* Paragraaf → Label: gedempte hoofdletters, zoals "01 · Droogte". */
.is-style-label {
	font-size: var(--wp--preset--font-size--x-small);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	line-height: 1.5;
	color: var(--wp--preset--color--accent-4);
}

/* Afbeelding → Microscoopbeeld: rond, met subtiel dradenkruis. */
.wp-block-image.is-style-microscope {
	position: relative;
	max-width: 320px;
	margin-inline: auto;
}

.wp-block-image.is-style-microscope img {
	display: block;
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	border-radius: 50%;
	border: 1px solid var(--wp--preset--color--line);
}

.wp-block-image.is-style-microscope::after,
.mc-scope::before {
	content: "";
	position: absolute;
	inset: 0 0 auto 0;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	pointer-events: none;
	background:
		linear-gradient(to right, transparent calc(50% - 0.5px), rgba(21, 18, 14, 0.3) calc(50% - 0.5px), rgba(21, 18, 14, 0.3) calc(50% + 0.5px), transparent calc(50% + 0.5px)),
		linear-gradient(to bottom, transparent calc(50% - 0.5px), rgba(21, 18, 14, 0.3) calc(50% - 0.5px), rgba(21, 18, 14, 0.3) calc(50% + 0.5px), transparent calc(50% + 0.5px));
}

/* Lijst → Statuslijst: label links, tekst rechts, lijntjes ertussen. */
.wp-block-list.is-style-status {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wp-block-list.is-style-status li {
	display: flex;
	gap: 20px;
	margin: 0;
	padding: 24px 0;
	border-top: 1px solid var(--wp--preset--color--accent-6);
}

.wp-block-list.is-style-status li:last-child {
	border-bottom: 1px solid var(--wp--preset--color--accent-6);
}

.wp-block-list.is-style-status li strong {
	flex: 0 0 120px;
	padding-top: 0.2em;
	font-size: var(--wp--preset--font-size--x-small);
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--soft);
}

.wp-block-list.is-style-status li:first-child strong {
	color: var(--wp--preset--color--accent-1);
}

@media (max-width: 420px) {
	.wp-block-list.is-style-status li strong {
		flex-basis: 96px;
	}
}

/* Homepage ----------------------------------------------------------- */

.mc-front :where(.wp-block-image) img {
	display: block;
	border-radius: 6px;
}

.mc-front .wp-block-image .wp-element-caption {
	margin-top: 12px;
	margin-bottom: 0;
}

.mc-balance {
	max-width: 18em;
	text-wrap: balance;
}

.mc-measure {
	max-width: 36em;
}

/* Rasterlijntjes tussen de zes onderzoeksdoelen. */
.mc-goals {
	background-color: var(--wp--preset--color--accent-6);
	border: 1px solid var(--wp--preset--color--accent-6);
}

.mc-icon img {
	width: 28px;
	height: 28px;
	border-radius: 0 !important;
}

/* Kolommen met een lijn erboven (Droogte, Wateroverlast, ...). */
.mc-rule {
	border-top: 1px solid var(--wp--preset--color--line);
	padding-top: 24px;
}

/* Filmpjes bloem en brood. */
.mc-video {
	margin: 0;
}

.mc-video video {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid var(--wp--preset--color--accent-6);
	background-color: var(--wp--preset--color--accent-5);
}

/* YouTube-film met klik-om-te-laden (zie assets/js/youtube-klik.js). */
.mc-yt {
	margin: 0;
}

.mc-yt a {
	position: relative;
	display: block;
	border-radius: 6px;
}

.mc-yt a::before,
.mc-yt a::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

/* Ronde knop... */
.mc-yt a::before {
	width: 76px;
	height: 76px;
	border-radius: 50%;
	background-color: var(--wp--preset--color--base);
	transition: box-shadow 0.15s ease;
}

/* ...met een driehoekje erin. */
.mc-yt a::after {
	width: 26px;
	height: 26px;
	margin-left: 2px;
	background-color: var(--wp--preset--color--contrast);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5 L19 12 L8 19 Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5 L19 12 L8 19 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mc-yt a:hover::before,
.mc-yt a:focus-visible::before {
	box-shadow: 0 0 0 2px var(--wp--preset--color--accent-1);
}

.mc-yt__frame {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
	border-radius: 6px;
	background-color: #000;
}

#film {
	scroll-margin-top: 24px;
}

/* Microscoopfilmpje onder het keukenfilmpje. */
.mc-video-micro {
	margin-top: 32px !important;
}

.mc-book img {
	width: 100%;
	border-radius: 4px !important;
	border: 1px solid var(--wp--preset--color--line);
}

/* Groot rond microscoopvenster in de hero, met schaalbalk. */
.mc-scope {
	position: relative;
	display: grid;
	place-items: center;
	width: calc(100% - 30px);
	max-width: 480px;
	aspect-ratio: 1 / 1;
	margin-inline: auto;
	border-radius: 50%;
	overflow: hidden;
	background-color: var(--wp--preset--color--accent-5);
	border: 1px solid var(--wp--preset--color--line);
	box-shadow: 0 0 0 14px var(--wp--preset--color--accent-2), 0 0 0 15px var(--wp--preset--color--accent-6);
}

.mc-scope > .wp-block-image {
	position: absolute;
	inset: 0;
	margin: 0;
}

.mc-front .mc-scope > .wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 0;
}

.mc-scope::before {
	z-index: 1;
}

.mc-scope::after {
	content: "50 \00B5m";
	position: absolute;
	z-index: 1;
	right: 18%;
	bottom: 15%;
	width: 64px;
	padding-top: 4px;
	border-top: 3px solid var(--wp--preset--color--base);
	text-align: right;
	font-size: 12px;
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--base);
}

.mc-scope > .wp-block-buttons {
	position: relative;
	z-index: 2;
	margin: 0;
}

/* Ronde playknop midden in het microscoopvenster. De tekst blijft voor schermlezers. */
.mc-play-round .wp-block-button__link {
	width: 76px;
	height: 76px;
	min-height: 0;
	padding: 0;
	border-radius: 50%;
	font-size: 0;
	color: var(--wp--preset--color--contrast);
	background-color: var(--wp--preset--color--base);
}

.mc-play-round .wp-block-button__link:hover {
	color: #fff;
	background-color: var(--wp--preset--color--base);
	box-shadow: 0 0 0 2px var(--wp--preset--color--accent-1);
}

.mc-play-round .wp-block-button__link::before {
	content: "";
	width: 26px;
	height: 26px;
	margin-left: 4px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5 L19 12 L8 19 Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5 L19 12 L8 19 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Ruimte tussen laatste sectie en footer zit al in de sectie zelf. */
.wp-site-blocks > footer {
	margin-block-start: 0;
}
