:root {
    --paper: #faf8f3;
    --surface: #ffffff;
    --sand: #f1ece2;
    --sand-deep: #e5ddcd;
    --sage: #6f8467;
    --sage-dark: #46593f;
    --sage-soft: #e6ebe1;
    --clay: #b07d57;
    --ink: #2f2e2a;
    --muted: #6d6b63;
    --line: #e6e0d4;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow: 0 1px 2px rgba(60, 50, 30, .05), 0 8px 24px rgba(60, 50, 30, .06);
    --serif: "Fraunces", Georgia, "Times New Roman", serif;
    --sans: "Nunito Sans", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    color: var(--ink);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.7;
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 500;
    line-height: 1.25;
    color: var(--sage-dark);
    letter-spacing: -.01em;
}

h1 { font-size: clamp(1.9rem, 1.4rem + 1.6vw, 2.6rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.4rem, 1.2rem + .6vw, 1.75rem); margin: 2rem 0 .75rem; }
h3 { font-size: 1.25rem; margin: 1.6rem 0 .5rem; }

a {
    color: var(--sage-dark);
    text-decoration-color: rgba(70, 89, 63, .35);
    text-underline-offset: .18em;
    transition: color .15s ease, text-decoration-color .15s ease;
}

a:hover { color: var(--clay); text-decoration-color: currentColor; }

:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }

img { max-width: 100%; height: auto; }

iframe {
    display: block;
    width: 100%;
    max-width: 640px;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: var(--radius);
    background: var(--sand);
}

.wrap {
    width: min(1120px, calc(100% - 2.5rem));
    margin-inline: auto;
}

.skip {
    position: absolute;
    left: -999px;
}

.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: .5rem .8rem; border-radius: 8px; }

/* Header */

header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(250, 248, 243, .92);
    backdrop-filter: saturate(140%) blur(8px);
    border-bottom: 1px solid var(--line);
}

.header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 2rem;
    min-height: 84px;
    padding: .75rem 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    color: var(--ink);
    text-decoration: none;
}

.brand:hover { color: var(--ink); }

.brand img { width: 52px; height: auto; }

.brand small {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
}

.brand strong {
    display: block;
    font-family: var(--serif);
    font-weight: 500;
    font-size: 1.85rem;
    line-height: 1.05;
    color: var(--sage-dark);
}

.menu-toggle, .menu-button { display: none; }

nav { display: flex; flex-wrap: wrap; gap: .25rem; margin-left: auto; }

nav a {
    position: relative;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    padding: .5rem .9rem;
    border-radius: 999px;
}

nav a:hover { color: var(--sage-dark); background: var(--sage-soft); }

nav a.active { color: var(--sage-dark); background: var(--sage-soft); }

main { padding: 2.5rem 0 4.5rem; }

/* Two-column pages */

.layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

.side {
    position: sticky;
    top: 108px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--sand-deep) transparent;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 1rem .75rem;
    box-shadow: var(--shadow);
}

.side ul { list-style: none; margin: 0; padding: 0; }

.side li { margin: 0; }

.side a {
    display: block;
    padding: .45rem .75rem;
    border-radius: 10px;
    color: var(--ink);
    font-size: .95rem;
    line-height: 1.35;
    text-decoration: none;
}

.side a:hover { background: var(--sand); color: var(--sage-dark); }

.side li.active a {
    background: var(--sage-soft);
    color: var(--sage-dark);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--sage);
}

/* Fold-out group in the side menu (details/summary: works without JavaScript) */

.side details > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .45rem .75rem;
    border-radius: 10px;
    color: var(--ink);
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
}

.side details > summary::-webkit-details-marker { display: none; }

.side details > summary::after {
    content: "";
    flex: none;
    width: .45rem;
    height: .45rem;
    margin-top: -.2rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .15s;
}

.side details[open] > summary::after { margin-top: .2rem; transform: rotate(-135deg); }

