/* Van Alebeek Bouwbedrijf, homepage
   Lettertypen self-hosted: Archivo (variabel, breedte + gewicht) en IBM Plex Mono. */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("../assets/fonts/plexmono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #e6e7e3;
  --bg-2: #dbddd8;
  --paper: #f1f2ef;
  --ink: #15181a;
  --ink-2: #474d52;
  --line: #a9aea9;
  --line-soft: #c6cac5;
  --accent: #a8361a;
  --accent-ink: #ffffff;
  --accent-soft: rgba(168, 54, 26, 0.1);
  --focus: #1d5fd1;

  --gutter: clamp(16px, 3vw, 40px);
  --max: 1440px;
  --header-h: 68px;

  --f-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Archivo", system-ui, sans-serif;
  --f-mono: "Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121416;
    --bg-2: #1a1d20;
    --paper: #1e2124;
    --ink: #e9eae6;
    --ink-2: #a9afb3;
    --line: #50565b;
    --line-soft: #33383c;
    --accent: #e2643f;
    --accent-ink: #15181a;
    --accent-soft: rgba(226, 100, 63, 0.14);
    --focus: #8ab4ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121416;
  --bg-2: #1a1d20;
  --paper: #1e2124;
  --ink: #e9eae6;
  --ink-2: #a9afb3;
  --line: #50565b;
  --line-soft: #33383c;
  --accent: #e2643f;
  --accent-ink: #15181a;
  --accent-soft: rgba(226, 100, 63, 0.14);
  --focus: #8ab4ff;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; -webkit-tap-highlight-color: transparent; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-stretch: 100%;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 14px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--f-mono); font-size: 0.8125rem; letter-spacing: 0.02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Knoppen: alles haaks, radius 0 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  font-weight: 650; font-size: 1rem; letter-spacing: 0.005em; white-space: nowrap;
  text-decoration: none; border: 1.5px solid var(--ink); border-radius: 0;
  background: transparent; color: var(--ink); cursor: pointer;
  transition: background-color 0.2s var(--ease-out), color 0.2s var(--ease-out), border-color 0.2s var(--ease-out), transform 0.1s ease-out;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn:active { transform: scale(0.97); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--accent:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 40;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line-soft); }
@media (prefers-reduced-transparency: reduce) { .site-header { background: var(--bg); backdrop-filter: none; } }
.site-header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.wordmark { display: inline-flex; flex-direction: column; text-decoration: none; line-height: 0.9; }
.wordmark__name { font-family: var(--f-display); font-weight: 900; font-stretch: 62%; font-size: 1.6rem; letter-spacing: -0.01em; text-transform: uppercase; }
.wordmark__sub { white-space: nowrap; font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); margin-top: 3px; }
.wordmark__sub b { color: var(--accent); font-weight: 400; }

.nav { display: flex; gap: 32px; }
.nav a { text-decoration: none; font-weight: 550; font-size: 0.9875rem; padding: 6px 0; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease-out); }
.nav a:hover::after { transform: scaleX(1); }
.header-cta { display: flex; gap: 10px; }
@media (max-width: 900px) { .nav { display: none; } }
@media (max-width: 560px) { .header-cta .btn--ghost-tel { display: none; } .header-cta .btn { padding: 0 12px; font-size: 0.875rem; } .wordmark__sub { letter-spacing: 0.08em; } }

/* Hero: typografische poster */
.hero { position: relative; display: flex; flex-direction: column; padding-top: clamp(20px, 4vh, 48px); padding-bottom: clamp(24px, 4vh, 48px); overflow: hidden; }
.hero .wrap { flex: 1; display: flex; flex-direction: column; }
.hero__eyebrow { display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; }
.hero__eyebrow span:last-child { text-align: right; }

