@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("assets/fonts/dm-mono-300.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/dm-mono-400.woff2") format("woff2");
}

@font-face {
  font-family: "DM Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("assets/fonts/dm-mono-500.woff2") format("woff2");
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
}

:root {
  --world: 0.5;
  --day-ink: #10272a;
  --day-muted: #52696b;
  --night-ink: #f4f0e8;
  --night-muted: #b9b7bd;
  --aqua: #53c7c8;
  --violet: #8066ff;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: #0b0b11;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Manrope", system-ui, sans-serif;
  color: color-mix(in srgb, var(--day-ink) calc((1 - var(--world)) * 100%), var(--night-ink));
  background: #0b0b11;
}

a {
  color: inherit;
}

.world {
  --ecg-bottom: 13%;
  --ecg-height: 17%;
  --horizon-bottom: 19.5733%;
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #eaf4f4;
  touch-action: pan-y;
}

.world::after {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  content: "";
  border: 1px solid rgb(255 255 255 / 0.18);
}

.world__layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.world__layer--day {
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 27%, rgb(255 255 255 / 0.96), transparent 31%),
    linear-gradient(135deg, #f5f3e8 0%, #dceff0 57%, #bcdfe1 100%);
  opacity: 1;
}

.world__layer--night {
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 76% 36%, rgb(91 68 174 / 0.36), transparent 29%),
    linear-gradient(145deg, #191725 0%, #0d0d14 56%, #050508 100%);
  opacity: 1;
  clip-path: inset(0 0 0 calc((1 - var(--world)) * 100%));
}

.world__layer--night::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  background:
    linear-gradient(rgb(68 70 76 / 0.3), rgb(68 70 76 / 0.3)),
    linear-gradient(90deg, rgb(7 7 12 / 0.96) 0%, rgb(7 7 12 / 0.52) 28%, transparent 63%),
    linear-gradient(180deg, rgb(5 5 8 / 0.12), rgb(5 5 8 / 0.28));
}

