:root {
  color-scheme: dark;
  --sky: #201937;
  --ink: #fff3ed;
  --moon: #ffd99c;
}
* { box-sizing: border-box; }
body {
  isolation: isolate;
  position: relative;
  min-height: 100svh;
  margin: 0;
  padding-bottom: 128px;
  background: var(--sky);
  color: var(--ink);
  font: 1rem/1.5 Geist, system-ui, sans-serif;
}
h1, h2, p, figure { margin: 0; }
.shell { width: min(100% - 64px, 1200px); margin-inline: auto; }
.masthead { display: flex; align-items: center; min-height: 96px; }
.wordmark { font: inherit; font-size: 2.25rem; line-height: 2.5rem; font-weight: 700; letter-spacing: -.075em; }
.wordmark span { color: var(--moon); }
.showcase { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-top: 48px; }
.work {
  min-width: 0;
  position: relative;
  border: 1px solid #f6d7ff38;
  border-radius: 24px;
  background: #211833;
  box-shadow: 0 16px 40px #0f091e66;
}
.work-link {
  display: grid;
  aspect-ratio: 6 / 7;
  position: relative;
  overflow: hidden;
  border-radius: inherit;
  color: #fff;
  text-decoration: none;
  touch-action: pan-y pinch-zoom;
  user-select: none;
}
.viewport, .track { position: absolute; inset: 0; }
.viewport { overflow: hidden; }
.track {
  display: flex;
  transform: translateX(calc(var(--slide, 0%) + var(--drag, 0px)));
  transition: transform 360ms cubic-bezier(.22, 1, .36, 1);
}
.track.dragging { transition: none; cursor: grabbing; }
.track figure { flex: 0 0 100%; min-width: 0; }
.track img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center var(--crop, 48%);
  -webkit-user-drag: none;
}
.persona figure:first-child { --crop: 34%; }
.persona figure:nth-child(2) { --crop: 22%; }
.persona figure:nth-child(3) { --crop: 11%; }
.farm figure:first-child { --crop: 72%; }
.farm figure:nth-child(2) { --crop: 64%; }
.farm figure:nth-child(3) { --crop: 72%; }
.jelly figure:first-child { --crop: 31%; }
.jelly figure:nth-child(3) { --crop: 61%; }
.work-link::after {
  content: '';
  position: absolute;
  inset: 38% 0 0;
  background: linear-gradient(180deg, transparent, #11082112 20%, #110821c9 65%, #110821 100%);
  pointer-events: none;
}
.work-copy {
  position: absolute;
  z-index: 1;
  inset: auto 24px 48px;
}
.work-copy h2 { font-size: 1.5rem; line-height: 2rem; font-weight: 700; letter-spacing: -.04em; }
.work-copy p { margin-top: 4px; font-size: .875rem; line-height: 1.25rem; color: #f3e7f3; word-break: keep-all; }
.work-link:hover h2 { text-decoration: underline; text-underline-offset: 4px; }
.controls { position: absolute; z-index: 2; inset: 0; pointer-events: none; }
.controls button {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
}
.controls .previous, .controls .next {
  position: absolute;
  top: 44%;
  translate: 0 -50%;
  background: #170f28db;
  box-shadow: inset 0 0 0 1px #ffffff30;
}
.previous { left: 8px; }
.next { right: 8px; }
.previous::before, .next::before {
  content: '';
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 2px 2px 0;
  rotate: -45deg;
  translate: -2px 0;
}
.previous::before { rotate: 135deg; translate: 2px 0; }
.controls button[aria-disabled="true"] { color: #ffffff70; cursor: default; }
.controls button:not([aria-disabled="true"]):hover { background-color: #372958; }
.controls button:active { scale: .95; }
.dots { position: absolute; inset: auto 0 0; display: flex; justify-content: center; }
.dots button { background: transparent; }
.dots button::before { content: ''; width: 8px; height: 8px; background: #ffffff7d; border-radius: 50%; }
.dots button[aria-current="true"]::before { width: 16px; border-radius: 8px; background: var(--moon); }
:focus-visible { outline: 2px solid var(--moon); outline-offset: 3px; }
.landscape {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, #ffcab9 0 2px, transparent 3px),
    radial-gradient(circle at 27% 10%, #ffe5bb 0 1px, transparent 2px),
    radial-gradient(circle at 48% 11%, #ac8bcb 0 2px, transparent 3px),
    radial-gradient(circle at 63% 5%, #ffedd1 0 1px, transparent 2px),
    radial-gradient(circle at 70% 13%, #ffdfb8 0 2px, transparent 3px),
    radial-gradient(circle at 93% 31%, #ffaebe 0 2px, transparent 3px),
    radial-gradient(ellipse at 80% 20%, #51315c 0, transparent 56%);
}
.moon {
  position: absolute;
  top: 24px;
  right: 12%;
  width: 96px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 70%, #d8896866 0 10%, transparent 11%),
              radial-gradient(circle at 70% 44%, #d8896870 0 6%, transparent 7%),
              radial-gradient(circle at 39% 21%, #d889684d 0 13%, transparent 14%),
              #ffd49a;
  box-shadow: inset -12px -12px #f0aa80, 0 0 48px #ffa88d58;
}
.ridge { position: absolute; bottom: -144px; width: 130%; height: 352px; border-radius: 50%; }
.ridge-far { right: -28%; rotate: -7deg; background: #382850; }
.ridge-near { left: -35%; bottom: -200px; rotate: 7deg; background: #292040; }
.mascot {
  position: absolute;
  bottom: 32px;
  width: 68px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 51%, #322244 0 2px, transparent 3px),
              radial-gradient(circle at 65% 51%, #322244 0 2px, transparent 3px), var(--mascot);
  box-shadow: inset -5px -6px #30133238, 0 8px 0 #170e2d3b;
}
.rabbit { left: 16%; --mascot: #f6cbad; rotate: -9deg; }
.rabbit::before, .rabbit::after {
  content: '';
  position: absolute;
  bottom: 86%;
  left: 13px;
  width: 15px;
  height: 32px;
  border: 4px solid #f6cbad;
  border-radius: 50%;
  background: #ec9eae;
  rotate: -10deg;
}
.rabbit::after { left: 36px; rotate: 13deg; }
.sprite { left: 48%; --mascot: #c4a5ed; rotate: 7deg; }
.sprite::before {
  content: '';
  position: absolute;
  bottom: 89%;
  left: 24px;
  width: 24px;
  height: 16px;
  background: #efb3d6;
  border-radius: 80% 0 80% 0;
  rotate: -17deg;
}
.jelly-piece { right: 16%; --mascot: #f3ae91; border-radius: 64% 59% 42% 45%; rotate: 10deg; }
.jelly-piece::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 13px;
  width: 18px;
  height: 7px;
  border-radius: 50%;
  background: #fff4de9c;
  rotate: -18deg;
}
@media (max-width: 860px) {
  .shell { width: min(100% - 32px, 540px); }
  .masthead { min-height: 72px; }
  .showcase { grid-template-columns: 1fr; padding-top: 24px; }
  .moon { top: 14px; right: 14%; width: 64px; }
  .work-copy { inset-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .track { transition: none; }
}