.dim { position: relative; margin-top: clamp(14px, 3vh, 34px); height: 22px; color: var(--ink-2); }
.dim__line { position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transform-origin: center; }
.dim__line::before, .dim__line::after { content: ""; position: absolute; top: -8px; width: 1px; height: 17px; background: currentColor; }
.dim__line::before { left: 0; } .dim__line::after { right: 0; }
.dim__label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: var(--bg); padding: 0 12px; font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }

.poster {
  display: block; margin: 0;
  font-family: var(--f-display); font-weight: 900; font-stretch: 62%;
  text-transform: uppercase; line-height: 0.8; letter-spacing: -0.015em;
  font-size: calc((100vw - 2 * var(--gutter)) / 4.55);
  white-space: nowrap; color: var(--ink);
  padding-top: 0.06em; margin-top: 0.02em;
}
.poster__line { display: inline-block; }
.poster__line + .poster__line { margin-left: 0.22em; }
.poster .ch { display: inline-block; will-change: clip-path; }
.poster .ch--accent { color: var(--accent); }
@media (min-width: 1440px) { .poster { font-size: calc((var(--max) - 2 * var(--gutter)) / 4.55); } }

.hero__bottom { margin-top: clamp(28px, 5vh, 64px); padding-top: clamp(20px, 3vh, 36px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 40px; align-items: end; border-top: 1px solid var(--line); }
.hero__title { margin: 0; font-family: var(--f-display); font-weight: 750; font-stretch: 80%; font-size: clamp(1.875rem, 3.1vw, 2.875rem); line-height: 1.02; letter-spacing: -0.015em; max-width: 21ch; }
.hero__sub { margin: 0 0 18px; color: var(--ink-2); max-width: 44ch; font-size: 1.125rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 760px) {
  .hero { min-height: auto; }
  .poster { font-size: calc((100vw - 2 * var(--gutter)) / 2.95); line-height: 0.82; }
  .poster__line { display: block; width: max-content; }
  .poster__line + .poster__line { margin-left: 0; }
  .hero__bottom { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
  .hero__ctas .btn { flex: 1 1 auto; }
}

/* Feitenbalk onder de hero */
.facts { border-block: 1px solid var(--line); background: var(--bg-2); }
.facts ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.facts li { padding: 18px 20px; border-left: 1px solid var(--line-soft); }
.facts li:first-child { border-left: 0; padding-left: 0; }
.facts dt, .facts .k { display: block; font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 4px; }
.facts .v { font-weight: 600; text-decoration: none; }
.facts a.v:hover { color: var(--accent); }
@media (max-width: 900px) {
  .facts ul { grid-template-columns: 1fr 1fr; }
  .facts li:nth-child(3) { border-left: 0; padding-left: 0; }
  .facts li:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}
@media (max-width: 460px) {
  .facts ul { grid-template-columns: 1fr; }
  .facts li { border-left: 0; padding-left: 0; padding-block: 14px; }
  .facts li + li { border-top: 1px solid var(--line-soft); }
}

/* Wat we bouwen: tekening + index */
.build { padding-block: clamp(72px, 10vw, 140px) 0; }
.section-title { margin: 0; font-family: var(--f-display); font-weight: 850; font-stretch: 70%; text-transform: uppercase; font-size: clamp(2.5rem, 6.5vw, 5.75rem); line-height: 0.9; letter-spacing: -0.01em; }
.section-lead { margin: 18px 0 0; max-width: 52ch; color: var(--ink-2); font-size: 1.125rem; }

.build__grid { margin-top: clamp(40px, 6vw, 72px); display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.drawing { margin: 0; position: sticky; top: calc(var(--header-h) + 24px); background: var(--paper); border: 1px solid var(--line-soft); padding: clamp(14px, 2vw, 28px); }
.drawing svg { width: 100%; height: auto; }
.drawing__meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-soft); color: var(--ink-2); }
.drawing__meta [data-current] { color: var(--accent); }

.d-ink { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: square; stroke-linejoin: miter; }
.d-thin { fill: none; stroke: var(--ink-2); stroke-width: 1; }
.d-dash { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 5; }
.d-ground { stroke: var(--ink); stroke-width: 2.5; }
.d-hatch { stroke: var(--ink-2); stroke-width: 1; opacity: 0.55; }
.d-text { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.06em; fill: var(--ink-2); text-transform: uppercase; }
.d-num { font-family: var(--f-mono); font-size: 12px; fill: var(--accent); }
.part { transition: opacity 0.4s ease; }
.part .d-ink, .part .d-dash { transition: stroke 0.35s ease; }
.part.is-active .d-ink, .part.is-active .d-dash { stroke: var(--accent); }
.part .tag { opacity: 0; transition: opacity 0.35s ease; }
.part.is-active .tag { opacity: 1; }
.part .tag circle { fill: var(--accent); }
.part .tag text { fill: var(--accent-ink); font-family: var(--f-mono); font-size: 12px; font-weight: 400; }

.index { list-style: none; margin: 0; padding: 0; counter-reset: idx; }
.index__item { min-height: clamp(200px, 30vh, 300px); padding: 22px 0 28px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; align-content: start; transition: opacity 0.35s ease; }
.index__item:last-child { min-height: clamp(260px, 52vh, 520px); }
.index__num { font-family: var(--f-mono); font-size: 0.875rem; color: var(--ink-2); padding-top: 9px; }
.index__head { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.index__name { margin: 0; font-family: var(--f-display); font-weight: 800; font-stretch: 75%; font-size: clamp(1.75rem, 2.6vw, 2.375rem); line-height: 1.05; letter-spacing: -0.01em; }
.index__cat { font-family: var(--f-mono); font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.index__text { grid-column: 2; margin: 8px 0 0; color: var(--ink-2); max-width: 40ch; }
.index__item.is-active .index__num { color: var(--accent); }
.index__item.is-active .index__name { color: var(--accent); }
.js .index__item:not(.is-active) .index__name { color: var(--ink-2); }

@media (max-width: 900px) {
  .build__grid { grid-template-columns: 1fr; gap: 0; }
  .drawing { top: calc(var(--header-h) + 8px); z-index: 2; padding: 10px; }
  .drawing__meta { margin-top: 6px; padding-top: 6px; font-size: 0.6875rem; }
  .drawing__meta span:first-child { display: none; }
  .drawing { margin-inline: calc(-1 * var(--gutter)); border-inline: 0; box-shadow: 0 10px 18px -14px rgba(0,0,0,.35); }
  .index__item { min-height: 0; padding: 20px 0 24px; }
  .index__item:first-child { margin-top: 20px; }
  .index__item:last-child { min-height: 42vh; }
}

/* Twee routes: nieuwbouw en verbouw */
.routes { padding-block: clamp(64px, 9vw, 128px); }
.routes__grid { display: grid; grid-template-columns: 5fr 7fr; gap: 0; border: 1px solid var(--ink); }
.route { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; min-height: 360px; padding: clamp(24px, 3vw, 44px); text-decoration: none; overflow: hidden; isolation: isolate; }
.route + .route { border-left: 1px solid var(--ink); }
.route::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5; transition: opacity 0.4s ease; }
/* arcering zoals op een bouwtekening: metselwerk en isolatie */
.route--new::before { background-image: repeating-linear-gradient(45deg, var(--line-soft) 0 1px, transparent 1px 11px); }
.route--re::before {
  background-image:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 100% 26px, 52px 52px;
  background-position: 0 0, 0 0;
}
.route:hover::before { opacity: 1; }
.route__kicker { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.route__title { margin: 8px 0 0; font-family: var(--f-display); font-weight: 900; font-stretch: 62%; text-transform: uppercase; font-size: clamp(3rem, 7vw, 6.5rem); line-height: 0.86; letter-spacing: -0.01em; }
.route__list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.route__list li { border: 1px solid var(--line); padding: 5px 10px; font-size: 0.9375rem; background: var(--bg); }
.route__go { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; }
.route__go svg { width: 20px; height: 20px; transition: transform 0.3s var(--ease-out); }
.route:hover .route__go svg { transform: translateX(6px); }
.route:hover .route__title { color: var(--accent); }
@media (max-width: 760px) {
  .routes__grid { grid-template-columns: 1fr; }
  .route { min-height: 280px; }
  .route + .route { border-left: 0; border-top: 1px solid var(--ink); }
}

/* Contact */
.contact { padding-block: clamp(64px, 9vw, 128px); background: var(--bg-2); border-top: 1px solid var(--line); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact__phone { display: block; margin-top: 26px; font-family: var(--f-display); font-weight: 900; font-stretch: 62%; font-size: clamp(3.25rem, 9vw, 8.5rem); line-height: 0.85; letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; }
.contact__phone:hover { color: var(--accent); }
.contact__note { margin: 14px 0 0; color: var(--ink-2); max-width: 40ch; }
.contact__list { margin: 36px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 24px; }
.contact__list dt { font-family: var(--f-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); padding-top: 3px; }
.contact__list dd { margin: 0; font-weight: 550; }
.contact__list a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact__list a:hover { color: var(--accent); }

.form { background: var(--paper); border: 1px solid var(--line-soft); padding: clamp(20px, 3vw, 36px); }
.form h3 { margin: 0 0 4px; font-family: var(--f-display); font-weight: 800; font-stretch: 75%; font-size: 1.875rem; line-height: 1.05; }
.form > p { margin: 0 0 22px; color: var(--ink-2); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field label { font-weight: 600; font-size: 0.9375rem; }
.field .opt { font-weight: 400; color: var(--ink-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 0; background: var(--bg); color: var(--ink);
  transition: border-color 0.2s ease;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ink); outline: 2px solid var(--focus); outline-offset: 1px; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-2); opacity: 0.85; }
.field .err { display: none; color: var(--accent); font-size: 0.875rem; font-weight: 550; }
.field.has-error input { border-color: var(--accent); }
.field.has-error .err { display: block; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 520px) { .field-row { grid-template-columns: 1fr; } }
.form .btn { width: 100%; margin-top: 6px; }
.form__notice { display: none; margin-top: 16px; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.form__notice.is-visible { display: block; }
@media (max-width: 900px) { .contact__grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { padding-block: 48px 28px; border-top: 1px solid var(--line); }
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer__col h2, .footer__h { margin: 0 0 10px; font-family: var(--f-mono); font-weight: 400; font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.footer__col p, .footer__col ul { margin: 0; padding: 0; list-style: none; }
.footer__col li + li { margin-top: 4px; }
.footer__col a { text-decoration: none; }
.footer__col a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.footer__bottom { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line-soft); display: flex; justify-content: space-between; gap: 16px; color: var(--ink-2); }
@media (max-width: 900px) { .footer__top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .footer__top { grid-template-columns: 1fr; } .footer__bottom { flex-direction: column; } }

/* Vaste belbalk op mobiel */
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: none; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform 0.35s var(--ease-out); }
.callbar.is-visible { transform: translateY(0); }
.callbar .btn { min-height: 46px; }
@media (max-width: 760px) { .callbar { display: grid; } body { padding-bottom: 0; } .site-footer { padding-bottom: 96px; } }

/* Melding voor links naar pagina's die nog volgen */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--bg); padding: 12px 18px; font-size: 0.9375rem; transition: opacity 0.25s ease, transform 0.3s var(--ease-out); max-width: calc(100vw - 32px); }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 760px) { .toast { bottom: 84px; } }

/* Reveals: alleen als JS en beweging aan staan */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(24px); }
}

h1, h2, h3, .hero__title { text-wrap: balance; }
p { text-wrap: pretty; }
.index__btn { all: unset; cursor: pointer; display: inline; }
.index__btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.index__btn:hover { color: var(--accent); }
.contact__phone, .facts .v, .footer__col a { font-variant-numeric: tabular-nums; }