.day-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(25 84 89 / 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgb(25 84 89 / 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to right, #000, transparent 73%);
}

.patient-line {
  position: absolute;
  bottom: var(--ecg-bottom);
  left: 0;
  width: 100%;
  height: var(--ecg-height);
  fill: none;
  stroke: rgb(35 127 132 / 0.16);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.scan {
  position: absolute;
  border: 1px solid rgb(24 121 128 / 0.12);
  border-radius: 50%;
}

.scan::before,
.scan::after {
  position: absolute;
  inset: 15%;
  content: "";
  border: inherit;
  border-radius: inherit;
}

.scan::after {
  inset: 31%;
}

.scan--one {
  top: 8%;
  left: 10%;
  width: 27vw;
  aspect-ratio: 1;
}

.scan--two {
  right: 35%;
  bottom: -15%;
  width: 22vw;
  aspect-ratio: 1;
}

.dance-film,
.dance-poster {
  position: absolute;
  top: 0;
  right: 0;
  width: 80vw;
  height: 100%;
  opacity: 0.82;
  filter: grayscale(0.32) saturate(0.62) contrast(1.02);
  transform: translateX(calc((0.5 - var(--world)) * 3%)) scale(1.015);
  transition: opacity 240ms ease, transform 700ms var(--ease);
}

.dance-film {
  z-index: 0;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.dance-poster {
  z-index: 1;
}

.dance-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.world.dance-film-is-playing .dance-poster {
  opacity: 0;
}

.dance-film::-webkit-media-controls,
.dance-film::-webkit-media-controls-start-playback-button {
  display: none !important;
  appearance: none;
}

.masthead {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1.6rem clamp(1.25rem, 4vw, 4rem);
}

.identity {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  border-radius: 999px;
  color: #f7f3ea;
  background: rgb(9 14 17 / 0.76);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.08);
  text-decoration: none;
  backdrop-filter: blur(12px);
}

.identity__mark {
  display: grid;
  width: 2rem;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
}

.status {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin: 0;
  font-family: "DM Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  color: #f7f3ea;
  background: rgb(9 14 17 / 0.48);
  backdrop-filter: blur(12px);
}

.status span {
  width: 0.45rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--aqua);
  box-shadow: 0 0 0.7rem var(--aqua);
}

.hero {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  padding: clamp(6rem, 11vh, 8.5rem) clamp(1.25rem, 4vw, 4rem) clamp(2rem, 5vh, 4rem);
}

.hero__intro {
  position: relative;
  z-index: 3;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  color: #f7f3ea;
  mix-blend-mode: difference;
}

.eyebrow,
.swipe-note {
  font-family: "DM Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 1.1rem;
  opacity: 0.68;
}

h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6.6vw, 6.8rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

h1 em {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.hero__copy {
  max-width: none;
  margin: 1.35rem auto 0;
  color: color-mix(in srgb, currentColor 74%, transparent);
  font-size: clamp(0.85rem, 1.25vw, 1.05rem);
  line-height: 1.6;
  white-space: nowrap;
}

.orbit-control {
  position: absolute;
  z-index: 2;
  bottom: var(--horizon-bottom);
  left: 50%;
  width: min(70vw, 760px);
  cursor: grab;
  outline: none;
  transform: translateX(-50%);
  user-select: none;
}

.orbit-control:active {
  cursor: grabbing;
}

.orbit-control:focus-visible {
  outline: none;
}

.orbit-control:focus-visible .orbit__line {
  stroke: var(--aqua);
  stroke-width: 2px;
}

.orbit {
  display: block;
  width: 100%;
  overflow: hidden;
}

.orbit__line,
.orbit__shadow {
  fill: none;
  vector-effect: non-scaling-stroke;
}

.orbit__shadow {
  stroke: rgb(0 0 0 / 0.2);
  stroke-width: 5px;
  filter: blur(6px);
}

.orbit__line {
  stroke: rgb(255 255 255 / 0.68);
  stroke-width: 1.25px;
  stroke-dasharray: 3 8;
  stroke-linecap: round;
  mix-blend-mode: difference;
}

.edge-hint {
  position: absolute;
  z-index: 7;
  top: 50%;
  display: flex;
  width: 2.8rem;
  min-height: 8.4rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.2);
  align-items: center;
  justify-content: space-between;
  font: inherit;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease, transform 520ms var(--ease);
}

.edge-hint--day {
  left: 0;
  border-left: 0;
  border-radius: 0 1.4rem 1.4rem 0;
  color: var(--day-ink);
  background: rgb(239 246 242 / 0.9);
  box-shadow: 10px 0 28px rgb(0 0 0 / 0.1);
  transform: translate(-110%, -50%);
}

.edge-hint--night {
  right: 0;
  border-right: 0;
  border-radius: 1.4rem 0 0 1.4rem;
  color: var(--night-ink);
  background: rgb(15 14 23 / 0.9);
  box-shadow: -10px 0 28px rgb(0 0 0 / 0.18);
  transform: translate(110%, -50%);
}

.world[data-world="day"] .edge-hint--night,
.world[data-world="night"] .edge-hint--day {
  opacity: 1;
  pointer-events: auto;
  transform: translate(0, -50%);
}

.edge-hint__body {
  font-size: 1rem;
}

.edge-hint__label {
  font-family: "DM Mono", monospace;
  font-size: 0.55rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

.edge-hint--day .edge-hint__label {
  transform: rotate(180deg);
}

.edge-hint:hover {
  width: 3.15rem;
}

.edge-hint:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: -4px;
}

.celestial {
  pointer-events: none;
  transition: opacity 600ms var(--ease);
}

.sun__glow {
  fill: #fff2aa;
  opacity: 0.26;
  filter: blur(12px);
}

.sun__core {
  fill: #fff7cf;
  stroke: rgb(142 107 24 / 0.28);
  stroke-width: 1px;
  filter: drop-shadow(0 0 10px rgb(255 227 107 / 0.72));
}

.moon__glow {
  fill: #cdc5ff;
  opacity: 0.23;
  filter: blur(11px);
}

.moon__body {
  fill: #f3f0ff;
  filter: drop-shadow(0 0 9px rgb(184 172 255 / 0.56));
}

.drag-hint {
  position: absolute;
  top: 32%;
  left: 50%;
  display: none;
  gap: 0.35rem;
  justify-items: center;
  padding: 0.55rem 0.75rem 0.5rem;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 999px;
  color: #f7f3ea;
  background: rgb(9 14 17 / 0.68);
  box-shadow: 0 8px 28px rgb(0 0 0 / 0.16);
  font-family: "DM Mono", monospace;
  font-size: 0.58rem;
  letter-spacing: 0.11em;
  line-height: 1;
  opacity: 0.86;
  white-space: nowrap;
  text-transform: uppercase;
  transform: translateX(-50%);
  transition: opacity 300ms ease;
  backdrop-filter: blur(10px);
}

.drag-hint svg {
  width: 3.6rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
}

.drag-hint__copy--touch {
  display: none;
}

.world.has-interacted .drag-hint {
  opacity: 0;
}

@media (hover: none) and (pointer: coarse) {
  .drag-hint {
    display: grid;
  }

  .drag-hint__copy--pointer {
    display: none;
  }

  .drag-hint__copy--touch {
    display: inline;
  }
}

.roles {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 12vw, 12rem);
  align-items: end;
}

