/* assets/css/base.css */

/* — Import theme variables — */
@import "./theme.css";

/* — Global resets & typography — */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background: radial-gradient(circle at top,
                             var(--bg-start),
                             var(--bg-end));
  color: var(--text);
  transition: background .3s, color .3s;
}

/* — Header (centered Apple-pill) — */
header {
  position: sticky;
  top: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 auto 1rem;
  width: 90%;
  padding: 0.3rem 1rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 8px var(--shadow);
  border-radius: 9999px;
}

/* — Desktop: header narrower (75%) — */
@media (min-width: 768px) {
  header {
    width: 75%;
  }
}

/* — Logo — */
.header__logo img {
  height: 1.8rem;
  width: auto;
}

/* — Desktop nav links — */
.header-nav {
  display: none;
  gap: 1.5rem;
  margin-left: 2rem;
}
.header-nav a {
  position: relative;
  padding: 0.2rem 0;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color .2s;
}
.header-nav a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s;
}
.header-nav a:hover::after {
  transform: scaleX(1);
}

/* — CTA button — */
.header-cta {
  display: none;
  margin-left: 1rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background .2s, color .2s;
}
.header-cta:hover {
  background: var(--accent);
  color: #fff;
}

/* — Language switch (always visible on mobile & desktop) — */
.lang-switch {
  display: flex;
  margin-left: auto;
}
.lang-switch button {
  background: none;
  border: none;
  padding: 0.2rem 0.5rem;
  margin: 0 0.2rem;
  cursor: pointer;
  color: var(--text);
  border-radius: 6px;
  transition: background .2s;
}
.lang-switch button.active,
.lang-switch button:hover {
  background: var(--accent);
  color: #fff;
}

/* — Theme switch (day/night) — */
.theme-switch {
  position: relative;
  display: block;
  margin-left: 0.5rem;
}
.theme-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.theme-switch label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 4rem;
  padding: 0.2rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border-radius: 9999px;
  cursor: pointer;
  position: relative;
}
.theme-switch .icon {
  font-size: 0.9rem;
  line-height: 1;
  color: var(--text);
  z-index: 2;
  transition: color .3s;
}
.theme-switch input:checked + label .icon.sun {
  color: var(--text-muted);
}
.theme-switch input:not(:checked) + label .icon.moon {
  color: var(--text-muted);
}
.theme-switch .knob {
  position: absolute;
  top: 0.15rem;
  left: 0.15rem;
  width: 1.2rem;
  height: 1.2rem;
  background: var(--glass);
  backdrop-filter: blur(12px);
  border-radius: 50%;
  box-shadow: 0 2px 5px var(--shadow);
  transition: transform .3s;
}
.theme-switch input:checked + label .knob {
  transform: translateX(2rem);
}

/* — Mobile hamburger (three bars) — */
.nav-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke: var(--text);
}

/* — Mobile nav overlay — */
.mobile-nav-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--glass);
  backdrop-filter: blur(16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.mobile-nav-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-overlay ul {
  list-style: none;
  text-align: center;
}
.mobile-nav-overlay li {
  margin: 1rem 0;
}
.mobile-nav-overlay a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}
.mobile-nav-overlay .header-cta {
  display: block;
  margin-top: 2rem;
}
#nav-close {
  position: absolute;
  bottom: 2rem;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--accent);
  cursor: pointer;
}

/* — Desktop overrides (≥768px) — */
@media (min-width: 768px) {
  .header-nav     { display: flex; }
  .header-cta     { display: inline-block; }
  .lang-switch    { /* already visible */ }
  .theme-switch   { /* already visible */ }
  .nav-toggle,
  .mobile-nav-overlay {
    display: none;
  }
}
/* Header altijd boven alles */
header, .site-header, .sticky-glass-header {
  position: sticky;         /* of 'fixed' als jij dat gebruikt */
  top: 0;
  z-index: 10000;           /* hoger dan secties/video's */
  isolation: isolate;       /* eigen stacking context => veilig boven pseudo/fixed lagen */
  pointer-events: auto;
}

/* Als je een mobiele overlay/menu-panel hebt, geef die nog hoger z-index */
.mobile-nav, .menu-panel, .overlay-nav {
  position: fixed;
  inset: 0;
  z-index: 10001;
}

/* Header staat altijd vooraan */
header, .site-header, .sticky-glass-header {
  position: sticky; top: 0;
  z-index: 10000;
  isolation: isolate;          /* eigen stacking context */
}

/* Toon hamburger alleen mobiel; verberg desktop-nav */
@media (max-width: 900px){
  .header-nav, header .header-cta { display: none !important; }
  .nav-toggle { display: inline-flex !important; }
}
@media (min-width: 901px){
  .nav-toggle { display: none !important; }
}

/* Mobiele overlay (frosted, boven alles) */
.mobile-nav-overlay{
  position: fixed; inset: 0;
  z-index: 10001;
  background: var(--glass); /* je bestaande glass-variabele */
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding: 2rem;
  opacity: 0; visibility: hidden; transform: translateY(12px) scale(.98);
  transition: opacity .25s ease, transform .25s ease, visibility .25s;
  pointer-events: none;         /* als verborgen: geen kliks blokkeren */
}
.mobile-nav-overlay.is-open{
  opacity: 1; visibility: visible; transform: none;
  pointer-events: auto;         /* nu klikbaar */
}

/* Links in overlay */
.mobile-nav-overlay ul{ list-style: none; margin: 0; padding: 0; text-align: center; }
.mobile-nav-overlay li{ margin: .25rem 0; }
.mobile-nav-overlay a{
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  text-decoration: none; font-weight: 600; color: var(--text);
  background: rgba(255,255,255,.08);
}
[data-theme="dark"] .mobile-nav-overlay a{ background: rgba(255,255,255,.06); }
.mobile-nav-overlay a:hover{ background: rgba(0,176,239,.12); color: var(--text); }

/* Sluitknop onderaan */
#nav-close{
  margin-top: .5rem;
  width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(127,127,127,.25);
  background: transparent; color: var(--text);
}

/* Zorg dat video/fades geen kliks stelen */
.hero__video, .rev__video { pointer-events: none; z-index: -1; }
#hero::after, .svc::before, .rev::before { pointer-events: none; }
