/*
 * Hand-written CSS for the few things theme.json can't express.
 * Tokens (colour/type/spacing) come from theme.json — do not hard-code
 * colours or sizes here; reference the --wp--preset--* custom properties.
 */

/* Skip link (brief §17 accessibility) */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: var(--wp--preset--color--text);
	color: var(--wp--preset--color--accent-ink);
	padding: 0.75rem 1.25rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
}

.skip-link:focus {
	left: 0.5rem;
	top: 0.5rem;
}

/* Visible focus state everywhere, including inside the block editor's front-end render */
:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

/* Reduced motion: kill all theme-authored motion outright */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* Editorial services list (see patterns/service-list.php) */
.rwerkhoven-service-row {
	padding: var(--wp--preset--spacing--20) 0;
	border-top: 1px solid var(--wp--preset--color--border);
}

.rwerkhoven-service-row:last-child {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

@media (prefers-reduced-motion: no-preference) {
	.rwerkhoven-project-card img {
		transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
	}

	.rwerkhoven-project-card:hover img {
		transform: scale(1.03);
	}
}

.rwerkhoven-project-card {
	overflow: hidden;
}

.rwerkhoven-project-card img {
	display: block;
	width: 100%;
}

.rwerkhoven-project-meta {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
	letter-spacing: 0.02em;
}

/* Header logo (rwerkhoven/logo): inline SVG in the menu's text colour */
.rwerkhoven-logo {
	display: block;
	flex-shrink: 1;
	min-width: 0;
	color: var(--wp--preset--color--text);
	line-height: 0;
}

.rwerkhoven-logo svg {
	display: block;
	width: auto;
	height: 44px;
	max-width: 100%;
}

@media (max-width: 600px) {
	.rwerkhoven-logo svg {
		height: 34px;
	}
}

/* Homepage hero: landscape photo carousel (inc/hero-carousel.php,
   assets/js/hero-carousel.js). Slides are stacked and cross-faded. */
.rwerkhoven-hero-carousel {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 85vh;
	overflow: hidden;
	background: var(--wp--preset--color--surface);
}

.rwerkhoven-hero-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.9s ease, visibility 0s linear 0.9s;
}

.rwerkhoven-hero-slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.9s ease, visibility 0s;
}

.rwerkhoven-hero-slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rwerkhoven-hero-controls {
	position: absolute;
	right: var(--wp--preset--spacing--30);
	bottom: var(--wp--preset--spacing--30);
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--10);
}

.rwerkhoven-hero-btn {
	border: 0;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	padding: 0.4rem 0.9rem;
	cursor: pointer;
}

.rwerkhoven-hero-btn:hover,
.rwerkhoven-hero-btn:focus-visible {
	color: var(--wp--preset--color--accent);
}

.rwerkhoven-hero-dots {
	display: flex;
	gap: 6px;
	padding: 0 0.25rem;
}

.rwerkhoven-hero-dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 1px solid var(--wp--preset--color--surface);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.rwerkhoven-hero-dot[aria-current="true"] {
	background: var(--wp--preset--color--surface);
}

@media (prefers-reduced-motion: reduce) {
	.rwerkhoven-hero-slide,
	.rwerkhoven-hero-slide.is-active {
		transition: none;
	}
}

@media (max-width: 768px) {
	.rwerkhoven-hero-carousel {
		aspect-ratio: 3 / 2;
	}

	.rwerkhoven-hero-controls {
		right: var(--wp--preset--spacing--20);
		bottom: var(--wp--preset--spacing--20);
	}
}

.rwerkhoven-hero-content {
	position: relative;
}

.rwerkhoven-hero-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.71875rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
}

@media (prefers-reduced-motion: no-preference) {
	.rwerkhoven-hero-content .wp-block-column > * {
		opacity: 0;
		animation: rwerkhoven-rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
	}

	.rwerkhoven-hero-content .wp-block-column:nth-child(1) > *:nth-child(1) { animation-delay: 0.05s; }
	.rwerkhoven-hero-content .wp-block-column:nth-child(1) > *:nth-child(2) { animation-delay: 0.15s; }
	.rwerkhoven-hero-content .wp-block-column:nth-child(2) > *:nth-child(1) { animation-delay: 0.2s; }
	.rwerkhoven-hero-content .wp-block-column:nth-child(2) > *:nth-child(2) { animation-delay: 0.3s; }
	.rwerkhoven-hero-content .wp-block-column:nth-child(2) > *:nth-child(3) { animation-delay: 0.4s; }

	@keyframes rwerkhoven-rise {
		from { opacity: 0; transform: translateY(14px); }
		to { opacity: 1; transform: translateY(0); }
	}
}

/* Entrance-animated elements must not start invisible in the Site Editor */
.editor-styles-wrapper .rwerkhoven-hero-content .wp-block-column > * {
	opacity: 1 !important;
	animation: none !important;
	transform: none !important;
}

/* Projectgalerij als carousel (klassen komen uit assets/js/gallery-carousel.js;
   zonder JS blijft het core Gallery-blok een gewone galerij) */
.rwerkhoven-carousel {
	display: flex !important;
	flex-wrap: nowrap !important;
	gap: 0 !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
}

