/* Van Eck Elektro – animaties en interacties */
:root { --red: #af1821; --red-dark: #8c121a; --ink: #2a2a29; --ease: cubic-bezier(.2, .7, .2, 1); }
html { scroll-behavior: smooth; }

/* Scroll-voortgang bovenaan */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; z-index: 100; pointer-events: none; }

/* Sticky header die compacter wordt bij scrollen (vanaf tabletbreedte) */
@media (min-width: 900px) {
  header { position: sticky; top: 0; z-index: 50; transition: box-shadow .35s var(--ease), background-color .35s var(--ease); }
  header > div { transition: padding .35s var(--ease); }
  header > div > a img { transition: height .35s var(--ease); }
  header.is-scrolled { background: rgba(255, 255, 255, .9) !important; -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); box-shadow: 0 8px 28px -16px rgba(42, 42, 41, .35); }
  header.is-scrolled > div { padding-top: 10px !important; padding-bottom: 10px !important; }
  header.is-scrolled > div > a img { height: 40px !important; }
}

/* Mobiel en tablet: uitklapmenu */
.menu-toggle, .tel-quick, .header-actions { display: none; }
@media (max-width: 1099px) {
  header { position: sticky; top: 0; z-index: 50; }
  header > div { flex-wrap: nowrap !important; padding-top: 12px !important; padding-bottom: 12px !important; }
  header > div > a img { height: 40px !important; }
  .header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
  .tel-quick, .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 8px; box-sizing: border-box; cursor: pointer; }
  .tel-quick { background: var(--red); color: #fff !important; }
  .menu-toggle { background: #fff; border: 2px solid #575755; padding: 0; }
  .menu-toggle span { position: relative; display: block; width: 20px; height: 2px; background: var(--ink); transition: background .2s; }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--ink); transition: transform .3s var(--ease), top .3s var(--ease); }
  .menu-toggle span::before { top: -6px; } .menu-toggle span::after { top: 6px; }
  header.menu-open .menu-toggle span { background: transparent; }
  header.menu-open .menu-toggle span::before { top: 0; transform: rotate(45deg); }
  header.menu-open .menu-toggle span::after { top: 0; transform: rotate(-45deg); }
  header nav[aria-label="Hoofdmenu"] { display: none !important; position: absolute; left: 0; right: 0; top: 100%; background: #fff; flex-direction: column; align-items: stretch !important; gap: 0 !important; padding: 8px 24px 24px; box-shadow: 0 18px 30px -18px rgba(42, 42, 41, .45); border-top: 1px solid #e6e6e4; max-height: calc(100vh - 70px); overflow-y: auto; box-sizing: border-box; }
  header.menu-open nav[aria-label="Hoofdmenu"] { display: flex !important; animation: menuIn .3s var(--ease) both; }
  header nav[aria-label="Hoofdmenu"] .nav-link { font-size: 18px !important; padding: 14px 0 !important; border-bottom: 1px solid #ededeb !important; }
  header nav[aria-label="Hoofdmenu"] .nav-link[aria-current] { border-bottom-color: #ededeb !important; padding-left: 12px !important; box-shadow: inset 3px 0 0 var(--red); }
  header nav[aria-label="Hoofdmenu"] .nav-link::after { display: none; }
  header nav[aria-label="Hoofdmenu"] .btn-red, header nav[aria-label="Hoofdmenu"] .btn-ghost { justify-content: center; margin-top: 12px; }
  .scroll-progress { display: none; }
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Menu: onderstreping schuift in */
.nav-link { position: relative; transition: color .25s var(--ease); }
.nav-link:not([aria-current])::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: 100% 50%; transition: transform .35s var(--ease); }
.nav-link:not([aria-current]):hover::after, .nav-link:not([aria-current]):focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }

/* Knoppen */
.btn-red, .btn-ghost, .btn-white, .btn-outline, button.btn-red { transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease); }
.btn-red:hover, button.btn-red:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(175, 24, 33, .7); }
.btn-white:hover, .btn-outline:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .35); }
.btn-outline:hover { background: rgba(255, 255, 255, .12) !important; }
.btn-ghost:hover { transform: translateY(-1px); }
.btn-red:active, .btn-white:active, .btn-ghost:active, .btn-outline:active { transform: translateY(0); }
.btn-ghost svg:last-child:not(:first-child) { transition: transform .3s var(--ease); }
.btn-ghost:hover svg:last-child:not(:first-child) { transform: translateX(5px); }

