/* bimsalabim — basisstijl */

:root {
  --bg: #0F1B2D;
  --bg-alt: #13233A;
  --accent: #3A5578;
  --accent-light: #A9BCD6;
  --text: #E8EEF6;
  --muted: #9FB0C6;
  --border: rgba(169, 188, 214, 0.16);
  --header-h: 68px;
  --radius: 10px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .logo {
  font-family: 'Archivo Black', 'Inter', sans-serif;
  font-weight: 400;
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; }

a { color: var(--accent-light); }
a:hover { color: var(--text); }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.container.narrow { max-width: 760px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 27, 45, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.logo {
  margin: 0;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { color: var(--accent-light); }

.site-nav ul {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  transition: color 0.15s ease;
}
.site-nav a:hover { color: var(--accent-light); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  display: flex;
  align-items: center;
  min-height: min(78vh, 680px);
  padding: 80px 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(90deg, #0F1B2D 0%, #0F1B2D 32%, rgba(15, 27, 45, 0.75) 52%, rgba(15, 27, 45, 0) 80%),
    url('../assets/banner.jpg');
  background-size: cover;
  background-position: center right;
}

.hero-content { max-width: 1160px; }
.hero h1 { max-width: 13ch; }

.hero-sub {
  max-width: 34ch;
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--muted);
  margin-bottom: 2em;
}

/* ---------- Knoppen ---------- */

.btn {
  display: inline-block;
  padding: 14px 28px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--bg);
}

.btn-outline { background: transparent; border-color: var(--accent-light); color: var(--accent-light); }

/* ---------- Secties ---------- */

.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); }

.intro {
  max-width: 62ch;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2.2em;
}

/* ---------- Kaarten ---------- */

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  padding: 28px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.section:not(.section-alt) .card { background: var(--bg-alt); }

.card:hover {
  border-color: var(--accent-light);
  transform: translateY(-2px);
}

.card p { color: var(--muted); margin-bottom: 0; }
.card .role {
  color: var(--accent-light);
  font-weight: 600;
  margin-bottom: 0.6em;
}

.icon {
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  fill: none;
  stroke: var(--accent-light);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.contact-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 1.1rem;
}
.contact-list .label {
  display: inline-block;
  min-width: 110px;
  color: var(--muted);
}

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

.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}
.footer-inner p { margin: 0; }

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
}

/* ---------- Mobiel ---------- */

@media (max-width: 760px) {
  .nav-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; padding: 8px 20px 16px; }
  .site-nav a { display: block; padding: 12px 0; font-size: 1.05rem; }

  .hero {
    min-height: 0;
    padding: 72px 0;
    background-image:
      linear-gradient(90deg, rgba(15, 27, 45, 0.95) 0%, rgba(15, 27, 45, 0.82) 60%, rgba(15, 27, 45, 0.55) 100%),
      url('../assets/banner.jpg');
  }

  .section { padding: 64px 0; }
  .grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================
   Palet uit de BIM-modellen
   ========================================================== */

:root {
  --arch: #D9DEE6;      /* architectuur: wit/lichtgrijs */
  --con: #E08A4C;       /* constructie: oranje */
  --ins: #5A8ED6;       /* installaties: blauw */
  --con-text: #EC9A5E;  /* oranje voor tekst op donker */
  --ins-text: #8FB4E8;  /* blauw voor tekst op donker */
}

.t-arch { color: var(--arch); }
.t-con  { color: var(--con-text); }
.t-ins  { color: var(--ins-text); }

.site-nav a[aria-current="page"] { color: var(--text); }

.eyebrow {
  margin-bottom: 0.8em;
  color: var(--con-text);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: 1.6em;
}
.narrow { max-width: 760px; }
.more { margin-top: 32px; }

/* Renders kaderloos laten opgaan in de achtergrond */
.render,
.aspects img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 5%, #000 90%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%),
    linear-gradient(180deg, transparent 0, #000 5%, #000 90%, transparent 100%);
  mask-composite: intersect;
}

/* ---------- Intro ---------- */

.uitleg-hero { padding: 48px 0 16px; }
.uitleg-hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  align-items: center;
}
.uitleg-hero h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.hero-render { max-width: 300px; justify-self: center; }

