/* Installatiebedrijf Vonk
   Kleuren volgen de leidingcodering uit de installatietechniek:
   rood = warmte, blauw = water, geel = gas/energie, zinkgrijs = dak. */

:root {
  --zink: #dadfe2;
  --zink-licht: #eef1f2;
  --zink-donker: #5b656b;
  --staal: #15232d;
  --staal-2: #22343f;
  --rood: #c4231b;
  --blauw: #1e5bc6;
  --geel: #f4b400;
  --lucht: #8fb8c9;
  --wit: #ffffff;

  --font: "Archivo", "Arial Narrow", Arial, system-ui, sans-serif;
  --pipe: 10px;
  --wrap: 72rem;
  --gutter: clamp(1.125rem, 4vw, 2.5rem);
  --header-h: 3.75rem;
  --callbar-h: 4rem;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { overflow-x: clip; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--staal);
  background: var(--zink);
}

img, svg, iframe { display: block; max-width: 100%; }

a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }

:focus-visible {
  outline: 3px solid var(--blauw);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.05;
  font-weight: 800;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-stretch: 112%;
  letter-spacing: -.01em;
}

p { margin: 0 0 1em; max-width: 64ch; }
p:last-child { margin-bottom: 0; }

ul { margin: 0; padding: 0; list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: .75rem 1rem;
  background: var(--geel);
  color: var(--staal);
  font-weight: 700;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */

.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--staal);
  color: var(--wit);
}

.top__bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--header-h);
}

.mark {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: .4rem;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}
.mark__spark {
  grid-row: 1 / 3;
  width: 1.75rem;
  height: 1.75rem;
  fill: var(--geel);
  transition: transform .25s ease;
}
.mark:hover .mark__spark { transform: rotate(-12deg) scale(1.1); }
.mark__name {
  font-size: 1.5rem;
  font-weight: 900;
  font-stretch: 125%;
  line-height: .95;
  letter-spacing: .02em;
}
.mark__sub {
  font-size: .75rem;
  font-stretch: 100%;
  line-height: 1.1;
  color: var(--zink);
}

.nav { display: none; }

