@font-face {
  font-family: 'Geist Local';
  src: url('./geist-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono Local';
  src: url('./geist-mono-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #070807;
  --paper: #f1f4ec;
  --muted: #83877f;
  --line: rgba(241, 244, 236, .14);
  --acid: #c8ff2e;
  --cyan: #74f7ff;
  --mono: 'Geist Mono Local', ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: 'Geist Local', Inter, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  color: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(140, 255, 70, .055), transparent 32rem),
    var(--ink);
  color: var(--paper);
  font-family: var(--sans);
}

button,
a {
  color: inherit;
}

button {
  font: inherit;
}

::selection {
  background: var(--acid);
  color: var(--ink);
}

.site-shell {
  isolation: isolate;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  width: 100%;
  max-width: 100%;
  min-height: 100svh;
  overflow: hidden;
  background: transparent;
}

.ambient-grid {
  position: fixed;
  z-index: -3;
  inset: 0;
  opacity: .52;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 50% 48%, black, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 70% at 50% 48%, black, transparent 78%);
}

.noise {
  position: fixed;
  z-index: 20;
  inset: -50%;
  opacity: .045;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E");
  animation: grain .22s steps(2) infinite;
}

@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(3%, -4%, 0); }
  50% { transform: translate3d(-5%, 2%, 0); }
  75% { transform: translate3d(2%, 5%, 0); }
  100% { transform: translate3d(-2%, -3%, 0); }
}

.topbar,
.footer {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  width: 100%;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: .15em;
}

.topbar {
  justify-content: space-between;
  padding: 28px 34px 0;
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  color: var(--paper);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: repeat(2, 4px);
  gap: 2px;
  width: 10px;
  height: 10px;
}

.brand-mark i {
  display: block;
  background: currentColor;
}

.brand-mark i:nth-child(2),
.brand-mark i:nth-child(3) {
  background: var(--acid);
}

.signal {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
}

.signal-dot {
  width: 5px;
  height: 5px;
  border-radius: 0;
  background: var(--acid);
  box-shadow: 0 0 12px var(--acid);
  animation: blink 1.8s steps(2) infinite;
}

@keyframes blink {
  50% { opacity: .3; }
}

.hero {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 690px;
  padding: 28px 24px 22px;
  overflow: hidden;
}

.eyebrow {
  z-index: 4;
  margin: 0 0 16px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .26em;
  color: var(--muted);
}

.title-wrap {
  z-index: 3;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: 100%;
}

.title-wrap h1 {
  margin: 0;
  font-size: clamp(58px, 9vw, 142px);
  font-weight: 300;
  line-height: .8;
  letter-spacing: -.075em;
  text-indent: -.05em;
  white-space: nowrap;
}

.acid {
  color: var(--acid);
  text-shadow: 0 0 24px rgba(200, 255, 46, .28);
}

.title-index,
.title-meta {
  position: absolute;
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.45;
  letter-spacing: .12em;
  color: var(--muted);
}

.title-index {
  top: 2px;
  left: -23px;
}

.title-meta {
  top: 3px;
  right: -74px;
}

.visual-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(58vw, 530px);
  aspect-ratio: 1;
  margin-top: clamp(-24px, -2vw, -6px);
}

#pixelForm {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 20px rgba(190, 255, 80, .07));
  transform: translateZ(0);
  cursor: crosshair;
}

.halo {
  position: absolute;
  z-index: 0;
  width: 54%;
  aspect-ratio: 1;
  border: 1px solid rgba(200, 255, 46, .07);
  border-radius: 50%;
  background: rgba(200, 255, 46, .035);
  filter: blur(12px);
  animation: breathe 5s ease-in-out infinite;
}

@keyframes breathe {
  50% { transform: scale(1.18); opacity: .55; }
}

.axis {
  position: absolute;
  z-index: 1;
  background: rgba(241, 244, 236, .1);
  pointer-events: none;
}

.axis::before,
.axis::after {
  content: '';
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(241, 244, 236, .32);
}