.role {
  width: 100%;
  max-width: 23rem;
}

.role--day {
  color: var(--day-ink);
}

.role--night {
  color: var(--night-ink);
}

.role--night {
  justify-self: end;
  text-align: right;
}

.role h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.035em;
}

.role a {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  padding-bottom: 0.28rem;
  border-bottom: 1px solid currentColor;
  font-family: "DM Mono", monospace;
  font-size: 0.67rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
  transition: gap 250ms ease, opacity 250ms ease;
}

.role a:hover,
.role a:focus-visible {
  gap: 0.85rem;
  opacity: 0.62;
}

.role--day {
  opacity: calc(1 - (var(--world) * 0.62));
  transform: translateX(calc(var(--world) * -0.7rem));
}

.role--night {
  opacity: calc(0.38 + (var(--world) * 0.62));
  transform: translateX(calc((1 - var(--world)) * 0.7rem));
}

.role--day,
.role--night {
  transition: opacity 160ms linear, transform 500ms var(--ease);
}

.swipe-note {
  position: absolute;
  z-index: 4;
  right: clamp(1.25rem, 4vw, 4rem);
  bottom: 1.1rem;
  margin: 0;
  opacity: 0.4;
  color: #f7f3ea;
  mix-blend-mode: difference;
}

noscript {
  position: fixed;
  z-index: 20;
  right: 1rem;
  bottom: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  color: #111;
  font: 0.8rem system-ui, sans-serif;
}

@media (max-width: 700px) {
  .world__layer--night::after {
    background:
      linear-gradient(rgb(68 70 76 / 0.3), rgb(68 70 76 / 0.3)),
      linear-gradient(90deg, rgb(7 7 12 / 0.48), transparent 70%),
      linear-gradient(180deg, rgb(5 5 8 / 0.2), rgb(5 5 8 / 0.34));
  }

  .dance-film,
  .dance-poster {
    width: 100%;
  }

  .dance-film,
  .dance-poster img {
    object-position: center;
  }

  .masthead {
    padding: 1.1rem 1.15rem;
  }

  .status {
    display: none;
  }

  .hero {
    min-height: 100svh;
    padding: 5.2rem 1.15rem 1.5rem;
    grid-template-rows: auto minmax(12rem, 1fr) auto;
  }

  .hero__intro {
    text-align: left;
  }

  .eyebrow {
    margin-bottom: 0.75rem;
  }

  h1 {
    font-size: clamp(2.25rem, 10.5vw, 3.8rem);
  }

  .hero__copy {
    max-width: 19rem;
    margin: 0.9rem 0 0;
    white-space: normal;
  }

  .orbit-control {
    width: 110vw;
  }

  .drag-hint {
    top: 24%;
    padding: 0.65rem 0.9rem 0.58rem;
    font-size: 0.62rem;
    opacity: 0.94;
  }

  .roles {
    gap: 1.2rem;
  }

  .role a {
    max-width: 100%;
    line-height: 1.45;
  }

  .role--night a {
    justify-content: flex-end;
    text-align: right;
  }

  .swipe-note {
    display: none;
  }

  .scan--one {
    width: 60vw;
  }

  .edge-hint {
    width: 2.45rem;
    min-height: 7.25rem;
    padding: 0.6rem 0.4rem;
  }

  .edge-hint:hover {
    width: 2.45rem;
  }
}

@media (max-height: 760px) and (min-width: 701px) {
  .hero {
    padding-top: 5.5rem;
    padding-bottom: 1.5rem;
  }

  .orbit-control {
    width: min(58vw, 620px);
  }

  .swipe-note {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
