/*
Theme Name: Opgelost AI
Theme URI: https://opgelostai.nl
Author: Kwadata
Author URI: https://kwadata.nl
Description: Block theme voor Opgelost AI, gebaseerd op de Brand manual V4 (november 2026). Minder gedoe. AI die gewoon werkt.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.1
License: Proprietary
Text Domain: opgelostai
*/

/* ---------- Basis ---------- */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p) { text-wrap: pretty; }
::selection { background: var(--wp--preset--color--lila); color: var(--wp--preset--color--inkt); }
:focus-visible { outline: 2px solid var(--wp--preset--color--stroom); outline-offset: 3px; border-radius: 4px; }
img { height: auto; max-width: 100%; }

.screen-reader-text:not(:focus) {
	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 !important;
}

/* ---------- Woordmerk: "Opgelost A" + cursor (de I van AI) ---------- */
.oa-wordmark {
	display: inline-flex;
	align-items: center;
	font-family: var(--wp--preset--font-family--bricolage);
	font-weight: 700;
	font-size: 1.6rem;
	line-height: 1;
	letter-spacing: -0.03em;
	color: var(--wp--preset--color--inkt) !important;
	text-decoration: none !important;
	white-space: nowrap;
	min-width: 120px; /* minimale breedte digitaal */
}
.oa-wordmark__cursor {
	display: inline-block;
	width: 0.13em;
	height: 0.82em;
	margin-left: 0.05em;
	background: var(--wp--preset--color--stroom);
	transform: translateY(0.01em);
}
.oa-wordmark:hover .oa-wordmark__cursor,
.oa-wordmark:focus-visible .oa-wordmark__cursor { animation: oa-blink 1s steps(1) infinite; }
@keyframes oa-blink { 50% { opacity: 0; } }

/* ---------- Typografische rollen ---------- */
/* Concert One: alleen hoofdletters, extra spatiëring, korte accenten */
.is-style-kicker,
.oa-kicker {
	font-family: var(--wp--preset--font-family--concert) !important;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 400 !important;
	line-height: 1.2;
}
/* IBM Plex Mono: labels in hoofdletters */
.is-style-label,
.oa-label {
	font-family: var(--wp--preset--font-family--plex-mono) !important;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	font-weight: 600;
	font-size: var(--wp--preset--font-size--small);
	line-height: 1.4;
}
.is-style-label { color: var(--wp--preset--color--gracht); }
/* Caveat: één korte zin, het handschrift van de stift */
.is-style-handschrift {
	font-family: var(--wp--preset--font-family--caveat) !important;
	font-weight: 600;
	font-size: 1.75rem;
	line-height: 1.15;
	letter-spacing: 0;
}
/* Grote cijfers in Concert One */
.oa-number {
	font-family: var(--wp--preset--font-family--concert);
	font-size: 2.5rem;
	line-height: 1;
	letter-spacing: 0.04em;
}

/* ---------- Kaarten en vlakken ---------- */
.is-style-kaart {
	border-radius: var(--wp--custom--radius--card);
	padding: clamp(1.5rem, 3vw, 2.5rem);
}
.is-style-kaart > :first-child { margin-top: 0; }
.is-style-kaart > :last-child { margin-bottom: 0; }

/* ---------- Plakbriefje: Plakgeel, Caveat, max. 3 graden ---------- */
.is-style-plakbriefje {
	background: var(--wp--preset--color--plakgeel) !important;
	color: var(--wp--preset--color--inkt) !important;
	font-family: var(--wp--preset--font-family--caveat);
	font-weight: 600;
	font-size: 1.6rem;
	line-height: 1.15;
	padding: 1.1rem 1.4rem !important;
	transform: rotate(-2deg);
	box-shadow: 0 10px 18px -12px rgba(27, 26, 33, 0.45);
	max-width: 18rem;
}
.is-style-plakbriefje > * { font-family: inherit !important; font-size: inherit; line-height: inherit; }
.is-style-plakbriefje > :first-child { margin-top: 0; }
.is-style-plakbriefje > :last-child { margin-bottom: 0; }
.oa-notes { display: flex; flex-wrap: wrap; gap: 1.5rem 2rem; align-items: flex-start; }
.oa-notes > .is-style-plakbriefje:nth-child(2) { transform: rotate(2.5deg); margin-top: 1.5rem; }
.oa-notes > .is-style-plakbriefje:nth-child(3) { transform: rotate(-1deg); }
.oa-notes > .is-style-plakbriefje:nth-child(n+4) { display: none; } /* nooit meer dan drie */

/* ---------- Knoppen ---------- */
.wp-block-button.is-style-boter .wp-block-button__link {
	background: var(--wp--preset--color--knop-boter);
	color: var(--wp--preset--color--inkt);
}
.wp-block-button.is-style-boter .wp-block-button__link:hover,
.wp-block-button.is-style-boter .wp-block-button__link:focus { background: var(--wp--preset--color--boter); }
.wp-block-button .wp-block-button__link { transition: background-color 0.15s ease; }