.side details > summary:hover { background: var(--sand); color: var(--sage-dark); }

.side li.has-active > details > summary { color: var(--sage-dark); }

/* A group whose title links to its own info page: the text is the link, the arrow still folds the group */
.side details > summary a {
    flex: 1;
    padding: 0;
    background: none;
    border-radius: 0;
    color: inherit;
    font-weight: inherit;
}

.side details > summary a:hover { background: none; }

.side li.is-current > details > summary {
    background: var(--sage-soft);
    color: var(--sage-dark);
    font-weight: 700;
    box-shadow: inset 3px 0 0 var(--sage);
}

.side details > ul {
    margin: .1rem 0 .4rem .75rem;
    padding-left: .35rem;
    border-left: 2px solid var(--line);
}

/* Content */

.prose { max-width: 72ch; }

.prose > *:first-child { margin-top: 0; }

.prose p, .prose ul, .prose ol { margin: 0 0 1.1rem; }

.prose ul, .prose ol { padding-left: 1.3rem; }

.prose li { margin-bottom: .35rem; }

.prose li::marker { color: var(--sage); }

.prose img {
    border-radius: var(--radius);
}

.prose blockquote {
    margin: 1.5rem 0;
    padding: .5rem 1.25rem;
    border-left: 3px solid var(--sage);
    background: var(--sand);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.prose table { border-collapse: collapse; width: 100%; margin: 0 0 1.25rem; }

.prose th, .prose td { border-bottom: 1px solid var(--line); padding: .5rem .6rem; text-align: left; vertical-align: top; }

.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

/* Legacy markup from the old site */

.prose .container, .prose .row, .prose .row-fluid, .prose section, .prose [class*="span"] {
    display: block;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.prose .wysiwyg-float-left { float: left; margin: .3rem 1.5rem 1rem 0; max-width: 45%; }

.prose .wysiwyg-float-right { float: right; margin: .3rem 0 1rem 1.5rem; max-width: 45%; }

.prose .image-block { display: block; margin: 1rem 0 1.5rem; }

.prose::after { content: ""; display: table; clear: both; }

.prose h1, .prose h2, .prose h3 { clear: both; }

.prose .map { display: none; }

.prose :is(p, h1, h2, h3, h4):empty { display: none; }

/* Carousel */

.carousel {
    position: relative;
    margin-bottom: 3rem;
}

.carousel-viewport {
    position: relative;
    min-height: 26rem;
    background: var(--sand);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.carousel-slide { margin: 0; }

.carousel-slide img {
    display: block;
    width: 100%;
    height: 26rem;
    object-fit: cover;
    animation: fade .8s ease;
}

@keyframes fade { from { opacity: .4; } to { opacity: 1; } }

.carousel-caption {
    position: absolute;
    left: 1.25rem;
    bottom: 1.25rem;
    margin: 0;
    padding: .55rem 1.1rem;
    background: rgba(250, 248, 243, .92);
    color: var(--ink);
    border-radius: 999px;
    font-weight: 600;
    font-size: .95rem;
}

.carousel-caption a { color: var(--sage-dark); text-decoration: none; }

.carousel-caption a::after { content: " →"; }

.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(250, 248, 243, .85);
    color: var(--sage-dark);
    font-size: 1.6rem;
    line-height: 1;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    cursor: pointer;
    opacity: .85;
    transition: opacity .15s ease, background .15s ease;
}

.carousel-prev:hover, .carousel-next:hover { opacity: 1; background: var(--surface); }

.carousel-prev { left: 1rem; }
.carousel-next { right: 1rem; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: 1rem;
}

.carousel-dots button {
    width: .6rem;
    height: .6rem;
    border-radius: 999px;
    border: 0;
    padding: 0;
    background: var(--sand-deep);
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.carousel-dots button[aria-current="true"] { width: 1.6rem; background: var(--sage); }

/* Homepage */

.home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: center;
}

.home-grid .prose > p:first-of-type em {
    font-family: var(--serif);
    font-style: normal;
    font-size: 1.2rem;
    line-height: 1.55;
    color: var(--sage-dark);
}

.home-grid iframe { max-width: none; box-shadow: var(--shadow); }

.tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 3.5rem;
}

.tile {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.tile:nth-child(2) { background: var(--sage-soft); border-color: transparent; }

.tile h2 { margin-top: 0; }

.tile h2 a { text-decoration: none; color: inherit; }

.tile h2 a:hover { color: var(--clay); }

.tile img { display: block; border-radius: var(--radius); margin-bottom: .5rem; }

/* Course overview */

.courses {
    list-style: none;
    padding: 0;
    display: grid;
    gap: .9rem;
    margin: 0 0 2rem;
}

.prose .courses { padding-left: 0; }

.courses li {
    margin: 0;
    padding: 1.1rem 1.35rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--sage);
    border-radius: var(--radius);
    line-height: 1.55;
}

.courses li::marker { content: none; }

.courses strong { font-family: var(--serif); font-weight: 500; font-size: 1.15rem; }

.courses strong a { text-decoration: none; }

/* A course with a page: the whole card is clickable (the title link is stretched over the card). */

.courses li.has-link {
    position: relative;
    cursor: pointer;
    transition: box-shadow .15s, transform .15s;
}

.courses li.has-link strong a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
}

