/* =============================================================================
 *  A. Thijm Klus en onderhoudsbedrijf — styles
 *  Palette inspired by the company flyers: deep navy, steel blue, silver.
 * ===========================================================================*/

:root {
  --navy-900: #0b1a33;
  --navy-800: #102345;
  --navy-700: #16315e;
  --blue-600: #1d4ed8;
  --blue-500: #2563eb;
  --blue-400: #3b82f6;
  --silver-100: #f4f6fb;
  --silver-200: #e6eaf2;
  --silver-300: #c9d2e0;
  --ink: #11203a;
  --muted: #5a6b86;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 26, 51, 0.12);
  --shadow-lg: 0 20px 50px rgba(11, 26, 51, 0.25);
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Barlow Condensed", "Inter", sans-serif;
  line-height: 1.08;
  margin: 0 0 .4em;
  letter-spacing: .3px;
  text-wrap: balance; /* nicer, more even heading line breaks */
}

p { text-wrap: pretty; } /* avoid ugly single-word last lines */

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ------------------------------------------------------------------ Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-call { background: var(--blue-500); color: #fff; box-shadow: 0 8px 20px rgba(37, 99, 235, .35); }
.btn-call:hover { background: var(--blue-600); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.12); }

/* --------------------------------------------------------------- Pap notice */
.pap-notice {
  background: #fde68a; color: #5a3e00; text-align: center;
  padding: .55rem 1rem; font-size: .9rem; font-weight: 500;
}

/* ------------------------------------------------------------------- Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 26, 51, .96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 68px; }

.brand { display: flex; align-items: center; gap: .65rem; color: #fff; }
/* Optional logo image: hidden until it successfully loads. When present, it
   replaces the icon + text wordmark. Remove images/logo.png to revert. */
.brand-logo { display: none; height: 46px; width: auto; max-width: 230px; }
.brand.has-logo .brand-logo { display: block; }
.brand.has-logo .brand-mark,
.brand.has-logo .brand-text { display: none; }
.brand-mark {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-600)); color: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: "Barlow Condensed", sans-serif; font-size: 1.3rem; letter-spacing: .5px; }
.brand-text small { font-size: .72rem; color: var(--silver-300); letter-spacing: .3px; }

.primary-nav { margin-left: auto; display: flex; align-items: center; gap: 1.25rem; }
.primary-nav > a { color: var(--silver-200); font-size: .95rem; font-weight: 500; }
.primary-nav > a:hover { color: #fff; }

.lang-switch { display: flex; gap: .25rem; background: rgba(255,255,255,.06); padding: .25rem; border-radius: 999px; }
.lang-switch button {
  border: 0; background: transparent; color: var(--silver-300);
  font-size: .78rem; font-weight: 700; letter-spacing: .5px;
  padding: .3rem .55rem; border-radius: 999px; cursor: pointer;
}
.lang-switch button:hover { color: #fff; }
.lang-switch button.is-active { background: var(--blue-500); color: #fff; }

.nav-call { padding: .55rem 1rem; font-size: .9rem; }
.nav-toggle { display: none; }
.header-actions { display: flex; align-items: center; gap: .5rem; }

/* --------------------------------------------------------------------- Hero */
.hero {
  position: relative; color: #fff; overflow: hidden;
  display: flex; align-items: center;
  min-height: calc(100vh - 68px);
  min-height: calc(100svh - 68px); /* hero fills one screen on mobile & desktop */
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(37,99,235,.45), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-700) 70%, var(--navy-800));
}
.hero-overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 46px 46px; opacity: .5; pointer-events: none;
}
.hero-inner { position: relative; padding: 1.6rem 20px 2.4rem; max-width: 820px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 2px; font-size: .8rem; font-weight: 700;
  color: var(--blue-400); margin: 0 0 .85rem;
}
.hero-title { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: .7rem; }
.hero-title span { color: var(--blue-400); }
/* Optional hero logo: hidden until it loads. When present it replaces the
   text headline. Remove images/logo.png to revert to the text headline. */
