/* Hero (spec 8, 9, 10, 14). Back to front: sky 10, text 20, monitor 30, pines 40, fade 50.
   Hero.dc.html moves the sky, text, monitor and pines on scroll by writing transforms to them. */

.hero {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 780px;
  padding-top: 80px; /* clears the fixed header */
  background: var(--page);
}
@media (min-width: 640px) {
  .hero {
    min-height: 900px;
  }
}

/* Art layers: the sky (.hm-sky, z 10) and the front pines (.hm-pines, z 40) are styled and animated
   in motion.css */

/* Text block: pinned and faded by script while the monitor slides over it */
.hero-text {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  padding-block: 96px;
  text-align: center;
}
/* the name, centred above the headline: letter-spaced pixel serif, like the X banner's lockup.
   The left padding matches the tracking that trails the last letter, so the word sits dead centre. */
.hero-mark {
  margin: 0 0 -8px;
  padding-left: 0.32em;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.32em;
}
@media (max-width: 639px) {
  .hero-mark {
    font-size: 20px;
    padding-left: 0.24em;
    letter-spacing: 0.24em;
  }
}
.hero-h1 {
  white-space: normal;
  filter: drop-shadow(4px 4px 0 rgba(255, 255, 255, .2));
}
@media (min-width: 1024px) {
  .hero-h1 {
    white-space: nowrap; /* two fixed lines from lg */
  }
}
.hero-sub {
  max-width: 768px;
  color: var(--text);
}

/* CTAs: a stacked column of equal widths on phones, a centred row from 640 */
.hero-ctas {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
}
@media (min-width: 640px) {
  .hero-ctas {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
  }
}
.hero-ico-16 {
  width: 16px;
  height: 16px;
}
.hero-ico-24 {
  width: 24px;
  height: 24px;
  margin-block: -4px; /* the rocket overflows its 16px slot, so the face stays 40px tall */
}

/* Phone-only live feed link over the clouds */
.hero-feed {
  --pbtn-ink: var(--copper-400);
  --pbtn-bracket: #fff;
}
@media (hover: hover) {
  .hero-feed:hover {
    --pbtn-ink: var(--copper-300);
  }
}
@media (min-width: 768px) {
  .hero-feed {
    display: none;
  }
}

/* Monitor (768 and up): the white and copper Interlinked terminal (BUILD/art/monitor-v2.*, geometry in
   monitor-v2.json). The black backing and the screen sit exactly in its transparent screen opening;
   the frame image above them covers everything outside the opening, so no clip shape is needed. */
.hero-mon {
  position: relative;
  z-index: 30;
  display: none;
  will-change: transform;
}
@media (min-width: 768px) {
  .hero-mon {
    display: block;
    padding-inline: 64px;
  }
}
@media (min-width: 1024px) {
  .hero-mon {
    padding-inline: 128px;
  }
}
.hero-mon-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1184 / 1057;
}
.hero-backing {
  position: absolute;
  z-index: 0;
  top: 14.298%;
  bottom: 29.63%;
  left: 13%;
  right: 13.154%;
  background: #000;
  pointer-events: none;
}
.hero-screen {
  position: absolute;
  z-index: 1;
  top: 14.298%;
  bottom: 29.63%;
  left: 13%;
  right: 13.154%;
  overflow: clip;
  container-type: inline-size;
  background: #000;
}
/* The imported Screen fills the clip whatever wrapper the import adds; its own stacking context
   keeps its windows and dragged icons under the overlays */
.hero-screen-mount {
  position: absolute;
  inset: 0;
  z-index: 0;
  isolation: isolate;
}
.hero-screen-mount > * {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-scan,
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}
.hero-scan {
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, .06) 3px 4px);
}
.hero-vignette {
  background: radial-gradient(transparent 60%, rgba(0, 0, 0, .18));
}
.hero-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  image-rendering: auto; /* a smooth render, drawn 1:1 at 1440 */
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

/* Bottom fade into the intro: five 24px bands, four below 640 */
.hero-fade {
  position: absolute;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}
.hero-fade > span {
  display: block;
  height: 24px;
  background: var(--page);
}
.hero-fade > span:nth-child(1) { display: none; opacity: .2; }
.hero-fade > span:nth-child(2) { opacity: .4; }
.hero-fade > span:nth-child(3) { opacity: .6; }
.hero-fade > span:nth-child(4) { opacity: .8; }
.hero-fade > span:nth-child(5) { opacity: .9; }
@media (min-width: 640px) {
  .hero-fade > span:nth-child(1) {
    display: block;
  }
}
