/* /device only: the hero, the diagram on its graph paper, and the four
   reasons. Scoped under .device so nothing leaks. */

.device {
  position: relative;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}

/* == graph paper behind the diagram: its own ground, so the stars stop at it,
   masked by four off-center ellipses so it fades out unevenly == */
.graph {
  position: absolute;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  top: 200px;
  height: 900px;
  z-index: 0;
  pointer-events: none;
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(var(--ph-rgb), .15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ph-rgb), .15) 1px, transparent 1px),
    linear-gradient(rgba(var(--ph-rgb), .065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ph-rgb), .065) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
  background-position: center top;
  -webkit-mask-image:
    radial-gradient(ellipse 44% 38% at 38% 44%, #000 0%, rgba(0, 0, 0, .7) 40%, transparent 100%),
    radial-gradient(ellipse 36% 30% at 70% 60%, #000 0%, rgba(0, 0, 0, .5) 45%, transparent 100%),
    radial-gradient(ellipse 26% 20% at 78% 34%, rgba(0, 0, 0, .5) 0%, transparent 100%),
    radial-gradient(ellipse 34% 18% at 50% 86%, rgba(0, 0, 0, .45) 0%, transparent 100%);
  mask-image:
    radial-gradient(ellipse 44% 38% at 38% 44%, #000 0%, rgba(0, 0, 0, .7) 40%, transparent 100%),
    radial-gradient(ellipse 36% 30% at 70% 60%, #000 0%, rgba(0, 0, 0, .5) 45%, transparent 100%),
    radial-gradient(ellipse 26% 20% at 78% 34%, rgba(0, 0, 0, .5) 0%, transparent 100%),
    radial-gradient(ellipse 34% 18% at 50% 86%, rgba(0, 0, 0, .45) 0%, transparent 100%);
}
.device > section { position: relative; z-index: 1; }

/* == hero == */
.device__hero { padding: 66px 0 44px; display: flex; flex-direction: column; gap: 22px; max-width: 760px; }
.device__eyebrow { font: var(--dm11); color: var(--ph-dim); letter-spacing: 2px; -webkit-font-smoothing: none; }
.device__title { margin: 0; font: 400 33px/1.3 var(--face-pixel); color: var(--ph-bright); -webkit-font-smoothing: none; text-wrap: balance; }
.device__lede { margin: 0; font: 400 16px/1.75 var(--face-mono); color: var(--ph-mute); max-width: 34em; text-wrap: pretty; }

/* == the diagram: an 868px stage that scrolls sideways when the page is narrower == */
.device__diagram { padding-bottom: 44px; }
.art__scroll { position: relative; overflow-x: auto; overflow-y: hidden; }
.art__stage { position: relative; width: 868px; height: 552px; margin: 0 auto; }

/* The leader lines sit over the art, so a line can land on the part it names. */
.art__leads { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; }
.art__lines { fill: none; stroke: rgba(var(--ph-rgb), .72); stroke-width: 1.5; stroke-linecap: square; }
.art__dots { fill: var(--ph); }

/* The box: device-outline.png is a mask over a phosphor fill so the silhouette
   re-tubes, and device-body.png sits on top so the amber screen and the red
   button keep their color. */
.art__box { position: absolute; left: 204px; top: 72px; width: 432px; height: 345px; z-index: 1; }
.art__outline {
  position: absolute;
  inset: 0;
  background: var(--ph);
  -webkit-mask-image: url('../img/device-outline.png');
  mask-image: url('../img/device-outline.png');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}
/* A photographic render, not a 1-bit sprite, so the sheet's pixelated default would alias it. */
.art__body { position: absolute; left: 0; top: 0; width: 100%; height: 100%; image-rendering: auto; }

/* The callouts: shrink-wrapped plates on the paper, placed off the leader lines. */
.art__note {
  position: absolute;
  width: max-content;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: var(--ink);
  padding: 10px;
  box-sizing: border-box;
  box-shadow: 0 0 0 1px var(--ph-l2);
}
.art__note--l { right: 712px; max-width: 168px; text-align: right; }
.art__note--r { left: 708px; max-width: 160px; text-align: left; }
.art__label { font: var(--dm11); color: var(--ph); letter-spacing: 1px; -webkit-font-smoothing: none; }
.art__say { font: 400 12px/1.5 var(--face-mono); color: var(--ph-mute); }

/* == why a box == */
.device__why { padding-bottom: 88px; display: flex; flex-direction: column; gap: 22px; }
.device__h2 { margin: 0; font: 400 33px/1.3 var(--face-pixel); color: var(--ph-bright); -webkit-font-smoothing: none; text-wrap: balance; }
.device__why-lede { margin: -8px 0 0; font: 400 16px/1.75 var(--face-mono); color: var(--ph-mute); text-wrap: pretty; }
.reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 1px; }
.reason {
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--ph-l2);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.reason__title { font: 400 11px/1.45 var(--face-pixel); color: var(--ph-bright); letter-spacing: 1px; -webkit-font-smoothing: none; }
.reason__body { font: 400 13px/1.65 var(--face-mono); color: var(--ph-mute); }
.device__more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  background: var(--surface);
  padding: 18px 22px;
  box-shadow: 0 0 0 1px var(--ph-l2);
}
.device__more:hover { background: var(--ph-wash2); }
.device__more-say { font: 400 13px/1.6 var(--face-mono); color: var(--ph-mute2); }
.device__more-go { font: var(--dm11); color: var(--ph); letter-spacing: 1px; white-space: nowrap; -webkit-font-smoothing: none; }