.hero-logo { display: none; width: auto; height: auto; max-width: min(100%, 300px); max-height: clamp(78px, 13vh, 124px); margin: 0 0 .55rem; }
.hero-inner.has-logo .hero-logo { display: block; }
.hero-tagline { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 600; color: #fff; margin: 0 0 .4rem; max-width: 560px; }
.hero-subtitle { font-size: clamp(1rem, 2.4vw, 1.2rem); line-height: 1.6; color: var(--silver-200); max-width: 560px; margin: 0; }

.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.1rem 0; }

.hero-badges { display: flex; flex-wrap: wrap; gap: 1.4rem; list-style: none; padding: 0; margin: 0; }
.hero-badges li { display: flex; align-items: center; gap: .5rem; font-weight: 600; color: var(--silver-200); }
.hero-badges .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--blue-400); box-shadow: 0 0 0 4px rgba(59,130,246,.2); }

.hero-badge-stamp {
  position: absolute; right: 6%; bottom: 8%; z-index: 2;
  display: none; flex-direction: column; align-items: center; gap: .4rem;
  width: 168px; height: 168px; border-radius: 50%; text-align: center;
  background: rgba(255,255,255,.06); border: 2px solid rgba(59,130,246,.5);
  color: #fff; font-family: "Barlow Condensed", sans-serif; font-size: 1.1rem;
  justify-content: center; padding: 1rem; line-height: 1.05;
  box-shadow: var(--shadow-lg);
}