.axis-x {
  width: 114%;
  height: 1px;
}

.axis-x::before { left: 0; top: -1px; }
.axis-x::after { right: 0; top: -1px; }

.axis-y {
  width: 1px;
  height: 114%;
}

.axis-y::before { top: 0; left: -1px; }
.axis-y::after { bottom: 0; left: -1px; }

.frame-corner {
  position: absolute;
  z-index: 3;
  width: 22px;
  height: 22px;
  border-color: rgba(241, 244, 236, .32);
  pointer-events: none;
}

.corner-a {
  top: 7%;
  left: 3%;
  border-top: 1px solid;
  border-left: 1px solid;
}

.corner-b {
  right: 3%;
  bottom: 7%;
  border-right: 1px solid;
  border-bottom: 1px solid;
}

.mode-switch {
  position: absolute;
  z-index: 5;
  right: 2%;
  bottom: 14%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(241, 244, 236, .16);
  border-radius: 0;
  background: rgba(7, 8, 7, .65);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .13em;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s;
}

.mode-switch:hover,
.mode-switch:focus-visible {
  border-color: var(--acid);
  color: var(--paper);
  outline: none;
  transform: translateY(-2px);
}

.button-pixel {
  width: 4px;
  height: 4px;
  background: var(--acid);
}

.hero-copy {
  z-index: 4;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  width: min(100%, 760px);
  margin-top: clamp(-44px, -5vw, -22px);
}

.hero-copy p {
  margin: 0;
  font-size: clamp(12px, 1.1vw, 15px);
  font-weight: 300;
  line-height: 1.65;
  letter-spacing: -.01em;
  color: rgba(241, 244, 236, .68);
}

.hero-copy > span {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .13em;
  color: var(--muted);
}

.footer {
  gap: 15px;
  padding: 0 34px 24px;
  color: #555952;
}

.footer-line {
  flex: 1;
  height: 1px;
  background: rgba(241, 244, 236, .08);
}

.boot-screen {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--ink);
  font-family: var(--mono);
  transition: opacity .55s cubic-bezier(.75, 0, .25, 1), visibility .55s;
}

.boot-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.boot-word {
  font-size: 12px;
  letter-spacing: .28em;
}

.boot-screen > span {
  color: var(--muted);
  font-size: 7px;
  letter-spacing: .2em;
}

.boot-progress {
  width: 136px;
  height: 1px;
  background: rgba(241, 244, 236, .12);
}

.boot-progress i {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--acid);
  transform: scaleX(0);
  transform-origin: left;
  animation: load 1.05s cubic-bezier(.7, 0, .25, 1) forwards;
}

@keyframes load {
  to { transform: scaleX(1); }
}

.cursor {
  display: none;
  position: fixed;
  z-index: 40;
  width: 7px;
  height: 7px;
  border: 1px solid var(--acid);
  pointer-events: none;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}

@media (pointer: fine) {
  .cursor { display: block; }
}

@media (max-width: 720px) {
  .topbar { padding: 22px 20px 0; }
  .hero { min-height: 650px; padding-inline: 20px; }
  .title-wrap { width: 100%; }
  .title-wrap h1 { font-size: clamp(52px, 18vw, 82px); }
  .title-meta { display: none; }
  .title-index { left: 3%; top: -12px; }
  .visual-stage { flex: 0 0 auto; width: min(94vw, 440px); margin-top: -8px; }
  .hero-copy { margin-top: -26px; align-items: flex-start; }
  .hero-copy > span { writing-mode: vertical-rl; }
  .footer { padding: 0 20px 18px; }
  .footer-line:last-of-type,
  .footer span:last-child { display: none; }
  .mode-switch { right: 5%; bottom: 11%; }
  .ambient-grid { background-size: 54px 54px; }
}

@media (max-height: 760px) and (min-width: 721px) {
  .hero { min-height: 610px; padding-block: 18px; }
  .visual-stage { width: 450px; }
}

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