:root {
  --color-bg: #f4f5f7;
  --color-navy: #0b2e5d;
  --color-blue: #446ca8;
  --color-depth: #c2c7d1;
  --color-muted: #666;

  --logo-width: min(560px, 86vw);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Verschuiving van de 3D-diepte ten opzichte van de voorkant, uit het logo zelf */
  --depth-x: 5.85px;
  --depth-y: -8.39px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at 50% 45%, #fff 0%, var(--color-bg) 60%) fixed, var(--color-bg);
  color: var(--color-muted);
  font-family: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.stage {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  padding: 1rem;
}

.logo-wrap {
  margin: 0;
  line-height: 0;
}

.logo {
  display: block;
  width: var(--logo-width);
  height: auto;
  overflow: visible;
  cursor: pointer;
  transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform 700ms var(--ease-out-expo);
  -webkit-tap-highlight-color: transparent;
}

.ring { fill: var(--color-navy); }
.extrude { fill: var(--color-depth); }
.letter { fill: var(--color-blue); }
.word--vegt { fill: var(--color-blue); }
.word--media { fill: var(--color-navy); }
.tagline { fill: var(--color-muted); }

.ring-mask {
  fill: none;
  stroke: #fff;
  stroke-width: 40;
  stroke-dasharray: 1 1;
}

.letter,
.word,
.tagline {
  transform-box: fill-box;
  transform-origin: center;
}

/* Intro: ring tekent zich, letters vallen erin, diepte klapt uit, woordmerk schuift in */
.logo:not(.is-resetting) .ring-mask { animation: ring-draw 1300ms var(--ease-out-expo) both; }
.logo:not(.is-resetting) .letter--v { animation: letter-drop 700ms var(--ease-out-back) 350ms both; }
.logo:not(.is-resetting) .letter--m { animation: letter-drop 700ms var(--ease-out-back) 480ms both; }
.logo:not(.is-resetting) .extrude { animation: extrude 900ms var(--ease-out-expo) 850ms both; }
.logo:not(.is-resetting) .word--vegt { animation: word-in 900ms var(--ease-out-expo) 700ms both; }
.logo:not(.is-resetting) .word--media { animation: word-in 900ms var(--ease-out-expo) 820ms both; }
.logo:not(.is-resetting) .tagline { animation: fade-up 900ms var(--ease-out-expo) 1250ms both; }

.contact {
  margin: 0;
  max-width: 34rem;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  letter-spacing: 0.01em;
  text-align: center;
  text-wrap: balance;
  animation: fade-up 900ms var(--ease-out-expo) 1600ms both;
}

.contact a {
  color: inherit;
  text-decoration: none;
}

.contact a:hover {
  color: var(--color-navy);
  text-decoration: underline;
  text-underline-offset: 0.25em;
}

.contact a:focus-visible,
.logo-link:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 6px;
  border-radius: 2px;
}

@keyframes ring-draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@keyframes letter-drop {
  from { opacity: 0; transform: translateY(-18px) scale(0.85); }
  to { opacity: 1; transform: none; }
}

@keyframes extrude {
  from { opacity: 0; transform: translate(var(--depth-x), var(--depth-y)); }
  to { opacity: 1; transform: none; }
}

@keyframes word-in {
  from { opacity: 0; transform: translateX(-22px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

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

  .logo {
    cursor: default;
  }
}
