@font-face {
  font-family: HJSplash;
  font-display: swap;
  src: url(/assets/fonts/HJSplash.subset.woff2) format('woff2');
}

.home-splash {
  --splash-cream: #fff3df;
  --splash-accent: #ffdc9e;
  --splash-line: rgb(255 243 223 / .3);
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  background: #761e1a var(--hj-paper-img) center / 360px;
  background-blend-mode: multiply;
  color: var(--splash-cream);
  color-scheme: dark;
}

.home-splash:not([open]) { display: none; }
.home-splash::backdrop { background: transparent; }
html:has(.home-splash[open]) { overflow: hidden; }

.home-splash-inner {
  display: flex;
  flex-direction: column;
  width: min(100% - 2 * clamp(22px, 5.5vw, 88px), 1280px);
  min-height: 100%;
  margin-inline: auto;
  padding-block: max(18px, env(safe-area-inset-top)) max(30px, env(safe-area-inset-bottom));
}

.home-splash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--splash-line);
}

.home-splash-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font: 700 clamp(17px, 2vw, 25px)/1.2 var(--hj-gm);
  letter-spacing: -.04em;
}

.home-splash-brand img {
  width: clamp(32px, 4vw, 48px);
  height: auto;
  filter: brightness(0) invert(1) sepia(.2);
}

.home-splash-skip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 4px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.home-splash-skip:hover {
  text-decoration: underline;
  text-underline-offset: .25em;
}

.home-splash-skip:focus-visible {
  outline: 2px solid var(--splash-accent);
  outline-offset: -2px;
}

.home-splash-stage {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(20px, 3vw, 48px);
  padding-block: clamp(30px, 5vh, 60px);
  border-bottom: 1px solid var(--splash-line);
}

.home-splash-copy h2 {
  margin: 0;
  color: inherit;
  font: 700 clamp(28px, 4.1vw, 65px)/1.18 var(--hj-gm);
  letter-spacing: -.04em;
  word-break: keep-all;
}

.home-splash-copy em {
  position: relative;
  display: inline-block;
  margin-top: .1em;
  color: var(--splash-accent);
  font: normal 1.28em/1.16 HJSplash, var(--hj-brush);
}

.home-splash-copy em::after {
  position: absolute;
  inset: 100% 0 auto;
  height: .11em;
  background: currentColor;
  mask: url(/assets/sketch/stroke-line.svg) center / 100% 100% no-repeat;
  transform-origin: left;
  content: '';
}

.home-splash-copy p {
  margin: clamp(22px, 3vw, 40px) 0 0;
  color: var(--splash-cream);
  font-size: clamp(14px, 1.5vw, 19px);
  font-weight: 600;
  word-break: keep-all;
}

.home-splash-photo { margin: 0; }

.home-splash-photo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 69svh;
  margin-inline: auto;
  object-fit: contain;
  filter: drop-shadow(0 23px 22px rgb(40 5 4 / .38));
}

@media (max-width: 680px) {
  .home-splash-stage {
    grid-template-columns: 1fr;
    align-content: center;
    gap: clamp(20px, 5vh, 44px);
    text-align: center;
  }

  .home-splash-copy h2 { font-size: clamp(26px, 8.4vw, 49px); }
  .home-splash-photo img { max-height: 37svh; }
}

@media (prefers-reduced-motion: no-preference) {
  .home-splash[open] .home-splash-copy {
    animation: home-splash-copy-in 480ms cubic-bezier(.16, 1, .3, 1) both;
  }

  .home-splash[open] .home-splash-copy em::after {
    animation: home-splash-stroke 580ms 150ms cubic-bezier(.2, .75, .25, 1) both;
  }

  .home-splash.home-splash-leaving { animation: home-splash-out 220ms ease-in both; }
}

@keyframes home-splash-copy-in {
  from { opacity: .45; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes home-splash-stroke {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes home-splash-out {
  to { opacity: 0; }
}
