/* [far]away — prototype styles */

@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/vt323-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'VT323';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/vt323-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --fg: #fff;
  --dim: rgba(255, 255, 255, 0.55);
  --line: rgba(255, 255, 255, 0.75);
  --sans: 'Helvetica Neue', Helvetica, Arial, 'Liberation Sans', sans-serif;
  --term: 'VT323', ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --pad: clamp(14px, 1.6vw, 20px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #000;
  color: var(--fg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 15px/1.45 var(--sans);
  background: #000;
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.is-landing {
  overflow: hidden;
  height: 100svh;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

:focus-visible {
  outline: 1px dashed #fff;
  outline-offset: 4px;
}

.term {
  font-family: var(--term);
  font-weight: 400;
  letter-spacing: 0.01em;
}

.dim {
  color: var(--dim);
}

/* read by screen readers, not shown */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Lenis smooth scrolling */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

/* letter-by-letter reveals */
.word,
.char {
  display: inline-block;
}

.word {
  white-space: nowrap;
}

/* masked: letters rise out of their own line */
.split--mask .word {
  overflow: hidden;
  margin-bottom: -0.14em;
  padding: 0 0.04em 0.14em;
  vertical-align: top;
}

.cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.85em;
  margin-left: 0.12em;
  vertical-align: -0.06em;
  background: currentColor;
  animation: blink 1.05s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

/* ------------------------------------------------------------ landing */

.landing {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #000;
}

.landing[hidden] {
  display: none;
}

.landing__code {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.landing__center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  padding: 0 20px;
  text-align: center;
}

.seek {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.12em 0.42em 0.08em;
  border: 1px solid #fff;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: clamp(44px, 7.5vw, 104px);
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  transition: background 0.15s, color 0.15s;
}

@media (hover: hover) {
  .seek:hover {
    background: #fff;
    color: #000;
    text-shadow: none;
  }

  .seek:hover .seek__label {
    animation: glitch 2.4s steps(1) infinite;
  }
}

@keyframes glitch {
  0%, 88%, 100% {
    transform: none;
    text-shadow: none;
  }
  90% {
    transform: translateX(-2px);
    text-shadow: 2px 0 rgba(0, 0, 0, 0.35);
  }
  93% {
    transform: translateX(2px) skewX(-6deg);
  }
  96% {
    transform: translateX(-1px);
    text-shadow: -2px 0 rgba(0, 0, 0, 0.35);
  }
}

.is-seeking .seek {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  cursor: default;
}

.boot {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  width: min(62ch, 92vw);
  transform: translateX(-50%);
  font-size: clamp(19px, 2vw, 27px);
  line-height: 1.3;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.45);
}

.boot__line {
  margin: 0 0 0.4em;
}

.boot .err {
  padding: 0 0.2em;
  background: #fff;
  color: #000;
  text-shadow: none;
  animation: blink 0.5s steps(1) 4;
}

.boot .hit {
  border-bottom: 1px solid #fff;
}

.landing__note {
  position: absolute;
  bottom: calc(100% + 16px);
  left: 50%;
  margin: 0;
  font-size: 18px;
  white-space: nowrap;
  transform: translateX(-50%);
}

.legal-links a {
  color: inherit;
  text-decoration: none;
}

.legal-links a:hover,
.legal-links a:focus-visible {
  text-decoration: underline;
}

.landing__corner {
  position: absolute;
  z-index: 2;
  margin: 0;
  padding: 2px 4px;
  background: #000;
  box-shadow: 0 0 16px 10px #000;
  font-size: 19px;
  line-height: 1;
}

.landing__corner--tl {
  top: calc(var(--pad) - 2px);
  left: calc(var(--pad) - 4px);
}

.landing__corner--tr {
  top: var(--pad);
  right: var(--pad);
}

.landing__corner--bl {
  bottom: var(--pad);
  left: var(--pad);
}

.landing__corner--br {
  bottom: var(--pad);
  right: var(--pad);
}

.landing__flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}

/* CRT: scanlines + vignette + a faint flicker */
.crt::before,
.crt::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.crt::before {
  background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
  animation: flicker 5s infinite;
}

.crt::after {
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
}

@keyframes flicker {
  0%,
  46%,
  100% {
    opacity: 0.9;
  }
  47% {
    opacity: 0.5;
  }
  48% {
    opacity: 1;
  }
}

/* ------------------------------------------------- site chrome */

.lang-switch {
  display: flex;
  gap: 0.8em;
}

.lang-switch button[aria-pressed='true'] {
  text-decoration: line-through;
}

.lang-switch button:hover {
  text-decoration: underline;
}

.cloud {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  height: 100lvh;
  pointer-events: none;
  transition: filter 1.1s ease, opacity 1.1s ease;
}

.cloud-blur .cloud {
  filter: blur(4px);
  opacity: 0.6;
}

.masthead-title {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 30;
  padding-bottom: 0.06em;
  color: #fff;
  font-size: clamp(64px, 15.5vw, 250px);
  line-height: 0.82;
  letter-spacing: -0.045em;
  text-decoration: none;
  white-space: nowrap;
  transform-origin: 0 0;
  will-change: transform;
}

.masthead-byline {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 0 20px;
  font-size: clamp(14px, 1.5vw, 20px);
  text-align: center;
  text-shadow: 0 0 12px #000, 0 0 4px #000;
  pointer-events: none;
  will-change: transform, opacity;
}

.topnav {
  position: fixed;
  top: var(--pad);
  right: var(--pad);
  z-index: 30;
  display: flex;
  align-items: baseline;
  gap: 22px;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.onair::before {
  content: '● ';
}

.onair {
  font-size: 18px;
  text-transform: none;
  animation: blink 2.4s steps(1) infinite;
}

/* a shade behind the docked title and nav */
body.is-site::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  z-index: 25;
  height: 64px;
  background: linear-gradient(#000 20%, transparent);
  pointer-events: none;
}

.proto {
  position: fixed;
  bottom: var(--pad);
  left: var(--pad);
  z-index: 30;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 17px;
}

.proto button {
  padding: 0 0.25em;
}

.proto button[aria-pressed='true'] {
  background: #fff;
  color: #000;
}

.site-legal {
  position: fixed;
  right: var(--pad);
  bottom: var(--pad);
  z-index: 30;
  margin: 0;
  padding: 2px 6px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--dim);
  font-size: 17px;
}

.is-landing .masthead-title,
.is-landing .masthead-byline,
.is-landing .topnav,
.is-landing .site,
.is-landing .proto,
.is-landing .site-legal {
  visibility: hidden;
}


/* a CRT refresh line that passes when you cross into another zone */
.sweep {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: 22vh;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.05) 70%, rgba(255, 255, 255, 0.35) 98%, #fff);
  opacity: 0;
  pointer-events: none;
}

