/* / only: the tiled sky, the twinkle field, the missile tracks, the landscape,
   the eclipse, the hero, the three cards and the row that hands you to /how.
   Scoped under .home so nothing leaks. */

.home {
  position: relative;
  /* wash2 and l5 differ from tokens.css on this page: .05 and .42 rather than .06 and .44. */
  --ph-wash2: rgba(var(--ph-rgb), .05);
  --ph-l5: rgba(var(--ph-rgb), .42);
}

/* == the layers of the top section, back to front, all at z-index 0 in document order; the sections at 1 == */

.home .sky, .home .spark, .home .arc, .home .eclipse {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

/* The sky is a mask over a phosphor fill, so drift moves the mask, not the
   background: the field re-tubes for free, and the drift is one animation on
   two divs. The thinned opacities here are what home.js writes on its first frame. */
.home .sky__layer {
  position: absolute;
  inset: -40px;
  background-color: var(--ph);
  -webkit-mask-image: url("/site-assets/img/launch/stars-dot.png");
  mask-image: url("/site-assets/img/launch/stars-dot.png");
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  animation-play-state: paused;
}
.home .sky__layer--near {
  opacity: .024;
  animation: drift 44s linear infinite paused;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}
.home .sky__layer--far {
  opacity: .042;
  animation: drift2 78s linear infinite paused;
  -webkit-mask-position: 96px 160px;
  mask-position: 96px 160px;
}

@keyframes drift {
  0% { -webkit-mask-position: 0 0; mask-position: 0 0; }
  100% { -webkit-mask-position: 0 512px; mask-position: 0 512px; }
}
@keyframes drift2 {
  0% { -webkit-mask-position: 96px 160px; mask-position: 96px 160px; }
  100% { -webkit-mask-position: 96px 672px; mask-position: 96px 672px; }
}

/* sparkle: a star swells one pixel step and brightens, then settles; each star's duration and delay are inline. */
.home .spark i {
  position: absolute;
  display: block;
  background: var(--ph);
  opacity: .28;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: .28; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.6); }
}

/* == the missile tracks, plotted per launch in home.js. The head is a zero-size
   point transformed along the path; the sprite hangs off it by half its size,
   so it rides the curve nose-first == */
.home .arc__svg { position: absolute; inset: 0; overflow: hidden; }
.home .arc__head { position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; }
.home .arc__head img { position: absolute; image-rendering: pixelated; }

/* == the landscape: full bleed, pinned to the bottom of the whole top section,
   above the tracks so a missile rises from behind the hills. Smooth vector on purpose == */
.home .land {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  pointer-events: none;
  z-index: 0;
}
.home .land svg { position: absolute; inset: 0; display: block; width: 100%; height: 150px; }

/* == hero == */

.home .hero-sec {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 64px var(--page-pad) 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 44px;
  align-items: center;
}
.home .hero__copy { position: relative; display: flex; flex-direction: column; gap: 26px; }
.home .hero__copy > * { position: relative; z-index: 1; }
.home .hero__eyebrow {
  font: var(--dm11);
  color: var(--ph-dim);
  letter-spacing: 2px;
  -webkit-font-smoothing: none;
}
/* The title: Departure 44, the one size past 33. */
.home .hero__title {
  margin: 0;
  font: 400 44px/1.22 var(--face-pixel);
  color: var(--ph-bright);
  letter-spacing: 0;
  -webkit-font-smoothing: none;
}
.home .hero__lede { margin: 0; font: 400 16px/1.75 var(--face-mono); color: var(--ph-mute); max-width: 32em; }
.home .hero__sub { margin: -12px 0 0; font: 400 14px/1.7 var(--face-mono); color: var(--ph-mute2); max-width: 34em; }
.home .hero__acts { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.home .hero__cta {
  display: inline-flex;
  align-items: center;
  padding: 18px 26px;
  background: var(--ph-mass);
  color: var(--ink);
  font: var(--dm11);
  letter-spacing: 1px;
  text-shadow: var(--px-bold);
  white-space: nowrap;
  flex: none;
  -webkit-font-smoothing: none;
}
.home .hero__cta:hover { background: var(--ph-hot); color: var(--ink); }
/* The second button: an outline, the same height. */
.home .hero__cta--outline {
  padding: 18px 22px;
  background: none;
  box-shadow: inset 0 0 0 1px var(--ph-l5);
  color: var(--ph);
  text-shadow: none;
}
.home .hero__cta--outline:hover { background: var(--ph-wash); color: var(--ph); }

.home .hero__cy {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  justify-self: center;
}
.home .hero__cy > * { position: relative; z-index: 1; }
/* Cy at 264, eleven times the 24px sprite. */
.home .hero__face { width: 264px; height: 264px; flex: none; opacity: .92; }
.home .hero__meet {
  font: var(--dm11);
  color: var(--ph-dim);
  letter-spacing: 1px;
  -webkit-font-smoothing: none;
}

/* == the three cards, and the row that hands you to /how ==
   The panel overlaps the bottom of the landscape; that is intended. */

.home .cards-sec {
  position: relative;
  z-index: 1;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 64px var(--page-pad) 90px;
}
.home .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 1px; }
.home .card {
  background: var(--surface);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 0 0 1px var(--ph-l2);
}
.home .card__head { display: flex; align-items: baseline; gap: 10px; }
.home .card__num { font: var(--dm11); color: var(--ph); -webkit-font-smoothing: none; }
.home .card__title { font: var(--dm11); color: var(--ph-bright); letter-spacing: 1px; -webkit-font-smoothing: none; }
.home .card__body { font: 400 13px/1.65 var(--face-mono); color: var(--ph-mute); }

.home .ceremony {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 18px 24px;
  margin-top: 1px;
  box-shadow: 0 0 0 1px var(--ph-l2);
}
.home .ceremony:hover { box-shadow: 0 0 0 1px var(--ph); }
.home .ceremony__say { font: 400 13px/1.6 var(--face-mono); color: var(--ph-mute2); }
.home .ceremony__go {
  font: var(--dm11);
  color: var(--ph);
  letter-spacing: 1px;
  white-space: nowrap;
  -webkit-font-smoothing: none;
}

/* == narrow: below 900px Cy moves under the copy, still centered == */
@media (max-width: 900px) {
  .home .hero-sec { grid-template-columns: minmax(0, 1fr); }
}

/* A reader who asked for less motion: no drift, stars static, and home.js launches nothing. */
@media (prefers-reduced-motion: reduce) {
  .home .sky__layer { animation: none; }
  .home .spark i { animation: none; opacity: .5; }
}