/* ---------- Iconen in een pastel cirkel ---------- */
.oa-icon {
	display: inline-grid;
	place-items: center;
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 50%;
	border: 2px solid var(--wp--preset--color--inkt);
	background: var(--wp--preset--color--whiteboard);
	box-shadow: 0 0 0 5px var(--oa-ring, transparent);
	color: var(--wp--preset--color--inkt);
	flex-shrink: 0;
}
.oa-icon svg { width: 2.1rem; height: 2.1rem; }
.oa-icon--munt { background: var(--wp--preset--color--munt); --oa-ring: rgba(207, 234, 227, 0.6); }
.oa-icon--boter { background: var(--wp--preset--color--boter); --oa-ring: rgba(255, 240, 191, 0.6); }
.oa-icon--lila { background: var(--wp--preset--color--lila); --oa-ring: rgba(233, 228, 255, 0.6); }
.oa-icon--perzik { background: var(--wp--preset--color--perzik); --oa-ring: rgba(247, 224, 213, 0.6); }
.oa-icon--zand { background: var(--wp--preset--color--zand); --oa-ring: rgba(239, 230, 216, 0.6); }
.oa-icon--klein { width: 3rem; height: 3rem; box-shadow: none; }
.oa-icon--klein svg { width: 1.5rem; height: 1.5rem; }

/* ---------- De route (vijf stappen) ---------- */
.oa-route { counter-reset: none; }
.oa-route .oa-step { display: flex; flex-direction: column; gap: 0.75rem; }
.oa-route .oa-step h3 { margin: 0; }
.oa-route .oa-step p { margin: 0; }

/* ---------- Zeven overtuigingen ---------- */
.oa-beliefs { list-style: none; padding: 0; margin: 0; }
.oa-beliefs li {
	display: grid;
	grid-template-columns: 3rem 1fr;
	gap: 1rem;
	align-items: baseline;
	padding: 0.9rem 0;
	border-top: 1px solid rgba(27, 26, 33, 0.18);
	font-size: var(--wp--preset--font-size--large);
}
.oa-beliefs li:last-child { border-bottom: 1px solid rgba(27, 26, 33, 0.18); }
.oa-beliefs .oa-label { color: var(--wp--preset--color--gracht); }

/* ---------- De stip ---------- */
.oa-stip { width: min(100%, 18rem); aspect-ratio: 1; display: block; }
.oa-stip text { font-family: var(--wp--preset--font-family--plex-mono); font-weight: 600; letter-spacing: 0.32em; }
.oa-stip .oa-stip__ring { animation: oa-spin 40s linear infinite; transform-origin: 50% 50%; }
@keyframes oa-spin { to { transform: rotate(360deg); } }

/* ---------- Header en footer ---------- */
.oa-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--wp--preset--color--papier) 92%, transparent); backdrop-filter: blur(8px); }
.admin-bar .oa-header { top: var(--wp-admin--admin-bar--height, 32px); }
.oa-header .wp-block-navigation a:hover { text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 2px; }
.oa-footer a { text-decoration: none; }
.oa-footer a:hover { text-decoration: underline; }

/* ---------- Berichten ---------- */
.wp-block-post-template.is-layout-grid > li { display: flex; }
.oa-post-card { width: 100%; }
.wp-block-post-featured-image img { border-radius: var(--wp--custom--radius--card); }

/* ---------- Beweging ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Mobiel ---------- */
@media (max-width: 781px) {
	.oa-wordmark { font-size: 1.35rem; }
	.is-style-plakbriefje { font-size: 1.4rem; }
	.oa-notes > .is-style-plakbriefje:nth-child(2) { margin-top: 0; }
}

/* ---------- Raster van vijf (route, zekerheden): 5 / 3+2 / 2 / 1 ---------- */
.oa-grid-5 { display: grid; gap: 2rem; grid-template-columns: repeat(6, 1fr); }
.oa-grid-5--tight { gap: 1.25rem; }
.oa-grid-5 > * { grid-column: span 2; }
.oa-grid-5 > :nth-child(4) { grid-column: 2 / span 2; }
@media (min-width: 1080px) {
	.oa-grid-5 { grid-template-columns: repeat(5, 1fr); }
	.oa-grid-5 > *, .oa-grid-5 > :nth-child(4) { grid-column: auto; }
}
@media (max-width: 781px) {
	.oa-grid-5 { grid-template-columns: repeat(2, 1fr); }
	.oa-grid-5 > *, .oa-grid-5 > :nth-child(4) { grid-column: auto; }
}
@media (max-width: 479px) {
	.oa-grid-5 { grid-template-columns: 1fr; }
}

/* Plakbriefjes verspringen, zoals op de muur */
.oa-notes { flex-direction: column; }
.oa-notes > .is-style-plakbriefje:nth-child(1) { align-self: flex-start; }
.oa-notes > .is-style-plakbriefje:nth-child(2) { align-self: flex-end; margin-top: -0.5rem; }
.oa-notes > .is-style-plakbriefje:nth-child(3) { align-self: center; margin-top: -0.5rem; }
