@font-face {
  font-family: Manrope;
  src: url('/assets/manrope-latin.ttf') format('truetype');
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: Manrope, Arial, sans-serif;
  font-synthesis: none;
  --ink: #0b0d0c;
  --paper: #e9eae1;
  --quiet: #9b9f94;
  --acid: #d8f58a;
  --gutter: clamp(24px, 4vw, 76px);
  background: var(--ink);
  color: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
body, button, a { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { font: inherit; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--acid); outline-offset: 7px; }
::selection { color: var(--ink); background: var(--acid); }
[hidden] { display: none !important; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 16px;
  left: 16px;
  padding: 14px 20px;
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-160%);
}
.skip-link:focus { transform: none; }
.experience { height: 190svh; }
.viewport {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;
}
.artwork { position: absolute; inset: 0; z-index: -1; }
.artwork::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 54% 53%, #19201566, transparent 62%);
}
canvas { position: absolute; display: block; width: 100%; height: 100%; }
.life-fallback { position: absolute; width: 100%; height: 100%; object-fit: contain; }
.webgl-ready .life-fallback { visibility: hidden; }

.header {
  position: absolute;
  inset: clamp(28px, 4vw, 66px) var(--gutter) auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 30px;
  pointer-events: none;
}
h1 {
  margin: 0;
  font-size: clamp(3.5rem, 7.8vw, 8.5rem);
  font-weight: 600;
  line-height: .91;
  letter-spacing: -.075em;
}
.period { color: var(--acid); }
nav {
  pointer-events: auto;
  display: grid;
  gap: 4px;
  min-width: 245px;
  padding-top: 4px;
}
nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  font-size: 1rem;
  letter-spacing: -.025em;
}
nav a:hover, nav a.is-active { color: var(--acid); }
.arrow { display: inline-block; font-size: 1.2rem; transition: transform 180ms ease; }
nav a:hover .arrow { transform: translate(2px, -2px); }

.coordinates {
  position: absolute;
  left: var(--gutter);
  top: 53%;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--quiet);
  font-family: Consolas, 'Courier New', monospace;
  font-size: .75rem;
  letter-spacing: .07em;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.live-dot { width: 5px; height: 5px; background: var(--acid); border-radius: 50%; }
.is-paused .live-dot { background: var(--quiet); }
.coordinate-divider { color: #50564b; }
.bottom-bar {
  position: absolute;
  bottom: clamp(28px, 3.6vw, 60px);
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.instructions {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--quiet);
  font-size: .875rem;
}
.instruction-divider { color: #50564b; }
.touch-hint { display: none; }
.down-arrow { padding-left: 8px; color: var(--acid); }
.motion-toggle {
  display: flex;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 95px;
  min-height: 44px;
  border: 1px solid #33392f;
  border-radius: 24px;
  padding: 0 18px;
  color: var(--paper);
  background: #0b0d0ccc;
  font-size: .875rem;
  cursor: pointer;
}
.motion-toggle:hover { border-color: var(--acid); color: var(--acid); }
.motion-symbol { font-family: Arial, sans-serif; font-size: .9rem; }
.scroll-track {
  position: absolute;
  right: var(--gutter);
  top: 38%;
  height: 24%;
  width: 1px;
  background: #2e3528;
}
.scroll-track span {
  display: block;
  width: 1px;
  height: 20%;
  background: var(--acid);
  transform: translateY(0);
}

@media (pointer: coarse) {
  .pointer-hint { display: none; }
  .touch-hint { display: inline; }
}
@media (max-width: 700px) {
  .header { gap: 18px; }
  h1 { font-size: clamp(3.2rem, 11vw, 4.8rem); }
  nav { min-width: 0; padding-top: 0; }
  nav a { font-size: .875rem; gap: 16px; }
  .coordinates { top: auto; bottom: 116px; }
  .instructions { gap: 10px; flex-wrap: wrap; max-width: 200px; row-gap: 8px; }
  .instruction-divider { display: none; }
  .instructions > span:last-child { flex-basis: 100%; }
  .scroll-track { right: 17px; }
}
@media (max-width: 360px) {
  .header { flex-direction: column; gap: 18px; }
  h1 { font-size: 3rem; }
  nav a { min-height: 38px; }
}
@media (max-height: 600px) and (min-width: 701px) {
  h1 { font-size: 3.5rem; }
  .header { top: 24px; }
  .bottom-bar { bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
