/* ============================================================
   KOEBRA WEBSITE — Stylesheet
   Typografie: Inter (400 / 600 / 700) — variable font, lokaal gehost
   ============================================================ */

/* --- @font-face ------------------------------------------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/static/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --- Custom properties ------------------------------------ */
:root {
  /* Kleurpalet */
  --paper:      #F1ECDD;
  --ink:        #1B2430;
  --muted:      #5b5a55;
  --navy:       #1B2A4A;
  --gold:       #E8AC3D;   /* iconen en decoratie op donkere achtergrond */
  --gold-text:  #7C5B14;   /* tekst/links op lichte achtergrond — 5.29:1 op crème */
  --card-border:#E3DDC9;

  /* Typografie */
  --font: 'Inter', system-ui, sans-serif;

  /* Schaal */
  --space-xs:  0.5rem;
  --space-s:   1rem;
  --space-m:   1.5rem;
  --space-l:   2.5rem;
  --space-xl:  4rem;

  --radius-card: 12px;
  --radius-btn:  8px;

  --max-width: 1100px;
}

/* --- Reset ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
address { font-style: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* --- Focus states ---------------------------------------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* --- Layout ---------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-m);
}

/* --- Site header ----------------------------------------- */
.site-header {
  background-color: var(--navy);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding-block: 1rem;
  flex-wrap: wrap;
}

.site-header__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.site-header .logo-mark {
  height: 48px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  gap: var(--space-l);
  list-style: none;
}

.site-nav a {
  display: flex;
  align-items: center;
  gap: 0.4em;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.01em;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.site-nav a:hover { color: #ffffff; }

.site-nav a[aria-current="page"] {
  color: #ffffff;
  border-bottom-color: var(--gold);
}

.site-nav svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

/* --- Site footer ----------------------------------------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding-block: var(--space-m);
}

.site-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  flex-wrap: wrap;
}

.site-footer address,
.site-footer p {
  font-size: 0.825rem;
  color: var(--muted);
}

/* --- Main content ---------------------------------------- */
main { flex: 1; }

/* --- Homepage tagline (onder kaarten) -------------------- */
.page-tagline {
  padding-block: var(--space-l) var(--space-xl);
  text-align: center;
}

.page-tagline__eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.875rem;
}

.page-tagline__sub {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--muted);
  max-width: 52ch;
  margin-inline: auto;
  line-height: 1.65;
}

/* --- Pagina hero (subpagina's) --------------------------- */
.page-hero {
  padding-block: var(--space-xl) var(--space-l);
}

.page-hero__eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gold-text);
  letter-spacing: 0.02em;
  margin-bottom: 0.875rem;
}

.page-hero__title {
  font-size: 2.625rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  max-width: 640px;
  margin: 0 0 1rem;
}

.page-hero__sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.6;
  margin: 0 0 3rem;
}

/* --- Keuzekaarten (homepage) ----------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-m);
  padding-block: var(--space-l) var(--space-xl);
}

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

.card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(27, 42, 74, 0.10);
}

.card__icon {
  width: 24px;
  height: 24px;
  color: var(--gold);
  margin-bottom: var(--space-m);
  flex-shrink: 0;
}

.card__title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--space-xs);
}

.card__body {
  font-size: 0.95rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.6;
}

.card__cta {
  margin-top: var(--space-m);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold-text);
}

/* --- Inhoudsblok (subpagina's) --------------------------- */
.content-block {
  padding-block: var(--space-l) var(--space-xl);
  max-width: 72ch;
}

.content-block h1 {
  font-size: clamp(1.167rem, 2.667vw, 1.833rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-m);
}

.content-block p {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: var(--space-s);
  line-height: 1.7;
}

.content-block ul {
  list-style: none;
  padding: 0;
  margin-bottom: var(--space-m);
}

.content-block ul li {
  display: flex;
  gap: var(--space-xs);
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--muted);
  margin-bottom: var(--space-xs);
}

.content-block ul li::before {
  content: '—';
  color: var(--gold-text);
  flex-shrink: 0;
  margin-top: 0.05em;
}

/* --- Knoppen --------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 0.6em 1.3em;
  border-radius: var(--radius-btn);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn--primary {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.btn--primary:hover {
  background: #253a64;
  border-color: #253a64;
}

.btn--secondary {
  background: #ffffff;
  color: var(--navy);
  border-color: var(--navy);
}

.btn--secondary:hover {
  background: var(--navy);
  color: #ffffff;
}

/* --- Referentieproject-blok (Koebr-AI-T) ----------------- */
.ref-block {
  border-left: 3px solid var(--gold);
  padding: var(--space-s) var(--space-m);
  margin-block: var(--space-m);
  background: rgba(27, 42, 74, 0.04);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

.ref-block p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.ref-block a {
  color: var(--gold-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* --- Interieurbouw: projectraster ------------------------ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-m);
  margin-block: var(--space-s) var(--space-l);
}

.project-item {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--space-m);
}

.project-item__label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-text);
  margin-bottom: var(--space-xs);
}

.project-item__title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

/* --- Contact-kaart --------------------------------------- */
.contact-block {
  background: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--space-m);
  margin-block: var(--space-s) var(--space-xl);
  max-width: 36ch;
}

.contact-block address {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
}

.contact-block a {
  color: var(--gold-text);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* --- Divider --------------------------------------------- */
hr {
  border: none;
  border-top: 1px solid var(--card-border);
  margin-block: var(--space-l);
}

/* --- Sectiekoppen (interieurbouw h2) --------------------- */
.section-heading {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-s);
}

/* --- Platform preview (energie) -------------------------- */
.platform-preview {
  padding-block: var(--space-l) var(--space-xl);
}

.platform-preview__heading {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: var(--space-m);
}

.platform-preview__grid {
  display: flex;
  gap: var(--space-m);
  flex-wrap: wrap;
}

.thumb-btn {
  background: none;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-card);
  padding: 0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(27, 42, 74, 0.08);
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}

.thumb-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(27, 42, 74, 0.14);
}

.thumb-img {
  display: block;
  max-width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .platform-preview__grid {
    flex-direction: column;
  }
  .thumb-btn {
    width: 100%;
  }
  .thumb-img {
    width: 100%;
  }
}

/* --- Lightbox -------------------------------------------- */
#lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox[hidden] { display: none; }

#lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(27, 36, 48, 0.82);
}

#lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 1200px);
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-card);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

#lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

#lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}
