/* ==========================================================================
   OPBOUW – menubalk en de drie koptypes (fotokop, gesplitst, effen vlak)
   Gedeeld door alle pagina's. Laden NA de eigen pagina-css.
   Zie de huisstijl, sectie Paginaopbouw.
   ========================================================================== */

html { scrollbar-gutter: stable; }

/* ---------- menubalk: AT-rondje links, menu rechts ---------- */
.tw-menubalk {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  box-sizing: border-box;
  padding: 44px clamp(20px, 5vw, 72px) 28px;
  color: #1a1a1a;
}
.tw-menubalk.licht { color: #fff; }
.tw-logo { display: block; flex: none; line-height: 0; border-radius: 50%; }
.tw-logo svg { display: block; width: 60px; height: 60px; }
.tw-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px clamp(16px, 3vw, 40px); }
.tw-menu a {
  font-family: 'Jost', sans-serif; font-size: 0.95rem; font-weight: 500; letter-spacing: 0.02em;
  color: inherit; text-decoration: none; padding-bottom: 3px; border-bottom: 2px solid transparent;
}
.tw-menu a:hover, .tw-menu a[aria-current] { border-bottom-color: #c4221a; }

/* ---------- gedeelde titels ---------- */
.tw-titel-groot {
  margin: 0; font-family: 'Bauhaus93', sans-serif; font-weight: normal; text-transform: lowercase;
  font-size: min(clamp(3.6rem, 8.4vw, 8.4rem), calc(100cqw / var(--deler, 6)));
  line-height: 0.85; letter-spacing: -0.02em; white-space: nowrap;
}
.tw-titel {
  margin: 0; font-family: 'Bauhaus93', sans-serif; font-weight: normal; text-transform: lowercase;
  font-size: clamp(2.4rem, 5.6vw, 5.6rem); line-height: 0.9; letter-spacing: -0.02em;
}
.tw-onder { margin: 18px 0 0; font-size: 1.05rem; font-weight: 600; color: #c4221a; }
.tw-pil {
  display: inline-flex; align-items: center; gap: 14px; margin: 24px 0 0;
  background: #c4221a; color: #fff; border-radius: 999px; padding: 10px 24px 11px;
  font-family: 'Jost', sans-serif; font-weight: 600; font-size: 1.05rem; text-decoration: none;
}
a.tw-pil:hover { background: #a01b15; color: #fff; }
.tw-pil .pil-kort { display: none; }
.tw-pil .nieuw { font-family: 'Bauhaus93', sans-serif; font-weight: normal; font-size: 1.2rem; }

/* ---------- koptype 1: fotokop (home, fietsen, te koop, brik brut) ---------- */
/* nooit hoger dan het scherm: titel en pil staan bij het openen altijd in beeld */
.tw-fotokop { position: relative; height: min(clamp(560px, 56vw, 800px), max(480px, 100vh)); height: min(clamp(560px, 56vw, 800px), max(480px, 100svh)); height: max(480px, min(clamp(560px, 56vw, 800px), 100svh)); background: #ececea; overflow: hidden; color: #fff; }
.tw-fotokop > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tw-fotokop::before, .tw-fotokop::after { content: ""; position: absolute; left: 0; right: 0; z-index: 1; pointer-events: none; }
.tw-fotokop::before { top: 0; height: 160px; background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0)); }
.tw-fotokop::after { bottom: 0; height: 62%; background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0)); }
.tw-fotokop .tw-menubalk { position: absolute; top: 0; left: 0; right: 0; color: #fff; }
.tw-fotokop-tekst {
  position: absolute; left: 0; right: 0; bottom: 56px; z-index: 2;
  box-sizing: border-box; padding: 0 clamp(20px, 5vw, 72px);
  container-type: inline-size;
}
.tw-fotokop-tekst .sub { margin: 18px 0 0; font-size: clamp(1.05rem, 1.6vw, 1.35rem); font-weight: 500; }
.tw-fotokop-tekst .tw-pil.los { margin-top: clamp(28px, 3.5vw, 48px); }

/* ---------- koptype 2: gesplitst (wielbouw, reparaties, projecten) ----------
   Zwart vlak tot de bovenrand. Links (5) het rondje, de titel en de tekst,
   rechts (7) de staande foto tot boven, met het menu erover.
   De kolomgrens valt op dezelfde lijn als de 5 : 7-kolommen verderop. */
.tw-gesplitst {
  --rand: clamp(20px, 5vw, 72px); --tussen: clamp(28px, 4vw, 64px);
  position: relative; background: #1a1a1a; color: #fff;
  display: grid;
  grid-template-columns: calc(var(--rand) + (100% - 2 * var(--rand) - var(--tussen)) * 5 / 12 + var(--tussen)) minmax(0, 1fr);
  height: clamp(620px, 56vw, 800px);
}
.tw-gesplitst .tw-menubalk { position: absolute; top: 0; left: 0; right: 0; }
.tw-gesplitst-tekst {
  /* titel bovenaan, één witregel onder het menu */
  padding: calc(132px + clamp(1.25rem, 1.9vw, 1.6rem) * 1.38) var(--tussen) 0 var(--rand);
  display: flex; flex-direction: column; justify-content: flex-start; gap: clamp(36px, 4vw, 56px);
}
.tw-gesplitst .tw-onder { color: #fff; }
.tw-ledekop { margin: 0 0 10px; font-weight: 600; font-size: 1.05rem; }
.tw-lede { margin: 0; font-size: clamp(1.25rem, 1.9vw, 1.6rem); line-height: 1.38; max-width: 34ch; }
.tw-gesplitst .tw-lede { color: rgba(255,255,255,0.92); }
.tw-gesplitst-foto { position: relative; overflow: hidden; background: #ececea; }
.tw-gesplitst-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tw-gesplitst.rood { background: #c4221a; }
/* op rood: rondje wit met rode letters */
.tw-gesplitst.rood .tw-logo circle { fill: #fff; }
.tw-gesplitst.rood .tw-logo path { fill: #c4221a; }
.tw-gesplitst-foto::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 160px; z-index: 1; background: linear-gradient(to bottom, rgba(0,0,0,0.45), rgba(0,0,0,0)); }

/* ---------- scheidingslijn boven elk onderdeel van een lijst (projecten) ---------- */
.tw-lijn { border-top: 2px solid #1a1a1a; padding-top: clamp(40px, 5vw, 72px); }

/* ---------- koptype 3: effen vlak (spaakcalculator) ---------- */
.tw-vlak { background: #1a1a1a; color: #fff; }
.tw-vlak .tw-onder { color: #fff; }
.tw-vlak-intro { container-type: inline-size; }
/* fietsen en spaakcalculator: zwart vlak even hoog, titel op dezelfde plek */
@media (min-width: 901px) {
  .tw-vlak { min-height: clamp(560px, 42vw, 640px); display: flex; flex-direction: column; }
  .tw-vlak > section { flex: 1; }
  .tw-vlak-intro { align-content: start; align-items: start; padding-top: clamp(24px, 4vw, 64px); }
  .tw-vlak .intro-merk { padding-top: clamp(24px, 4vw, 64px); }
}
.tw-wrap.tw-fietsen-tegels { padding-top: clamp(56px, 8vw, 120px); }

/* ---------- home: wat zoek je, tegels, contact ---------- */
.tw-wrap { box-sizing: border-box; padding: 0 clamp(20px, 5vw, 72px); }
.tw-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(28px, 4vw, 64px); align-items: end; padding-top: clamp(56px, 8vw, 120px); padding-bottom: clamp(40px, 5vw, 72px); }
.tw-intro p.tekst { margin: 0; font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.45; max-width: 46ch; }
.tw-tegels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); padding-bottom: clamp(56px, 8vw, 120px); }
.tw-tegel { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #ececea; color: #fff; text-decoration: none; }
.tw-tegel img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.tw-tegel:hover img { transform: scale(1.03); }
.tw-tegel::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60%; background: linear-gradient(to top, rgba(0,0,0,0.6), rgba(0,0,0,0)); }
.tw-tegel-tekst { position: absolute; z-index: 1; left: clamp(20px, 2.4vw, 36px); right: clamp(20px, 2.4vw, 36px); bottom: clamp(20px, 2.4vw, 32px); }
.tw-tegel-naam { display: block; font-family: 'Bauhaus93', sans-serif; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 0.9; }
.tw-tegel-regel { display: block; margin-top: 10px; font-size: 1.05rem; font-weight: 500; }
.tw-tegel.rood { background: #c4221a; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(20px, 2.4vw, 36px); box-sizing: border-box; }
.tw-tegel.rood::after { display: none; }
.tw-tegel.rood .tw-tegel-tekst { position: static; }
.tw-tegel.rood .groot { font-family: 'Bauhaus93', sans-serif; font-size: clamp(4rem, 9vw, 8.4rem); line-height: 0.85; letter-spacing: -0.02em; }
.tw-tegel.rood .tw-tegel-regel { color: rgba(255,255,255,0.92); }

.tw-contact { background: #1a1a1a; color: #fff; }
.tw-contact-raster { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px clamp(28px, 4vw, 64px); padding-top: clamp(56px, 8vw, 120px); padding-bottom: clamp(56px, 8vw, 120px); }
.tw-contact h2 { margin: 0; font-family: 'Bauhaus93', sans-serif; font-weight: normal; font-size: clamp(2.4rem, 5.6vw, 5.6rem); line-height: 0.9; }
.tw-contact .onder { margin: 14px 0 0; font-weight: 600; font-size: 1.05rem; }
.tw-contact-links { display: flex; flex-direction: column; }
.tw-contact address { margin-top: auto; padding-top: 40px; font-style: normal; font-size: 1.05rem; line-height: 1.7; color: rgba(255,255,255,0.8); }
.tw-contact address strong { display: block; color: #fff; font-weight: 600; }
.tw-contact address a { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3); }
.tw-contact .afspraak { display: block; margin-top: 18px; color: #fff; font-weight: 500; }
.tw-belknop { display: inline-block; font-family: 'Bauhaus93', sans-serif; font-size: 1.3rem; text-decoration: none; color: #fff; border: 2px solid #fff; border-radius: 999px; padding: 14px 36px 16px; }
.tw-belknop:hover { background: #fff; color: #1a1a1a; }
.tw-contact .uitleg { margin: 20px 0 40px; font-size: 1rem; color: rgba(255,255,255,0.8); max-width: 46ch; }
.tw-routes { list-style: none; margin: 0; padding: 0; border-bottom: 2px solid rgba(255,255,255,0.35); }
.tw-routes a { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: 22px 0 24px; border-top: 2px solid rgba(255,255,255,0.35); color: #fff; text-decoration: none; }
.tw-routes .naam { display: block; font-family: 'Bauhaus93', sans-serif; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1; }
.tw-routes .regel { display: block; margin-top: 8px; font-size: 1rem; color: rgba(255,255,255,0.8); }
.tw-routes .pijl { font-size: 1.6rem; }
.tw-routes a:hover .naam { color: #c4221a; }

:focus-visible { outline: 3px solid #c4221a; outline-offset: 3px; }

/* ---------- smalle schermen ---------- */
@media (max-width: 900px) {
  .tw-gesplitst { grid-template-columns: 1fr; height: auto; }
  .tw-gesplitst .tw-menubalk { position: relative; }
  .tw-gesplitst-tekst { padding: 8px var(--rand) 40px; }
  .tw-gesplitst-foto { aspect-ratio: 4 / 5; }
  .tw-gesplitst-foto::before { display: none; }
  .tw-intro, .tw-contact-raster { grid-template-columns: 1fr; }
  .tw-tegels { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .tw-menubalk { padding-top: 28px; padding-bottom: 20px; align-items: flex-start; }
  .tw-logo svg { width: 48px; height: 48px; }
  .tw-menu { gap: 6px 16px; }
  .tw-menu a { font-size: 0.85rem; }
  .tw-fotokop { height: 560px; height: max(480px, min(560px, 100svh)); }
  .tw-fotokop-tekst { bottom: 36px; }
  /* pil op één regel: korte tekst op de telefoon */
  .tw-pil { white-space: nowrap; gap: 10px; padding: 9px 18px 10px; font-size: 1rem; }
  .tw-pil .pil-lang { display: none; }
  .tw-pil .pil-kort { display: inline; }
}
@media (max-width: 359px) {
  .tw-pil { gap: 8px; padding: 8px 14px 9px; font-size: 0.9rem; }
}
