@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Roboto:wght@400;500;700&display=swap');

/* Kroonhoveniers. Colours from their own logo and site CSS, see ../BRAND.md */
:root {
  --green: #008f4d;       /* their site CSS: links, buttons, headings */
  --green-deep: #007a42;  /* shade of #008f4d, AA with white text */
  --forest: #004a13;      /* logo: dark green of the oval */
  --forest-deep: #052509; /* logo: darkest green edge */
  --leaf: #a0ce7d;        /* logo: light green highlight */
  --ink: #222121;         /* their body text colour */
  --muted: #525252;       /* their secondary text colour */
  --paper: #f3f7ee;       /* tint of logo #ecf3df */
  --line: #dbe4d3;        /* tint of #a0ce7d */
  --white: #fff;

  --f-display: 'Marcellus', 'Optima', Georgia, serif;
  --f-body: 'Roboto', 'Segoe UI', system-ui, sans-serif;

  --r: 3px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 6rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 1.0625rem/1.7 var(--f-body); color: var(--ink); background: var(--white); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .2em; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 1.12; margin: 0; color: var(--forest); text-wrap: balance; }
h3 { line-height: 1.25; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
::selection { background: #d6eac6; }
:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 3px; }
.on-dark :focus-visible { outline-color: var(--leaf); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--forest); color: var(--white); padding: .5rem 1rem; z-index: 99; }
.skip:focus { left: .5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: .55rem; min-height: 46px; padding: .7rem 1.25rem; border-radius: var(--r); border: 1px solid var(--green-deep); background: var(--green-deep); color: var(--white); font: 700 .875rem/1.2 var(--f-body); text-decoration: none; cursor: pointer; transition: background .18s, color .18s, border-color .18s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: var(--forest); border-color: var(--forest); }
.btn.ghost { background: transparent; color: var(--forest); border-color: var(--forest); }
.btn.ghost:hover { background: var(--forest); color: var(--white); }
.on-dark .btn { background: var(--leaf); border-color: var(--leaf); color: var(--forest-deep); }
.on-dark .btn:hover { background: var(--white); border-color: var(--white); }
.on-dark .btn.ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.on-dark .btn.ghost:hover { background: var(--white); color: var(--forest); border-color: var(--white); }
.textlink { color: var(--green-deep); font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--line); }
.header-in { display: flex; align-items: center; gap: 1.5rem; min-height: 84px; }
.brand img { height: 60px; width: auto; }
.site-nav { margin-left: auto; }
.nav-list { list-style: none; display: flex; gap: 1.75rem; }
.nav-link { font-size: .92rem; text-decoration: none; padding: .35rem 0; border-bottom: 2px solid transparent; color: var(--ink); }
.nav-link:hover { border-bottom-color: var(--line); }
.nav-link[aria-current="page"] { border-bottom-color: var(--green); color: var(--forest); }
.menu-btn { display: none; align-items: center; gap: .4rem; background: none; border: 1px solid var(--line); border-radius: var(--r); padding: .55rem .8rem; font: 700 .85rem var(--f-body); color: var(--forest); cursor: pointer; }
.menu-btn svg { width: 20px; height: 20px; }

@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .nav-list[popover] { position: fixed; inset: 84px 0 auto 0; margin: 0; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--white); padding: .5rem 1.25rem 1.25rem; flex-direction: column; gap: 0; }
  .nav-list[popover]:not(:popover-open) { display: none; }
  .nav-list .nav-link { display: block; padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .header-call .num { display: none; }
}
@media (max-width: 1140px) and (min-width: 961px) { .header-call .num { display: none; } }
@media (max-width: 520px) {
  .header-in { gap: .75rem; min-height: 70px; }
  .brand img { height: 46px; }
  .nav-list[popover] { inset: 70px 0 auto 0; }
  .header-call { padding-inline: .8rem; }
}

