@import url('https://fonts.googleapis.com/css2?family=Libre+Caslon+Text:wght@400;700&family=Work+Sans:wght@400;500;600&display=swap');

/* Koenders Schilderwerken. Colours from their logo, bus and old site CSS, see ../BRAND.md */
:root {
  --black: #000;          /* logo background, bus */
  --ink: #1b1b1b;         /* shade of #333333 (old body text) */
  --text: #333333;        /* old site body text */
  --grey: #666666;        /* old site menu bar, wordmark colour */
  --grey-2: #686868;      /* old site footer bar */
  --orange: #dd6633;      /* old site promotional bar */
  --orange-deep: #b04c1f; /* shade of #dd6633, AA with white */
  --paper: #f4f3f1;       /* neutral tint */
  --paper-2: #e9e7e3;
  --white: #fff;
  --muted: #5c5c5c;
  --line: #d9d6d1;
  --line-dark: #333;

  --f-display: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --f-body: 'Work Sans', 'Segoe UI', system-ui, sans-serif;

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

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; font-family: var(--f-body); font-size: 1.0625rem; line-height: 1.65; color: var(--text); background: var(--white); text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; color: var(--ink); line-height: 1.15; margin: 0 0 .6em; text-wrap: balance; letter-spacing: -.005em; }
h1 { font-size: clamp(2.3rem, 1.4rem + 3.6vw, 4.2rem); }
h2 { font-size: clamp(1.8rem, 1.3rem + 1.9vw, 2.8rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; max-width: 66ch; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.section { padding-block: clamp(3.5rem, 2rem + 6vw, 7rem); }
.tint { background: var(--paper); }
.dark { background: var(--text); color: #d6d6d6; } /* #333333, their body text colour: stays apart from the black footer */
.dark h2, .dark h3 { color: var(--white); }
.lead { font-size: 1.2rem; color: var(--muted); }
.dark .lead { color: #bdbdbd; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--white); padding: .6rem 1rem; }
.skip:focus { left: 1rem; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
svg { width: 1.15em; height: 1.15em; flex: none; }

/* Buttons: 3px radius, filled or 1px outline */
.btn { display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; padding: .7rem 1.3rem; border-radius: var(--r); background: var(--orange-deep); color: var(--white); border: 1px solid var(--orange-deep); font: 600 .95rem/1.2 var(--f-body); text-decoration: none; cursor: pointer; transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease); }
.btn:hover { background: #943f18; border-color: #943f18; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--white); }
.dark .btn.ghost { color: var(--white); border-color: #8a8a8a; }
.dark .btn.ghost:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Header: black, like their logo and bus */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--black); color: var(--white); transition: box-shadow .2s; }
.site-header.scrolled { box-shadow: 0 1px 0 #2a2a2a; }
.header-in { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; }
.brand { display: block; margin-right: auto; }
.brand img { height: 58px; width: auto; }
.nav-list { display: flex; gap: 1.8rem; }
.nav-link { text-decoration: none; font-size: .95rem; color: #d0d0d0; padding-block: .4rem; border-bottom: 1px solid transparent; }
.nav-link:hover { color: var(--white); }
.nav-link[aria-current="page"] { color: var(--white); border-bottom-color: var(--orange); }
.menu-btn { display: none; }
.header-call { min-height: 44px; padding: .55rem 1rem; }
@media (max-width: 1100px) { .header-call .num { display: none; } }
@media (max-width: 960px) {
  .menu-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .5rem .8rem; background: transparent; color: var(--white); border: 1px solid #555; border-radius: var(--r); font: 500 .9rem var(--f-body); cursor: pointer; }
  .site-nav { order: 2; }
  .header-cta { order: 1; }
  .nav-list[popover] { inset: 76px 0 auto auto; margin: 0; width: min(320px, 100vw); flex-direction: column; gap: 0; padding: .5rem 0; background: var(--black); border: 0; border-top: 1px solid #2a2a2a; color: var(--white); }
  .nav-list[popover] .nav-link { display: block; padding: 1rem 1.5rem; border-bottom: 1px solid #222; }
  .nav-list[popover] .nav-link[aria-current="page"] { color: var(--orange); }
  .nav-list:not([popover]), .nav-list[popover]:not(:popover-open) { display: none; }
}
@media (max-width: 480px) { .brand img { height: 44px; } .header-in { gap: .75rem; } .menu-label { display: none; } }

/* Hero: text left, their own photo right */
.hero { background: var(--paper); }
.hero-grid { display: grid; gap: 2rem; padding-block: 2.5rem 0; }
.hero-text { padding-bottom: 1rem; }
.hero h1 { margin-bottom: .45em; }
.hero-lead { font-size: 1.2rem; color: var(--muted); max-width: 34rem; }
.hero-media { margin-inline: -1.25rem; }
.hero-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 40%; }
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 5fr 6fr; align-items: end; gap: 3.5rem; padding-block: 5rem 0; }
  .hero-text { padding-bottom: 5rem; }
  .hero-media { margin-inline: 0; }
  .hero-media img { aspect-ratio: 5 / 4; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-word { display: inline-block; opacity: 0; transform: translateY(.35em); animation: up .7s var(--ease) forwards; animation-delay: calc(var(--i) * 60ms + 80ms); }
  .fade-in { opacity: 0; animation: fade .8s var(--ease) .5s forwards; }
  .hero-media img { animation: settle 1.6s var(--ease) both; }
  [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; }
}
@keyframes up { to { opacity: 1; transform: none; } }
@keyframes fade { to { opacity: 1; } }
@keyframes settle { from { transform: scale(1.04); } to { transform: none; } }

/* Facts: label/value columns with thin lines */
.facts { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.facts ul { display: grid; grid-template-columns: repeat(2, 1fr); }
.facts li { padding: 1.4rem 1rem 1.4rem 0; border-bottom: 1px solid var(--line); }
.facts li:nth-last-child(-n+2) { border-bottom: 0; }
.facts b { display: block; font: 400 1.6rem/1.2 var(--f-display); color: var(--ink); }
.facts span { font-size: .92rem; color: var(--muted); }
@media (min-width: 900px) {
  .facts ul { grid-template-columns: repeat(4, 1fr); }
  .facts li { border-bottom: 0; padding: 1.8rem 1.5rem; border-left: 1px solid var(--line); }
  .facts li:first-child { border-left: 0; padding-left: 0; }
}

/* Section head: left aligned */
.head { max-width: 44rem; margin-bottom: 2.5rem; }
.head p { color: var(--muted); }
.dark .head p { color: #bdbdbd; }

/* Services as a register: rows over the full width */
.register { border-top: 1px solid var(--line-dark); }
.register a { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1.5rem; align-items: center; padding: 1.2rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.register .r-name { font: 400 clamp(1.4rem, 1.1rem + 1vw, 1.95rem)/1.2 var(--f-display); color: var(--ink); grid-column: 1; grid-row: 2; }
.register .r-note { font-size: .9rem; color: var(--muted); grid-column: 1; grid-row: 1; }
.register .r-go { grid-column: 2; grid-row: 1 / 3; color: var(--orange-deep); transition: transform .2s var(--ease); }
.register a:hover .r-name { color: var(--orange-deep); }
.register a:hover .r-go { transform: translateX(4px); }
@media (min-width: 900px) {
  .register a { grid-template-columns: 17rem 1fr auto; padding: 1.35rem 0; }
  .register .r-note { grid-row: 1; }
  .register .r-name { grid-column: 2; grid-row: 1; }
  .register .r-go { grid-column: 3; grid-row: 1; }
}

/* Detail: photo left, text right */
.detail { display: grid; gap: 2rem; align-items: start; }
.detail + .detail { margin-top: clamp(3.5rem, 2rem + 5vw, 6rem); }
.detail-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 2px; }
.detail-media.wide img { aspect-ratio: 4 / 3; }
.detail-media.small { max-width: 450px; }
.detail.flip .detail-media.small { justify-self: end; }
@media (max-width: 899px) { .detail.flip .detail-media.small { justify-self: start; } }
.detail-media figcaption { font-size: .85rem; color: var(--muted); margin-top: .6rem; }
.dark .detail-media figcaption { color: #9a9a9a; }
.rows { border-top: 1px solid var(--line); margin-top: 1.5rem; }
.rows li { display: flex; gap: 1rem; justify-content: space-between; padding: .8rem 0; border-bottom: 1px solid var(--line); font-size: .98rem; }
.rows li span:first-child { flex: none; }
.rows li span:last-child { color: var(--muted); text-align: right; }
.dark .rows, .dark .rows li { border-color: #4a4a4a; }
.dark .rows li span:last-child { color: #a8a8a8; }
@media (max-width: 599px) {
  .rows li { flex-direction: column; gap: .1rem; }
  .rows li span:first-child { font-weight: 600; color: var(--ink); font-size: .92rem; }
  .rows li span:last-child { text-align: left; }
  .facts b { font-size: 1.3rem; }
}
@media (min-width: 900px) {
  .detail { grid-template-columns: 11fr 10fr; gap: 4.5rem; }
  .detail.flip .detail-media { order: 2; }
  .detail.flip { grid-template-columns: 10fr 11fr; }
}

/* Photo cards: title on the photo */
.cards { display: grid; gap: 1rem; }
.card { position: relative; margin: 0; overflow: hidden; background: var(--black); }
.card img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; opacity: .9; }
.card figcaption { position: absolute; inset: auto 0 0 0; padding: 3rem 1.25rem 1.1rem; background: linear-gradient(transparent, rgba(0,0,0,.78)); color: var(--white); }
.card figcaption b { display: block; font: 400 1.3rem/1.25 var(--f-display); }
.card figcaption span { font-size: .9rem; color: #dcdcdc; }
@media (min-width: 700px) { .cards { grid-template-columns: repeat(3, 1fr); } }

/* Centred interlude: once per page */
.interlude { text-align: center; }
.interlude p { margin-inline: auto; color: var(--muted); }
.interlude .actions { justify-content: center; }
.dark.interlude p { color: #bdbdbd; }

/* Page head for inner pages */
.page-head { background: var(--paper); padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) clamp(2.5rem, 1.5rem + 3vw, 4rem); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.2rem, 1.5rem + 2.8vw, 3.6rem); }
.page-head p { font-size: 1.15rem; color: var(--muted); max-width: 44rem; margin: 0; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 1rem; }
.crumbs a { color: var(--muted); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery figcaption { font-size: .85rem; color: var(--muted); padding-top: .45rem; }
@media (min-width: 800px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 1rem; } }

/* Area list */
.places { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; font: 400 1.35rem/1.6 var(--f-display); color: var(--ink); margin-top: 1rem; }

/* Contact rows: label left, value right */
.contact-grid { display: grid; gap: 3rem; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 5fr 6fr; gap: 5rem; } }
.lv { border-top: 1px solid var(--line-dark); }
.lv > div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.lv dt { font-weight: 600; font-size: .92rem; color: var(--ink); }
.lv dd { margin: 0; }
.lv dd a { text-decoration-color: var(--orange); text-underline-offset: 3px; }
.lv small { display: block; color: var(--muted); font-size: .88rem; }
@media (max-width: 420px) { .lv > div { grid-template-columns: 1fr; gap: .15rem; } }

/* Form (demo) */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 600; font-size: .92rem; color: var(--ink); }
.field label small { font-weight: 400; color: var(--muted); }
.field input, .field textarea { width: 100%; font: inherit; font-size: 1rem; padding: .75rem .85rem; border: 1px solid #b9b5ae; border-radius: var(--r); background: var(--white); color: var(--ink); }
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: var(--ink); }
.field input:user-invalid, .field textarea:user-invalid { border-color: #b3261e; }
.two { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .two { grid-template-columns: 1fr 1fr; } }
.form-note { font-size: .88rem; color: var(--muted); margin: 0; }
.form-ok { padding: 2rem; background: var(--paper); border-left: 3px solid var(--ink); }
.form-ok h3:focus { outline: none; }
.spinner { width: 1em; height: 1em; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-panel { background: var(--paper); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }

/* Footer with labelled groups */
.site-footer { background: var(--black); color: #c9c9c9; padding-block: 4rem 6rem; font-size: .98rem; }
.footer-grid { display: grid; gap: 2.5rem; }
.footer-brand img { height: 48px; width: auto; margin-bottom: 1.2rem; }
.footer-brand p { color: #a9a9a9; max-width: 22rem; }
.site-footer h2 { font: 500 .82rem/1 var(--f-body); color: #8f8f8f; margin: 0 0 1rem; letter-spacing: .02em; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: var(--white); text-decoration: underline; text-decoration-color: #555; text-underline-offset: 4px; }
.site-footer a:hover { text-decoration-color: var(--orange); }
.site-footer .btn { text-decoration: none; margin-top: .5rem; }
.f-gap { margin-top: 1.8rem !important; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #262626; color: #8f8f8f; font-size: .88rem; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 4fr 3fr 3fr 3fr; } .site-footer { padding-bottom: 3rem; } }

/* Mobile call bar */
.callbar { position: fixed; inset: auto 0 0 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(--black); transform: translateY(110%); transition: transform .3s var(--ease); }
.callbar.show { transform: none; }
.callbar .btn { justify-content: center; }
.callbar .btn.ghost { color: var(--white); border-color: #777; }
@media (min-width: 900px) { .callbar { display: none; } }

.note { font-size: .92rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1.5rem; }
