/*
Theme Name: Levenshuis
Theme URI: https://levenshuis.org
Author: Pendulum
Description: A warm, editorial theme for Levenshuis and biobased building.
Version: 1.0.0
Text Domain: levenshuis
*/

:root {
    --cream: #f7f5f0;
    --sage: #8a9a84;
    --forest: #2f342d;
    --terracotta: #b87352;
    --mist: #e2e5e0;
    --container: 80rem;
}

* {
    box-sizing: border-box;
}

html {
    background-color: var(--forest);
    scroll-behavior: smooth;
    /* Reserve the scrollbar's width permanently. Toggling a FAQ item changes
       page height and can cross the threshold where the browser adds or
       removes the vertical scrollbar; without this, every full-bleed
       section (which sizes itself with 100vw) visibly resizes each time
       that happens. */
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    background: var(--cream);
    color: #293029;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    display: block;
    max-width: 100%;
    height: auto;
}

.container {
    width: min(calc(100% - 3rem), var(--container));
    margin-inline: auto;
}

.screen-reader-text {
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--forest);
    box-shadow: 0 2px 8px #0002;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.nav-brand {
    display: flex;
    flex: 1;
}

.nav-actions {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
}

.custom-logo {
    max-height: 5rem;
    width: auto;
}

.site-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
}

.primary-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.primary-menu a {
    color: white;
    font-size: .875rem;
    font-weight: 600;
}

.primary-menu a:hover,
.footer-menu a:hover {
    color: var(--terracotta);
}

.primary-menu .menu-item-has-children {
    position: relative;
}

.primary-menu>.menu-item-has-children {
    display: flex;
    align-items: center;
}

.primary-menu .sub-menu>.menu-item-has-children {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.submenu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
    margin-left: .25rem;
    padding: .25rem;
}

.submenu-toggle svg {
    width: 1rem;
    height: 1rem;
    transition: transform .2s ease;
}

.submenu-toggle:hover,
.submenu-toggle:focus-visible {
    color: var(--terracotta);
}

.submenu-toggle:focus-visible {
    outline: 2px solid var(--terracotta);
    outline-offset: 2px;
}

.primary-menu .sub-menu {
    position: absolute;
    z-index: 1;
    min-width: 13rem;
    visibility: hidden;
    opacity: 0;
    border-radius: .5rem;
    background: var(--forest);
    box-shadow: 0 .75rem 2rem #0003;
    list-style: none;
    margin: 0;
    padding: .5rem;
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    pointer-events: none;
}

.primary-menu>.menu-item-has-children>.sub-menu {
    top: calc(100% + 1rem);
    left: 50%;
    transform: translate(-50%, -.5rem);
}

.primary-menu .sub-menu .sub-menu {
    top: -.5rem;
    left: calc(100% + .5rem);
    transform: translateX(-.5rem);
}

.primary-menu>.menu-item-has-children>.sub-menu::before {
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 1rem;
    content: "";
}

.primary-menu .sub-menu .sub-menu::before {
    position: absolute;
    top: 0;
    right: 100%;
    width: .5rem;
    height: 100%;
    content: "";
}

.primary-menu .sub-menu a {
    display: block;
    border-radius: .375rem;
    padding: .65rem .75rem;
    white-space: nowrap;
}

.primary-menu .sub-menu a:hover,
.primary-menu .sub-menu a:focus-visible {
    background: #ffffff0d;
    color: var(--terracotta);
}