/* Hero: forest band left, own project photo right, edge to edge */
.hero { background: var(--forest); color: var(--white); display: grid; }
.hero-copy { padding: clamp(2.75rem, 7vw, 6rem) 1.25rem clamp(2.5rem, 6vw, 5rem); }
.hero h1 { color: var(--white); font-size: clamp(2.4rem, 4.4vw, 4.1rem); max-width: 12em; }
.hero-lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: rgba(255,255,255,.85); max-width: 32em; margin: 1.4rem 0 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-meta { list-style: none; margin-top: 2.5rem; border-top: 1px solid rgba(255,255,255,.22); font-size: .95rem; max-width: 30rem; }
.hero-meta li { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid rgba(255,255,255,.22); }
.hero-meta .k { color: var(--leaf); font-weight: 700; }
.hero-meta a { color: var(--white); text-decoration: underline; text-decoration-color: rgba(255,255,255,.4); text-decoration-thickness: 1px; }
.hero-photo { margin: 0; min-height: 300px; position: relative; overflow: hidden; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
@media (min-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); min-height: min(76vh, 720px); }
  .hero-copy { padding-left: max(1.25rem, calc((100vw - var(--wrap)) / 2)); padding-right: 3.5rem; align-self: center; }
}
@media (max-width: 959px) { .hero-photo { aspect-ratio: 4 / 3; min-height: 0; } }
@media (max-width: 420px) { .hero-meta li { grid-template-columns: 1fr; gap: .1rem; } }

.fade-in { opacity: 0; animation: fade .8s var(--ease) .15s forwards; }
.fade-in.late { animation-delay: .4s; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.hero-photo img { animation: settle 1.6s var(--ease) both; }
@keyframes settle { from { transform: scale(1.04); } to { transform: none; } }

/* Page head (sub pages) */
.page-head { padding: clamp(2.5rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); background: var(--paper); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); max-width: 16em; }
.page-head p { color: var(--muted); max-width: 42em; margin: 1.2rem 0 0; font-size: 1.1rem; }

/* Facts */
.facts { border-bottom: 1px solid var(--line); }
.facts ul { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); }
.facts li { padding: 1.5rem 1.25rem 1.5rem 0; font-size: .92rem; color: var(--muted); }
.facts strong { display: block; font: 400 1.45rem/1.15 var(--f-display); color: var(--forest); margin-bottom: .25rem; }
@media (min-width: 900px) {
  .facts ul { grid-template-columns: repeat(4, 1fr); }
  .facts li + li { border-left: 1px solid var(--line); padding-left: 1.5rem; }
}
@media (max-width: 899px) { .facts li:nth-child(even) { padding-left: 1.25rem; border-left: 1px solid var(--line); } .facts li:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Sections */
.sec { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.sec.tint { background: var(--paper); }
.sec-head { display: grid; gap: 1rem 4rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.sec-head h2 { font-size: clamp(2rem, 3.8vw, 3rem); }
.sec-head p { color: var(--muted); margin: 0; max-width: 34em; }
@media (min-width: 900px) { .sec-head { grid-template-columns: 1fr 1fr; align-items: end; } }

/* Register list (services) */
.reg { list-style: none; border-top: 1px solid var(--line); }
.reg li { border-bottom: 1px solid var(--line); }
.reg a { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1.5rem; align-items: center; padding: 1.25rem 0; text-decoration: none; }
.reg .r-name { font: 400 clamp(1.5rem, 2.6vw, 2.1rem)/1.15 var(--f-display); color: var(--forest); }
.reg .r-text { grid-column: 1; font-size: .92rem; color: var(--muted); }
.reg .r-go { grid-column: 2; grid-row: 1 / span 2; width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--r); color: var(--forest); transition: background .18s, border-color .18s, color .18s; }
.reg .r-go svg { width: 18px; height: 18px; }
.reg a:hover .r-go { background: var(--green-deep); border-color: var(--green-deep); color: var(--white); }
.reg a:hover .r-name { text-decoration: underline; text-decoration-thickness: 1px; }
@media (min-width: 900px) {
  .reg a { grid-template-columns: 18rem 1fr auto; min-height: 86px; }
  .reg .r-text { grid-column: 1; grid-row: 1; padding-right: 2rem; }
  .reg .r-name { grid-column: 2; grid-row: 1; }
  .reg .r-go { grid-column: 3; grid-row: 1; }
}

/* Photo cards with title on the photo */
.pcards { list-style: none; display: grid; gap: 1rem; }
.pcards a { display: block; position: relative; color: var(--white); text-decoration: none; border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; background: var(--forest); }
.pcards img { width: 100%; height: 100%; object-fit: cover; }
.pcards a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,37,9,.82) 0%, rgba(5,37,9,.5) 32%, rgba(5,37,9,0) 62%); }
.pcards .t { position: absolute; z-index: 1; left: 1.25rem; right: 1.25rem; top: 1.1rem; }
.pcards .t strong { display: block; font: 400 1.45rem/1.2 var(--f-display); text-shadow: 0 1px 12px rgba(5,37,9,.55); }
.pcards .t span { font-size: .9rem; opacity: .9; }
.pcards a:hover strong { text-decoration: underline; text-decoration-thickness: 1px; }
@media (min-width: 760px) { .pcards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 759px) { .pcards a { aspect-ratio: 4 / 3; } }

