/* ===========================================================
   QBS — website styles
   Huisstijl: Fraunces (koppen) + Inter (tekst), rood + charcoal.
   =========================================================== */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--qbs-font-tekst);
  font-weight: 400;
  line-height: 1.65;
  color: var(--qbs-tekst);
  background: var(--qbs-wit);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--qbs-font-kop);
  color: var(--qbs-charcoal);
  margin: 0 0 0.5em;
}
h1 { font-weight: 600; line-height: 1.12; font-size: clamp(34px, 5vw, 46px); }
h2 { font-weight: 600; font-size: clamp(26px, 3.4vw, 32px); }
h3 { font-weight: 500; font-size: 20px; }

p { margin: 0 0 1em; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; }

.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--qbs-rood-actie);
  margin: 0 0 14px;
}

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--qbs-font-tekst);
  font-size: 16px;
  text-decoration: none;
  border-radius: var(--qbs-radius);
  padding: 12px 24px;
  transition: background .18s ease, transform .18s ease, border-color .18s ease;
}
.btn-primary {
  background: var(--qbs-rood-actie);
  color: var(--qbs-wit);
  font-weight: 600;
  border: 1px solid var(--qbs-rood-actie);
}
.btn-primary:hover { background: var(--qbs-rood-hover); border-color: var(--qbs-rood-hover); }
.btn-secondary {
  background: transparent;
  color: var(--qbs-charcoal);
  font-weight: 500;
  border: 1px solid var(--qbs-lijn);
}
.btn-secondary:hover { border-color: var(--qbs-charcoal); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--qbs-lijn);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand { text-decoration: none; line-height: 1; display: flex; align-items: center; }
.brand-img { height: 46px; width: auto; display: block; }
.nav a {
  text-decoration: none;
  color: var(--qbs-charcoal);
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover { color: var(--qbs-rood-actie); }

/* Hamburger-knop (alleen mobiel zichtbaar) */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--qbs-lijn);
  border-radius: var(--qbs-radius);
  background: var(--qbs-wit);
  color: var(--qbs-charcoal);
  cursor: pointer;
}
.nav-toggle svg { width: 24px; height: 24px; }

/* Mobiel: nav als uitklapbaar paneel onder de header */
.nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  background: var(--qbs-wit);
  border-bottom: 1px solid var(--qbs-lijn);
  box-shadow: 0 14px 26px rgba(38,38,38,0.10);
  padding: 6px 0;
}
.nav.open { display: flex; }
.nav .nav-link { padding: 13px 24px; }
.nav .nav-contact { color: var(--qbs-rood-actie); font-weight: 600; }

/* Dropdown onder "Referenties" (mobiel: subitems altijd zichtbaar, ingesprongen) */
.has-dropdown { display: flex; flex-direction: column; }
.drop-label { display: flex; align-items: center; gap: 6px; }
.drop-label svg { width: 14px; height: 14px; }
.dropdown { display: flex; flex-direction: column; }
.nav .dropdown .nav-link { padding: 11px 24px 11px 44px; font-size: 14.5px; }

/* Desktop: klassieke horizontale nav, hamburger verborgen */
@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 28px;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  .nav .nav-link { padding: 0; }
  .nav .nav-contact {
    background: var(--qbs-rood-actie);
    color: var(--qbs-wit);
    font-weight: 600;
    padding: 11px 22px;
    border-radius: var(--qbs-radius);
  }
  .nav .nav-contact:hover { background: var(--qbs-rood-hover); color: var(--qbs-wit); }

  /* Dropdown op desktop: zwevend paneel onder het menu-item */
  .has-dropdown { position: relative; flex-direction: row; }
  .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 14px;
    min-width: 215px;
    background: var(--qbs-wit);
    border: 1px solid var(--qbs-lijn);
    border-radius: var(--qbs-radius);
    box-shadow: 0 14px 30px rgba(38,38,38,0.12);
    padding: 6px 0;
    z-index: 60;
  }
  /* onzichtbare brug zodat de hover niet wegvalt tussen knop en paneel */
  .dropdown::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 0;
    right: 0;
    height: 14px;
  }
  .has-dropdown:hover > .dropdown,
  .has-dropdown:focus-within > .dropdown,
  .has-dropdown.open > .dropdown { display: flex; }
  .nav .dropdown .nav-link { padding: 10px 18px; }
  .nav .dropdown .nav-link:hover { background: var(--qbs-bg-licht); }
}