.rwerkhoven-carousel::-webkit-scrollbar {
	display: none;
}

.rwerkhoven-carousel > figure,
.rwerkhoven-carousel > .wp-block-image {
	flex: 0 0 100% !important;
	width: 100% !important;
	margin: 0 !important;
	scroll-snap-align: start;
}

.rwerkhoven-carousel img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	display: block;
}

.rwerkhoven-carousel-controls {
	display: flex;
	align-items: center;
	gap: var(--wp--preset--spacing--20);
	margin-top: var(--wp--preset--spacing--10);
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
}

.rwerkhoven-carousel-btn {
	border: 1px solid var(--wp--preset--color--border);
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font: inherit;
	padding: 0.4rem 0.9rem;
	cursor: pointer;
}

.rwerkhoven-carousel-btn:hover:not(:disabled) {
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--accent);
}

.rwerkhoven-carousel-btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.rwerkhoven-carousel-counter {
	color: var(--wp--preset--color--muted);
}

/* Citaten (aanbevelingen op Het bureau) */
.wp-block-quote {
	border-left: 3px solid var(--wp--preset--color--accent);
	margin: var(--wp--preset--spacing--30) 0;
	padding-left: var(--wp--preset--spacing--30);
}

.wp-block-quote cite {
	display: block;
	margin-top: 0.5rem;
	font-style: normal;
	font-size: 0.875rem;
	color: var(--wp--preset--color--muted);
}

/* Contactformulier (inc/contact-form.php) */
.rwerkhoven-contact-form label {
	display: block;
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.8125rem;
	letter-spacing: 0.04em;
	margin-bottom: 0.35rem;
}

.rwerkhoven-contact-form input[type="text"],
.rwerkhoven-contact-form input[type="email"],
.rwerkhoven-contact-form input[type="tel"],
.rwerkhoven-contact-form textarea {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 2px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text);
	font: inherit;
}

.rwerkhoven-contact-form input:focus-visible,
.rwerkhoven-contact-form textarea:focus-visible {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 1px;
	border-color: var(--wp--preset--color--accent);
}

.rwerkhoven-contact-form .rwerkhoven-consent label {
	display: flex;
	gap: 0.6rem;
	align-items: baseline;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.875rem;
	letter-spacing: 0;
}

.rwerkhoven-contact-form .rwerkhoven-form-privacy {
	font-size: 0.8125rem;
	color: var(--wp--preset--color--muted);
}

.rwerkhoven-form-error {
	border-left: 3px solid var(--wp--preset--color--accent);
	background: var(--wp--preset--color--surface);
	padding: var(--wp--preset--spacing--20);
	font-size: 0.9375rem;
}

/* Honeypot: visueel en voor toetsenbord verborgen, wel aanwezig voor bots */
.rwerkhoven-contact-form .rwerkhoven-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rwerkhoven-final-cta a {
	text-decoration: none;
}

.rwerkhoven-final-cta a:hover {
	color: var(--wp--preset--color--accent);
}

/* Diensten page: one anchored section per service (scripts/create-pages.php) */
html {
	scroll-behavior: smooth;
}

.rwerkhoven-service-section {
	margin-top: var(--wp--preset--spacing--40);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--wp--preset--color--border);
}

.rwerkhoven-service-section > h2[id] {
	scroll-margin-top: var(--wp--preset--spacing--40);
}

/* Lead-in above a list ("Onder andere voor:", "Particulieren") */
p.rwerkhoven-list-label {
	margin-bottom: 0.25rem;
}

p.rwerkhoven-list-label + .wp-block-list {
	margin-top: 0;
}

/* Lists without bullets, such as "Voor wie" on Het bureau */
ul.rwerkhoven-plain-list {
	list-style: none;
	padding-left: 0;
}

/* "Waarom kiezen voor …": ticks instead of bullets */
.rwerkhoven-checklist {
	list-style: none;
	padding-left: 0;
}

.rwerkhoven-checklist li {
	position: relative;
	padding-left: 1.75rem;
}

.rwerkhoven-checklist li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: var(--wp--preset--color--accent);
	font-weight: 600;
}

/* Typography refinements (2026-10-09)
   The type scale lives in theme.json; these two things it cannot express. */

/* 1. The homepage hero is the one place a display-size H1 is warranted. */
.rwerkhoven-hero-content h1 {
	font-size: var(--wp--preset--font-size--xx-large);
}

/* 2. Cap the measure at ~68 characters (docs/design-system.md): at the 1200px
   content width, body copy would otherwise run to ~140 characters a line. */
.wp-block-post-content > p,
.wp-block-post-content > ul,
.wp-block-post-content > ol,
.rwerkhoven-service-section > p,
.rwerkhoven-service-section > ul,
.rwerkhoven-service-section > ol {
	max-width: 68ch;
}

/* Align capped text, lists and social icons on the left edge of the photos
   and headings. The constrained layout centres narrower children with
   `margin-left: auto !important`, so it takes !important to override. */
.wp-block-post-content > *,
.rwerkhoven-service-section > * {
	margin-left: 0 !important;
}

/* The services jump list reads as navigation, not prose — let it span. */
.wp-block-post-content > p.rwerkhoven-service-index {
	max-width: none;
}