/* Split text blocks */
.split { display: grid; gap: 2rem; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1.1fr; gap: 5rem; align-items: center; } }
.split h2 { font-size: clamp(2rem, 3.6vw, 2.9rem); margin-bottom: 1.2rem; }
.split-photo { margin: 0; border-radius: var(--r); overflow: hidden; }
.split-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.split-photo figcaption { font-size: .85rem; color: var(--muted); padding-top: .6rem; }
.lead { font-size: 1.15rem; color: var(--ink); }
.rows { list-style: none; border-top: 1px solid var(--line); margin: 1.5rem 0 2rem; }
.rows li { border-bottom: 1px solid var(--line); padding: .8rem 0; text-wrap: pretty; }
.steps { list-style: none; border-top: 1px solid var(--line); margin: 1.5rem 0 2rem; }
.steps li { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; border-bottom: 1px solid var(--line); padding: 1rem 0; }
.steps strong { color: var(--forest); }
.steps span { color: var(--muted); }
@media (max-width: 560px) { .steps li { grid-template-columns: 1fr; gap: .2rem; } }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Promises (their own list) */
.promise { list-style: none; display: grid; border-top: 1px solid var(--line); }
.promise li { padding: 1.1rem 0; border-bottom: 1px solid var(--line); font: 400 1.3rem/1.3 var(--f-display); color: var(--forest); }
.promise li span { display: block; font: 400 .92rem/1.5 var(--f-body); color: var(--muted); margin-top: .2rem; }
@media (min-width: 900px) { .promise { grid-template-columns: 1fr 1fr; column-gap: 3rem; } }