/* ---------- Hero ---------- */
.hero { padding: 92px 0 76px; background: var(--qbs-wit); }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.5fr 1fr; gap: 56px; }
}
.hero-inner { max-width: 720px; }
.hero h1 { margin-bottom: 20px; }
.hero h1 .accent { color: var(--qbs-rood); }
.hero .lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--qbs-tekst);
  max-width: 640px;
  margin-bottom: 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-art { display: flex; justify-content: center; }
.hero-art img { width: 100%; max-width: 380px; height: auto; }
@media (max-width: 560px) { .hero-art { display: none; } }

/* ---------- Geanimeerd QBS-icoon (hero) ---------- */
.hero-art .qbs-anim { width: 100%; max-width: 380px; height: auto; display: block; overflow: visible; }
/* basis = eindbeeld: zonder animatie (geen JS / reduced-motion) toont het volledige icoon */
.qbs-anim .r0  { opacity: 1; }
.qbs-anim .r1  { opacity: .34; }
.qbs-anim .r2  { opacity: .18; }
.qbs-anim .tri { opacity: 1; transform: scale(1); transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: no-preference) {
  /* speelt één keer af bij het laden, vriest in op het eindbeeld (fill-mode: both) */
  .qbs-anim .r0  { animation: qbsBlink0 3.8s linear 1 both; }
  .qbs-anim .r1  { animation: qbsBlink1 3.8s linear 1 both; }
  .qbs-anim .r2  { animation: qbsBlink2 3.8s linear 1 both; }
  .qbs-anim .tri { animation: qbsTriIn 3.8s linear 1 both; }
  /* klasse die JS kort toevoegt om de animatie opnieuw te starten */
  .qbs-anim.replay .r0, .qbs-anim.replay .r1, .qbs-anim.replay .r2, .qbs-anim.replay .tri { animation: none; }
}

/* outer ring (eind 1.0) — 2 knipperrondes */
@keyframes qbsBlink0 {
  0%   { opacity:.10 }  5.53% { opacity:1 }  11.05%{ opacity:.10 }
  33.16%{ opacity:.10 } 38.68%{ opacity:1 }  44.21%{ opacity:.10 }
  66.32%{ opacity:.10 } 90%   { opacity:1 }  100% { opacity:1 }
}
/* middle ring (eind 0.34) — 2 knipperrondes */
@keyframes qbsBlink1 {
  0%   { opacity:.10 }  11.05%{ opacity:.10 } 16.58%{ opacity:1 }  22.11%{ opacity:.10 }
  44.21%{ opacity:.10 } 49.74%{ opacity:1 }   55.26%{ opacity:.10 }
  66.32%{ opacity:.10 } 90%   { opacity:.34 } 100% { opacity:.34 }
}
/* inner ring (eind 0.18) — 2 knipperrondes */
@keyframes qbsBlink2 {
  0%   { opacity:.10 }  22.11%{ opacity:.10 } 27.63%{ opacity:1 }  33.16%{ opacity:.10 }
  55.26%{ opacity:.10 } 60.79%{ opacity:1 }   66.32%{ opacity:.10 }
  90%  { opacity:.18 }  100%  { opacity:.18 }
}
/* driehoek: ploft in tijdens de settle, blijft staan */
@keyframes qbsTriIn {
  0%    { opacity:0; transform:scale(.5) }
  66.32%{ opacity:0; transform:scale(.5) }
  80%   { opacity:1; transform:scale(1.06) }
  86%   { opacity:1; transform:scale(1) }
  100%  { opacity:1; transform:scale(1) }
}

