/* The Arrival title page -- V1 house-cover shape, Arrival red accent. */

body.title-body {
  margin: 0;
  min-height: 100svh;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(86% 52% at 50% -8%, rgba(159, 36, 56, 0.24), transparent 68%),
    linear-gradient(180deg, #0d0a12 0%, #07060c 60%, #030306 100%);
  color: #efe6d8;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body.has-title-boot {
  overflow: hidden;
}

html.title-boot-skipped body.has-title-boot {
  overflow-y: auto;
}

.title-root {
  min-height: 100svh;
}

.title-noscript {
  max-width: 34rem;
  margin: 0 auto;
  padding: 2rem;
  color: #efe6d8;
}

.title-boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #020205;
  cursor: pointer;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.title-boot.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

html.title-boot-skipped .title-boot {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.title-boot-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #020205;
}

.title-boot::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.34)),
    radial-gradient(60% 38% at 50% 70%, rgba(159, 36, 56, 0.18), transparent 72%);
}

.title-boot-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  gap: 0.4rem;
  color: rgba(239, 230, 216, 0.78);
  text-align: center;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0;
}

.title-boot-fallback strong {
  display: block;
  font-size: 3rem;
  letter-spacing: 0.12em;
}

.title-stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding:
    calc(env(safe-area-inset-top, 0px) + 1rem)
    1rem
    calc(env(safe-area-inset-bottom, 0px) + 1.35rem);
}

.title-stage::before,
.title-stage::after,
.title-rake,
.title-haze {
  content: "";
  position: absolute;
  pointer-events: none;
}

.title-stage::before {
  inset: 0;
  background:
    radial-gradient(48% 30% at calc(var(--rake-x, 48) * 1%) calc(var(--rake-y, 40) * 1%), rgba(232, 107, 83, 0.16), transparent 68%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), transparent 48%, rgba(0, 0, 0, 0.84));
}

.title-stage::after {
  inset: auto 0 0;
  height: 54%;
  background:
    linear-gradient(180deg, transparent, rgba(33, 10, 18, 0.38) 44%, rgba(0, 0, 0, 0.48)),
    radial-gradient(70% 34% at 50% 80%, rgba(159, 36, 56, 0.2), transparent 72%);
}

.title-rake {
  inset: 0;
  z-index: 1;
  mix-blend-mode: screen;
  background:
    radial-gradient(
      36% 30% at calc(var(--rake-x, 48) * 1%) calc(var(--rake-y, 40) * 1%),
      rgba(252, 180, 137, 0.12),
      rgba(159, 36, 56, 0.05) 42%,
      transparent 70%
    );
}

.title-haze {
  z-index: 1;
  width: 70%;
  height: 42%;
  bottom: 6%;
  opacity: 0.3;
  filter: blur(18px);
  background:
    linear-gradient(90deg, transparent, rgba(159, 36, 56, 0.18), transparent),
    linear-gradient(180deg, transparent, rgba(240, 179, 129, 0.07), transparent);
  transform: translate3d(calc(var(--title-x, 0) * -10px), 0, 0);
}

.title-haze--left {
  left: -18%;
}

.title-haze--right {
  right: -22%;
  bottom: 20%;
  opacity: 0.24;
  transform: translate3d(calc(var(--title-x, 0) * 8px), 0, 0);
}

.title-paintwash {
  position: absolute;
  inset: -8% -28% 16%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  filter: saturate(1.18) contrast(1.08) brightness(0.72) blur(1.2px);
  mix-blend-mode: screen;
  transform: translate3d(calc(var(--title-x, 0) * -7px), calc(var(--title-y, 0) * -4px), 0);
  -webkit-mask-image: radial-gradient(ellipse at 50% 46%, #000 0 16%, rgba(0, 0, 0, 0.58) 38%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 46%, #000 0 16%, rgba(0, 0, 0, 0.58) 38%, transparent 70%);
}

.title-paintwash img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 44%;
  transform: scale(1.08);
}

.title-composition {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.72rem;
  width: min(100%, 34rem);
}

