/* DoughBelly homepage introduction */

@font-face {
  font-family: "Montserrat Splash";
  src: url("../fonts/montserrat-latin-300-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 300;
  font-display: swap;
}

html.show-splash,
html.show-splash body {
  overflow: hidden;
}

.splash-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(24px, 4vw, 54px);
  overflow: auto;
  color: #202426;
  background:
    radial-gradient(circle at 12% 14%, rgba(239, 79, 89, 0.18), transparent 29%),
    radial-gradient(circle at 88% 80%, rgba(32, 88, 98, 0.18), transparent 31%),
    linear-gradient(145deg, #ffffff 0%, #f6f7f5 55%, #edf2f1 100%);
  isolation: isolate;
}

.splash-screen::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.38;
  background-image: radial-gradient(rgba(32, 88, 98, 0.22) 1px, transparent 1px);
  background-size: 25px 25px;
  mask-image: linear-gradient(120deg, #000, transparent 34%, transparent 70%, #000);
}

.show-splash .splash-screen {
  display: grid;
}

.splash-shell {
  width: min(100%, 1080px);
  text-align: center;
  opacity: 0;
  transform: translateY(12px) scale(0.99);
  animation: splash-arrive 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 120ms forwards;
}

.splash-eyebrow {
  margin: 0 0 14px;
  color: #cf333f;
  font-size: clamp(0.72rem, 1.6vw, 0.88rem);
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.splash-media {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(32, 88, 98, 0.16);
  border-radius: clamp(18px, 3vw, 32px);
  box-shadow:
    0 30px 80px rgba(18, 63, 71, 0.18),
    0 8px 24px rgba(22, 38, 42, 0.08);
}

.splash-media::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: inherit;
}

.splash-media video {
  display: block;
  width: 100%;
  max-height: 66vh;
  max-height: 66dvh;
  aspect-ratio: 16 / 9;
  background: #fff;
  object-fit: contain;
  transform: scale(1.1);
  transform-origin: center;
}

.splash-tagline {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: min(92%, 980px);
  margin: 0;
  color: #62696b;
  font-family: "Montserrat Splash", "Montserrat", sans-serif;
  font-size: clamp(1.65rem, 2.8vw, 2.65rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.02em;
  opacity: 0;
  pointer-events: none;
  text-wrap: balance;
  transform: translate(-50%, calc(-50% + 10px));
  transition: opacity 600ms ease, transform 600ms ease;
}

.splash-tagline.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.splash-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: 4px;
  overflow: hidden;
  background: rgba(32, 88, 98, 0.1);
}

.splash-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #ef4f59, #cf333f, #205862);
  transform: scaleX(var(--splash-progress, 0));
  transform-origin: left center;
  transition: transform 120ms linear;
}

.splash-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
}

.splash-footer p {
  margin: 0;
  color: #465053;
  font-size: clamp(0.96rem, 2vw, 1.12rem);
}

.splash-enter,
.splash-skip {
  appearance: none;
  font: inherit;
  cursor: pointer;
}

.splash-enter {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 20px;
  color: #fff;
  font-weight: 800;
  background: #ef4f59;
  border: 2px solid #ef4f59;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(207, 51, 63, 0.22);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.splash-enter:hover,
.splash-enter:focus-visible {
  background: #cf333f;
  border-color: #cf333f;
  outline: none;
  transform: translateY(-2px);
}

.splash-enter span {
  font-size: 1.25em;
  line-height: 1;
}

.splash-skip {
  position: absolute;
  top: clamp(18px, 3vw, 32px);
  right: clamp(18px, 3vw, 36px);
  z-index: 3;
  padding: 9px 14px;
  color: #465053;
  font-size: 0.88rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(32, 88, 98, 0.18);
  border-radius: 999px;
  backdrop-filter: blur(8px);
}

.splash-skip:hover,
.splash-skip:focus-visible {
  color: #cf333f;
  border-color: rgba(207, 51, 63, 0.42);
  outline: none;
}

.splash-closing .splash-screen {
  pointer-events: none;
  animation: splash-leave 520ms ease forwards;
}

@keyframes splash-arrive {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes splash-leave {
  to {
    opacity: 0;
    transform: scale(1.015);
  }
}

@media (max-width: 680px) {
  .splash-screen {
    align-items: center;
    padding: 70px 18px 24px;
  }

  .splash-media video {
    max-height: none;
    transform: translateY(3%) scale(1.38);
  }

  .splash-tagline {
    width: 94%;
    font-size: clamp(1.05rem, 5vw, 1.35rem);
    line-height: 1.25;
  }

  .splash-footer {
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
  }

  .splash-enter {
    width: 100%;
  }
}

@media (max-height: 650px) and (orientation: landscape) {
  .splash-screen {
    padding: 46px 70px 18px;
  }

  .splash-eyebrow {
    margin-bottom: 8px;
  }

  .splash-media video {
    max-height: 58vh;
    max-height: 58dvh;
    transform: scale(1.35);
  }

  .splash-footer {
    margin-top: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .splash-shell {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .splash-progress {
    display: none;
  }

  .splash-tagline {
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  .splash-enter,
  .splash-progress span {
    transition: none;
  }

  .splash-closing .splash-screen {
    animation-duration: 1ms;
  }
}
