/* ==========================================================================
   Splash / Full-screen Carousel / Floating Nav
   Minimal, dependency-free component (no Bootstrap JS or jQuery required).
   Namespaced with "spc-" so it won't collide with Bootstrap's own classes.
   ========================================================================== */

:root {
  --spc-bg: #f7f6f3;
  --spc-bg-rgb: 247, 246, 243; /* zelfde kleur als --spc-bg, maar als r, g, b - hou dit gelijk als je --spc-bg wijzigt */
  --spc-fg: #111111;
  --spc-nav-color: #ffffff;
  --spc-nav-shadow: rgba(0, 0, 0, 0.45);

  --spc-duration-logo-in: 0.9s;
  --spc-duration-crossfade: 1.3s;
  --spc-duration-slide: 1.2s;

  /* EDIT HIER: hoe zichtbaar de eerste foto door het splash-scherm heen
     schemert. 1 = onzichtbaar (volledig --spc-bg), 0 = de foto op volle
     sterkte. 0.85 laat 'm heel vaag doorschemeren. */
  --spc-intro-tint-alpha: 0.85;

  --spc-z-intro: 2100;
  --spc-z-nav: 2000;
  --spc-z-carousel: 1;

  --spc-nav-gap: 32px;
}

/* Let op: CSS media queries kunnen geen var() gebruiken, dus de
   mobiel-breakpoint (768px) staat hieronder op twee plekken hardcoded:
   bij "2b) EDIT HIER" (welke carousel getoond wordt) en bij "4) Mobile"
   (hamburgermenu). Pas je hem aan, doe dat dan op beide plekken. */

/* -------------------------------------------------------------------------
   1) Intro / splash screen with centered logo
   ------------------------------------------------------------------------- */
.spc-intro {
  /* --spc-intro-img komt van --spc-img/--spc-img-mobile die je op het
     .spc-intro-element zelf meegeeft (zie demo.html) - meestal dezelfde
     foto als de eerste carousel-slide, zodat die al heel vaag zichtbaar
     is achter het logo. Geen van beide gezet? Dan blijft het gewoon
     --spc-bg, zoals voorheen. */
  --spc-intro-img: var(--spc-img, none);

  position: fixed;
  inset: 0;
  z-index: var(--spc-z-intro);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--spc-bg);
  background-image:
    linear-gradient(rgba(var(--spc-bg-rgb), var(--spc-intro-tint-alpha)), rgba(var(--spc-bg-rgb), var(--spc-intro-tint-alpha))),
    var(--spc-intro-img);
  background-size: cover;
  background-position: center;
  opacity: 1;
  transition: opacity var(--spc-duration-crossfade) cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

@media (max-width: 768px) {
  .spc-intro {
    --spc-intro-img: var(--spc-img-mobile, var(--spc-img, none));
  }
}

.spc-intro.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.spc-intro__logo {
  width: 160px;
  max-width: 32vw;
  height: auto;
  opacity: 0;
  animation: spc-fade-in var(--spc-duration-logo-in) ease forwards;
  animation-delay: 0.1s;
}

@keyframes spc-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* -------------------------------------------------------------------------
   2) Full-screen crossfading carousel with a soft radial vignette/blur

   Twee volledig gescheiden carousels: [data-spc-carousel="desktop"] en
   [data-spc-carousel="mobile"]. Elk heeft zijn eigen set slides in de
   HTML (demo.html), dus het aantal afbeeldingen mag per scenario
   verschillen. Er is er altijd maar één zichtbaar - zie "2b) EDIT HIER".
   ------------------------------------------------------------------------- */
.spc-carousel {
  position: fixed;
  inset: 0;
  z-index: var(--spc-z-carousel);
  overflow: hidden;
  opacity: 0;
  transition: opacity var(--spc-duration-crossfade) cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

.spc-carousel.is-visible {
  opacity: 1;
}

.spc-carousel__slide {
  position: absolute;
  inset: 0;
  background-image: var(--spc-img);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity var(--spc-duration-slide) ease;
}

.spc-carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}

