/* Dusk outside the refuge. Everything is scoped to the unselected home screen. */
.refuge-content--home {
  position: relative;
  isolation: isolate;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  scrollbar-gutter: auto;
  background: #1a2d33;
}
.refuge-scene {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}
.refuge-skyline { position: absolute; inset: 0; width: 100%; height: 100%; }
.refuge-scene::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: 0;
  background:
    linear-gradient(90deg, #0c1a20e8 0%, #102129b8 28%, #10212950 58%, #10212900 85%),
    linear-gradient(180deg, #11242c30 0%, transparent 47%, #0b1b200d 75%, #08171db3 100%);
}
/* 48% × 34% ≈ 16% of the scene. The SVG stays proportional inside this box. */
.refuge-car-stage {
  position: absolute;
  z-index: 2;
  width: 48%;
  height: 34%;
  right: 1.5%;
  bottom: 6%;
}
.refuge-wreck { display: block; width: 100%; height: 100%; overflow: visible; }
.refuge-smoke-source { opacity: .14; }
.refuge-smoke-wisp {
  transform-box: view-box;
  transform-origin: 0 0;
  opacity: 0;
  animation: refuge-smoke-rise 11.2s linear infinite;
}
.refuge-smoke-wisp--0 { animation-delay: -1.4s; }
.refuge-smoke-wisp--1 { animation-delay: -4.2s; }
.refuge-smoke-wisp--2 { animation-delay: -7s; }
.refuge-smoke-wisp--3 { animation-delay: -9.8s; }
@keyframes refuge-smoke-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(.48); }
  16% { opacity: .24; transform: translate(-7px, -18px) scale(.68); }
  45% { opacity: .19; transform: translate(-28px, -63px) scale(.98); }
  75% { opacity: .1; transform: translate(-60px, -115px) scale(1.3); }
  100% { opacity: 0; transform: translate(-98px, -178px) scale(1.65); }
}
/* One exact pattern period: matrix shear -.15 × 280px = -42px.
   Translating by that vector makes the loop seamless, including across F11 resize. */
.refuge-rain {
  position: absolute;
  inset: -280px -84px;
  pointer-events: none;
  animation: refuge-rain-fall 1.8s linear infinite;
  will-change: transform;
}
.refuge-rain > svg { display: block; width: 100%; height: 100%; }
.refuge-rain--far { z-index: 1; opacity: .22; animation-delay: -.9s; }
.refuge-rain--near { z-index: 3; opacity: .16; animation-duration: 1.15s; animation-delay: -.41s; }
@keyframes refuge-rain-fall {
  from { transform: translate3d(42px, -280px, 0); }
  to { transform: translate3d(0, 0, 0); }
}
.refuge-content--home .refuge-welcome {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 100%;
  padding: clamp(28px, 3.5vw, 58px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}
.refuge-content--home .refuge-welcome > .section-eyebrow { color: #e6b68d; letter-spacing: .18em; }
.refuge-content--home .refuge-welcome h1 {
  max-width: 920px;
  text-shadow: 0 3px 20px #0a171980;
}
.refuge-content--home .refuge-welcome > p { color: #d7ddd2; text-shadow: 0 2px 9px #0a1719; }
.refuge-content--home .welcome-actions { margin-bottom: 24px; }
.refuge-content--home .welcome-actions .btn { box-shadow: 0 4px 16px #08171a40; }
.refuge-content--home .welcome-actions .btn-ghost { background: #1a2d31e8; color: #e0e5d8; border-color: #788b80; }
.refuge-content--home .welcome-actions .btn-ghost:hover { background: #32494b; }
.refuge-content--home .storage-notice { position: relative; max-width: 630px; background: #253b32ee; }
.refuge-content--home .refuge-bottom-line {
  padding-top: 16px;
  color: #b1c3b6;
  border-color: #93ac9938;
  text-shadow: 0 1px 5px #09191d;
}
@media (min-width: 761px) and (max-height: 850px) {
  .refuge-content--home .refuge-welcome { padding: 28px; }
  .refuge-content--home .refuge-welcome h1 { font-size: clamp(42px, 4.3vw, 66px); margin: 22px 0 18px; }
  .refuge-content--home .refuge-welcome > p { font-size: 14px; }
  .refuge-content--home .welcome-actions { margin-top: 20px; }
}
@media (max-width: 1000px) and (min-width: 761px) {
  .refuge-car-stage { width: 63%; height: 30%; right: 1%; }
  .refuge-content--home .refuge-welcome { padding: 28px 24px; }
}
@media (max-width: 760px), (max-height: 530px) {
  .refuge-content--home .refuge-welcome { height: auto; min-height: 680px; padding: 30px 20px 24px; }
  .refuge-content--home .refuge-welcome h1 { font-size: clamp(37px, 8vw, 58px); margin: 22px 0 18px; }
  .refuge-content--home .refuge-welcome > p { font-size: 14px; }
  .refuge-car-stage { width: 82%; height: 28%; right: 1%; bottom: 7%; }
  .refuge-scene::after {
    background: linear-gradient(180deg, #10232bec 0%, #10232ba8 35%, #10232b25 64%, #08171d80 100%);
  }
  .refuge-content--home .refuge-bottom-line { font-size: 9px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .refuge-rain { display: none; animation: none; will-change: auto; }
  .refuge-smoke-wisp { animation: none; opacity: 0; }
  .refuge-smoke-wisp--1 { opacity: .16; transform: translate(-18px, -42px) scale(.85); }
}
