/* ESMI-Afbouw — static one-pager */

:root {
  color-scheme: dark;
  --bg: #000000;
  --text: #f5f5f7;
  --muted: #86868b;
  --panel: #c0c0c0;
  --focus: #ffffff;
  --max: 40rem;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --assemble: 1.15s;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.5;
  letter-spacing: -0.011em;
}

/* Honingraat-achtergrond: haal class "has-honey" van <html> om terug te gaan naar zwart. */
html.has-honey body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.8)),
    url("../images/honey.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

html.js.has-honey body::before {
  opacity: 0;
  transition: opacity 1.2s var(--ease);
}

html.js.has-honey.is-honey-in body::before {
  opacity: 1;
}

main,
footer {
  position: relative;
  z-index: 1;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--text);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: #ffffff;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

main {
  display: block;
  flex: 1 0 auto;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 12vh 6vw 2.5rem;
  padding-top: max(9vh, 5.5rem);
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  text-align: center;
}

.hero-brand {
  --logo-size: min(42vw, 20rem);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 3.5vw, 3rem);
  width: min(100%, 64rem);
  height: fit-content;
}

.hero-stage {
  position: relative;
  flex: 0 0 var(--logo-size);
  width: var(--logo-size);
  align-self: stretch;
  overflow: visible;
  transition: opacity 0.45s var(--ease);
}

.wordmark-slot {
  position: relative;
  flex: 1 1 16rem;
  min-width: 0;
  width: 100%;
  max-width: 30rem;
  padding-top: 6.9rem;
}

.wordmark-slot::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 226.77 / 85.04;
}

.wordmark {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  width: 100%;
  font-size: 0;
  line-height: 0;
  background-color: transparent;
  transform-origin: 0 0;
  transition: background-color 0.5s var(--ease);
}

a.wordmark {
  color: inherit;
  text-decoration: none;
}

.wordmark-pin {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
}

body.is-wordmark-sticky .hero-stage {
  opacity: 0;
  pointer-events: none;
}

body.is-wordmark-sticky .wordmark {
  position: fixed;
  left: 0;
  right: 0;
  bottom: auto;
  top: 0;
  z-index: 50;
  width: 100%;
  padding: max(0.6rem, env(safe-area-inset-top)) 6vw 0.75rem;
  background: #000;
}

body.is-wordmark-sticky .wordmark-svg {
  width: min(92vw, 24rem);
  margin-inline: auto;
}

.logo {
  position: absolute;
  left: 0;
  top: 50%;
  width: var(--logo-size);
  height: var(--logo-size);
  overflow: visible;
  transform: translateY(-50%);
  transition: opacity 0.45s var(--ease);
}

.logo-piece {
  transform-box: fill-box;
  transform-origin: center;
}

html.js .logo:not(.is-in) .logo-piece {
  opacity: 0;
  transform: translate(var(--dx), var(--dy));
}

html.js .logo.is-in .logo-piece {
  opacity: 1;
  transform: none;
  transition:
    transform var(--assemble) var(--ease) var(--delay),
    opacity calc(var(--assemble) * 0.7) var(--ease) var(--delay);
}

.piece-l1 {
  --dx: -72vw;
  --dy: 8vh;
  --delay: 0ms;
}

.piece-l2 {
  --dx: -48vw;
  --dy: -42vh;
  --delay: 70ms;
}

.piece-header {
  --dx: 0;
  --dy: -70vh;
  --delay: 40ms;
}

.piece-door {
  --dx: 0;
  --dy: 78vh;
  --delay: 120ms;
}

.piece-handle {
  --dx: -30vw;
  --dy: 10vh;
  --delay: 280ms;
}

.piece-strip {
  --dx: 18vw;
  --dy: -64vh;
  --delay: 90ms;
}

.piece-r1 {
  --dx: 12vw;
  --dy: -76vh;
  --delay: 30ms;
}

.piece-r2 {
  --dx: 70vw;
  --dy: -16vh;
  --delay: 80ms;
}

