@font-face {
  font-family: Geist;
  src: url("assets/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: dark;
  font-family: Geist, system-ui, sans-serif;
  background: #080610;
  color: #ede1ff;
}
* { box-sizing: border-box; }
body {
  min-height: 100svh;
  margin: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 5vw, 3rem);
  background: radial-gradient(ellipse at 50% 43%, #170d27, transparent 65%);
}
.teaser {
  display: grid;
  justify-items: center;
  width: min(100%, 56rem, 104svh);
  padding-block: .5rem 1.5rem;
}
.teaser img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  mask-image:
    linear-gradient(to bottom, transparent, #000 7%, #000 95%, transparent),
    linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-composite: intersect;
}
h1 {
  margin: clamp(1rem, 4vw, 2.4rem) 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 490;
  letter-spacing: .16em;
}

.brain-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
}
.brain-stage.interactive { cursor: grab; touch-action: none; }
.brain-stage.interactive:active { cursor: grabbing; }
.brain-stage img { user-select: none; pointer-events: none; }
.brain-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.brain-stage.show-model canvas { opacity: 1; }
.brain-stage.show-model img { opacity: 0; }
.brain-controls:not([hidden]) {
  display: flex;
  align-items: center;
  gap: .18rem;
  margin-top: .45rem;
  padding: .19rem .26rem;
  border: 1px solid #7b60a466;
  border-radius: 999px;
  background: #1e1429b3;
}
.brain-controls button,
.model-credit summary {
  display: grid;
  place-items: center;
  min-width: 2.25rem;
  min-height: 2.15rem;
  padding: .1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #eadaff;
  font: 500 1.13rem/1 Geist, system-ui, sans-serif;
  cursor: pointer;
}
.brain-controls button:disabled { cursor: default; opacity: .45; }
.brain-controls button:not(:disabled):hover,
.model-credit summary:hover { background: #4a3268; }
.brain-controls button:focus-visible,
.model-credit summary:focus-visible,
.brain-stage:focus-visible {
  outline: 2px solid #cdaaff;
  outline-offset: 3px;
}
.model-credit summary { list-style: none; opacity: .75; }
.model-credit summary::-webkit-details-marker { display: none; }
.model-credit p {
  position: absolute;
  z-index: 1;
  left: 50%;
  width: min(27rem, calc(100% - 2rem));
  margin: .5rem 0 0;
  padding: .8rem 1rem;
  transform: translateX(-50%);
  border: 1px solid #6d558b;
  border-radius: .65rem;
  background: #1e1429;
  font-size: .82rem;
  line-height: 1.5;
}
.model-credit a { color: #dfc5ff; }
.screen-reader {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.brain-points:not([hidden]) {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.brain-points button {
  position: absolute;
  transform: translate(-50%, -50%);
  min-height: 2.1rem;
  padding: .25rem .55rem;
  border: 1px solid #c5a6ff80;
  border-radius: 999px;
  background: #110b21db;
  color: #f0e3ff;
  font: 540 clamp(.72rem, 1.6vw, .85rem)/1.1 Geist, system-ui, sans-serif;
  white-space: nowrap;
  pointer-events: auto;
  cursor: pointer;
}
.brain-points button::before {
  content: '';
  display: inline-block;
  width: .34rem;
  height: .34rem;
  margin-right: .34rem;
  vertical-align: .11em;
  border-radius: 50%;
  background: #d0a7ff;
}
.brain-points button:hover { background: #392255; }
.brain-points button:focus-visible,
.brain-topic button:focus-visible {
  outline: 2px solid #d6b4ff;
  outline-offset: 3px;
}
.brain-points [data-topic="motivation"] { left: 31%; top: 47%; }
.brain-points [data-topic="learning"] { left: 59%; top: 30%; }
.brain-points [data-topic="attention"] { left: 65%; top: 61%; }
.brain-topic {
  width: min(25rem, calc(100% - 2rem));
  padding: 1.55rem;
  border: 1px solid #a986d1;
  border-radius: 1rem;
  background: #161020;
  color: #f0e3ff;
  box-shadow: 0 1rem 3rem #0008;
}
.brain-topic::backdrop { background: #0806109e; }
.brain-topic h2 { margin: 0; font-size: clamp(1.55rem, 6vw, 2rem); font-weight: 550; }
.brain-topic p { margin: .65rem 0 1.2rem; color: #e3d6ee; line-height: 1.55; }
.brain-topic button {
  min-height: 2.35rem;
  padding: .35rem .85rem;
  border: 1px solid #9171b2;
  border-radius: 999px;
  background: #2a1a3d;
  color: #f0e3ff;
  font: inherit;
  cursor: pointer;
}