/* Kaarten en tegels */
.card, .tile { transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .25s var(--ease); will-change: transform; }
.card:hover, .tile:hover { transform: translateY(-6px); box-shadow: 0 22px 44px -22px rgba(42, 42, 41, .4); }
.card img { transition: transform .9s var(--ease); }
.card:hover img { transform: scale(1.05); }
.card--service > div:first-child, .tile > span:first-child { transition: transform .45s var(--ease), box-shadow .45s var(--ease); }
.card--service:hover > div:first-child, .tile:hover > span:first-child { transform: rotate(-8deg) scale(1.1); box-shadow: 0 10px 20px -8px rgba(175, 24, 33, .6); }

/* Kaart */
.map-box.is-loaded { padding: 0 !important; background: #e9e9e6 !important; }
.map-route { position: absolute; left: 16px; bottom: 16px; z-index: 2; display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; border-radius: 6px; background: var(--red); color: #fff !important; font-weight: 600; text-decoration: none; box-shadow: 0 8px 20px -8px rgba(0,0,0,.45); }
.map-route:hover { background: var(--red-dark); }

/* Formulier */
input, select, textarea { transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
input:hover, select:hover, textarea:hover { border-color: #8f8f8c !important; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--red) !important; box-shadow: 0 0 0 4px rgba(175, 24, 33, .14); }
.form-status { grid-column: 1 / -1; margin: 0; font-size: 16px; line-height: 1.5; display: none; align-items: center; gap: 12px; padding: 16px 18px; border-radius: 8px; }
.form-status.is-shown { display: flex; animation: fadeUp .5s var(--ease) both; }
.form-status.is-ok { background: #edf6ee; color: #1f5a2a; }
.form-status.is-error { background: #f9e8e9; color: var(--red-dark); }
button[disabled] { opacity: .7; cursor: progress !important; }

/* ---------- Bewegingen (alleen als de bezoeker beweging niet heeft uitgezet) ---------- */
@media (prefers-reduced-motion: no-preference) {
  body { animation: pageIn .5s var(--ease) both; }

  /* Openingssectie */
  .hero:not(.hero--split) > div > *,
  .hero--split > div > div:first-child > * { animation: fadeUp .9s var(--ease) both; }
  .hero:not(.hero--split) > div > *:nth-child(2), .hero--split > div > div:first-child > *:nth-child(2) { animation-delay: .1s; }
  .hero:not(.hero--split) > div > *:nth-child(3), .hero--split > div > div:first-child > *:nth-child(3) { animation-delay: .2s; }
  .hero--split > div > div:first-child > *:nth-child(4) { animation-delay: .3s; }
  .hero--split > div > div:last-child > img { animation: imgIn 1.2s var(--ease) .15s both; }
  .hero--split > div > div:last-child > div[aria-hidden] { animation: blockIn 1.1s var(--ease) .35s both; transform-origin: 100% 0; }
  .hero--split > div > div:last-child > div:last-child { animation: popIn .8s var(--ease) .9s both; }

  /* Onthullen bij scrollen */
  .js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
  .js .reveal.reveal--img { transform: scale(.96); }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  /* Stappen: rode lijn tekent zich */
  .js .step { position: relative; border-top-color: transparent !important; }
  .js .step::before { content: ""; position: absolute; top: -3px; left: 0; right: 0; height: 3px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s var(--ease) .2s; }
  .js .step.is-visible::before { transform: scaleX(1); }

  /* 'In uitvoering'-label pulseert zacht */
  .badge-live { animation: pulse 2.4s ease-in-out infinite; }
  details.vac[open] > div { animation: fadeUp .45s var(--ease) both; }
}

@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes imgIn { from { opacity: 0; transform: translateX(40px) scale(.97); clip-path: inset(0 0 0 30% round 10px); } to { opacity: 1; transform: none; clip-path: inset(0 0 0 0 round 10px); } }
@keyframes blockIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes popIn { 0% { opacity: 0; transform: translateY(16px) scale(.9); } 100% { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(175, 24, 33, .55); } 50% { box-shadow: 0 0 0 8px rgba(175, 24, 33, 0); } }

/* Toegankelijkheid: skip-link en zichtbare focus */
.skip-link{position:fixed;left:16px;top:-80px;z-index:1000;background:#af1821;color:#fff!important;font-weight:600;padding:12px 18px;border-radius:6px;text-decoration:none;transition:top .15s}
.skip-link:focus{top:12px}
main:focus{outline:none}
a:focus-visible,button:focus-visible,summary:focus-visible{outline:3px solid #af1821;outline-offset:3px;border-radius:4px}
footer a:focus-visible,section[style*="#575755"] a:focus-visible,section[style*="#af1821"] a:focus-visible{outline-color:#ffffff}

/* Projectcarrousel op de homepagina */
.pc-track { cursor: grab; }
.pc-track.is-drag { user-select: none; -webkit-user-select: none; }
.js .pc-track.pc-wait .pc-card { animation-play-state: paused; }
@media (hover: none) { .pc-track { cursor: auto; } }
