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

:root {
  --bg: #0f0e0e;
  --text: #ffffff;
  --text-muted: rgba(255, 255, 255, 0.45);
  --btn-glass-bg: rgba(15, 14, 14, 0.45);
  --btn-glass-blur: 20px;
  --btn-hover-bg: #facfe5;
  --btn-hover-text: #000000;
  --btn-transition: 0.35s ease;
  --trail-max-size: 450px;
  --trail-radius: 4px;
  --screensaver-fade: 0.5s;
  --screensaver-inset: 20px;
  --font-title: "Avenir Next", "Avenir", "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  --hero-inset-block: 2rem;
  --hero-inset-inline: 4rem;
}

@font-face {
  font-family: "Avenir Next";
  font-style: normal;
  font-weight: 800;
  src:
    local("Avenir Next Heavy"),
    local("AvenirNext-Heavy"),
    local("AvenirNextHeavy");
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hero */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 2rem;
  overflow: hidden;
}

.hero-trail {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-trail--back {
  z-index: 1;
}

.hero-trail--front {
  z-index: 3;
}

.trail-item {
  position: absolute;
  border-radius: var(--trail-radius);
  overflow: hidden;
  pointer-events: none;
  will-change: transform, opacity;
  transform-origin: center center;
}

.trail-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.trail-item--enter {
  animation: trail-in 0.45s cubic-bezier(0.12, 0.23, 0.5, 1) forwards;
}

.trail-item--exit {
  animation: trail-out 0.4s cubic-bezier(0.84, 0, 0.24, 1) forwards;
}

@keyframes trail-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes trail-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trail-item--enter,
  .trail-item--exit {
    animation: none;
  }
}

/* Center content */
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 100%;
  text-align: center;
  pointer-events: none;
}

.hero-label {
  margin-bottom: 0.75rem;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #353535;
  text-transform: lowercase;
}

.hero-title {
  font-family: var(--font-title);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 800;
  font-size: clamp(4rem, 14vw, 10rem);
  color: var(--text);
  text-transform: uppercase;
  white-space: nowrap;
}

/* Desktop: two spans render as one word (SUPERBRUUT) */
.hero-title__line {
  display: inline;
}

.hero-download {
  position: relative;
  z-index: 4;
  margin-top: 80px;
  pointer-events: auto;
}

/* Footer — full-hero overlay; children positioned per breakpoint */
.hero-footer {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.hero-footer__email {
  position: absolute;
  top: var(--hero-inset-block);
  left: calc(var(--hero-inset-inline) / 2);
  pointer-events: auto;
}

.hero-footer__info {
  position: absolute;
  top: var(--hero-inset-block);
  right: calc(var(--hero-inset-inline) / 2);
  pointer-events: auto;
  font-family: inherit;
  cursor: pointer;
}

.hero-footer__copy {
  position: absolute;
  bottom: var(--hero-inset-block);
  left: var(--hero-inset-inline);
  display: flex;
  align-items: center;
  height: 60px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  pointer-events: none;
}

.hero-footer__actions {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  pointer-events: auto;
}

.hero-footer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 60px;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--btn-glass-bg);
  backdrop-filter: blur(var(--btn-glass-blur));
  -webkit-backdrop-filter: blur(var(--btn-glass-blur));
  border: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--btn-transition),
    color var(--btn-transition),
    backdrop-filter var(--btn-transition),
    -webkit-backdrop-filter var(--btn-transition);
}

.hero-footer__btn:hover {
  background: var(--btn-hover-bg);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  color: var(--btn-hover-text);
}

.hero-footer__btn-icon {
  flex-shrink: 0;
  display: block;
  filter: brightness(0) invert(1);
  transition: filter var(--btn-transition);
}

.hero-footer__btn:hover .hero-footer__btn-icon {
  filter: none;
}

/* Mobile — Figma iPhone 14 & 15 Pro frame (393×852) */
@media (max-width: 809.98px) {
  :root {
    --btn-glass-bg: rgba(0, 0, 0, 0.6);
    --btn-glass-blur: 2.5px;
    --trail-max-size: 300px;
    --hero-inset-block: 32px;
    --hero-inset-inline: 29px;
  }

  body {
    background: #131313;
  }

  .hero {
    padding: 1.25rem;
    background: #131313;
  }

  .hero-content {
    padding: 0 0.25rem;
  }

  .hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: min(365px, 100%);
    font-size: clamp(3.5rem, 25.45vw, 6.25rem);
    line-height: 0.87;
    white-space: normal;
  }

  .hero-title__line {
    display: block;
  }

  /* Tap images: above title (2), below download (4) */
  .hero-trail--front {
    z-index: 3;
  }

  .hero-content {
    z-index: 2;
  }

  .hero-download {
    z-index: 4;
  }

  .hero-footer__copy {
    height: auto;
    display: flex;
    font-size: 10.5px;
  }

  .hero-footer__actions {
    bottom: var(--hero-inset-block);
    right: var(--hero-inset-inline);
    left: auto;
    transform: none;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 14px;
  }

  .hero-footer__btn {
    height: 46px;
    padding: 0 18px;
    font-size: 10.5px;
    border: 1.5px solid #000;
  }

  #footer-email.hero-footer__btn,
  #footer-info.hero-footer__btn,
  #footer-woh.hero-footer__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    height: auto;
    padding: 10px 8px;
    border: none;
    border-radius: 0;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    font-size: 10.5px;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--text);
    -webkit-tap-highlight-color: transparent;
  }

  /* Keep the text visually aligned to the same anchors while enlarging hit areas */
  #footer-email.hero-footer__btn {
    margin-left: -8px;
  }

  #footer-info.hero-footer__btn,
  #footer-woh.hero-footer__btn {
    margin-right: -8px;
  }

  #footer-email.hero-footer__btn:hover,
  #footer-info.hero-footer__btn:hover,
  #footer-woh.hero-footer__btn:hover {
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: var(--text);
    text-decoration: underline;
  }

  .hero-footer__btn-icon {
    width: 18px;
    height: 18px;
  }
}

/* Idle video screensaver */
.screensaver {
  position: fixed;
  inset: var(--screensaver-inset);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: #000;
  transition: opacity var(--screensaver-fade) ease, visibility var(--screensaver-fade) ease;
}

.screensaver--visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.screensaver__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

body.screensaver-active {
  overflow: hidden;
}