.title-house-wrap {
  position: relative;
  width: min(100%, 21.5rem);
  min-width: min(100%, 17.25rem);
  transform:
    translate3d(calc(var(--title-x, 0) * 6px), calc(var(--title-y, 0) * 4px), 0)
    rotate(calc(var(--title-x, 0) * 0.25deg));
  transform-origin: 50% 72%;
  transition: transform 180ms ease;
}

.title-house-scene {
  position: relative;
  display: block;
  aspect-ratio: 2 / 3;
  filter:
    drop-shadow(0 28px 50px rgba(0, 0, 0, 0.58))
    drop-shadow(0 0 34px rgba(159, 36, 56, 0.14));
}

.title-house {
  display: block;
  width: 100%;
  height: auto;
}

.title-stars circle {
  opacity: 0.46;
}

.title-stars .title-star {
  transform-box: fill-box;
  transform-origin: center;
  animation: title-star-twinkle 5.4s ease-in-out infinite;
}

@keyframes title-star-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.84); }
  50% { opacity: 0.62; transform: scale(1.08); }
}

.title-roof,
.title-wing,
.title-house-face {
  fill: #14101c;
  stroke: #302539;
  stroke-width: 2;
}

.title-roof {
  fill: #1c1424;
}

.title-roof-line {
  fill: none;
  stroke: rgba(186, 126, 119, 0.36);
  stroke-width: 2;
}

.title-roof-line--lower {
  opacity: 0.58;
}

.title-chimney {
  fill: #15101a;
  stroke: #302539;
  stroke-width: 2;
}

.title-smoke {
  fill: rgba(239, 230, 216, 0.22);
  filter: blur(1px);
}

.title-path {
  fill: rgba(64, 21, 30, 0.44);
}

.title-procession {
  fill: rgba(239, 230, 216, 0.34);
  stroke: rgba(239, 230, 216, 0.3);
  stroke-width: 2;
}

.title-door-arch {
  fill: #09070d;
  stroke: rgba(217, 178, 90, 0.26);
  stroke-width: 3;
}

.title-door-light {
  opacity: 0.34;
  transition: opacity 220ms ease;
}

.title-door-rim {
  stroke: rgba(255, 231, 176, 0.3);
  stroke-width: 2;
  opacity: 0.52;
  transition: opacity 220ms ease;
}

.title-door-leaf {
  fill: #10080d;
  stroke: rgba(240, 179, 129, 0.25);
  stroke-width: 1.3;
  transform-box: fill-box;
  transform-origin: center bottom;
  transition: transform 520ms cubic-bezier(0.2, 0.9, 0.18, 1), opacity 420ms ease, filter 220ms ease;
  filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.52));
}

.title-door-seam {
  fill: none;
  stroke: rgba(255, 231, 176, 0.28);
  stroke-width: 1.2;
  opacity: 0.5;
  transition: opacity 220ms ease;
}

.title-door-keyhole {
  fill: #f0b381;
  opacity: 0.68;
  filter: drop-shadow(0 0 12px rgba(240, 179, 129, 0.52));
  transition: opacity 220ms ease, transform 220ms ease;
  transform-box: fill-box;
  transform-origin: center;
}

.title-doorspill {
  fill: rgba(240, 179, 129, 0.32);
  opacity: 0.24;
  animation: title-doorspill-breathe 5.2s ease-in-out infinite;
}

@keyframes title-doorspill-breathe {
  0%, 100% { opacity: 0.18; transform: scaleX(0.96); }
  50% { opacity: 0.42; transform: scaleX(1.03); }
}

.title-door-wash {
  opacity: 0.68;
  mix-blend-mode: screen;
}

.title-porch {
  fill: none;
  stroke: rgba(217, 178, 90, 0.22);
  stroke-width: 2;
}

.title-window rect {
  fill: #0a080f;
  stroke: rgba(217, 178, 90, 0.24);
  stroke-width: 1.5;
}

.title-window line {
  stroke: rgba(217, 178, 90, 0.18);
}

.title-window.is-touched rect {
  fill: rgba(159, 36, 56, 0.36);
  stroke: rgba(240, 179, 129, 0.62);
}