.primary-menu .menu-item-has-children:not(.has-submenu-toggle):hover>.sub-menu,
.primary-menu .menu-item-has-children:not(.has-submenu-toggle):focus-within>.sub-menu,
.primary-menu .menu-item-has-children.is-submenu-open>.sub-menu {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.primary-menu .sub-menu .menu-item-has-children.is-submenu-open>.sub-menu {
    transform: translateX(0);
}

.primary-menu .sub-menu .submenu-toggle svg {
    transform: rotate(-90deg);
}

.primary-menu>.menu-item-has-children.is-submenu-open>.submenu-toggle svg,
.primary-menu .sub-menu .menu-item-has-children.is-submenu-open>.submenu-toggle svg {
    transform: rotate(180deg);
}

.button {
    display: inline-block;
    border: 0;
    border-radius: .375rem;
    background: var(--terracotta);
    box-shadow: 0 1px 2px 0 #0000000d;
    color: white;
    cursor: pointer;
    font: inherit;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
    padding: .625rem 1rem;
    text-decoration: none;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.button:hover {
    background: var(--sage);
    color: white;
}

.button:focus-visible {
    outline: 2px solid var(--terracotta);
    outline-offset: 2px;
}

.header-contact {
    box-shadow: none;
}

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: .4rem;
    background: transparent;
    color: var(--mist);
    cursor: pointer;
    padding: .625rem;
}

.menu-toggle:hover {
    color: var(--terracotta);
}

.hero {
    background: linear-gradient(135deg, var(--forest), var(--sage));
    color: var(--mist);
    padding: 6rem 0;
}

.hero-grid,
.split {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    align-items: center;
}

.eyebrow {
    color: var(--terracotta);
    font-size: 1rem;
    font-weight: 700;
}

h1,
h2,
h3 {
    margin: 0;
}

.hero h1,
.banner h1 {
    color: var(--mist);
}

.hero p {
    font-size: 1.125rem;
    line-height: 2;
}

.hero h1+p {
    margin-top: 1.5rem;
}

.hero-media {
    overflow: hidden;
    border-radius: 1.5rem;
}

.hero-media video,
.hero-media img {
    width: 100%;
}

.section {
    padding: 6rem 0;
}

.section-cream+.section-cream,
.section-white+.section-white,
.section-transparent+.section-transparent {
    padding-top: 0;
}

.section-white {
    background: white;
}

.section-cream {
    background: var(--cream);
}

.section-transparent {
    background: transparent;
}

/* A section nested inside a gradient section must not repeat the outer
   section's vertical padding or break out of it to full-bleed width.
   Scoped to .gradient-section because page templates already wrap all
   content in a .section, which would otherwise match every block. */
.gradient-section .section {
    margin-left: 0;
    padding-block: 0;
    width: auto;
}

.gradient-section .section>.container {
    width: 100%;
}

.lead {
    font-size: 1.125rem;
    line-height: 2;
}

.cards,
.post-grid,
.partner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.cards {
    margin-top: 3rem;
}

.card {
    border-radius: 1.5rem;
    background: white;
    padding: 2rem;
    box-shadow: 0 0 0 1px #29302918;
}

.card h3 {
    font-size: 1.125rem;
}

.card p {
    color: #5e665f;
}

.banner {
    background: var(--forest);
    padding: 6rem 0;
    text-align: center;
}

.banner p {
    color: var(--sage);
    font-size: 1.125rem;
    line-height: 2;
}

.banner-post {
    text-align: left;
}

.banner-post .container {
    max-width: 42rem;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1.5rem;
}

.banner-post .post-tag {
    background: #8a9a8433;
    box-shadow: inset 0 0 0 1px #8a9a844d;
    color: var(--sage);
}

.banner-post h1+p {
    color: var(--sage);
    font-size: .95rem;
    margin-top: 2rem;
}

.prose {
    max-width: 48rem;
}

.prose p {
    color: #59615a;
}

/* Inline links inside editable content need their own colour and underline;
   the global `a { color: inherit }` rule exists for nav/footer/button links
   that must not look like plain text links. Button links keep their own
   styling even when a Buttons block sits inside a prose/content area. */
.prose a:not(.wp-block-button__link),
.wp-block-post-content a:not(.wp-block-button__link) {
    color: var(--terracotta);
    text-decoration: underline;
    text-underline-offset: .15em;
}

.prose a:not(.wp-block-button__link):hover,
.wp-block-post-content a:not(.wp-block-button__link):hover {
    color: var(--sage);
}

.post-grid {
    margin-top: 3rem;
}

.post-card {
    display: flex;
    flex-direction: column;
}

.post-card img,
.post-placeholder {
    aspect-ratio: 3 / 2;
    border-radius: 1.5rem;
    object-fit: cover;
    width: 100%;
}

.post-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--sage), var(--forest));
    color: white;
    font-size: 2rem;
}

.post-meta {
    align-items: center;
    color: #687068;
    display: flex;
    flex-wrap: wrap;
    font-size: .85rem;
    gap: .6rem;
    margin-top: 1.3rem;
}

.post-tag {
    background: white;
    border-radius: 9999px;
    box-shadow: inset 0 0 0 1px rgba(138, 154, 132, .2);
    color: var(--sage);
    font-weight: 600;
    padding: .3rem .8rem;
}