/* ---------- Groeiend verhaal ---------- */

html.snap { scroll-snap-type: y proximity; }

.story-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  padding: 24px 0;
  scroll-snap-align: start;
}

.story {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) 1.5fr;
  grid-template-areas:
    "bar   stage"
    "text  stage";
  grid-template-rows: auto 1fr;
  gap: 12px 40px;
  outline: none;
}

/* Balk met teller, bolletjes en pijlen */
.story-bar {
  grid-area: bar;
  display: flex;
  align-items: center;
  gap: 14px;
}
.story-count {
  margin: 0;
  color: var(--con-text);
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.95rem;
  white-space: nowrap;
}
.story-dots { display: flex; gap: 7px; }
.story-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid var(--accent-light);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.story-dots button[aria-current="step"] { background: var(--con); border-color: var(--con); }
.story-arrows { display: flex; gap: 6px; margin-left: auto; }
.arrow {
  width: 38px;
  height: 38px;
  border: 1px solid var(--accent-light);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.arrow:hover { background: var(--accent-light); color: var(--bg); }
.arrow:disabled { opacity: 0.3; pointer-events: none; }

/* Tekst per stap */
.story-steps {
  grid-area: text;
  margin: 0;
  padding: 0;
  list-style: none;
}
.story-steps li { margin-bottom: 18px; }
.story-steps h3 { font-size: 1.3rem; margin-bottom: 0.35em; }
.story-steps p { color: var(--muted); margin: 0; }
.story-steps strong { color: var(--text); }

/* Zonder JavaScript: alles tegelijk zichtbaar */
.story:not(.is-interactive) .story-bar,
.story:not(.is-interactive) .swipe-hint { display: none; }
.story.is-interactive .story-steps li { display: none; margin: 0; }
.story.is-interactive .story-steps li.active { display: block; }

/* Lagen die per stap verschijnen (ruimte blijft gereserveerd: hetzelfde venster) */
.layer { transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s; }
.story.is-interactive .layer:not(.on) {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
}

/* Het venster */
.stage {
  grid-area: stage;
  position: relative;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 190px;
  grid-template-areas:
    "docs    docs  docs"
    "aspects coord side"
    "phases  phases phases";
  gap: 14px 18px;
  align-items: center;
  padding: 26px 20px 18px;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  transition: transform 0.15s ease;
}
.stage:active { cursor: grabbing; }
.stage img { -webkit-user-drag: none; pointer-events: none; }

.cde-frame {
  position: absolute;
  inset: 0;
  border: 1.5px solid var(--accent-light);
  border-radius: 14px;
  pointer-events: none;
}
.cde-label {
  position: absolute;
  top: -12px;
  left: 18px;
  padding: 1px 10px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--bg);
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.85rem;
}

.library-layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}
.library-layer img { width: 100%; max-width: 380px; height: auto; }

.docs {
  grid-area: docs;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.doc-iso {
  margin-right: 4px;
  color: var(--ins-text);
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.9rem;
}
.doc {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.82rem;
}

.aspects {
  grid-area: aspects;
  display: grid;
  gap: 4px;
  position: relative;
}
.aspects::after {
  content: "›";
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-light);
  font-size: 1.4rem;
}
.aspects figure { margin: 0; text-align: center; }
.aspects figcaption { font-size: 0.72rem; font-weight: 600; line-height: 1.2; }
.aspects .disc-arch figcaption { color: var(--arch); }
.aspects .disc-con figcaption { color: var(--con-text); }
.aspects .disc-ins figcaption { color: var(--ins-text); }

