@font-face {
  font-family: Handjet;
  src: url("fonts/Handjet-Latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

#bash-os {
  --surface: #21111c;
  --chapter-ink: #fff8ef;
  --chrome: #28111e;
  --highlight: #ffbf91;
  color: var(--chapter-ink);
  isolation: isolate;
}

.bash-os-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.bash-os-field {
  position: sticky;
  top: 0;
  height: min(100%, 100dvh);
  background: linear-gradient(150deg, #120f17, #3f0d1a, #be123c, #fb923c, #fde68a);
}

.bash-os-field canvas,
.bash-os-field::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.bash-os-field canvas {
  display: block;
  opacity: 0;
}

.bash-os-field.is-rendered canvas { opacity: 1; }

.bash-os-field::after {
  content: "";
  background: linear-gradient(105deg, #120f177d, #120f17a8 53%, #120f179e);
}

#bash-os-reflection {
  min-block-size: 100svh;
  padding-block-end: clamp(7rem, 19svh, 13rem);
}

::highlight(bash-os-untyped) { color: transparent; }
#bash-os p[data-typing] { -webkit-text-stroke: 0; }
.bash-os-cursor {
  position: fixed;
  z-index: 2;
  top: 0;
  left: 0;
  width: 2px;
  background: #ffc595;
  pointer-events: none;
}
.bash-os-cursor.is-blinking { animation: bash-os-cursor-blink .74s steps(1,end) infinite; }
@keyframes bash-os-cursor-blink { 50% { opacity: 0; } }

@media print, (forced-colors: active) {
  .bash-os-backdrop { display: none; }
  .bash-os-cursor { display: none; }
  ::highlight(bash-os-untyped) { color: CanvasText; }
  #bash-os-reflection { min-block-size: 0; padding-block-end: 1rem; }
  #bash-os { color: inherit; }
}

.tone-bash-os :is(.chapter-copy h2, .expansion h3, .gallery-head h3, .slide-copy h4, .case-close h3) {
  font-family: Handjet, "Plex Mono", monospace;
  font-weight: 660;
  letter-spacing: .012em;
  inline-size: fit-content;
  max-inline-size: 100%;
}

.tone-bash-os .chapter-copy h2 {
  font-size: clamp(4.6rem, 9.4vw, 9rem);
  font-weight: 610;
  line-height: .92;
}

.tone-bash-os :is(.expansion, .case-close) h3 {
  font-size: clamp(3rem, 5.6vw, 6.3rem);
  line-height: .98;
}

.tone-bash-os .slide-copy h4 {
  font-size: clamp(2.25rem, 4.4vw, 4.8rem);
  line-height: .98;
}

.tone-bash-os .gallery-head h3 {
  font-size: clamp(1.25rem, 1.65vw, 1.7rem);
  font-weight: 700;
  line-height: 1.1;
}

@media screen and (forced-colors: none) {
  @supports (background-clip: text) {
    #bash-os :is(h2, h3, h4) {
      background-image: linear-gradient(102deg, #ffafd0, #ffad96 52%, #ffe49e);
      background-clip: text;
      color: transparent;
    }

    #bash-os .chapter-copy h2 {
      background-image: linear-gradient(102deg, #ff91c5, #ffd299 85%, #ffe19b);
    }
  }
}