/* ---------- Over mij ---------- */
.about { background: var(--qbs-bg-licht); border-top: 1px solid var(--qbs-lijn); border-bottom: 1px solid var(--qbs-lijn); }
.about-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: stretch;
}
@media (min-width: 820px) {
  .about-top { grid-template-columns: 320px 1fr; gap: 48px; }
}
.about-photo-wrap {
  position: relative;
  margin: 0;
  border-radius: var(--qbs-radius-lg);
  overflow: hidden;
  border: 1px solid var(--qbs-lijn);
  box-shadow: 0 18px 40px rgba(38,38,38,0.10);
  min-height: 360px;
}
.about-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
.about-photo-wrap figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 40px 20px 18px;
  font-family: var(--qbs-font-kop);
  font-weight: 600;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(to top, rgba(20,20,20,0.78), rgba(20,20,20,0));
}
.about-text p { max-width: 600px; }

.skills-block {
  margin-top: 36px;
}
.skill-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-tag {
  background: var(--qbs-wit);
  border: 1px solid var(--qbs-lijn);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--qbs-charcoal);
}
.skill-tag::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--qbs-rood);
  margin-right: 9px;
  vertical-align: middle;
}

/* ---------- Sectiekop ---------- */
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head p:not(.eyebrow) { color: var(--qbs-muted); margin-bottom: 0; }

/* ---------- Referenties ---------- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 640px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }

.work-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--qbs-wit);
  border: 1px solid var(--qbs-lijn);
  border-radius: var(--qbs-radius-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 44px rgba(38,38,38,0.14);
  border-color: #d9d6d1;
}

/* Browserframe-mockup */
.browser {
  background: #ECEAE6;
  border-bottom: 1px solid var(--qbs-lijn);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
}
.dots { display: flex; gap: 6px; }
.dots span { width: 11px; height: 11px; border-radius: 50%; background: #CFCBC4; }
.dots span:nth-child(1) { background: #E66A60; }
.dots span:nth-child(2) { background: #E8B84B; }
.dots span:nth-child(3) { background: #6FBE7A; }
.addr {
  flex: 1;
  background: var(--qbs-wit);
  border: 1px solid #DEDBD5;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12.5px;
  color: var(--qbs-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(100deg, #f3f1ee 30%, #e9e6e1 50%, #f3f1ee 70%);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  overflow: hidden;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity .4s ease;
}
.shot.loaded { opacity: 1; }
.shot-wrap.loaded { animation: none; background: var(--qbs-bg-licht); }

.work-body { padding: 22px 22px 24px; }
.work-body .work-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.work-body h3 { margin: 0; }
.work-visit {
  font-size: 13px;
  font-weight: 600;
  color: var(--qbs-rood-actie);
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .2s ease, transform .2s ease;
}
.work-card:hover .work-visit { opacity: 1; transform: translateX(0); }
.work-domain { font-size: 13px; color: var(--qbs-muted); margin: 4px 0 12px; }
.work-body p { font-size: 15px; margin: 0; }

/* ---------- Technologieën ---------- */
.tech { background: var(--qbs-wit); }
.tech-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 8px;
}
@media (min-width: 700px) { .tech-grid { grid-template-columns: repeat(3, 1fr); } }
.tech-item {
  background: var(--qbs-wit);
  border: 1px solid var(--qbs-lijn);
  border-radius: var(--qbs-radius-lg);
  padding: 24px 24px 26px;
}
.tech-item h3 { margin-bottom: 8px; }
.tech-item p { font-size: 15px; color: var(--qbs-tekst); margin: 0; }

/* ---------- Contact ---------- */
.contact-inner { max-width: 640px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

/* ---------- Software projecten ---------- */
.projects { background: var(--qbs-wit); padding-top: 0; }
.proj-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 760px) { .proj-grid { grid-template-columns: repeat(2, 1fr); } }
.proj-card {
  display: flex;
  gap: 18px;
  background: var(--qbs-bg-licht);
  border: 1px solid var(--qbs-lijn);
  border-radius: var(--qbs-radius-lg);
  padding: 26px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.proj-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(38,38,38,0.10);
}
.proj-icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--qbs-rood-licht);
  display: flex;
  align-items: center;
  justify-content: center;
}
.proj-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: var(--qbs-rood-actie);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.proj-body h3 { margin: 0 0 2px; }
.proj-meta { font-size: 13px; color: var(--qbs-muted); margin: 0 0 10px; }
.proj-meta .proj-client { color: var(--qbs-rood-actie); font-weight: 600; }
.proj-body p:last-child { font-size: 15px; margin: 0; }

/* ---------- Hoe ik werk ---------- */
.process { background: var(--qbs-bg-licht); border-top: 1px solid var(--qbs-lijn); border-bottom: 1px solid var(--qbs-lijn); }
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}
@media (min-width: 560px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 920px) { .steps-grid { grid-template-columns: repeat(4, 1fr); gap: 26px; } }
.step { position: relative; }
.step-num {
  display: block;
  font-family: var(--qbs-font-kop);
  font-weight: 600;
  font-size: 40px;
  line-height: 1;
  color: var(--qbs-rood);
  margin-bottom: 16px;
}
.step h3 { margin: 0 0 8px; }
.step p { font-size: 15px; color: var(--qbs-tekst); margin: 0; }

/* ---------- Getuigenissen ---------- */
.testimonials { background: var(--qbs-bg-licht); }
.testi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}
@media (min-width: 720px) { .testi-grid { grid-template-columns: repeat(3, 1fr); } }
.testi-card {
  margin: 0;
  background: var(--qbs-wit);
  border: 1px solid var(--qbs-lijn);
  border-radius: var(--qbs-radius-lg);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
}
.testi-card blockquote {
  margin: 0 0 20px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--qbs-tekst);
  position: relative;
}
.testi-card blockquote::before {
  content: "\201C";
  font-family: var(--qbs-font-kop);
  font-size: 56px;
  line-height: 1;
  color: var(--qbs-rood);
  display: block;
  height: 30px;
}
.testi-card figcaption { margin-top: auto; }
.testi-name {
  display: block;
  font-family: var(--qbs-font-kop);
  font-weight: 600;
  font-size: 17px;
  color: var(--qbs-charcoal);
}
.testi-role { display: block; font-size: 13px; color: var(--qbs-muted); margin-top: 2px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--qbs-bg-licht);
  color: var(--qbs-tekst);
  border-top: 1px solid var(--qbs-lijn);
  padding: 56px 0 36px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
}
.footer-brand .brand-img { height: 96px; width: auto; }