.post-featured-image,
.post-placeholder-single {
    border-radius: 1.5rem;
    display: block;
    margin-bottom: 3rem;
    overflow: hidden;
    width: 100%;
}

.post-featured-image img {
    display: block;
    height: auto;
    width: 100%;
}

.post-placeholder-single {
    align-items: center;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--sage), var(--forest));
    color: white;
    display: flex;
    font-size: 2.5rem;
    justify-content: center;
}

.post-share {
    border-top: 1px solid #e5e7eb;
    margin-top: 4rem;
    padding-top: 2rem;
}

.post-share h3 {
    color: var(--forest);
    font-size: .875rem;
    font-weight: 600;
}

.post-share-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.post-share-links a {
    align-items: center;
    background: #f3f4f6;
    border-radius: 9999px;
    color: #4b5563;
    display: flex;
    height: 2.25rem;
    justify-content: center;
    transition: background-color .2s, color .2s;
    width: 2.25rem;
}

.post-share-links a:hover {
    background: var(--terracotta);
    color: white;
}

.post-back {
    margin-top: 3rem;
}

.post-back a {
    align-items: center;
    color: var(--terracotta);
    display: inline-flex;
    font-weight: 600;
    gap: .5rem;
    text-decoration: none;
}

.post-back a:hover {
    color: var(--sage);
}

.post-card h2 {
    font-size: 1.25rem;
    margin-top: .4rem;
}

.post-card p {
    color: #606860;
}

.partner-grid {
    grid-template-columns: repeat(4, 1fr);
    margin-top: 2rem;
}

.partner-card {
    display: grid;
    min-height: 8rem;
    place-items: center;
    border-radius: 1rem;
    background: white;
    padding: 1rem;
}

.partner-card img {
    max-height: 5rem;
    object-fit: contain;
}

.our-partners__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(4, 1fr);
    margin-top: 3rem;
}

.our-partners__card {
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 0 0 1px #29302918;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    transition: box-shadow .3s ease;
}

.our-partners__card:hover {
    box-shadow: 0 0 0 1px var(--sage);
}

.our-partners__logo {
    border-radius: 9999px;
    height: 6rem;
    object-fit: contain;
    width: 6rem;
}

.our-partners__logo--placeholder {
    align-items: center;
    background: linear-gradient(135deg, var(--sage), var(--forest));
    color: white;
    display: flex;
    font-size: 1.75rem;
    font-weight: 600;
    justify-content: center;
}

.our-partners__name {
    font-weight: 600;
    margin-top: 1.5rem;
}

.our-partners__tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    justify-content: center;
    margin-top: .75rem;
}

.our-partners__tag {
    background: #f7f5f0;
    border-radius: 9999px;
    box-shadow: inset 0 0 0 1px rgba(138, 154, 132, .2);
    color: var(--sage);
    font-size: .8rem;
    font-weight: 600;
    padding: .25rem .7rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem 2rem;
}

label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: .375rem;
}

input,
textarea,
select {
    border: 1px solid #cdd1cb;
    border-radius: .375rem;
    background: white;
    font: inherit;
    font-size: 1rem;
    padding: .625rem .875rem;
    width: 100%;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--terracotta);
    outline: 2px solid var(--terracotta);
    outline-offset: -1px;
}

textarea {
    min-height: 10rem;
    resize: vertical;
}

.field-full {
    grid-column: 1 / -1;
}

.site-footer {
    background: var(--forest);
    color: var(--mist);
    padding: 6rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 2rem;
}

.site-footer h2 {
    color: var(--mist);
    font-size: .875rem;
    font-weight: 600;
}

.site-footer p {
    color: var(--mist);
    font-size: .875rem;
}

.site-footer .custom-logo {
    max-height: 4rem;
}

.footer-about {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
}

.footer-about p {
    margin: 0;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
}

.footer-socials a {
    color: var(--mist);
    transition: color .2s;
}

.footer-socials a:hover {
    color: var(--terracotta);
}

.footer-socials svg {
    width: 1.5rem;
    height: 1.5rem;
}

.footer-menu {
    list-style: none;
    margin: 1.5rem 0 0;
    padding: 0;
}

.footer-menu li {
    margin: 1rem 0;
}

.footer-menu a {
    color: var(--sage);
    font-size: .875rem;
    transition: color .2s;
}

