/* ==========================================================
   Cusveller Bouw en Renovatie — huisstijl afgeleid van het logo
   ========================================================== */
:root {
  --slate: #393e46;
  --slate-dark: #2c3037;
  --slate-deep: #22252a;
  --gold-dark: #905e26;
  --gold-light: #f5ec9b;
  --gold: #c39a4e;
  --gold-gradient: linear-gradient(90deg, var(--gold-dark), var(--gold-light) 50%, var(--gold-dark));
  --paper: #f7f5f0;
  --paper-2: #efebe2;
  --ink: #26292e;
  --ink-soft: #5a5f68;
  --white: #fff;

  --font-display: "Cinzel", "Trajan Pro", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --wrap: 1120px;
  --radius: 4px;
  --shadow: 0 10px 30px rgba(20, 22, 26, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--gold-dark); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--white); padding: 8px 12px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Gouden dubbele lijn, als in het logo */
.gold-rule {
  height: 6px;
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
  border-image: var(--gold-gradient) 1;
  width: 120px;
  margin: 0 0 1.4rem;
}
.center .gold-rule { margin-left: auto; margin-right: auto; }

.eyebrow {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.6rem;
}

.center { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  background: var(--slate);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}
.site-header::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--gold-gradient);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  gap: 16px;
}
.logo img { height: 52px; width: auto; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--white);
  border-radius: var(--radius);
  padding: 8px 12px;
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
}
.site-nav a {
  display: block;
  padding: 10px 16px;
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--gold-light);
  border-bottom-color: var(--gold);
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--slate-dark);
    padding: 8px 20px 16px;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; }
  .logo img { height: 44px; }
}

/* ---------- Knoppen ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-gold {
  background: var(--gold-gradient);
  background-size: 200% 100%;
  color: var(--slate-deep);
}
.btn-gold:hover { background-position: 100% 0; }
.btn-ghost {
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-dark { background: var(--slate); color: var(--white); }
.btn:disabled { opacity: 0.6; cursor: wait; transform: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.center .btn-row { justify-content: center; }

/* ---------- Foto met terugval als het bestand ontbreekt ---------- */
.photo {
  position: relative;
  background: var(--slate) url("../assets/favicon.png") center / 64px no-repeat;
  overflow: hidden;
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.is-missing img { display: none; }
.photo.is-missing::after {
  content: "Foto volgt";
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ---------- Hero (startpagina) ---------- */
.hero {
  position: relative;
  min-height: min(86vh, 760px);
  display: flex;
  align-items: flex-end;
  color: var(--white);
  background: var(--slate-deep);
}
.hero .photo {
  position: absolute;
  inset: 0;
  background-size: 96px;
}
.hero .photo.is-missing::after { display: none; }
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(34, 37, 42, 0.15) 0%, rgba(34, 37, 42, 0.55) 45%, rgba(34, 37, 42, 0.92) 100%),
    linear-gradient(90deg, rgba(34, 37, 42, 0.7) 0%, rgba(34, 37, 42, 0) 70%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: 120px;
  padding-bottom: 72px;
}
.hero h1 { max-width: 14em; }
.hero-lead {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
  max-width: 34em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.8rem;
}
.hero .eyebrow { color: var(--gold-light); }

/* ---------- Secties ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--paper-2); }
.section-dark { background: var(--slate); color: var(--white); }
.section-dark .eyebrow { color: var(--gold-light); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.section-dark .lead { color: rgba(255, 255, 255, 0.8); }

.page-header {
  background: var(--slate);
  color: var(--white);
  padding: 64px 0 56px;
}
.page-header p { color: rgba(255, 255, 255, 0.8); max-width: 38em; margin: 0; font-size: 1.15rem; }
.page-header .eyebrow { color: var(--gold-light); }

/* Kernwaarden */
.values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.value {
  background: var(--white);
  padding: 32px 28px;
  border-radius: var(--radius);
  border-top: 3px solid;
  border-image: var(--gold-gradient) 1;
  box-shadow: 0 2px 10px rgba(20, 22, 26, 0.05);
}
.value-icon {
  width: 44px; height: 44px;
  color: var(--gold-dark);
  margin-bottom: 16px;
}
.value p { color: var(--ink-soft); margin: 0; }

/* Werkwijze in stappen */
.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding-top: 64px;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0; left: 0;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-light);
}
.steps p { color: rgba(255, 255, 255, 0.8); margin: 0; }