.title-window.is-lit rect {
  fill: rgba(159, 36, 56, 0.26);
  stroke: rgba(240, 179, 129, 0.5);
}

.title-gable {
  cursor: pointer;
  fill: none;
  stroke: rgba(217, 178, 90, 0.32);
  stroke-width: 1.4;
}

.title-gable-frame {
  fill: #0a080f;
  stroke: rgba(217, 178, 90, 0.26);
}

.title-gable-glow {
  fill: rgba(159, 36, 56, 0.12);
  stroke: none;
  transition: opacity 180ms ease, filter 180ms ease;
}

.title-gable:hover .title-gable-glow,
.title-gable:focus-visible .title-gable-glow,
.title-gable.is-lit .title-gable-glow,
.title-gable.is-touched .title-gable-glow {
  opacity: 0.58;
  filter: drop-shadow(0 0 12px rgba(240, 179, 129, 0.48));
}

.title-lamp {
  fill: none;
  stroke: rgba(217, 178, 90, 0.5);
  stroke-width: 2;
}

.title-lamp-glow {
  fill: rgba(159, 36, 56, 0.16);
  stroke: none;
  animation: title-lamp-flicker 3.8s ease-in-out infinite;
}

.title-lamp.is-touched .title-lamp-glow,
.title-lamp:hover .title-lamp-glow,
.title-lamp:focus-visible .title-lamp-glow {
  fill: rgba(240, 179, 129, 0.34);
  filter: drop-shadow(0 0 14px rgba(240, 179, 129, 0.42));
}

@keyframes title-lamp-flicker {
  0%, 100% { opacity: 0.72; }
  40% { opacity: 0.92; }
  47% { opacity: 0.68; }
  58% { opacity: 1; }
}

.title-moon {
  fill: #efe8f2;
}

.title-moon.is-touched {
  filter: drop-shadow(0 0 18px rgba(239, 230, 216, 0.22));
}

.title-painted-door {
  position: absolute;
  z-index: 3;
  left: 35.9%;
  bottom: 1.8%;
  width: 28.2%;
  height: 28.8%;
  overflow: hidden;
  border: 1px solid rgba(240, 179, 129, 0.24);
  border-radius: 48% 48% 4% 4%;
  background: #10080d;
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 195, 0.08),
    inset 0 -2rem 2.5rem rgba(0, 0, 0, 0.36),
    0 0 1.7rem rgba(159, 36, 56, 0.2),
    0 1rem 1.6rem rgba(0, 0, 0, 0.32);
  opacity: 0.92;
  filter: saturate(1.18) contrast(1.1) brightness(0.88);
  pointer-events: none;
}

.title-painted-door::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow:
    inset 0 0 1.1rem rgba(240, 179, 129, 0.14),
    inset 0 -2.4rem 2.8rem rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.title-painted-door-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 42%;
  transform: scale(1.1);
}

.title-house-wrap.is-awake .title-painted-door,
.title-house-wrap.is-opening .title-painted-door {
  opacity: 1;
  filter: saturate(1.28) contrast(1.12) brightness(1.02);
  box-shadow:
    inset 0 0 0 1px rgba(255, 236, 195, 0.14),
    inset 0 -2rem 2.5rem rgba(0, 0, 0, 0.28),
    0 0 2rem rgba(159, 36, 56, 0.38),
    0 0 3.5rem rgba(240, 179, 129, 0.16);
}

.title-house-wrap.is-awake .title-door-light,
.title-house-wrap.is-opening .title-door-light {
  opacity: 0.82;
}

.title-house-wrap.is-awake .title-door-rim,
.title-house-wrap.is-opening .title-door-rim {
  opacity: 0.82;
}

.title-house-wrap.is-awake .title-door-keyhole,
.title-house-wrap.is-opening .title-door-keyhole {
  opacity: 1;
  transform: scale(1.05);
}

.title-house-wrap.is-opening .title-door-leaf--left {
  transform: translateX(-24px) skewY(2deg) scaleX(0.84);
  opacity: 0.7;
}

.title-house-wrap.is-opening .title-door-leaf--right {
  transform: translateX(24px) skewY(-2deg) scaleX(0.84);
  opacity: 0.7;
}

