:root {
  color-scheme: dark;
  --bg: #05070d;
  --text: #f6fbff;
  --muted: rgba(246, 251, 255, 0.62);
  --faint: rgba(246, 251, 255, 0.34);
  --line: rgba(210, 236, 255, 0.18);
  --accent: #8fd3ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
a {
  font: inherit;
}

.shell {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  user-select: none;
  isolation: isolate;
}

.background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(rgba(5, 7, 13, 0.58), rgba(5, 7, 13, 0.72)),
    url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?q=80&w=2000&auto=format&fit=crop") center / cover;
  filter: grayscale(0.45);
  opacity: 0.42;
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 52%, rgba(143, 211, 255, 0.14), transparent 26%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent 35%, rgba(255, 255, 255, 0.03));
}

.intro {
  position: absolute;
  z-index: 4;
  top: clamp(28px, 7vh, 72px);
  left: clamp(20px, 6vw, 84px);
  max-width: min(520px, calc(100vw - 40px));
  pointer-events: none;
  transition: opacity 500ms ease, transform 500ms ease;
}

.intro.is-hidden {
  opacity: 0;
  transform: translateY(-12px);
}

.eyebrow,
.destination__index,
.fragment-count,
.topline,
.archive-grid p {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.72rem;
  color: var(--faint);
}

.intro h1,
.destination h1,
.archive h1 {
  margin: 12px 0;
  letter-spacing: 0;
  line-height: 0.92;
}

.intro h1 {
  font-size: clamp(3.2rem, 9vw, 8rem);
}

.intro p:not(.eyebrow) {
  margin: 0;
  max-width: 440px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.55;
}

.glass-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  transform: scale(2.2);
  animation: spin-ccw 180s linear infinite;
  transition: opacity 1000ms ease;
}

.glass-layer.is-paused {
  animation-play-state: paused;
}

.glass-layer.is-gone {
  opacity: 0;
  pointer-events: none;
}

@keyframes spin-ccw {
  from {
    transform: scale(2.2) rotate(0deg);
  }
  to {
    transform: scale(2.2) rotate(-360deg);
  }
}

svg {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 22px 45px rgba(0, 0, 0, 0.62));
}

.shard {
  cursor: pointer;
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 500ms ease, filter 300ms ease;
}

.shard polygon {
  transition: stroke 220ms ease, stroke-width 220ms ease;
}

.shard:hover {
  filter: brightness(1.28) saturate(1.2);
}

.shard:hover polygon {
  stroke: rgba(255, 255, 255, 0.86);
  stroke-width: 0.2;
}

.shard.is-depressing {
  transform: scale(0.95);
  filter: brightness(0.5);
  opacity: 0.9;
}

.shard.is-zooming {
  transform: scale(150);
  filter: brightness(2) contrast(1.18);
  transition: transform 1800ms cubic-bezier(0.7, 0, 0.2, 1), filter 1000ms ease;
}

.shard.is-fading {
  opacity: 0;
  transform: scale(0.5);
}

.destination {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  opacity: 0;
  transform: scale(0.96);
  filter: blur(22px);
  pointer-events: none;
  transition: opacity 1000ms ease, transform 1000ms ease, filter 1000ms ease;
}

.destination.is-visible {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
  pointer-events: auto;
}

.destination__glow {
  position: absolute;
  width: min(680px, 90vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(143, 211, 255, 0.08);
  filter: blur(78px);
  pointer-events: none;
}

.destination > *:not(.destination__glow) {
  position: relative;
}

.destination h1 {
  max-width: min(920px, 92vw);
  font-size: clamp(3.6rem, 10vw, 8.5rem);
}

.destination__index {
  display: inline-block;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.destination__excerpt {
  margin: 0;
  max-width: 720px;
  color: rgba(246, 251, 255, 0.72);
  font-size: clamp(1.1rem, 2.6vw, 1.65rem);
  line-height: 1.55;
}

.return-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin-top: 54px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
}

.return-button:hover {
  background: rgba(143, 211, 255, 0.12);
}

.return-button span:first-child {
  font-size: 1.15rem;
  transition: transform 180ms ease;
}

.return-button:hover span:first-child {
  transform: translateX(-3px);
}

.fragment-count {
  position: absolute;
  z-index: 5;
  left: 20px;
  right: 20px;
  bottom: 28px;
  text-align: center;
  color: rgba(246, 251, 255, 0.28);
  animation: pulse 2.4s ease-in-out infinite;
  transition: opacity 500ms ease;
}

.fragment-count.is-hidden {
  opacity: 0;
}

@keyframes pulse {
  50% {
    opacity: 0.48;
  }
}

.archive-page {
  min-height: 100vh;
  background:
    linear-gradient(rgba(5, 7, 13, 0.84), rgba(5, 7, 13, 0.92)),
    url("https://images.unsplash.com/photo-1462331940025-496dfbfc7564?q=80&w=2000&auto=format&fit=crop") center / cover fixed;
}

.archive {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 80px;
}

.topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: clamp(64px, 12vw, 136px);
}

.topline a {
  color: var(--muted);
  text-decoration: none;
}

.topline a:hover {
  color: var(--text);
}

.archive header {
  max-width: 760px;
}

.archive h1 {
  font-size: clamp(4rem, 13vw, 10rem);
}

.archive header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.3rem);
  line-height: 1.6;
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 56px;
  border: 1px solid var(--line);
  background: var(--line);
}

.archive-grid article {
  min-height: 220px;
  padding: 24px;
  background: rgba(5, 7, 13, 0.78);
}

.archive-grid h2 {
  margin: 28px 0 14px;
  font-size: 1.35rem;
}

.archive-grid span {
  color: var(--muted);
  line-height: 1.55;
}

@media (max-width: 760px) {
  .shell {
    min-height: 580px;
  }

  .intro {
    top: 24px;
  }

  .intro h1 {
    font-size: clamp(2.8rem, 16vw, 5rem);
  }

  .destination {
    padding: 24px 18px;
  }

  .destination h1 {
    font-size: clamp(3rem, 17vw, 5.4rem);
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }
}