.courses li.has-link:hover {
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.courses li.has-link:hover strong a { color: var(--clay); }

.courses li.has-link:focus-within {
    outline: 2px solid var(--sage);
    outline-offset: 2px;
}

.courses li.has-link strong a:focus-visible { outline: none; }

/* Link cards (Achtergrond > Links) */

.link-cards {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 2rem;
    display: grid;
    gap: 1rem;
}

.prose .link-cards { padding-left: 0; }

.link-cards li {
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 4px solid var(--sage);
    border-radius: var(--radius);
    line-height: 1.55;
}

.link-cards li::marker { content: none; }

.link-cards h2 { margin: 0 0 .35rem; font-size: 1.25rem; }

.link-cards p { margin: 0 0 .85rem; color: var(--muted); }

.link-cards .link-urls {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.link-cards .link-urls li {
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
}

.link-cards .link-urls a {
    display: inline-block;
    padding: .3rem .85rem;
    background: var(--sage-soft);
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
}

.link-cards .link-urls a:hover { background: var(--sage); color: #fff; }

/* Forms */

.flash {
    background: var(--sage-soft);
    border: 1px solid #cfd9c7;
    border-radius: var(--radius);
    padding: .9rem 1.2rem;
    margin: 0 0 1.5rem;
    scroll-margin-top: 7rem; /* room for the sticky header when scrolled into view after a form */
}

.site-updated {
    margin: 2rem 0 0;
    color: var(--muted);
    font-size: .95rem;
}

.flash-error { background: #f8ebe4; border-color: #ead0c2; }

.form-panel {
    margin-top: 2.5rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.form-panel h2 { margin-top: 0; }

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

.contact-grid .prose h2:first-child { margin-top: 0; }

.contact-grid .form-panel { margin-top: 0; }

.contact-photo { margin: 1.75rem 0 0; }
.contact-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 5 / 2;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.contact-map {
    margin: 3rem 0 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.contact-map iframe {
    max-width: none;
    aspect-ratio: 21 / 8;
    min-height: 320px;
    border-radius: 0;
}

.contact-map figcaption {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .25rem 1.5rem;
    padding: .9rem 1.5rem;
    font-size: .95rem;
    color: var(--muted);
}

.contact-map figcaption a { font-weight: 600; }

.contact-grid form input, .contact-grid form textarea { width: 100%; }

/* Belangstelling-formulier in de inhoud. Hoger in specificiteit dan de
   legacy-reset (.prose section), anders verdwijnt de ruimte in de kaart. */
.prose .form-panel {
    margin: 2.5rem 0 0;
    padding: clamp(1.4rem, 1rem + 1.6vw, 2.25rem);
}

.prose .form-panel h2 { margin: 0 0 1.25rem; }

.prose .form-panel form > div[id] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem 1.25rem;
}

.prose .form-panel label { margin: 0 0 .35rem; }

.prose .form-panel input:not([type="hidden"]),
.prose .form-panel textarea {
    width: 100%;
    box-sizing: border-box;
}

.prose .form-panel button { margin-top: .25rem; justify-self: start; }

@media (min-width: 801px) {
    .layout .form-panel form > div[id] {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .layout .form-panel form > div[id] > div:has(> textarea),
    .layout .form-panel form > div[id] > div:has(> button),
    .layout .form-panel form > div[id] > div:has(> input[name$="[course]"]),
    .layout .form-panel form > div[id] > div:has(> input[type="email"]) {
        grid-column: 1 / -1;
    }
}

form label { display: block; margin: 1rem 0 .3rem; font-weight: 600; font-size: .95rem; }

form input, form textarea {
    width: min(100%, 36rem);
    padding: .7rem .9rem;
    border: 1px solid var(--sand-deep);
    border-radius: 10px;
    background: var(--paper);
    font: inherit;
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

form input:focus, form textarea:focus {
    outline: none;
    border-color: var(--sage);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(111, 132, 103, .2);
}

form textarea { min-height: 9rem; }

form button, .button {
    margin-top: 1.25rem;
    background: var(--sage-dark);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: .75rem 1.6rem;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, transform .15s ease;
}

form button:hover, .button:hover { background: var(--sage); transform: translateY(-1px); }

.hp { position: absolute; left: -9999px; }

/* Footer */

footer {
    background: var(--sand);
    border-top: 1px solid var(--line);
    color: var(--ink);
    padding: 3rem 0 2.5rem;
    font-size: .95rem;
}

footer a { color: var(--ink); }

footer a:hover { color: var(--clay); }

footer p { margin: 0 0 .75rem; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr auto;
    gap: 2rem;
}

.footer-title {
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--sage-dark);
}

.footer-links { list-style: none; margin: 0; padding: 0; }

.footer-links li { margin-bottom: .35rem; }

.footer-meta { text-align: right; color: var(--muted); }

/* Small screens */

@media (max-width: 900px) {
    .layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
    .side { position: static; order: 2; }
    .home-grid, .tiles, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
}

@media (max-width: 800px) {
    body { font-size: 1rem; }
    main { padding: 1.5rem 0 3rem; }
    .header-bar { min-height: 68px; gap: .75rem; }
    .brand { flex: 1 1 0; min-width: 0; gap: .65rem; }
    .brand img { width: 42px; }
    .brand strong { font-size: 1.5rem; }
    .brand small { font-size: .62rem; letter-spacing: .08em; }
    .menu-button {
        display: inline-flex;
        align-items: center;
        margin-left: auto;
        padding: .45rem 1rem;
        border: 1px solid var(--sand-deep);
        border-radius: 999px;
        font-weight: 600;
        cursor: pointer;
    }
    .menu-toggle:checked ~ nav, nav { display: none; width: 100%; }
    .menu-toggle:checked ~ nav { display: flex; flex-direction: column; padding-bottom: .5rem; }
    nav a { border-radius: 10px; }
    .carousel-viewport { min-height: 15rem; border-radius: var(--radius); }
    .carousel-slide img { height: 15rem; }
    .carousel-caption { left: .75rem; right: .75rem; bottom: .75rem; text-align: center; }
    .tile, .form-panel { padding: 1.4rem; }
    .prose { min-width: 0; overflow-wrap: anywhere; }
    .prose .wysiwyg-float-left, .prose .wysiwyg-float-right { float: none; margin: 0 0 1rem; max-width: 100%; }
    .footer-grid { grid-template-columns: minmax(0, 1fr); }
    .footer-meta { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