.top__call {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .5rem 1rem;
  background: var(--geel);
  color: var(--staal);
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.top__call svg { width: 1.1rem; height: 1.1rem; fill: currentColor; }
.top__call:hover { transform: translateY(-1px); box-shadow: 0 0 0 3px rgba(244, 180, 0, .35); }
.top__call-long { display: none; }

@media (min-width: 30rem) {
  .top__call-long { display: inline; }
  .top__call-short { display: none; }
}

@media (min-width: 52rem) {
  .nav {
    display: flex;
    gap: 1.5rem;
  }
  .nav a {
    position: relative;
    text-decoration: none;
    font-weight: 600;
    padding-block: .5rem;
  }
  .nav a::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: .2rem;
    height: 3px;
    background: var(--geel);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .2s ease;
  }
  .nav a:hover::after, .nav a:focus-visible::after { transform: scaleX(1); }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3.5rem;
  padding: .85rem 1.5rem;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  font-size: 1.125rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn svg { width: 1.25rem; height: 1.25rem; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

.btn--call { background: var(--geel); color: var(--staal); }
.btn--call:hover { box-shadow: 0 6px 0 -1px var(--staal); }
.btn--quote { background: var(--blauw); color: var(--wit); }
.btn--quote:hover { box-shadow: 0 6px 0 -1px var(--staal); }
.btn--big { font-size: clamp(1.25rem, 4.5vw, 1.75rem); min-height: 4.25rem; padding-inline: 2rem; }

/* ---------- Hero ---------- */

.hero {
  background:
    linear-gradient(90deg, rgba(21, 35, 45, .05) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
    linear-gradient(rgba(21, 35, 45, .05) 1px, transparent 1px) 0 0 / 2.5rem 2.5rem,
    var(--zink-licht);
  border-bottom: var(--pipe) solid var(--staal);
}

.hero__inner {
  padding-block: clamp(2rem, 7vw, 6rem) clamp(2.5rem, 7vw, 6rem);
}

.hero__lead {
  font-weight: 700;
  font-size: 1rem;
  color: var(--staal-2);
  margin-bottom: 1rem;
}

.hero__title {
  font-size: clamp(2.25rem, 11vw, 7rem);
  font-weight: 900;
  font-stretch: 100%;
  line-height: .92;
  letter-spacing: -.02em;
  hyphens: manual;
  overflow-wrap: break-word;
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}
.hero__line { display: block; }
.hero__line + .hero__line { color: var(--staal-2); }

@media (min-width: 45rem) {
  .hero__title { font-stretch: 118%; font-size: clamp(3.5rem, 9.4vw, 7rem); }
}

/* voorkomt een flits van de hero vóór de animatie; head-script haalt dit na 2,5 s altijd weg */
.anim-pending [data-hero] { visibility: hidden; }

.hero__text {
  font-size: clamp(1.0625rem, 2.2vw, 1.3rem);
  max-width: 38rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

/* CTA's als leidingen die eindigen in de knop */
.hero__cta {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
}

.run {
  display: flex;
  align-items: center;
  min-width: 0;
}
.run__pipe {
  position: relative;
  flex: 0 0 1.5rem;
  height: var(--pipe);
  margin-left: calc(var(--gutter) * -1);
  background: currentColor;
  transform-origin: left center;
}
/* koppelstuk tussen leiding en knop */
.run__pipe::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 10px;
  height: 22px;
  transform: translateY(-50%);
  background: currentColor;
  border-radius: 2px;
}
.run--warm { color: var(--rood); }
.run--cold { color: var(--blauw); }
.run .btn { flex: 1 1 auto; min-width: 0; margin-left: 8px; }

@media (min-width: 36rem) {
  .run__pipe { flex-basis: clamp(3rem, 12vw, 9rem); }
  .run .btn { flex: 0 1 auto; }
}

/* ---------- Section basics ---------- */

.services, .projects, .area, .quote, .contact, .clients {
  padding-block: clamp(3.5rem, 9vw, 7rem);
}

.section-head {
  display: grid;
  gap: 1rem;
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.section-head p { font-size: 1.125rem; }

@media (min-width: 52rem) {
  .section-head { grid-template-columns: 1fr 1.3fr; align-items: end; gap: 3rem; }
}

/* ---------- Diensten: leidingen met aftakkingen ---------- */

.lines { display: grid; gap: clamp(2rem, 5vw, 3rem); }

.line {
  --c: var(--staal);
  position: relative;
  padding-left: calc(var(--pipe) + 1.25rem);
}
.line::before {
  content: "";
  position: absolute;
  left: 0; top: .35rem; bottom: 0;
  width: var(--pipe);
  background: var(--c);
  border-radius: var(--pipe) var(--pipe) 0 0;
  transform: scaleY(var(--grow, 1));
  transform-origin: top;
}
.line--warm { --c: var(--rood); }
.line--cold { --c: var(--blauw); }
.line--air { --c: var(--lucht); }
.line--roof { --c: var(--zink-donker); }
.line--power { --c: var(--geel); }

.line__name {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-stretch: 125%;
  font-weight: 900;
  margin-bottom: 1rem;
}

.line__taps { display: grid; gap: 1rem; }

.tap {
  position: relative;
  padding: 1.25rem 1.25rem 1.375rem;
  background: var(--wit);
  border-left: 4px solid var(--c);
  transition: transform .2s ease;
}
/* aftakking (T-stuk) vanaf de hoofdleiding */
.tap::before {
  content: "";
  position: absolute;
  top: 1.6rem;
  left: calc((var(--pipe) + 1.25rem + 4px) * -1);
  width: calc(var(--pipe) + 1.25rem);
  height: 6px;
  background: var(--c);
}
.tap:hover { transform: translateX(4px); }

.tap h4 {
  font-size: 1.375rem;
  font-stretch: 108%;
  margin-bottom: .6rem;
}
.tap p { font-size: 1rem; }
.tap__more { color: var(--staal-2); }

@media (min-width: 52rem) {
  .line {
    display: grid;
    grid-template-columns: 13rem 1fr;
    gap: 2rem;
  }
  .line__name { position: sticky; top: calc(var(--header-h) + 1.5rem); align-self: start; }
  .line__taps { grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
  .tap::before { display: none; }
}

/* ---------- Storing ---------- */

.storing {
  background: var(--rood);
  color: var(--wit);
  padding-block: clamp(3rem, 8vw, 5.5rem);
}
.storing__inner {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.storing h2 { margin-bottom: 1rem; }
.storing p { font-size: 1.125rem; }
.storing .btn--call:hover { box-shadow: 0 6px 0 -1px var(--staal); }

@media (min-width: 52rem) {
  .storing__inner { grid-template-columns: 1.4fr auto; gap: 4rem; }
}

/* ---------- Klanten & kwalificaties ---------- */

.clients { background: var(--staal); color: var(--wit); }
.clients__inner { display: grid; gap: 3rem; }
.clients p { font-size: 1.125rem; margin-top: 1rem; }
.h-small { font-size: 1.5rem; font-stretch: 112%; margin-bottom: 1rem; }

.quals { display: grid; gap: .5rem; }
.quals li {
  display: flex;
  gap: .75rem;
  align-items: baseline;
  padding-block: .5rem;
  border-bottom: 2px solid var(--staal-2);
  font-weight: 600;
}
.quals li::before {
  content: "";
  flex: none;
  width: .7rem;
  height: .7rem;
  background: var(--geel);
  border-radius: 50%;
  transform: translateY(-.05em);
}

@media (min-width: 52rem) {
  .clients__inner { grid-template-columns: 1.2fr 1fr; gap: 5rem; }
}

/* ---------- Projecten ---------- */

.projects__list { display: grid; gap: 1.5rem; }
.project img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: var(--zink-donker);
  border-bottom: var(--pipe) solid var(--staal);
}
.project h3 {
  font-size: 1.25rem;
  font-stretch: 108%;
  margin-top: .85rem;
}
.project { overflow: hidden; }
.project img { transition: transform .4s ease; }
.project:hover img { transform: scale(1.03); }

@media (min-width: 45rem) {
  .projects__list { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Werkgebied ---------- */

.area { background: var(--zink-licht); }
.area__inner { display: grid; gap: 2.5rem; align-items: center; }
.area__text h2 { margin-bottom: 1rem; }

.towns {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
}
.towns li {
  padding: .35rem .85rem;
  border: 2px solid var(--staal);
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
}
.towns li:first-child { background: var(--staal); color: var(--wit); }

.area__map { margin: 0; }
.area__map svg { width: 100%; height: auto; }
.area__map figcaption { font-size: .875rem; color: var(--zink-donker); margin-top: .5rem; }

.net__pipe { stroke: var(--blauw); stroke-width: 10; }
.node circle { fill: var(--wit); stroke: var(--staal); stroke-width: 5; }
.node--home circle { fill: var(--geel); stroke: var(--staal); stroke-width: 6; }
.node text { font: 700 22px var(--font); fill: var(--staal); }
.node--home text { font-size: 30px; font-weight: 900; }

@media (min-width: 52rem) {
  .area__inner { grid-template-columns: 1fr 1.25fr; gap: 4rem; }
}

/* ---------- Offerte ---------- */

.quote__inner { display: grid; gap: 2.5rem; }
.quote__intro h2 { margin-bottom: 1rem; }
.quote__intro p { font-size: 1.125rem; }

.form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  background: var(--wit);
  border-top: var(--pipe) solid var(--blauw);
  min-width: 0;
}
.field { display: grid; gap: .4rem; min-width: 0; }
.field label { font-weight: 700; }
.field input, .field select, .field textarea {
  width: 100%;
  min-width: 0;
  min-height: 3rem;
  padding: .7rem .85rem;
  font: inherit;
  color: var(--staal);
  background: var(--zink-licht);
  border: 2px solid var(--zink-donker);
  border-radius: 4px;
}
.field textarea { resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--blauw);
  outline-offset: 1px;
  border-color: var(--staal);
}
.form__foot { display: grid; gap: .75rem; justify-items: start; }
.form__foot .btn { width: 100%; }
.form__status { font-weight: 600; min-height: 1.6em; }

@media (min-width: 36rem) {
  .form { grid-template-columns: 1fr 1fr; }
  .field--wide { grid-column: 1 / -1; }
  .form__foot .btn { width: auto; }
}
@media (min-width: 60rem) {
  .quote__inner { grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: start; }
}

/* ---------- Contact ---------- */

.contact { background: var(--zink-licht); border-top: var(--pipe) solid var(--staal); }
.contact__inner { display: grid; gap: 2.5rem; }
.contact__info h2 { margin-bottom: 1.5rem; }

.facts { margin: 0 0 1.5rem; display: grid; gap: 1rem; }
.facts div { display: grid; gap: .1rem; }
.facts dt { font-size: .9rem; font-weight: 700; color: var(--zink-donker); }
.facts dd { margin: 0; font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }
.link-strong { font-weight: 700; }

.contact__map iframe {
  width: 100%;
  height: clamp(18rem, 55vw, 28rem);
  border: 0;
  border-left: var(--pipe) solid var(--rood);
  background: var(--zink);
}

@media (min-width: 52rem) {
  .contact__inner { grid-template-columns: 1fr 1.5fr; gap: 4rem; align-items: center; }
}

/* ---------- Footer ---------- */

.foot {
  background: var(--staal);
  color: var(--zink);
  padding-block: 3rem;
  font-size: .95rem;
}
.foot__inner { display: grid; gap: 1.5rem; }
.foot__name { font-weight: 900; font-stretch: 118%; font-size: 1.25rem; color: var(--wit); margin-bottom: .25rem; }
.foot address { font-style: normal; line-height: 1.7; }
.foot__legal { display: flex; flex-wrap: wrap; gap: 1rem; }

@media (min-width: 52rem) {
  .foot__inner { grid-template-columns: 1.5fr 1fr 1fr; align-items: start; }
}

/* ---------- Mobiele belbalk ----------
   Zonder JS blijft de balk verborgen (de belknop in de header is altijd zichtbaar).
   Met JS verschijnt hij pas als de belknop in de hero uit beeld is gescrold. */

.callbar { display: none; }

@media (max-width: 51.99rem) {
  .js .callbar {
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: calc(.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    min-height: var(--callbar-h);
    padding-inline: 1rem;
    background: var(--geel);
    color: var(--staal);
    font-weight: 900;
    font-size: 1.125rem;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 0 0 3px var(--staal);
    transform: translateY(calc(100% + 2rem));
    visibility: hidden;
    transition: transform .3s ease, visibility 0s linear .3s;
  }
  .js .callbar svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
  .js .callbar.is-visible {
    transform: none;
    visibility: visible;
    transition: transform .3s ease, visibility 0s;
  }
  /* ruimte zodat de balk de footer niet afdekt */
  .js body { padding-bottom: calc(var(--callbar-h) + 1.5rem); }
}

/* ---------- Beweging ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
  }
}