/* Twee kolommen: tekst + foto */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split .photo { aspect-ratio: 4 / 5; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split .photo { aspect-ratio: 4 / 3; }
}

.check-list { list-style: none; padding: 0; margin: 0 0 1.6rem; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.55em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--gold-dark);
  border-bottom: 2px solid var(--gold-dark);
  transform: rotate(-45deg);
}

/* Werkgebied */
.towns {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.towns li {
  padding: 8px 18px;
  border: 1px solid rgba(245, 236, 155, 0.35);
  border-radius: 999px;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
}
.towns li.is-home {
  background: var(--gold-gradient);
  color: var(--slate-deep);
  border-color: transparent;
  font-weight: 600;
}

/* ---------- Referenties ---------- */
.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.ref-card {
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(20, 22, 26, 0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.ref-card:hover, .ref-card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }
.ref-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ref-cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--slate); }
.ref-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ref-count {
  position: absolute;
  right: 10px; bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(34, 37, 42, 0.8);
  color: var(--white);
  font-size: 0.8rem;
}
.ref-body {
  padding: 20px 22px 24px;
  border-top: 3px solid;
  border-image: var(--gold-gradient) 1;
}
.ref-body h3 { margin-bottom: 0.3em; }
.ref-meta { color: var(--gold-dark); font-size: 0.92rem; margin-bottom: 0.6em; }
.ref-text {
  color: var(--ink-soft);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ref-skeleton {
  aspect-ratio: 4 / 4.2;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--paper-2), #e4dfd3, var(--paper-2));
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.ref-empty {
  text-align: center;
  padding: 48px 24px 8px;
}

.ref-dialog {
  width: min(960px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  overflow: auto;
}
.ref-dialog::backdrop { background: rgba(20, 22, 26, 0.85); }
.ref-main {
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  background: var(--slate-deep);
}
.ref-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  background: var(--slate-deep);
}
.ref-thumbs button {
  flex: none;
  width: 72px; height: 72px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 3px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  background: none;
}
.ref-thumbs button[aria-current="true"] { border-color: var(--gold); opacity: 1; }
.ref-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.ref-dialog-body { padding: 24px 28px 28px; }
.ref-dialog-meta { color: var(--gold-dark); }
.ref-dialog-text { white-space: pre-line; margin: 0; }
.ref-close {
  position: sticky;
  top: 10px;
  float: right;
  margin: 10px 10px -54px 0;
  z-index: 2;
  width: 44px; height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(34, 37, 42, 0.8);
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: stretch;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 32px; } }

.contact-card {
  background: var(--slate);
  color: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  border-top: 3px solid;
  border-image: var(--gold-gradient) 1;
}
@media (max-width: 520px) { .contact-card { padding: 28px 22px; } }
.contact-card h2 { font-size: 1.8rem; margin-bottom: 0.2em; }
.contact-card .muted { color: var(--gold-light); margin-bottom: 1.2em; }
.contact-intro { color: rgba(255, 255, 255, 0.85); }

.contact-list { list-style: none; padding: 0; margin: 24px 0 0; }
.contact-list li {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 1.1rem;
}
.contact-list svg { width: 20px; height: 20px; flex: none; color: var(--gold-light); }
.contact-list a { color: var(--white); text-decoration: none; }
.contact-list a:hover { color: var(--gold-light); text-decoration: underline; }
.contact-actions { margin-top: 28px; }

.contact-photo {
  min-height: 420px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
@media (max-width: 860px) { .contact-photo { min-height: 0; aspect-ratio: 4 / 3; } }

/* ---------- CTA-balk ---------- */
.cta-band {
  background: var(--slate-dark);
  color: var(--white);
  padding: 64px 0;
}
.cta-band p { color: rgba(255, 255, 255, 0.8); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--slate-deep);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  padding: 48px 0 32px;
}
.site-footer::before {
  content: "";
  display: block;
  height: 2px;
  background: var(--gold-gradient);
  margin-top: -48px;
  margin-bottom: 46px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 32px;
}
.footer-grid img { height: 56px; width: auto; margin-bottom: 12px; }
.site-footer a { color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--gold-light); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.85rem;
}

[hidden] { display: none !important; }

@media (max-width: 600px) {
  .section { padding: 60px 0; }
  .page-header { padding: 44px 0 40px; }
  .hero-content { padding-bottom: 48px; }
}
