/* Apple-style splash — full-bleed brand intro before first paint settles */

#site-splash {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 80% 55% at 50% 42%, rgba(31, 64, 18, 0.55) 0%, transparent 70%),
    linear-gradient(165deg, #0f2008 0%, #162D0D 48%, #1a3510 100%);
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: opacity 720ms cubic-bezier(0.4, 0, 0.2, 1),
              visibility 720ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  touch-action: none;
}

#site-splash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.splash-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: min(92vw, 560px);
  transform: translateZ(0);
}

.splash-mark {
  margin: 0;
  font-family: 'Anton', 'Impact', 'Arial Black', sans-serif;
  font-weight: 400;
  font-size: clamp(42px, 11vw, 88px);
  line-height: 0.92;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transform: scale(0.96) translateY(8px);
  animation: splash-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 120ms forwards;
}

.splash-rule {
  width: 36px;
  height: 2px;
  margin: clamp(14px, 2.8vw, 22px) 0;
  background: #D9FF3F;
  border-radius: 1px;
  opacity: 0;
  transform: scaleX(0.4);
  animation: splash-rule 700ms cubic-bezier(0.16, 1, 0.3, 1) 420ms forwards;
}

.splash-sub {
  margin: 0;
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  font-weight: 500;
  font-size: clamp(11px, 2.6vw, 13px);
  letter-spacing: 0.42em;
  text-indent: 0.42em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
  opacity: 0;
  transform: translateY(6px);
  animation: splash-rise 800ms cubic-bezier(0.16, 1, 0.3, 1) 520ms forwards;
}

.splash-tag {
  margin: clamp(18px, 3.5vw, 28px) 0 0;
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(15px, 3.4vw, 20px);
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.88);
  opacity: 0;
  transform: translateY(6px);
  animation: splash-rise 800ms cubic-bezier(0.16, 1, 0.3, 1) 720ms forwards;
}

@keyframes splash-rise {
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes splash-rule {
  to {
    opacity: 1;
    transform: scaleX(1);
  }
}

/* Lock page while splash is up */
html.splash-pending,
html.splash-pending body {
  background: #0f2008;
  overflow: hidden !important;
  height: 100%;
}

html.splash-pending body > *:not(#site-splash) {
  visibility: hidden;
}

/* Portrait phones — keep brand hero scale */
@media (max-width: 480px) and (orientation: portrait) {
  .splash-mark {
    font-size: clamp(40px, 14vw, 64px);
    letter-spacing: 0.05em;
  }

  .splash-sub {
    letter-spacing: 0.34em;
    text-indent: 0.34em;
  }
}

/* Landscape / short viewports — compact, still centered */
@media (max-height: 500px) and (orientation: landscape) {
  #site-splash {
    padding:
      max(12px, env(safe-area-inset-top))
      max(32px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom))
      max(32px, env(safe-area-inset-left));
  }

  .splash-inner {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 20px;
    max-width: min(94vw, 720px);
  }

  .splash-mark {
    font-size: clamp(28px, 7vw, 48px);
    width: 100%;
  }

  .splash-rule {
    width: 28px;
    margin: 0;
  }

  .splash-sub {
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.36em;
    text-indent: 0.36em;
  }

  .splash-tag {
    width: 100%;
    margin: 10px 0 0;
    font-size: 15px;
  }
}

/* Wide tablets / desktop landscape */
@media (min-width: 900px) and (orientation: landscape) {
  .splash-mark {
    font-size: clamp(64px, 7vw, 96px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-mark,
  .splash-rule,
  .splash-sub,
  .splash-tag {
    animation: none;
    opacity: 1;
    transform: none;
  }

  #site-splash {
    transition-duration: 200ms;
  }
}