.title-house-wrap.is-opening .title-door-seam,
.title-house-wrap.is-opening .title-door-keyhole {
  opacity: 0;
}

.title-house-wrap.is-opening .title-painted-door {
  opacity: 0.42;
  transform: perspective(22rem) scaleX(0.88);
}

.title-approach {
  appearance: none;
  position: absolute;
  z-index: 4;
  left: 34%;
  bottom: 1.4%;
  width: 32%;
  height: 31%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 48% 48% 10% 10%;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.title-approach:focus-visible {
  outline: 2px solid rgba(240, 179, 129, 0.78);
  outline-offset: 5px;
}

.title-door-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.title-house-wrap.is-opening {
  transform: translate3d(0, -4px, 0) scale(1.012);
}

.title-banner {
  display: grid;
  justify-items: center;
  gap: 0.48rem;
  text-align: center;
}

.title-part {
  margin: 0;
  color: rgba(239, 230, 216, 0.48);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.title-wordmark {
  margin: 0;
  color: #f6f1f2;
  font-size: clamp(2.05rem, 12vw, 4.4rem);
  line-height: 1;
  text-shadow: 0 0 24px rgba(159, 36, 56, 0.24);
}

.title-subtitle {
  margin: -0.12rem 0 0;
  color: rgba(240, 179, 129, 0.78);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.2rem, 6vw, 2rem);
  line-height: 1;
}

.title-poem {
  display: grid;
  gap: 0.14rem;
  margin-top: 0.18rem;
  color: rgba(239, 230, 216, 0.7);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.94rem;
  line-height: 1.34;
}

.title-poem p,
.title-cue {
  margin: 0;
}

.title-cue {
  color: rgba(239, 230, 216, 0.42);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.title-resume-slot {
  width: min(100%, 30rem);
}

.title-resume {
  margin: 0 auto;
  padding: 0.9rem;
  border: 1px solid rgba(178, 126, 132, 0.22);
  border-radius: 8px;
  background: rgba(11, 8, 14, 0.74);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
}

.title-resume-eyebrow {
  margin: 0 0 0.2rem;
  color: rgba(239, 230, 216, 0.45);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.title-resume-heading {
  margin: 0 0 0.65rem;
  color: #f6f1f2;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 600;
}

.title-resume-list {
  display: grid;
  gap: 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.title-resume-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.title-resume-where {
  min-width: 0;
}

.title-resume-title,
.title-resume-spot {
  display: block;
}

.title-resume-title {
  color: #efe6d8;
  font-size: 0.88rem;
  font-weight: 650;
}

.title-resume-spot {
  color: rgba(239, 230, 216, 0.52);
  font-size: 0.76rem;
}

.title-resume-progress {
  display: block;
  height: 0.28rem;
  margin-top: 0.3rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(239, 230, 216, 0.08);
}

.title-resume-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9f2438, #f0b381);
}

.title-resume-go {
  min-height: 2.15rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(240, 179, 129, 0.28);
  border-radius: 8px;
  background: rgba(22, 12, 18, 0.82);
  color: #efe6d8;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.title-resume-go--secondary {
  color: rgba(239, 230, 216, 0.76);
}

.title-resume-go:hover,
.title-resume-go:focus-visible {
  border-color: rgba(240, 179, 129, 0.54);
  outline: none;
}

@media (min-width: 760px) {
  .title-composition {
    grid-template-columns: minmax(18rem, 21.5rem) minmax(16rem, 1fr);
    column-gap: 2rem;
    width: min(100%, 58rem);
  }

  .title-house-wrap,
  .title-resume-slot {
    grid-column: 1;
  }

  .title-banner {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }
}

@media (max-width: 380px) {
  .title-stage {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .title-resume-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .title-resume-go {
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .title-boot,
  .title-house-wrap,
  .title-haze,
  .title-painted-door,
  .title-paintwash {
    transition: none;
  }

  .title-stars .title-star,
  .title-lamp-glow,
  .title-doorspill {
    animation: none;
  }

  .title-door-leaf {
    transition: none;
  }
}