/* Radial "vignette" layer: a blurred duplicate of the same image, masked so
   only the outer ring is visible. Centre stays crisp, edges read softer -
   pure CSS, no extra image requests, no JS. */
.spc-carousel__slide::after {
  content: "";
  position: absolute;
  inset: -6%;
  background-image: var(--spc-img);
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(1.05);
  -webkit-mask-image: radial-gradient(circle at center, transparent 38%, rgba(0, 0, 0, 0.9) 100%);
          mask-image: radial-gradient(circle at center, transparent 38%, rgba(0, 0, 0, 0.9) 100%);
  pointer-events: none;
}

/* Optional: a light dark-radial overlay for extra contrast under the nav
   text. Remove this block if you don't want it. */
.spc-carousel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.22) 100%);
  pointer-events: none;
}

/* -------------------------------------------------------------------------
   2b) EDIT HIER: welke carousel op welke breedte zichtbaar is.
   Standaard: de "desktop"-carousel vanaf 769px breed, de "mobile"-
   carousel op 768px en smaller. Beide draaien onafhankelijk door hun
   eigen slides (zie splash-carousel.js) - alleen de zichtbare telt mee.
   ------------------------------------------------------------------------- */
.spc-carousel[data-spc-carousel="mobile"] {
  display: none;
}

@media (max-width: 768px) {
  .spc-carousel[data-spc-carousel="desktop"] {
    display: none;
  }
  .spc-carousel[data-spc-carousel="mobile"] {
    display: block;
  }
}

/* -------------------------------------------------------------------------
   3) Floating navigation, docked to the right edge (desktop)
   ------------------------------------------------------------------------- */
.spc-nav {
  position: fixed;
  top: 50%;
  right: var(--spc-nav-gap);
  transform: translateY(-50%);
  z-index: var(--spc-z-nav);
}

.spc-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 14px;
}

.spc-nav__list a {
  color: var(--spc-nav-color);
  text-decoration: none;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 200; /* Inter Extra Light - laad gewicht 200 (zie demo.html / README.md) */
  font-size: 14px;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-shadow: 0 1px 4px var(--spc-nav-shadow);
  transition: opacity 0.25s ease;
}

.spc-nav__list a:hover,
.spc-nav__list a:focus-visible {
  opacity: 0.6;
}

.spc-nav__burger {
  display: none;
}

.spc-nav--dark {
  --spc-nav-color: #111111;
  --spc-nav-shadow: rgba(255, 255, 255, 0.6);
}

/* -------------------------------------------------------------------------
   4) Mobile: hamburger top-right, menu panel drops from the top
   ------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .spc-nav {
    top: 0;
    right: 0;
    left: 0;
    transform: none;
    mix-blend-mode: normal;
    pointer-events: none;
  }

  .spc-nav__burger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    position: fixed;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    z-index: calc(var(--spc-z-nav) + 1);
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    filter: drop-shadow(0 1px 3px var(--spc-nav-shadow));
  }

  .spc-nav__burger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--spc-nav-color);
    transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.25s ease;
  }

  /* Menu open = wit paneel op de achtergrond, dus dan wordt het kruisje
     donker zodat het zichtbaar blijft. */
  .spc-nav.is-open .spc-nav__burger span {
    background: #111111;
  }

  .spc-nav.is-open .spc-nav__burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .spc-nav.is-open .spc-nav__burger span:nth-child(2) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .spc-nav__list {
    position: fixed;
    inset: 0 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    padding: 96px 24px 32px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.3s ease;
  }

  .spc-nav.is-open .spc-nav__list {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .spc-nav__list a {
    display: block;
    width: 100%;
    padding: 12px 0;
    color: #111111;
    font-size: 20px;
    text-shadow: none;
  }
}

/* -------------------------------------------------------------------------
   5) Respect reduced-motion preferences
   ------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .spc-intro,
  .spc-carousel,
  .spc-carousel__slide,
  .spc-nav__list,
  .spc-nav__burger span,
  .spc-intro__logo {
    transition: none !important;
    animation: none !important;
  }
  .spc-intro__logo { opacity: 1; }
}