.footer-newsletter p {
    color: var(--sage);
    margin: .5rem 0 0;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.newsletter-form input {
    border: 1px solid #ffffff1a;
    background: #ffffff0d;
    color: white;
    font-size: .875rem;
    padding: .55rem .85rem;
}

.newsletter-form input::placeholder {
    color: #9ca3af;
}

.newsletter-form input:focus {
    border-color: var(--terracotta);
    outline: none;
}

.newsletter-form .button {
    flex: none;
    padding: .55rem .85rem;
}

.newsletter-form-notice {
    color: var(--sage);
    font-size: .875rem;
    font-style: italic;
    margin-top: 1.5rem;
}

.copyright {
    border-top: 1px solid #ffffff1a;
    color: var(--sage);
    font-size: .875rem;
    margin-top: 4rem;
    padding-top: 2rem;
}

.aligncenter {
    margin-inline: auto;
}

.wp-block-image img {
    border-radius: 1.5rem;
}

/* Matches the deep image shadow used on the old site's image panels. */
.has-image-shadow,
.wp-block-image.has-image-shadow img {
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px #00000040;
}

/* Match the site's default button treatment (see .button) so the core
   Buttons block previews correctly without a separate style variant. */
.wp-block-button__link {
    background: var(--terracotta);
    border-radius: .375rem;
    box-shadow: 0 1px 2px 0 #0000000d;
    color: white;
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.25rem;
    padding: .625rem 1rem;
    transition: background-color .15s ease-in-out, color .15s ease-in-out;
}

.wp-block-button__link:hover {
    background: var(--sage);
    color: white;
}

.wp-block-button__link:focus-visible {
    outline: 2px solid var(--terracotta);
    outline-offset: 2px;
}

.wp-block-buttons {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.wp-block-buttons.is-content-justification-center {
    justify-content: center;
}

.wp-block-buttons.is-content-justification-right {
    justify-content: flex-end;
}

.wp-block-buttons.is-content-justification-left {
    justify-content: flex-start;
}

.wp-block-button.is-style-primary .wp-block-button__link {
    background: var(--terracotta);
    color: white;
}

/* The old site's secondary call to action: a plain semibold label that
   picks up the surrounding text colour and turns terracotta on hover. */
.wp-block-button.is-style-tertiary .wp-block-button__link {
    background: transparent;
    box-shadow: none;
    color: #202520;
    padding: 0;
}

.wp-block-button.is-style-tertiary .wp-block-button__link:hover {
    background: transparent;
    color: var(--terracotta);
}

.gradient-section .wp-block-button.is-style-tertiary .wp-block-button__link,
.hero .wp-block-button.is-style-tertiary .wp-block-button__link,
.banner .wp-block-button.is-style-tertiary .wp-block-button__link {
    color: var(--mist);
}

.gradient-section .wp-block-button.is-style-tertiary .wp-block-button__link:hover,
.hero .wp-block-button.is-style-tertiary .wp-block-button__link:hover,
.banner .wp-block-button.is-style-tertiary .wp-block-button__link:hover {
    color: var(--terracotta);
}

.wp-block-list.is-style-checks,
.wp-block-list.is-style-arrows {
    list-style: none;
    padding-left: 0;
}

.wp-block-list.is-style-checks li,
.wp-block-list.is-style-arrows li {
    display: flex;
    gap: .75rem;
}

.wp-block-list.is-style-checks li {
    position: relative;
}

.wp-block-list.is-style-checks li::before {
    background: var(--terracotta);
    content: "";
    flex: 0 0 1.25rem;
    height: 1.25rem;
    margin-top: .2rem;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' fill-rule='evenodd' d='M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' fill-rule='evenodd' d='M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
}

.wp-block-list.is-style-arrows li::before {
    color: var(--terracotta);
    content: "\2192";
    flex: 0 0 1.25rem;
    font-weight: 700;
}

.gradient-section {
    color: var(--mist);
}

.gradient-section--forest-sage {
    background: linear-gradient(135deg, var(--forest), var(--sage));
}

.gradient-section--sage-forest {
    background: linear-gradient(135deg, var(--sage), var(--forest));
}

.gradient-section--sky-indigo {
    background: linear-gradient(135deg, #80caff, #4f46e5);
}

.gradient-section h2,
.gradient-section h3 {
    color: var(--mist);
}

.gradient-section p {
    color: var(--mist);
}

.gradient-section__content {
    max-width: 48rem;
    margin-inline: auto;
}

/* Nested sections bring their own container, so the narrow prose
   width would otherwise squeeze them. */
.gradient-section__content:has(.section) {
    max-width: none;
}

/* Block styles registered via register_block_style() in functions.php,
   matching the real classes used across the site's page templates. */
.is-style-eyebrow {
    color: var(--terracotta);
    font-size: 1rem;
    font-weight: 700;
}

.is-style-card {
    border-radius: 1.5rem;
    background: white;
    padding: 2rem;
    box-shadow: 0 0 0 1px #29302918;
}

.is-style-banner {
    background: var(--forest);
    color: var(--mist);
    padding: 6rem 3rem;
    text-align: center;
}

.is-style-banner h1,
.is-style-banner h2,
.is-style-banner h3 {
    color: var(--mist);
}

.is-style-banner p {
    color: var(--sage);
    font-size: 1.125rem;
    line-height: 2;
}

.is-style-rounded img,
img.is-style-rounded {
    border-radius: 1.5rem;
}

.wp-block-levenshuis-media-section,
.wp-block-levenshuis-levenshuis-section,
.wp-block-levenshuis-gradient-section,
.wp-block-levenshuis-faq,
.wp-block-levenshuis-contact,
.wp-block-levenshuis-contact-form,
.wp-block-levenshuis-order-form,
.wp-block-levenshuis-triptych,
.wp-block-levenshuis-partner-layers,
.wp-block-levenshuis-latest-posts,
.wp-block-levenshuis-our-partners,
.wp-block-levenshuis-google-calendar {
    margin-left: calc(50% - 50vw);
    width: 100vw;
}

.prose> :is(.wp-block-levenshuis-media-section,
    .wp-block-levenshuis-levenshuis-section,
    .wp-block-levenshuis-gradient-section,
    .wp-block-levenshuis-faq,
    .wp-block-levenshuis-contact,
    .wp-block-levenshuis-contact-form,
    .wp-block-levenshuis-order-form,
    .wp-block-levenshuis-triptych,
    .wp-block-levenshuis-partner-layers,
    .wp-block-levenshuis-latest-posts,
    .wp-block-levenshuis-our-partners,
    .wp-block-levenshuis-google-calendar):first-child {
    margin-top: -6rem;
}

.prose> :is(.wp-block-levenshuis-media-section,
    .wp-block-levenshuis-levenshuis-section,
    .wp-block-levenshuis-gradient-section,
    .wp-block-levenshuis-faq,
    .wp-block-levenshuis-contact,
    .wp-block-levenshuis-contact-form,
    .wp-block-levenshuis-order-form,
    .wp-block-levenshuis-triptych,
    .wp-block-levenshuis-partner-layers,
    .wp-block-levenshuis-latest-posts,
    .wp-block-levenshuis-our-partners,
    .wp-block-levenshuis-google-calendar):last-child {
    margin-bottom: -6rem;
}

.prose .block-section__intro .eyebrow,
.prose .block-section__intro .is-style-eyebrow,
.prose .media-section__content .is-style-eyebrow,
.prose .levenshuis-section__content .is-style-eyebrow {
    color: var(--terracotta);
    font-size: 1rem;
    font-weight: 700;
}

.prose .block-section__intro .lead,
.prose .media-section__content .lead,
.prose .levenshuis-section__content .lead {
    font-size: 1.125rem;
    line-height: 2;
}

.block-section__intro {
    margin-bottom: 3rem;
    max-width: 46rem;
}

.block-section__intro.is-centered {
    margin-inline: auto;
    text-align: center;
}

.block-section__intro:has(.has-text-align-center) {
    margin-inline: auto;
}

.block-section__intro> :last-child,
.media-section__content> :last-child,
.levenshuis-section__content> :last-child,
.triptych-card> :last-child,
.triptych-item__body> :last-child {
    margin-bottom: 0;
}

.media-section__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
    align-items: center;
}

.media-section__media {
    overflow: hidden;
    border-radius: 1.5rem;
    background: var(--mist);
}

.media-section__media img {
    aspect-ratio: 4 / 3;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.levenshuis-section__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
    align-items: center;
}

.levenshuis-section__content {
    max-width: 48rem;
}

.levenshuis-section:not(.has-media) .levenshuis-section__content {
    grid-column: 1 / -1;
    margin-inline: auto;
}

.levenshuis-section__media {
    background: transparent;
}

.levenshuis-section__media-frame {
    overflow: hidden;
    border-radius: 1.5rem;
}

/* On white sections the media sits on cream so transparent images and
   letterboxed video read as a deliberate panel rather than floating. */
.levenshuis-section.section-white .levenshuis-section__media-frame {
    background: var(--cream);
}

.levenshuis-section__caption {
    color: #59615a;
    font-size: .875rem;
    line-height: 1.5;
    margin: 1rem 0 0;
}

.gradient-section .levenshuis-section__caption,
.section-transparent .levenshuis-section__caption {
    color: inherit;
    opacity: .8;
}

.levenshuis-section__media img {
    aspect-ratio: 4 / 3;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

/* Videos keep their intrinsic aspect ratio so nothing is cropped away. */
.levenshuis-section__media video {
    display: block;
    height: auto;
    width: 100%;
}

.levenshuis-section--right .levenshuis-section__media {
    order: 2;
}

.levenshuis-section__empty-image {
    align-items: center;
    background: var(--mist);
    border-radius: 1.5rem;
    display: flex;
    justify-content: center;
    min-height: 20rem;
    padding: 2rem;
}

.media-section--right .media-section__media {
    order: 2;
}

.faq-item {
    border-top: 1px solid #2025201a;
    max-width: 56rem;
    margin-inline: auto;
    padding-top: 1.5rem;
}

/* No divider or extra top padding above the first question: the section
   intro's own bottom margin already matches the gap other blocks use, so
   anything more here would make the FAQ section stand out. */
.faq-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.faq-item+.faq-item {
    margin-top: 1.5rem;
}

.faq-item__question {
    align-items: flex-start;
    color: #202520;
    cursor: pointer;
    display: flex;
    font-weight: 600;
    gap: 1.5rem;
    justify-content: space-between;
    line-height: 1.75;
    list-style: none;
    text-align: left;
}

/* Hide the native disclosure triangle so only the plus/minus icon shows. */
.faq-item__question::-webkit-details-marker {
    display: none;
}

.faq-item__text {
    flex: 1;
}

.faq-item__icon {
    color: #202520;
    flex: none;
    height: 1.5rem;
    margin-top: .125rem;
    width: 1.5rem;
}

.faq-item[open] .faq-item__icon-bar {
    opacity: 0;
}

.faq-item__answer {
    color: #59615a;
    margin-top: .5rem;
    padding-right: 3rem;
}

.faq-item__answer p:last-child {
    margin-bottom: 0;
}

.faq-item.is-editing .faq-item__question {
    cursor: text;
}

.gradient-section .faq-item,
.section-transparent .faq-item {
    border-top-color: #ffffff2e;
}

.gradient-section .faq-item__question,
.gradient-section .faq-item__icon,
.gradient-section .faq-item__answer,
.section-transparent .faq-item__question,
.section-transparent .faq-item__icon,
.section-transparent .faq-item__answer {
    color: inherit;
}

.contact-intro> :last-child {
    margin-bottom: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 2.5rem 0 0;
}

.contact-details__item {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
}

.contact-details__item dd {
    margin: 0;
}

.contact-details__icon {
    color: #9ca39a;
    flex: none;
    height: 1.5rem;
    margin-top: .125rem;
    width: 1.5rem;
}

.gradient-section .contact-details__icon,
.section-transparent .contact-details__icon {
    color: inherit;
    opacity: .7;
}

.contact-form-panel {
    align-self: start;
}

.contact-form__honeypot {
    left: -9999px;
    position: absolute;
}

.contact-form__errors {
    background: #fef2f2;
    border-radius: .5rem;
    color: #991b1b;
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
}

.contact-form__errors p {
    font-weight: 600;
    margin: 0;
}

.contact-form__errors ul {
    margin: .5rem 0 0;
    padding-left: 1.25rem;
}

.contact-form__success {
    background: #ecfdf3;
    border-radius: .75rem;
    color: #1a5b3d;
    padding: 2rem;
}

.contact-form__success p {
    margin: 0;
}

.contact-form__actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 2rem;
}

.triptych-grid {
    gap: 2rem;
}

.triptych-card,
.triptych-grid>.wp-block-column>.wp-block-group,
.triptych-item {
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
    background: white;
    padding: 2rem;
    box-shadow: 0 0 0 1px #29302918;
}

.triptych-item__heading {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1rem;
    width: 100%;
}

.triptych-item__icon {
    display: inline-flex;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    align-items: center;
    justify-content: center;
    border-radius: .65rem;
    background: color-mix(in srgb, var(--triptych-icon-color) 12%, white);
    color: var(--triptych-icon-color);
}

.triptych-item__icon--inverted {
    background: var(--triptych-icon-color);
    color: white;
}

.triptych-item__icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.triptych-item__heading h3 {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.triptych-item__body {
    width: 100%;
}

.triptych-item__body> :first-child {
    margin-top: 0;
}

.triptych-item__body> :last-child {
    margin-bottom: 0;
}

.triptych--plain .triptych-card,
.triptych--plain .triptych-grid>.wp-block-column>.wp-block-group,
.triptych--plain .triptych-item {
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
}

.partner-layers__layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr);
    gap: 3rem;
    align-items: start;
}

.partner-layers__visual {
    overflow: hidden;
    border-radius: 1.5rem;
    background: var(--cream);
    box-shadow: 0 .75rem 2.5rem #29302918;
}

.partner-layers__visual img {
    aspect-ratio: 16 / 9;
    object-fit: contain;
    width: 100%;
}

.partner-layers__empty-image {
    display: grid;
    aspect-ratio: 16 / 9;
    place-items: center;
    color: #687068;
}

.partner-layers__tabs {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.partner-layers__tab {
    border: 1px solid #29302922;
    border-radius: .5rem;
    background: white;
    color: #293029;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    padding: .85rem 1rem;
    text-align: left;
}

.partner-layers__tab:hover {
    background: var(--cream);
}

.partner-layers__tab.is-active {
    border-color: var(--terracotta);
    background: var(--terracotta);
    color: white;
}

.partner-layers__partners {
    margin-top: 2.5rem;
}

.partner-layers__partners h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

.partner-layers__partner-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.partner-layers__partner {
    display: flex;
    min-height: 8rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: white;
    padding: 1rem;
    text-align: center;
}

.partner-layers__partner img {
    max-height: 4rem;
    object-fit: contain;
    width: auto;
}

.partner-layers__partner span {
    margin-top: .75rem;
    font-size: .9rem;
    font-weight: 700;
}

.partner-layers-editor__row {
    border: 1px solid #29302922;
    border-radius: .75rem;
    margin-top: 1rem;
    padding: 1rem;
}

.partner-layers-editor__image {
    max-height: 10rem;
    margin-bottom: .75rem;
    object-fit: contain;
}

/* blocks/demo — example custom block wired to color/alignment/size attributes. */
.demo-block {
    border-radius: 1rem;
    padding: 1.5rem;
}

.demo-block--blue {
    background: #e2e9f5;
}

.demo-block--red {
    background: #f5e2e2;
}

.demo-block--green {
    background: var(--mist);
}

.demo-block--left {
    text-align: left;
}

.demo-block--center {
    text-align: center;
}

.demo-block--right {
    text-align: right;
}

.demo-block--small {
    font-size: .85rem;
}

.demo-block--medium {
    font-size: 1rem;
}

.demo-block--large {
    font-size: 1.3rem;
}

@media (max-width: 900px) {

    .primary-menu {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .header-contact {
        margin-left: auto;
    }

    .primary-menu.is-open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--forest);
        margin: 0;
        max-height: calc(100vh - 8rem);
        max-height: calc(100dvh - 8rem);
        overflow-y: auto;
        padding: .5rem 1.5rem 1.5rem;
    }

    .primary-menu.is-open li {
        border-top: 1px solid #ffffff1a;
    }

    .primary-menu.is-open .menu-item-has-children {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .primary-menu.is-open a {
        display: block;
        border-radius: .5rem;
        font-size: 1rem;
        padding: .75rem .75rem;
    }

    .primary-menu.is-open a:hover {
        background: #ffffff0d;
    }

    .primary-menu.is-open .submenu-toggle {
        align-self: stretch;
        margin: 0;
        padding: .75rem 1rem;
    }

    .primary-menu.is-open .submenu-toggle svg,
    .primary-menu.is-open .sub-menu .submenu-toggle svg {
        transform: none;
    }

    .primary-menu.is-open .menu-item-has-children.is-submenu-open>.submenu-toggle svg {
        transform: rotate(180deg);
    }

    .primary-menu.is-open .sub-menu {
        position: static;
        display: none;
        grid-column: 1 / -1;
        min-width: 0;
        width: 100%;
        visibility: visible;
        opacity: 1;
        transform: none;
        border-radius: 0;
        background: #ffffff08;
        box-shadow: none;
        margin: 0;
        padding: 0 0 .5rem 1rem;
        transition: none;
        pointer-events: auto;
    }

    .primary-menu.is-open .sub-menu::before,
    .primary-menu.is-open .sub-menu .sub-menu::before {
        content: none;
    }

    .primary-menu.is-open .is-submenu-open>.sub-menu {
        display: block;
    }

    .primary-menu.is-open .sub-menu li {
        border-top: 0;
    }

    .primary-menu.is-open .sub-menu .sub-menu {
        border-left: 1px solid #ffffff1a;
    }

    .primary-menu.is-open .sub-menu a {
        font-size: .9375rem;
        font-weight: 500;
        white-space: normal;
    }

    .hero-grid,
    .split,
    .contact-grid,
    .media-section__grid,
    .levenshuis-section__grid,
    .partner-layers__layout {
        grid-template-columns: 1fr;
    }

    .media-section--right .media-section__media {
        order: initial;
    }

    .levenshuis-section--right .levenshuis-section__media {
        order: initial;
    }

    .cards,
    .post-grid,
    .our-partners__grid {
        grid-template-columns: 1fr;
    }

    .partner-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .partner-layers__partner-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2.5rem;
    }

    .footer-about {
        grid-column: 1 / -1;
    }
}

/* Give inline links their own colour/underline in the editor too, without
   touching button links (buttons keep their own colour/no-underline). */
.editor-styles-wrapper a:not(.wp-block-button__link) {
    color: var(--terracotta);
    text-decoration: underline;
    text-underline-offset: .15em;
}

.editor-styles-wrapper a:not(.wp-block-button__link):hover {
    color: var(--sage);
}

/* The editor canvas has no equivalent of the frontend's .container/.prose
   wrapper (that markup lives in page.php etc., not in post_content), so
   top-level blocks and the post title field (its own separate wrapper)
   would otherwise sit flush against the canvas edge. Reproduce that
   wrapper's width and gutter here; this also keeps the `calc(50% - 50vw)`
   full-bleed maths on custom sections correct, since it assumes it is
   nested inside a container of this width. */
.editor-styles-wrapper .is-root-container,
.edit-post-visual-editor__post-title-wrapper,
.editor-visual-editor__post-title-wrapper {
    max-width: 48rem;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

/* Keep the optional image and text side by side in the block editor. */
.editor-styles-wrapper .levenshuis-section__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-styles-wrapper .levenshuis-section:not(.has-media) .levenshuis-section__content {
    grid-column: auto;
    margin-inline: 0;
}

.editor-styles-wrapper .levenshuis-section--right .levenshuis-section__media {
    order: 2;
}

@media (max-width: 560px) {
    .container {
        width: min(calc(100% - 2rem), var(--container));
    }

    .section,
    .hero {
        padding: 4rem 0;
    }

    .prose> :is(.wp-block-levenshuis-media-section,
        .wp-block-levenshuis-levenshuis-section,
        .wp-block-levenshuis-gradient-section,
        .wp-block-levenshuis-faq,
        .wp-block-levenshuis-contact,
        .wp-block-levenshuis-contact-form,
        .wp-block-levenshuis-order-form,
        .wp-block-levenshuis-triptych,
        .wp-block-levenshuis-partner-layers,
        .wp-block-levenshuis-latest-posts,
        .wp-block-levenshuis-our-partners,
        .wp-block-levenshuis-google-calendar):first-child {
        margin-top: -4rem;
    }

    .prose> :is(.wp-block-levenshuis-media-section,
        .wp-block-levenshuis-levenshuis-section,
        .wp-block-levenshuis-gradient-section,
        .wp-block-levenshuis-faq,
        .wp-block-levenshuis-contact,
        .wp-block-levenshuis-contact-form,
        .wp-block-levenshuis-order-form,
        .wp-block-levenshuis-triptych,
        .wp-block-levenshuis-partner-layers,
        .wp-block-levenshuis-latest-posts,
        .wp-block-levenshuis-our-partners,
        .wp-block-levenshuis-google-calendar):last-child {
        margin-bottom: -4rem;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: auto;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }
}