/* Detail blocks on diensten page: photo left, text right */
.detail { display: grid; gap: 1.5rem 4rem; padding: clamp(2.5rem, 5vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.detail:first-child { border-top: 0; }
.detail h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-bottom: 1rem; }
.detail .rows { margin: 1.25rem 0 1.75rem; }
.detail figure { margin: 0; }
.detail figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.detail figcaption { font-size: .85rem; color: var(--muted); padding-top: .6rem; }
.detail .note { margin-top: 1rem; }
@media (min-width: 900px) {
  .detail { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .detail figure { position: sticky; top: 110px; }
}

/* Projects (werk page) */
.project { padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--line); }
.project:first-child { border-top: 0; padding-top: 0; }
.project:last-child { padding-bottom: 0; }
.project-head { display: grid; gap: .75rem 4rem; margin-bottom: 1.5rem; }
.project-head h2 { font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.project-head p { color: var(--muted); margin: 0; max-width: 40em; }
@media (min-width: 900px) { .project-head { grid-template-columns: 1fr 1.2fr; } }
.gallery { list-style: none; display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
.gallery li { margin: 0; position: relative; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
.gallery li:first-child { grid-column: 1 / -1; }
.gallery .tag { position: absolute; left: .6rem; top: .6rem; background: var(--white); color: var(--ink); font-size: .8rem; font-weight: 700; padding: .2rem .5rem; border-radius: 2px; }
@media (min-width: 760px) {
  .gallery { grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: clamp(170px, 17vw, 250px); }
  .gallery img { height: 100%; aspect-ratio: auto; }
  .gallery li:first-child { grid-column: 1; grid-row: 1 / span 2; }
  .gallery li:nth-child(4):last-child { grid-column: 2 / span 2; }
  .gallery.three li:not(:first-child) { grid-column: 2 / span 2; }
  .gallery.two { grid-template-columns: 1fr 1fr; grid-auto-rows: clamp(220px, 26vw, 380px); }
  .gallery.two li:first-child { grid-column: auto; grid-row: auto; }
}

/* Contact rows */
.kv { list-style: none; border-top: 1px solid var(--line); }
.kv li { display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.kv .k { font-weight: 700; font-size: .92rem; color: var(--forest); }
.kv a { text-decoration: none; border-bottom: 1px solid var(--line); }
.kv a:hover { border-bottom-color: var(--ink); }
.kv .v span { display: block; font-size: .9rem; color: var(--muted); }
.note { font-size: .9rem; color: var(--muted); }
@media (max-width: 560px) { .kv li { grid-template-columns: 1fr; gap: .2rem; } }
.member { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.member img { width: 150px; height: auto; }
.member p { margin: 0; font-size: .9rem; color: var(--muted); max-width: 22em; }

/* Form */
.form { display: grid; gap: 1.1rem; }
.form .two { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form .two { grid-template-columns: 1fr 1fr; } }
.field label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .35rem; color: var(--forest); }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; padding: .75rem .85rem; border: 1px solid #a3b096; border-radius: var(--r); background: var(--white); color: var(--ink); }
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--green-deep); outline-offset: 1px; border-color: var(--green-deep); }
.field input:user-invalid, .field textarea:user-invalid, .field select:user-invalid { border-color: #a3261b; }
.field .err { display: none; color: #a3261b; font-size: .85rem; margin-top: .3rem; }
.field input:user-invalid + .err, .field textarea:user-invalid + .err, .field select:user-invalid + .err { display: block; }
.form-demo { font-size: .85rem; color: var(--muted); margin: 0; }
.form-ok { padding: 2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.form-ok h3 { font-size: 1.6rem; margin-bottom: .6rem; }
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 960px) { .contact-grid { grid-template-columns: 1fr 1.1fr; gap: 5rem; } }

/* CTA band */
.cta { background: var(--forest); color: var(--white); padding: clamp(3.5rem, 6vw, 5.5rem) 0; }
.cta-in { display: grid; gap: 2rem; align-items: end; }
.cta h2 { color: var(--white); font-size: clamp(2rem, 4vw, 3.2rem); }
.cta p { color: rgba(255,255,255,.82); margin: 1rem 0 0; max-width: 34em; }
@media (min-width: 900px) { .cta-in { grid-template-columns: 1.3fr 1fr; } .cta .actions { justify-content: flex-end; } }

/* Footer */
.site-footer { background: var(--white); border-top: 1px solid var(--line); padding: 4rem 0 6rem; font-size: .95rem; }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-brand img { height: 72px; width: auto; margin-bottom: 1rem; }
.footer-brand p { color: var(--muted); max-width: 22em; }
.site-footer h2 { font: 700 .8rem/1 var(--f-body); color: var(--muted); margin-bottom: .9rem; letter-spacing: .02em; }
.site-footer ul { list-style: none; display: grid; gap: .55rem; }
.site-footer ul a { text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.site-footer ul a:hover { text-decoration-color: var(--ink); }
.f-note { display: block; font-size: .85rem; color: var(--muted); }
.f-gap { margin-top: 1.6rem; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.1fr; } .site-footer { padding-bottom: 3rem; } }

/* Mobile call bar */
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom)); background: var(--white); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform .3s var(--ease); }
.callbar.show { transform: none; }
.callbar .btn { justify-content: center; }
@media (min-width: 900px) { .callbar { display: none; } }

/* Reveal */
[data-aos] { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0s); }
[data-aos].aos-animate { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in, .hero-photo img { animation: none; opacity: 1; }
  [data-aos] { opacity: 1; transform: none; transition: none; }
  .callbar { transition: none; }
}
@media (max-width: 759px) { .gallery li:nth-child(even):last-child { grid-column: 1 / -1; } }
.sr-h { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
