/* ============================================================
   CANOPY — Logo reveal boot loader
   Cream paper + brown wordmark. Responsive (dvh / clamp / safe areas).
   ============================================================ */

.boot.loader,
.loader {
  z-index: 500;
  color: #542916;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  position: fixed;
  inset: 0;
  display: block;
  pointer-events: none;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  box-sizing: border-box;
}

.loader__bg {
  background-color: #fdf0e8;
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.loader__container {
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  position: relative;
  padding: 1.25rem;
  box-sizing: border-box;
}

.loader__bg-bar {
  z-index: 1;
  transform-origin: left center;
  transform-style: preserve-3d;
  background-color: #a13a1e;
  width: 100%;
  height: clamp(3px, 0.55vw, 6px);
  position: absolute;
  inset: auto 0 0;
  transform: scale3d(0, 1, 1);
}

.loader__logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: min(12em, 72vw);
  height: clamp(2.4rem, 8vw, 3.2rem);
  position: relative;
}

.loader__logo-item {
  width: 100%;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader__logo-item.is--base {
  opacity: 0.18;
}

.loader__logo-item.is--top {
  -webkit-clip-path: inset(0% 100% 0% 0%);
  clip-path: inset(0% 100% 0% 0%);
}

.loader__word {
  margin: 0;
  font-family: 'Outfit', 'Familjen Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.85rem, 8.5vw, 2.75rem);
  letter-spacing: 0.06em;
  text-transform: lowercase;
  line-height: 1;
  color: #542916;
  white-space: nowrap;
}

.loader__text-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: absolute;
  bottom: max(3.25rem, calc(2.5rem + env(safe-area-inset-bottom)));
  left: 1rem;
  right: 1rem;
  min-height: 1.6em;
  pointer-events: none;
}

.loader__text-el {
  text-transform: uppercase;
  white-space: nowrap;
  margin-bottom: -0.25em;
  padding-bottom: 0.25em;
  font-family: 'Outfit', 'Familjen Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(0.72rem, 2.8vw, 0.9rem);
  letter-spacing: 0.12em;
  color: rgba(84, 41, 22, 0.72);
  position: absolute;
}

.loader__skip {
  position: absolute;
  bottom: max(5.5rem, calc(4.75rem + env(safe-area-inset-bottom)));
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-align: center;
  max-width: 20rem;
  margin: 0 auto;
  pointer-events: none;
}

.loader__hint,
.loader__warn {
  margin: 0;
  font-family: 'Outfit', 'Familjen Grotesk', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(0.75rem, 2.3vw, 0.9rem);
  letter-spacing: 0.02em;
  line-height: 1.35;
  color: rgba(84, 41, 22, 0.72);
  opacity: 0;
}

.loader__warn {
  font-size: clamp(0.7rem, 2vw, 0.82rem);
  color: rgba(84, 41, 22, 0.58);
  max-width: 18rem;
}

.loader__enter {
  pointer-events: auto;
  appearance: none;
  border: 0;
  cursor: pointer;
  margin-top: 0.2rem;
  font-family: 'Outfit', 'Familjen Grotesk', system-ui, sans-serif;
  font-weight: 600;
  font-size: clamp(0.8rem, 2.3vw, 0.95rem);
  letter-spacing: 0.03em;
  color: #fdf0e8;
  background: #542916;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  opacity: 0;
  min-height: 44px;
  min-width: 44px;
}

.loader__enter:focus-visible {
  outline: 2px solid #a13a1e;
  outline-offset: 3px;
}

[data-load-reset] {
  opacity: 0;
}

.boot.is-done {
  display: none !important;
}

body.is-booting {
  overflow: hidden;
}

@media (max-width: 480px) {
  .loader__logo-wrap {
    width: min(11em, 78vw);
  }
  .loader__text-wrap {
    bottom: max(2.75rem, calc(2.1rem + env(safe-area-inset-bottom)));
  }
  .loader__skip {
    bottom: max(4.75rem, calc(4rem + env(safe-area-inset-bottom)));
  }
}

@media (prefers-reduced-motion: reduce) {
  .loader__logo-item.is--top {
    -webkit-clip-path: none;
    clip-path: none;
  }
  .loader__logo-item.is--base {
    opacity: 0;
  }
  [data-load-reset] {
    opacity: 1;
  }
}