.coord { grid-area: coord; text-align: center; }
.coord .render { max-width: 300px; margin: 0 auto; }
.coord-label {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.side { grid-area: side; display: grid; gap: 14px; }

.props {
  margin: 0;
  padding: 8px 12px;
  border-left: 3px solid var(--arch);
  background: rgba(19, 35, 58, 0.8);
  border-radius: 0 6px 6px 0;
  font-size: 0.82rem;
}
.props dt { margin-bottom: 2px; font-weight: 600; }
.props dd {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 2px 0;
  color: var(--muted);
}
.props dd span:last-child { color: var(--text); }

.dms {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 18px 10px 10px;
  border: 1.5px dashed var(--accent-light);
  border-radius: 8px;
  font-size: 0.8rem;
}
.dms > span:not(.dms-label) {
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-alt);
}
.dms-label {
  position: absolute;
  top: -10px;
  left: 10px;
  padding: 0 6px;
  background: var(--bg);
  color: var(--accent-light);
  font-family: 'Archivo Black', sans-serif;
  font-size: 0.75rem;
}

.phase-bar {
  grid-area: phases;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px 8px;
}
.ph {
  position: relative;
  padding: 7px 4px;
  border-radius: 6px;
  background: var(--accent);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background-color 0.35s ease, color 0.35s ease;
}
.ph:not(.ph-archive)::after {
  content: "›";
  position: absolute;
  right: -8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-light);
}
.story[data-step="8"] .ph-client { background: var(--ins); }
.story[data-step="8"] .ph-archive { background: var(--con); color: var(--bg); }
.client-bracket {
  grid-column: 3 / 5;
  padding-top: 4px;
  border-top: 2px solid var(--ins);
  color: var(--ins-text);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}
.archive-note {
  grid-column: 4 / 5;
  color: var(--con-text);
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.25;
}

/* Hint om te vegen of te slepen */
.swipe-hint {
  position: absolute;
  left: 50%;
  bottom: -30px;
  transform: translateX(-50%);
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}
.swipe-touch::before {
  content: "";
  display: inline-block;
  width: 26px;
  height: 2px;
  margin: 0 8px 3px 0;
  background: var(--con);
  border-radius: 2px;
  animation: swipe 1.6s ease-in-out infinite;
}
@keyframes swipe {
  0%, 100% { transform: translateX(8px); opacity: 0.4; }
  50% { transform: translateX(-8px); opacity: 1; }
}
.swipe-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .swipe-touch { display: inline; }
  .swipe-mouse { display: none; }
}
.story.used .swipe-hint { opacity: 0; }

.disclaimer {
  margin: 44px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.cta { text-align: left; }

/* ---------- Tablet ---------- */

@media (max-width: 960px) {
  .story {
    grid-template-columns: 1fr;
    grid-template-areas: "bar" "text" "stage";
    grid-template-rows: auto auto auto;
  }
  .story.is-interactive .story-steps { min-height: 6.6em; }
}

/* ---------- Mobiel: alles in één scherm ---------- */

@media (max-width: 760px) {
  .uitleg-hero { padding: 32px 0 8px; }
  .uitleg-hero-grid { grid-template-columns: 1fr; }
  .hero-render { display: none; }

  .story-section { padding: 10px 0 8px; justify-content: flex-start; }
  .story { gap: 8px; }
  .story-steps h3 { font-size: 1.1rem; }
  .story-steps p { font-size: 0.92rem; line-height: 1.5; }
  .story.is-interactive .story-steps { min-height: 8.6em; }
  .arrow { width: 34px; height: 34px; }

  .stage {
    grid-template-columns: 58px minmax(0, 1fr);
    grid-template-areas:
      "docs    docs"
      "aspects coord"
      "side    side"
      "phases  phases";
    gap: 10px 14px;
    padding: 20px 12px 12px;
  }
  .doc-iso { font-size: 0.78rem; }
  .doc { font-size: 0.72rem; padding: 2px 8px; }
  .aspects::after { right: -12px; }
  .aspects figcaption { font-size: 0.6rem; }
  .coord .render { max-width: 210px; }
  .side { grid-template-columns: 1fr 1fr; gap: 10px; align-items: start; }
  .props { font-size: 0.72rem; padding: 6px 8px; }
  .dms { font-size: 0.72rem; padding: 16px 8px 8px; }
  .ph { font-size: 0.7rem; padding: 6px 2px; }
  .client-bracket { font-size: 0.7rem; }
  .archive-note { font-size: 0.64rem; grid-column: 3 / 5; }
  .library-layer img { max-width: 300px; }
  .disclaimer { margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
