/* Bussiremont: large, calm and easy to read. Colours and sizes come from theme.json. */

:root {
	--green: var(--wp--preset--color--green, #1d6a2b);
	--green-dark: var(--wp--preset--color--green-dark, #134a1d);
	--green-light: var(--wp--preset--color--green-light, #eaf3e6);
	--yellow: var(--wp--preset--color--yellow, #f4cf2a);
	--yellow-light: var(--wp--preset--color--yellow-light, #fdf6d3);
	--ink: var(--wp--preset--color--ink, #1b1f1b);
	--muted: var(--wp--preset--color--muted, #4a524a);
	--line: var(--wp--preset--color--line, #cfd6cc);
	--radius: 10px;
	--wrap: 1180px;
	--gutter-base: clamp(1rem, 4vw, 2rem);
	/* Sideways on an iPhone the notch side gets extra room. */
	--gutter: max(var(--gutter-base), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
	--focus: 0 0 0 3px #fff, 0 0 0 6px var(--ink);
}

*, *::before, *::after { box-sizing: border-box; }

/* The page ends in the footer's green, also when pulled past the end. */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--green-dark); }
body { margin: 0; background: #fff; color: var(--ink); overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }

/* A quick second tap doesn't zoom the page; pinch zoom still works. */
a, button, summary { touch-action: manipulation; }

:where(a, button, input, summary, [tabindex]):focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--narrow { max-width: calc(760px + 2 * var(--gutter)); }

.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--yellow); color: var(--ink); padding: 0.75rem 1.25rem; font-weight: 700; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Top bar: the phone number on every page, and the languages. */
.topbar { background: var(--green-dark); color: #fff; font-size: 1.0625rem; }
.topbar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; min-height: 3.25rem; padding-block: 0.4rem; }
.topbar__contact { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1.5rem; margin: 0; }
.topbar a { color: #fff; }
.topbar__phone { display: inline-flex; align-items: center; min-height: 2.75rem; gap: 0.5rem; font-weight: 700; font-size: 1.25rem; text-decoration: none; }
.topbar__phone:hover span { text-decoration: underline; }

.languages { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.languages a { display: inline-flex; align-items: center; justify-content: center; min-width: 3.25rem; min-height: 2.75rem; padding: 0 0.6rem; border-radius: 6px; font-weight: 700; text-decoration: none; letter-spacing: 0.02em; }
.languages a:hover { background: rgba(255, 255, 255, 0.15); }
.languages a[aria-current] { background: var(--yellow); color: var(--ink); }

/* Header: logo and the menu in plain words. */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; min-height: 5rem; padding-block: 0.5rem; }
.logo { display: block; flex: 0 0 auto; line-height: 0; padding-block: 0.5rem; }
.logo img { width: clamp(170px, 32vw, 300px); height: auto; }
@media (max-width: 359px) {
	.logo img { width: 140px; }
	.menu-toggle { padding: 0 0.6rem; font-size: 1.0625rem; }
}
@media (max-width: 599px) {
	.topbar__email { display: none; }
	.site-header__inner { min-height: 4.5rem; gap: 0.75rem; }
	.menu-toggle { padding: 0 0.9rem; }
}

.nav__list { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.nav__list a { display: block; padding: 0.7rem 0.65rem; border-radius: 8px; color: var(--ink); font-weight: 700; font-size: 1.1875rem; text-decoration: none; }
.nav__list a:hover { background: var(--green-light); color: var(--green-dark); }
.nav__list a[aria-current] { color: var(--green-dark); background: var(--green-light); box-shadow: inset 0 -4px 0 var(--green); }

.menu-toggle { display: none; align-items: center; gap: 0.6rem; min-height: 3.25rem; padding: 0 1.1rem; border: 2px solid var(--green); border-radius: 8px; background: #fff; color: var(--green-dark); font: inherit; font-weight: 700; font-size: 1.1875rem; cursor: pointer; }
.menu-toggle__icon, .menu-toggle__icon::before, .menu-toggle__icon::after { display: block; width: 22px; height: 3px; background: currentColor; border-radius: 2px; position: relative; transition: transform 0.2s ease; }
.menu-toggle__icon::before, .menu-toggle__icon::after { content: ""; position: absolute; left: 0; }
.menu-toggle__icon::before { top: -7px; }
.menu-toggle__icon::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__icon::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1199px) {
	.menu-toggle { display: inline-flex; }
	.js .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border-bottom: 3px solid var(--green); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12); }
	.js .nav.is-open { display: block; }
	.nav__list { flex-direction: column; padding: 0.5rem var(--gutter) 1rem; }
	.nav__list a { padding: 1rem; font-size: 1.25rem; border-bottom: 1px solid var(--line); border-radius: 0; }
	.nav__list li:last-child a { border-bottom: 0; }
	/* Without JavaScript the menu simply shows under the logo. */
	html:not(.js) .site-header__inner { flex-wrap: wrap; }
	html:not(.js) .menu-toggle { display: none; }
	html:not(.js) .nav { width: 100%; }
}

/* Buttons. */
.button, .wp-block-button__link, .link-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
	min-height: 3.5rem; padding: 0.85rem 1.6rem; border: 3px solid var(--green); border-radius: 8px;
	background: var(--green); color: #fff; font: inherit; font-weight: 700; line-height: 1.25; text-decoration: none; text-align: center; cursor: pointer;
}
.button:hover, .wp-block-button__link:hover, .link-button:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.button--outline, .is-style-outline .wp-block-button__link, .link-button { background: #fff; color: var(--green-dark); }
.button--outline:hover, .is-style-outline .wp-block-button__link:hover { background: var(--green-light); color: var(--green-dark); }
.link-button { min-height: 3rem; padding: 0.5rem 1.1rem; font-size: 1.0625rem; }
.link-button:hover { background: var(--green-light); color: var(--green-dark); }
.wp-block-button.is-style-call .wp-block-button__link { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.wp-block-button.is-style-call .wp-block-button__link:hover { background: #ffe066; border-color: #ffe066; }

/* Page headings. */
.page-header { background: var(--green-light); border-bottom: 1px solid var(--line); padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-title { margin: 0; font-size: var(--wp--preset--font-size--xx-large); line-height: 1.15; }
.page-date { margin: 0.75rem 0 0; color: var(--muted); font-size: 1.0625rem; }
.back-link { margin: 0 0 1rem; font-size: 1.0625rem; }
.back-link a:not(.button) { display: inline-flex; align-items: center; min-height: 2.75rem; }
.back-link--bottom { margin: 2rem 0 0; }

/* Page and news text. */
.entry-content { padding-block: clamp(2rem, 5vw, 3.5rem); }
.entry-content > * { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.entry-content > .alignwide, .is-wide-page .entry-content > * { width: min(var(--wrap) - 2 * var(--gutter), 100% - 2 * var(--gutter)); }
.is-wide-page .page-header .wrap--narrow { max-width: var(--wrap); }
.entry-content > .alignfull { width: 100%; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2 { margin-top: 2.5rem; }
.entry-content p, .entry-content li { max-width: 70ch; }
.entry-content ul { padding-left: 1.4em; }
.entry-content figure { margin-block: 2rem; }
.entry-content img { border-radius: var(--radius); }
.entry-content .wp-block-gallery { margin-block: 1.5rem 2.5rem; }
.entry-content .wp-block-gallery img { border-radius: 6px; }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image { cursor: zoom-in; }

/* Front page: the workshop picture with the page's heading, text and call button, and the order form.
   On a computer the form sits on the picture beside the text, so the page fits one screen;
   on a phone the picture and text come first and the form follows. The texts are edited on the page. */
.front { background-color: var(--green-light); }
.front__intro {
	color: #fff; background-color: var(--green-dark);
	background-image: linear-gradient(90deg, rgba(10, 30, 14, 0.82) 0%, rgba(10, 30, 14, 0.6) 60%, rgba(10, 30, 14, 0.25) 100%), url("../img/hero-960.jpg");
	background-image: linear-gradient(90deg, rgba(10, 30, 14, 0.82) 0%, rgba(10, 30, 14, 0.6) 60%, rgba(10, 30, 14, 0.25) 100%), image-set(url("../img/hero-960.webp") type("image/webp"), url("../img/hero-960.jpg") type("image/jpeg"));
	background-size: cover; background-position: center 40%;
	padding: clamp(4rem, 12vw, 7rem) var(--gutter) 2.25rem;
}
.front__order { padding: 2rem var(--gutter) clamp(2.5rem, 6vw, 4rem); }
.front__order-title { margin: 0 0 1rem; font-size: var(--wp--preset--font-size--x-large); }

.hero h1 { color: #fff; max-width: 18ch; margin: 0 0 1rem; font-size: clamp(2.25rem, 5vw, 3.5rem); line-height: 1.08; }
.hero p { max-width: 36ch; font-size: clamp(1.25rem, 2vw, 1.5rem); margin: 0 0 1.75rem; }
.hero .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 0.75rem 1rem; }
.hero .wp-block-button__link { min-height: 4rem; font-size: 1.25rem; padding-inline: 2rem; }
.hero > :last-child { margin-bottom: 0; }
@media (max-width: 599px) {
	.hero .wp-block-buttons { flex-direction: column; align-items: stretch; }
	.hero .wp-block-button, .hero .wp-block-button__link { width: 100%; }
}

@media (min-width: 1000px) {
	.front {
		background-color: var(--green-dark);
		background-image: linear-gradient(90deg, rgba(10, 30, 14, 0.85) 0%, rgba(10, 30, 14, 0.6) 50%, rgba(10, 30, 14, 0.3) 100%), url("../img/hero.jpg");
		background-image: linear-gradient(90deg, rgba(10, 30, 14, 0.85) 0%, rgba(10, 30, 14, 0.6) 50%, rgba(10, 30, 14, 0.3) 100%), image-set(url("../img/hero.webp") type("image/webp"), url("../img/hero.jpg") type("image/jpeg"));
		background-size: cover; background-position: center 40%;
	}
	.front__inner {
		display: grid; grid-template-columns: minmax(0, 1fr) minmax(420px, 560px); gap: 2.5rem; align-items: center;
		max-width: var(--wrap); margin-inline: auto; padding: 1.25rem var(--gutter);
	}
	.front__intro { background: none; padding: 0; }
	.front__order { overflow: hidden; padding: 1rem 0 0; background: #fff; border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }
	/* The form inside starts 12px in, so the heading and the note line up with its fields. */
	.front__order-title { font-size: 1.75rem; margin-bottom: 0.25rem; padding-inline: 1.75rem; }
	.front__order .order-form { border-radius: 0; }
	.front__order .order-form__frame { padding: 0 1rem; }
	.front__order .order-form__privacy { padding: 0.75rem 1.75rem; }
	.front__order .order-form { border: 0; box-shadow: none; }
	.front__order .order-form__frame { padding: 0; }
}

/* "What we do" on the partner page: a simple list in columns. */
.service-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 0.75rem 2rem; list-style: none; padding: 0 !important; margin-block: 1.5rem 2rem; }
.service-list li { position: relative; display: flex; align-items: center; min-height: 3.75rem; padding: 0.9rem 1rem 0.9rem 3.25rem; background: var(--green-light); border-radius: var(--radius); font-weight: 700; font-size: 1.25rem; max-width: none; }
.service-list li::before { content: ""; position: absolute; left: 1rem; top: 50%; width: 1.4rem; height: 1.4rem; margin-top: -0.7rem; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 80% no-repeat; }

/* Front page sections. */
.section { padding-block: clamp(3rem, 7vw, 5rem); }
.section--flush { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section--tint { background: var(--green-light); }
.section--yellow { background: var(--yellow-light); border-top: 6px solid var(--yellow); }
.section__title { margin: 0 0 1.5rem; font-size: var(--wp--preset--font-size--x-large); }
.section__lead { margin: -0.5rem 0 1.5rem; font-size: 1.3125rem; }
.section__more { margin: 2rem 0 0; }

/* News cards. */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 1.5rem; }
.news-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; position: relative; }
.news-card__image { display: block; aspect-ratio: 3 / 2; background: var(--green-light); }
.news-card__image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.news-card__image--empty { display: flex; align-items: center; justify-content: center; background: var(--green-light) url("../img/icon.svg") center / 30% no-repeat; }
.news-card:hover .news-card__image img { transform: scale(1.03); }
.news-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.4rem 1.5rem; }
.news-card__date { margin: 0 0 0.4rem; color: var(--muted); font-size: 1.0625rem; }
.news-card__title { margin: 0 0 0.75rem; font-size: 1.375rem; line-height: 1.3; }
.news-card__title a { color: var(--ink); text-decoration: none; }
.news-card__title a::after { content: ""; position: absolute; inset: 0; } /* The whole card opens the article. */
.news-card__title a:hover { text-decoration: underline; }
.news-card__body > p { margin: 0 0 1rem; }
.news-card__more { margin-top: auto !important; font-weight: 700; }
.news-card:focus-within { box-shadow: var(--focus); }
.news-card__title a:focus-visible { box-shadow: none; }

.posts-navigation { margin-top: 2.5rem; }
.posts-navigation .nav-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.posts-navigation a { display: inline-flex; min-height: 3.5rem; align-items: center; padding: 0.75rem 1.4rem; border: 3px solid var(--green); border-radius: 8px; font-weight: 700; text-decoration: none; color: var(--green-dark); }
.posts-navigation .nav-next { margin-left: auto; }

/* Front page gallery strip. */
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.photo-strip a { display: block; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.photo-strip a:hover img { transform: scale(1.04); }
@media (max-width: 700px) { .photo-strip { grid-template-columns: repeat(2, 1fr); } }

/* Order form: the form in a white card with the privacy note under it, then a panel for those who'd rather call. */
.order-form { scroll-margin-top: 1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06); overflow: hidden; }
.order-form__frame { padding: 0.5rem; min-height: 44rem; } /* About the form's height, so the page doesn't jump when it loads. */
.order-form__frame.is-loaded { min-height: 0; }
.order-form iframe { display: block; width: 100%; border: 0; }
.entry-content .order-form__privacy, .order-form__privacy { max-width: none; margin: 0; padding: 0.9rem 1.25rem; border-top: 1px solid var(--line); background: #f7f8f6; color: var(--muted); font-size: 1rem; }
.order-call { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 1.5rem; margin-top: 1.5rem; padding: 1.25rem 1.5rem; background: var(--yellow-light); border: 2px solid var(--yellow); border-radius: var(--radius); }
.section--yellow .order-call { background: #fff; }
.order-call__text { margin: 0; font-size: 1.375rem; font-weight: 700; }
.button--call { background: var(--yellow); border-color: var(--yellow); color: var(--ink); font-size: 1.25rem; white-space: nowrap; }
.button--call:hover { background: #ffe066; border-color: #ffe066; color: var(--ink); }
@media (max-width: 599px) { .order-call .button--call { width: 100%; } }
.phone { font-weight: 700; white-space: nowrap; }

/* Contact cards (footer and the contact page). */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 1rem; }
.contact-card { padding: 1.25rem 1.4rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.contact-card :is(h2, h3) { margin: 0 0 0.5rem; font-size: 1.1875rem; }
.contact-card a:not(.link-button) { display: inline-flex; align-items: center; min-height: 2.75rem; }
.contact-card p { margin: 0 0 0.75rem; }
.contact-card p:last-child { margin-bottom: 0; }
.entry-content > .contact-cards { width: min(var(--wrap) - 2 * var(--gutter), 100% - 2 * var(--gutter)); }

/* Footer. */
.site-footer { background: var(--green-dark); color: #fff; padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer__title { color: #fff; margin: 0 0 0.25rem; font-size: var(--wp--preset--font-size--x-large); }
.site-footer__lead { margin: 0 0 1.5rem; font-size: 1.25rem; }
.site-footer .contact-card { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.2); }
.site-footer .contact-card :is(h2, h3) { color: var(--yellow); }
.site-footer__bottom a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.site-footer .link-button { background: transparent; color: #fff; border-color: #fff; }
.site-footer .link-button:hover { background: rgba(255, 255, 255, 0.15); color: #fff; }
.site-footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.25); font-size: 1.0625rem; }
.site-footer__bottom p { margin: 0; }
/* On the contact page the footer has only this line (the cards are in the page itself). */
.site-footer__bottom:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* Picture viewer. */
.lightbox { width: 100vw; height: 100vh; width: 100dvw; height: 100dvh; max-width: none; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(10, 14, 10, 0.94); color: #fff; }
.lightbox::backdrop { background: rgba(10, 14, 10, 0.94); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lightbox__top { display: flex; justify-content: space-between; align-items: center; padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) 0.75rem max(1rem, env(safe-area-inset-left, 0px)); font-size: 1.125rem; }
.lightbox__figure { margin: 0; display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 max(1rem, env(safe-area-inset-left, 0px)); }
.lightbox__figure img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lightbox__bar { display: flex; justify-content: center; gap: 1rem; padding: 1rem 1rem max(1rem, env(safe-area-inset-bottom, 0px)); }
.lightbox button { min-height: 3.5rem; min-width: 3.5rem; padding: 0 1.25rem; border: 2px solid #fff; border-radius: 8px; background: transparent; color: #fff; font: inherit; font-weight: 700; font-size: 1.125rem; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, 0.15); }
.lightbox .lightbox__close { background: #fff; color: var(--ink); }

@media (orientation: landscape) and (max-height: 500px) {
	.lightbox[open] { grid-template-rows: auto 1fr; }
	.lightbox__bar { position: absolute; inset: 50% max(0.5rem, env(safe-area-inset-right, 0px)) auto max(0.5rem, env(safe-area-inset-left, 0px)); transform: translateY(-50%); justify-content: space-between; padding: 0; pointer-events: none; }
	.lightbox__bar button { pointer-events: auto; background: rgba(10, 14, 10, 0.6); }
	.lightbox__figure { padding: 0 max(1rem, env(safe-area-inset-left, 0px)) max(0.5rem, env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
	.topbar, .site-header nav, .menu-toggle, .order-form, .section--yellow, .site-footer .link-button { display: none !important; }
}
