/* 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,
.hero-ico-play {
  width: 24px;
  height: 24px;
  margin-block: -4px; /* two-tone 12px pixel emblems at 2x: they overflow the 16px slot, so the face stays 40px tall */
  shape-rendering: crispEdges;
}

/* Monitor: 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.
   On phones it is drawn a little wider than the screen (the outer edges of its side panels run off
   the page) so the screen itself is nearly as wide as the phone. */
.hero-mon {
  position: relative;
  z-index: 30;
  display: block;
  margin-top: 8px;
  will-change: transform;
}
.hero-mon-box {
  width: calc(100% + 88px);
  margin-inline: -44px;
}
@media (min-width: 480px) {
  .hero-mon {
    padding-inline: 24px;
  }
  .hero-mon-box {
    width: 100%;
    margin-inline: 0;
  }
}
@media (min-width: 768px) {
  .hero-mon {
    margin-top: 0;
    padding-inline: 64px;
  }
}
@media (min-width: 1024px) {
  .hero-mon {
    padding-inline: 128px;
  }
}
.hero-mon-box {
  position: relative;
  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;
  }
}

/* The desk on the monitor (Hero.dc.html deskVals): the crew in a row, the latest decisions, a way into the
   desk. Sized from the screen's own width (cqi), so it reads the same on the phone's smaller monitor. */
.hd {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 2.6cqi;
  padding: 3.4cqi 3.8cqi 3cqi;
  color: var(--text);
  font-family: var(--font-body-alt);
  font-size: max(9px, 1.9cqi);
  line-height: 1.35;
  text-align: left;
  background: #070605;
}
.hd-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2cqi;
  font-family: var(--font-caption);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hd-name { color: var(--copper-400); }
.hd-chips {
  display: flex;
  gap: 1.4cqi;
}
.hd-chips > span {
  display: inline-flex;
  align-items: center;
  gap: 0.9cqi;
  padding: 0.3cqi 1.1cqi;
  background: var(--stone-800);
  color: var(--text-2);
}
.hd-chips .hd-paper { color: var(--copper-300); }
.hd-live i {
  width: max(5px, 0.9cqi);
  height: max(5px, 0.9cqi);
  background: var(--stone-500);
}
.hd-live.is-on { color: #fff; }
.hd-live.is-on i {
  background: var(--accent);
  animation: hd-blink 1.6s steps(1, end) infinite;
}
@keyframes hd-blink { 50% { opacity: 0.25; } }
.hd-crew {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.6cqi;
  margin: 0;
  padding: 0;
  list-style: none;
}
.hd-crew li {
  display: grid;
  gap: 0.5cqi;
  min-width: 0;
}
.hd-crew img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
  background: #0a0a0a;
}
.hd-crew b {
  font-family: var(--font-heading);
  font-size: max(11px, 2.6cqi);
  font-weight: 400;
  line-height: 1.1;
}
.hd-crew span {
  overflow: hidden;
  color: var(--text-3);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hd-feed {
  display: grid;
  align-content: start;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: hidden;
}
.hd-feed li {
  display: flex;
  align-items: baseline;
  gap: 0.9cqi;
  min-width: 0;
  padding: 0.7cqi 0;
  border-top: 1px solid var(--stone-800);
  white-space: nowrap;
}
.hd-feed li:first-child { border-top: 0; }
.hd-feed b {
  color: var(--copper-400);
  font-weight: inherit;
}
.hd-feed .is-bought b,
.hd-feed .is-sold b { color: var(--copper-300); }
.hd-verb { color: var(--text-2); }
.hd-sym {
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.92em;
}
.hd-why {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  color: var(--text-3);
  text-overflow: ellipsis;
}
.hd-t {
  margin-left: auto;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.hd-note {
  margin: 0;
  color: var(--text-3);
}
.hd-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2cqi;
  padding-top: 1.6cqi;
  border-top: 1px solid var(--stone-700);
  color: var(--text-3);
  font-family: var(--font-caption);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.hd-go { color: var(--copper-400); }
@media (hover: hover) {
  .hd-foot:hover .hd-go { color: var(--copper-300); }
}
.hd-foot:focus-visible {
  outline: 2px solid var(--copper-400);
  outline-offset: 2px;
}
/* the phone's monitor is small: the crew keep their names, the feed drops its reasons */
@container (max-width: 480px) {
  .hd { gap: 2.2cqi; padding: 3cqi; }
  .hd-crew span { display: none; }
  .hd-why { display: none; }
  .hd-feed li:nth-child(n + 4) { display: none; }
  .hd-foot > span:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hd-live.is-on i { animation: none; }
}