/* ------------------------------------------------------------- site */

.site {
  position: relative;
  z-index: 2;
  /* cards slide in from beyond the edges; never let that widen the page */
  overflow-x: clip;
}

.intro {
  position: relative;
  height: 135vh;
}

.intro__scroll {
  position: absolute;
  top: calc(100svh - 52px);
  left: 0;
  right: 0;
  margin: 0;
  font-size: 21px;
  text-align: center;
  text-shadow: 0 0 12px #000, 0 0 4px #000;
  animation: bob 2.6s ease-in-out infinite;
}

@keyframes bob {
  50% {
    transform: translateY(6px);
    opacity: 0.6;
  }
}

/* zone thresholds */

.zone__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 10vh var(--pad);
  text-align: center;
  text-shadow: 0 0 18px #000, 0 0 6px #000, 0 0 2px #000;
}

.zone__head > * {
  margin: 0;
}

.zone__cmd {
  min-height: 1.2em;
  color: var(--dim);
  font-size: 22px;
}

.zone__idx {
  font-size: 22px;
}

.zone__title {
  font-size: clamp(56px, 11vw, 170px);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.zone__concept {
  max-width: 30ch;
  margin-top: 14px !important;
  font-size: clamp(16px, 1.6vw, 21px);
}

/* traces: photo + transcription cards on a 12-column grid */

.zone__traces {
  padding: 0 var(--pad) 16vh;
}

.trace {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--pad);
  align-items: start;
  margin-bottom: 26vh;
}

.trace--a .trace__media {
  grid-area: 1 / 1 / 2 / span 7;
}
.trace--a .trace__text {
  grid-area: 1 / 8 / 2 / span 5;
  margin-top: 24vh;
}

.trace--b .trace__media {
  grid-area: 1 / 6 / 2 / span 7;
}
.trace--b .trace__text {
  grid-area: 1 / 1 / 2 / span 5;
  margin-top: 30vh;
}

.trace--c .trace__media {
  grid-area: 1 / 2 / 2 / span 8;
}
.trace--c .trace__text {
  grid-area: 2 / 7 / 3 / span 6;
  z-index: 1;
  margin-top: -14vh;
}

.trace--tl .trace__text {
  grid-column: 2 / span 6;
}
.trace--tr .trace__text {
  grid-column: 6 / span 6;
}

.trace__media {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
}

.trace__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  /* a trace starts as a negative and develops when you reach it */
  filter: invert(1) grayscale(1) contrast(1.15) brightness(0.9);
  transition: filter 1.8s ease;
}

.trace.is-active .trace__media img {
  filter: none;
}

.label {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-transform: uppercase;
}

.label__title {
  margin: 0;
  font-weight: 400;
  padding: 3px 5px 2px;
  border: 1px solid #fff;
  background: #000;
  font-size: clamp(15px, 1.4vw, 20px);
  line-height: 1.1;
}

.label__meta {
  display: flex;
  align-items: center;
  padding: 3px 5px;
  border: 1px solid #fff;
  border-top: 0;
  background: #000;
  font-size: 12.5px;
  line-height: 1.4;
  white-space: pre;
}

.trace.is-heard .label__meta::after {
  content: ' ✓';
}

.label__eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  width: 0;
  height: 10px;
  overflow: hidden;
  transition: width 0.3s, margin 0.3s;
}

.label__eq i {
  width: 2px;
  height: 30%;
  background: #fff;
}

.is-playing .label__eq {
  width: 14px;
  margin-left: 8px;
}