.footer-col h4 {
  font-family: var(--qbs-font-tekst);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--qbs-rood-actie);
  margin: 0 0 14px;
}
.footer-col p, .footer-col a {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--qbs-charcoal);
  text-decoration: none;
  margin: 0 0 6px;
}
.footer-col a:hover { color: var(--qbs-rood-actie); }
.footer-col .muted { color: var(--qbs-muted); font-size: 13px; }
.footer-col .contact-name { font-weight: 600; }
.footer-col .btw { color: var(--qbs-rood-actie); font-weight: 600; }
/* Contactregels met rood icoon */
.footer-col .ico {
  display: flex;
  align-items: center;
  gap: 9px;
}
.footer-col .ico svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: var(--qbs-rood-actie);
}
/* Adres over twee regels: icoon bovenaan, ter hoogte van de straat */
.footer-col .ico-top { align-items: flex-start; }
.footer-col .ico-top svg { margin-top: 3px; }
/* Adresregels op gelijke afstand (6px) zodat postcode+plaats met het e-mailadres
   uitlijnt en het BTW-nummer met de LinkedIn-link in de contactkolom. */
.footer-col .addr-lines { display: flex; flex-direction: column; gap: 6px; }

.footer-bottom {
  border-top: 1px solid var(--qbs-lijn);
  margin-top: 40px;
  padding-top: 22px;
  font-size: 13px;
  color: var(--qbs-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/* Mobiel: footertekst horizontaal gecentreerd */
@media (max-width: 719px) {
  .footer-inner { text-align: center; }
  .footer-brand .brand-img { margin-left: auto; margin-right: auto; display: block; }
  .footer-col .ico,
  .footer-col .ico-top { justify-content: center; }
  .footer-col .addr-lines { align-items: center; }
  .footer-bottom { flex-direction: column; align-items: center; text-align: center; }
}