/* ------------------------------------------------------------------ Sections */
.section { padding: 4.5rem 0; }
.section--dark { background: var(--navy-900); color: #fff; }
.section--dark .section-head p { color: var(--silver-300); }

.section-head { text-align: center; max-width: 620px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.section-head h2::after {
  content: ""; display: block; width: 52px; height: 4px; border-radius: 2px;
  background: var(--blue-500); margin: .85rem auto 0;
}
.section-head p { color: var(--muted); font-size: 1.08rem; line-height: 1.6; margin: 1rem 0 0; }

/* Scroll-reveal. The .reveal class is added by JS only, so if scripting is off
   all content stays visible. Above-the-fold items are shown immediately. */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in-view { opacity: 1; transform: none; }

.grid { display: grid; gap: 1.2rem; }
.grid-services { grid-template-columns: repeat(3, 1fr); }
.grid-comp { grid-template-columns: repeat(4, 1fr); margin-bottom: 2.4rem; }
.grid-promises { grid-template-columns: repeat(4, 1fr); }
.grid-gallery { grid-template-columns: repeat(3, 1fr); }
.grid-contact { grid-template-columns: repeat(4, 1fr); }

/* --------------------------------------------------------------------- Cards */
.card {
  background: #fff; border: 1px solid var(--silver-200); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.service-card h3 { font-size: 1.5rem; color: var(--navy-800); }
.service-card p { margin: 0; color: var(--muted); font-size: .97rem; line-height: 1.6; }
.service-icon {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px;
  background: linear-gradient(135deg, var(--navy-700), var(--blue-600)); color: #fff; margin-bottom: 1rem;
}
.service-card--accent { background: linear-gradient(160deg, var(--navy-800), var(--navy-700)); border-color: transparent; }
.service-card--accent h3 { color: #fff; }
.service-card--accent p { color: var(--silver-300); }
.service-card--accent .service-icon { background: var(--blue-500); }

/* ------------------------------------------------------------- Competencies */
.comp { padding: 1.3rem 1.4rem; border-left: 3px solid var(--blue-500); background: rgba(255,255,255,.04); border-radius: 0 var(--radius) var(--radius) 0; }
.comp h3 { font-size: 1.3rem; color: #fff; }
.comp p { margin: 0; color: var(--silver-300); font-size: .94rem; }

.promise { text-align: center; padding: 1.2rem; border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); }
.promise h4 { font-family: "Inter", sans-serif; font-size: 1.02rem; color: var(--blue-400); margin-bottom: .3rem; }
.promise p { margin: 0; color: var(--silver-300); font-size: .88rem; }

/* ------------------------------------------------------------------- Gallery */
.gallery-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 0 1.8rem; }
.gallery-filter {
  border: 1px solid var(--silver-300); background: #fff; color: var(--navy-800);
  font-weight: 600; font-size: .9rem; padding: .5rem 1.1rem; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.gallery-filter:hover { border-color: var(--blue-400); }
.gallery-filter.is-active { background: var(--blue-500); border-color: var(--blue-500); color: #fff; }

.gallery-item {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 3; background: var(--silver-100); box-shadow: var(--shadow); cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item::after {
  content: "+"; position: absolute; top: .6rem; right: .8rem; width: 30px; height: 30px;
  display: grid; place-items: center; border-radius: 50%; background: rgba(11,26,51,.6); color: #fff;
  font-size: 1.2rem; opacity: 0; transition: opacity .2s ease;
}
.gallery-item:hover::after { opacity: 1; }
.gallery-item.is-missing, .gallery-item.is-hidden { display: none; }

.gallery-empty {
  text-align: center; color: var(--muted); font-weight: 600; padding: 2.5rem 1rem;
  border: 1px dashed var(--silver-300); border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, var(--silver-100), var(--silver-100) 12px, var(--silver-200) 12px, var(--silver-200) 24px);
}

/* ------------------------------------------------------------------ Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(7, 16, 33, .92); padding: 4vw;
}
.lightbox[hidden] { display: none; }
.lb-img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.lb-close, .lb-nav {
  position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.4rem; line-height: 1; transition: background .15s ease;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255,255,255,.25); }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ----------------------------------------------------------- Before / After */
.projects-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem; }
.project-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.project-card.is-loading { display: none; }
.project-title { font-size: 1.4rem; color: var(--navy-800); margin: 0; padding: .9rem 1.2rem; }

.ba { position: relative; aspect-ratio: 4 / 3; overflow: hidden; user-select: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-before { clip-path: inset(0 50% 0 0); }
.ba-label {
  position: absolute; bottom: .7rem; padding: .25rem .7rem; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: #fff; background: rgba(11,26,51,.7); border-radius: 999px;
}
.ba-label-before { left: .7rem; }
.ba-label-after { right: .7rem; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; background: #fff;
  transform: translateX(-50%); pointer-events: none; box-shadow: 0 0 8px rgba(0,0,0,.5);
}
.ba-handle::after {
  content: "⟷"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--navy-800);
  display: grid; place-items: center; font-size: 1rem; box-shadow: var(--shadow);
}
.ba-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
}

/* --------------------------------------------------------------------- About */
.section--split { background: var(--silver-100); }
.about-inner { display: grid; grid-template-columns: 1fr 1.25fr; gap: 2.4rem; align-items: center; }
.about-text h2 { font-size: clamp(2rem, 4vw, 2.8rem); }
.about-text p { color: var(--muted); font-size: 1.08rem; line-height: 1.75; max-width: 56ch; }
.about-slogan {
  font-family: "Barlow Condensed", sans-serif; font-size: 1.6rem !important;
  color: var(--navy-800); font-weight: 700; margin: 1rem 0 1.4rem !important;
}

/* Owner portrait */
.about-portrait {
  position: relative; margin: 0; border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 4 / 5; background: var(--navy-800);
  box-shadow: var(--shadow-lg); border: 4px solid #fff;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.about-portrait-tag {
  position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column;
  padding: 1.4rem 1.2rem .9rem; color: #fff;
  background: linear-gradient(transparent, rgba(11,26,51,.88));
  font-size: .9rem; letter-spacing: .3px;
}
.about-portrait-name { font-family: "Barlow Condensed", sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: .5px; }
.about-portrait-fallback { display: none; }
/* Placeholder shown when no portrait file is present yet */
.about-portrait.is-empty {
  display: grid; place-items: center; border-style: dashed; border-color: var(--silver-300); border-width: 2px;
  background: repeating-linear-gradient(45deg, var(--silver-100), var(--silver-100) 12px, var(--silver-200) 12px, var(--silver-200) 24px);
}
.about-portrait.is-empty img,
.about-portrait.is-empty .about-portrait-tag { display: none; }
.about-portrait.is-empty .about-portrait-fallback {
  display: block; color: var(--muted); font-weight: 600; text-align: center; padding: 1rem;
}

/* ------------------------------------------------------------------- Contact */
.contact-card {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.5rem;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius); transition: border-color .15s ease, transform .15s ease;
}
a.contact-card:hover { border-color: var(--blue-400); transform: translateY(-3px); }
.contact-label { font-size: .82rem; text-transform: uppercase; letter-spacing: 1px; color: var(--blue-400); font-weight: 700; }
.contact-value { font-size: 1.25rem; font-weight: 700; }
.contact-value--sm { font-size: .98rem; font-weight: 500; color: var(--silver-300); }

/* -------------------------------------------------------------------- Footer */
.site-footer { background: var(--navy-900); color: var(--silver-300); padding: 2.5rem 0; border-top: 1px solid rgba(255,255,255,.08); }
.footer-inner { text-align: center; }
.brand--footer { justify-content: center; color: #fff; margin-bottom: .6rem; }
.footer-logo { display: none; height: 52px; width: auto; }
.brand--footer.has-logo .footer-logo { display: block; }
.brand--footer.has-logo .brand-text { display: none; }
.footer-tagline { font-family: "Barlow Condensed", sans-serif; font-size: 1.4rem; color: #fff; margin: .2rem 0 .8rem; }
.footer-meta { font-size: .85rem; margin: 0; }
.footer-credit { font-size: .82rem; margin: .6rem 0 0; color: var(--silver-300); }
.footer-credit a { color: var(--blue-400); font-weight: 600; }
.footer-credit a:hover { color: #fff; text-decoration: underline; }

/* ----------------------------------------------------------- Floating button */
.fab-whatsapp {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: var(--shadow-lg); transition: transform .15s ease;
}
.fab-whatsapp:hover { transform: scale(1.08); }

/* ---------------------------------------------------------------- Responsive */
@media (min-width: 1024px) { .hero-badge-stamp { display: flex; } }

/* Desktop: each section fills one screen (Projects keeps its natural height).
   The hero is already full-height at all sizes (see .hero above). */
@media (min-width: 992px) {
  .section:not(#projects) {
    min-height: 100svh;
    display: flex; align-items: center;
    padding-top: 3rem; padding-bottom: 3rem;
  }
  .section:not(#projects) > .container { width: 100%; }
}

@media (max-width: 900px) {
  .grid-services, .grid-gallery { grid-template-columns: repeat(2, 1fr); }
  .grid-comp, .grid-promises, .grid-contact { grid-template-columns: repeat(2, 1fr); }
  .projects-list { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .header-inner { gap: .6rem; }
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 42px; height: 42px; background: transparent; border: 0; cursor: pointer;
  }
  .nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; }
  /* Language switch + menu button stay visible in the bar */
  .header-actions { margin-left: auto; gap: .35rem; }
  .lang-switch { gap: .12rem; padding: .2rem; }
  .lang-switch button { font-size: .7rem; padding: .26rem .42rem; letter-spacing: .2px; }
  .primary-nav {
    position: fixed; inset: 68px 0 auto 0; margin: 0;
    flex-direction: column; align-items: flex-start; gap: 1rem;
    background: var(--navy-800); padding: 1.4rem 20px 1.8rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
    transform: translateY(-130%); transition: transform .25s ease; visibility: hidden;
  }
  .primary-nav.is-open { transform: translateY(0); visibility: visible; }
  .nav-call { align-self: stretch; justify-content: center; }
}

@media (max-width: 520px) {
  .grid-services, .grid-gallery, .grid-comp, .grid-promises, .grid-contact { grid-template-columns: 1fr; }
  .hero-inner { padding: 1.4rem 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