.is-playing .label__eq i {
  animation: eq 0.8s ease-in-out infinite alternate;
}

.is-playing .label__eq i:nth-child(2) {
  animation-duration: 0.55s;
}

.is-playing .label__eq i:nth-child(3) {
  animation-duration: 0.95s;
}

.is-playing .label__eq i:nth-child(4) {
  animation-duration: 0.65s;
}

@keyframes eq {
  from {
    height: 15%;
  }
  to {
    height: 100%;
  }
}

.panel {
  position: relative;
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: border-color 0.8s, background 0.8s;
}

.trace.is-active .panel {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.9);
}

/* text-only traces carry their label on the panel's corner */
.panel > .label {
  top: -1px;
  left: -1px;
}

.panel:has(> .label) {
  padding-top: 84px;
}

.panel__q {
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.panel__body {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.9s ease;
}

.trace.is-active .panel__body {
  color: #fff;
}

.panel__body p {
  max-width: 48ch;
  margin: 0 0 0.9em;
  font-size: clamp(15px, 1.15vw, 17px);
  line-height: 1.55;
}

.panel__speaker,
.panel__lang {
  margin: 0;
  color: var(--dim);
  font-size: 12px;
  text-transform: uppercase;
}

.panel__speaker {
  margin: 18px 0 4px;
}

.panel__lang button {
  color: #fff;
  text-decoration: underline;
  text-transform: uppercase;
}

/* ------------------------------------------------------------ credits */

.credits {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 12vh var(--pad);
  text-align: center;
  text-shadow: 0 0 18px #000, 0 0 6px #000;
}

.credits p {
  margin: 0;
}

.credits__end {
  margin-bottom: 3vh !important;
  color: var(--dim);
  font-size: 22px;
}

.credits__title {
  margin-bottom: 2vh !important;
  font-size: clamp(56px, 11vw, 170px);
  line-height: 0.9;
  letter-spacing: -0.045em;
}

.credits__by,
.credits__lines {
  font-size: clamp(15px, 1.5vw, 20px);
}

.credits__legal {
  margin-top: 3vh !important;
  color: var(--dim);
  font-size: 19px;
}

.credits__legal a {
  color: inherit;
}

.credits__again {
  margin-top: 6vh;
  padding: 0.12em 0.5em;
  border: 1px solid #fff;
  font-size: 24px;
}

@media (hover: hover) {
  .credits__again:hover {
    background: #fff;
    color: #000;
  }
}

/* ---------------------------------------------------------- legal page */

.legal-page {
  font-size: 16px;
}

.legal-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: var(--pad);
  background: linear-gradient(#000 70%, transparent);
  font-size: 14px;
  text-transform: uppercase;
}

.legal-back {
  color: #fff;
  font-size: 22px;
  text-decoration: none;
  text-transform: none;
}

.legal-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  max-width: 760px;
  margin: 4vh auto 0;
  padding: 0 var(--pad);
  font-size: 20px;
}

.legal-toc a {
  color: var(--dim);
}

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 2vh var(--pad) 16vh;
}

.legal section {
  padding-top: 7vh;
}

.legal h2 {
  margin: 0 0 3vh;
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.legal h3 {
  margin: 2.2em 0 0.4em;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.legal p,
.legal li {
  margin: 0 0 0.8em;
  line-height: 1.6;
}

.legal a {
  color: #fff;
}

.legal .lines {
  white-space: pre-line;
}

.legal mark.missing {
  padding: 0 0.3em;
  background: #fff;
  color: #000;
}

/* ------------------------------------------------------------- small */

@media (max-width: 820px) {
  .trace {
    display: block;
    margin-bottom: 20vh;
  }

  .trace__media {
    margin-right: 8vw;
  }

  .trace--b .trace__media {
    margin: 0 0 0 8vw;
  }

  .trace__text {
    margin: -40px 0 0 8vw !important;
  }

  .trace--b .trace__text {
    margin: -40px 8vw 0 0 !important;
  }

  /* full-screen blur on a live canvas is too heavy for phones: dim instead */
  .cloud-blur .cloud {
    filter: none;
    opacity: 0.35;
  }

  .panel {
    padding: 18px 16px 16px;
    background: rgba(0, 0, 0, 0.88);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .panel:has(> .label) {
    padding-top: 76px;
  }

  .proto__long {
    display: none;
  }

  /* bigger tap targets */
  .topnav button,
  .proto button,
  .landing__corner--tr button,
  .panel__lang button {
    min-height: 32px;
    padding: 6px 4px;
  }

  .topnav {
    top: 8px;
    align-items: center;
  }

  .topnav {
    gap: 14px;
    font-size: 12px;
  }

  .masthead-title {
    font-size: 21vw;
  }

  .intro__scroll {
    top: calc(100svh - 112px);
  }

  .landing__corner {
    font-size: 16px;
  }

  .landing__corner--tl .dim {
    display: none;
  }

  .proto,
  .site-legal {
    font-size: 15px;
  }

  .landing__note {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cursor,
  .onair,
  .crt::before,
  .intro__scroll,
  .boot .err {
    animation: none;
  }
}