.piece-r3 {
  --dx: 58vw;
  --dy: 54vh;
  --delay: 140ms;
}

.piece-r4 {
  --dx: 82vw;
  --dy: 22vh;
  --delay: 180ms;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 1.05;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wordmark-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  shape-rendering: geometricPrecision;
  transform-origin: 0 0;
}

.wordmark-fill {
  shape-rendering: geometricPrecision;
}

.wordmark-photo {
  mix-blend-mode: screen;
  opacity: 0.82;
}

.wordmark-glow {
  mix-blend-mode: screen;
}

h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  line-height: 1.15;
  margin-bottom: 1.1rem;
}

.lede {
  margin: clamp(2rem, 5vh, 3.25rem) auto 0;
  max-width: 22ch;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.4rem);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.error-title {
  margin: clamp(2.4rem, 6vh, 3.75rem) auto 0;
  color: var(--text);
  font-size: clamp(1.9rem, 4.5vw, 3.1rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.04em;
}

@media (min-width: 641px) {
  .error-title {
    white-space: nowrap;
  }
}

.error-title + .lede {
  margin-top: 0.85rem;
}

.story {
  width: min(100% - 3rem, var(--max));
  margin: 0 auto;
  padding: clamp(2rem, 4vh, 3rem) 0 0;
}

.facts-section {
  width: min(100% - 3rem, var(--max));
  margin: 0 auto;
  padding: 18vh 0 0;
}

.story p {
  margin: 0 0 1.15em;
  color: var(--text);
}

.story p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.facts {
  display: grid;
  gap: 1.35rem 2.5rem;
  margin: 0;
}

@media (min-width: 640px) {
  .facts {
    grid-template-columns: 1fr 1fr;
  }
}

.facts div {
  margin: 0;
}

.facts dt {
  margin: 0 0 0.2rem;
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.facts dd {
  margin: 0;
}

footer {
  width: min(100% - 3rem, var(--max));
  margin: auto auto 0;
  padding: 18vh 0 8vh;
  padding-bottom: max(8vh, calc(2rem + env(safe-area-inset-bottom)));
  color: var(--muted);
  font-size: 0.88em;
}

footer p {
  margin: 0;
}

footer p + p {
  margin-top: 0.35rem;
}

html.js .reveal {
  opacity: 0;
  transform: translateY(1.1rem);
}

html.js body.is-ready .reveal {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.9s var(--ease) var(--reveal-delay, 0ms),
    transform 0.9s var(--ease) var(--reveal-delay, 0ms);
}

.reveal-1 {
  --reveal-delay: 80ms;
}

.reveal-2 {
  --reveal-delay: 180ms;
}

@media (prefers-reduced-motion: reduce) {
  html.js.has-honey body::before {
    opacity: 1;
    transition: none;
  }

  html.js .logo:not(.is-in) .logo-piece,
  html.js .logo.is-in .logo-piece,
  html.js .reveal,
  html.js body.is-ready .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .wordmark-svg {
    animation: none;
  }

  .hero-stage,
  .logo {
    transition: none;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: max(8vh, env(safe-area-inset-top));
  }

  .hero-brand {
    flex-direction: column;
    gap: 0.5rem;
    height: fit-content;
  }

  .hero-stage {
    position: relative;
    flex: 0 0 auto;
    align-self: auto;
    width: min(52vw, 15rem);
    height: min(52vw, 15rem);
  }

  .wordmark-slot {
    flex: 0 0 auto;
    width: min(92vw, 28rem);
    max-width: 28rem;
    padding-top: 0;
  }

  .logo {
    position: static;
    width: 100%;
    height: 100%;
    transform: none;
  }

  .wordmark {
    width: 100%;
    max-width: none;
    padding-top: 0;
  }

  .lede {
    margin-top: 1.2rem;
  }
}

@media (max-width: 480px) {
  .story,
  .facts-section,
  footer {
    width: min(100% - 2rem, var(--max));
  }
}
