@font-face {
  font-family: "Holo Terminal Heavy";
  src: url("/fonts/HoloTerminalHeavy.ttf") format("truetype");
  font-display: swap;
}

:root {
  --bg: #020403;
  --green: #6bff7a;
  --dim: #42b857;
  --deep: #2e803d;
  --light: #d9ffe0;
  --text: #c3d9c7;
  --red: #ff4529;
  --hot: var(--green);
  --hot-rgb: 107, 255, 122;
  --heavy: "Holo Terminal Heavy", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

.danger {
  --hot: var(--red);
  --hot-rgb: 255, 69, 41;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--green);
  font-family: var(--heavy);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

h1, h2, p, ul {
  margin: 0;
  padding: 0;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px clamp(14px, 3vw, 40px);
  background: rgba(2, 4, 3, 0.84);
  border-bottom: 1px solid rgba(46, 128, 61, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.home .bar {
  position: fixed;
  left: 0;
  right: 0;
}

.mark {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--dim);
}

.mark img {
  display: block;
  width: 104px;
  height: auto;
  filter: drop-shadow(0 0 12px rgba(107, 255, 122, 0.5));
}

.tabs {
  display: flex;
  gap: 6px;
}

.tabs a {
  display: block;
  padding: 9px 14px;
  font-size: 11px;
  letter-spacing: 0.12em;
  white-space: nowrap;
  text-decoration: none;
  color: var(--green);
  background: rgba(107, 255, 122, 0.04);
  border: 1px solid var(--deep);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.tabs a:hover, .tabs a:focus-visible {
  background: rgba(107, 255, 122, 0.2);
  color: var(--light);
  box-shadow: 0 0 18px rgba(107, 255, 122, 0.35);
  outline: none;
}

.tabs a[aria-current="page"] {
  background: var(--green);
  color: #031006;
  border-color: var(--light);
  box-shadow: 0 0 18px rgba(107, 255, 122, 0.5);
}

#top {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 540px;
  display: grid;
  place-content: center;
  justify-items: center;
  overflow: hidden;
}

#top canvas, #you canvas {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

html.live #top canvas, html.live #you canvas {
  display: block;
}

#top canvas {
  cursor: pointer;
}

#top h1 img {
  display: block;
  width: min(560px, 76vw);
  height: auto;
  filter: drop-shadow(0 0 30px rgba(107, 255, 122, 0.5));
}

html.live #top h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

#top::after, #you::before, #you::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 110px;
  pointer-events: none;
}

#top::after, #you::after {
  bottom: 0;
  background: linear-gradient(rgba(2, 4, 3, 0), var(--bg));
}

#you::before {
  top: 0;
  background: linear-gradient(var(--bg), rgba(2, 4, 3, 0));
}

.intro {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: clamp(58px, 8vh, 96px);
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 0 22px;
  text-align: center;
  pointer-events: none;
}

.pitch {
  max-width: 780px;
  font-size: clamp(14px, 1.45vw, 20px);
  line-height: 1.7;
  color: var(--light);
  text-shadow: 0 0 18px rgba(107, 255, 122, 0.6);
}

.tag {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--dim);
}

.cue {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: 0.34em;
  text-decoration: none;
  color: var(--dim);
  animation: nod 2.2s ease-in-out infinite;
}

.cue::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  margin: 6px auto 0;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.cue:hover, .cue:focus-visible {
  color: var(--light);
  outline: none;
}

@keyframes nod {
  50% { transform: translate(-50%, 6px); }
}

#you {
  position: relative;
  min-height: min(92vh, 880px);
  display: flex;
  align-items: center;
  overflow: hidden;
}

#you canvas {
  touch-action: pan-y;
  cursor: grab;
}

#you canvas.hot {
  cursor: pointer;
}

#you canvas.held {
  cursor: grabbing;
}

.sheet {
  position: relative;
  z-index: 2;
  width: min(430px, 34vw);
  margin-left: clamp(18px, 3.4vw, 56px);
  padding: 26px 26px 24px 30px;
  border-left: 2px solid var(--green);
  background: linear-gradient(90deg, rgba(107, 255, 122, 0.12), rgba(107, 255, 122, 0) 94%), repeating-linear-gradient(0deg, rgba(107, 255, 122, 0.05) 0 1px, transparent 1px 4px);
  box-shadow: -18px 0 40px -22px rgba(107, 255, 122, 0.8);
}

html.live .sheet {
  transform: perspective(1100px) rotateY(15deg);
  transform-origin: left center;
}

.sheet::before, .sheet::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--green), rgba(107, 255, 122, 0));
}

.sheet::before {
  top: 0;
}

.sheet::after {
  bottom: 0;
}

h2 {
  font-size: clamp(24px, 2.75vw, 44px);
  line-height: 1.06;
  margin-bottom: 18px;
  color: var(--light);
  text-shadow: 0 0 22px rgba(var(--hot-rgb), 0.7);
}

.sheet p, .note p, #join p {
  font-size: clamp(12px, 1vw, 15px);
  line-height: 1.8;
  margin-bottom: 14px;
  color: var(--hot);
  text-shadow: 0 0 10px rgba(var(--hot-rgb), 0.35);
}

.sheet .do {
  display: none;
  margin-bottom: 0;
  color: var(--light);
}

html.live .sheet .do {
  display: block;
}

.do::before {
  content: "> ";
  color: var(--green);
}

.do::after {
  content: "";
  display: inline-block;
  width: 0.6em;
  height: 1em;
  margin-left: 6px;
  vertical-align: -0.12em;
  background: var(--green);
  animation: caret 1s steps(2) infinite;
}

@keyframes caret {
  50% { opacity: 0; }
}

#say {
  position: absolute;
  z-index: 2;
  left: 60%;
  bottom: 8%;
  transform: translateX(-50%);
  font-size: 18px;
  letter-spacing: 0.16em;
  white-space: nowrap;
  color: var(--light);
  text-shadow: 0 0 18px currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s;
}

#say.show {
  opacity: 1;
  transition: none;
  animation: stutter 0.35s steps(3);
}

#say.red {
  color: var(--red);
}

#say.big {
  font-size: clamp(28px, 4.6vw, 64px);
  bottom: 46%;
}

@keyframes stutter {
  0% { opacity: 0; transform: translateX(-52%); }
  40% { opacity: 1; transform: translateX(-48%); }
  70% { opacity: 0.4; }
  100% { opacity: 1; transform: translateX(-50%); }
}

#flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 60% 50%, rgba(255, 69, 41, 0.55), rgba(255, 69, 41, 0.15) 60%, rgba(255, 69, 41, 0.3));
}

#flash.hit {
  animation: hit 0.6s ease-out;
}

@keyframes hit {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

.block {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(44px, 7vw, 96px) clamp(18px, 4vw, 48px);
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 72px);
}

.note {
  padding-top: 24px;
  border-top: 1px solid var(--hot);
  box-shadow: 0 -14px 30px -22px rgba(var(--hot-rgb), 0.9);
}

.note h2 {
  font-size: clamp(22px, 2.3vw, 36px);
}

.note p {
  margin-bottom: 0;
}

.shots {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.shots a {
  display: block;
  border: 1px solid var(--deep);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.shots a:hover, .shots a:focus-visible {
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(107, 255, 122, 0.35);
  outline: none;
}

.shots img {
  display: block;
  width: 100%;
  height: auto;
}

#join {
  text-align: center;
}

#join p {
  max-width: 640px;
  margin: 0 auto 22px;
}

#join .row {
  max-width: none;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.key {
  position: relative;
  display: inline-block;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: inherit;
  text-decoration: none;
  text-shadow: none;
  color: var(--green);
  background: rgba(107, 255, 122, 0.05);
  border: 1px solid var(--dim);
  border-radius: 0;
  padding: 13px 18px;
  cursor: pointer;
  box-shadow: inset 0 0 16px rgba(107, 255, 122, 0.08);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.key:hover, .key:focus-visible {
  background: rgba(107, 255, 122, 0.2);
  color: var(--light);
  box-shadow: 0 0 20px rgba(107, 255, 122, 0.4), inset 0 0 16px rgba(107, 255, 122, 0.15);
  outline: none;
}

.key.fill {
  background: var(--green);
  color: #031006;
  border-color: var(--light);
  box-shadow: 0 0 28px rgba(107, 255, 122, 0.6);
}

.key.fill:hover, .key.fill:focus-visible {
  background: var(--light);
}

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 26px 20px 44px;
  border-top: 1px solid rgba(46, 128, 61, 0.5);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--dim);
}

.foot a {
  text-decoration: none;
}

.rated {
  flex-basis: 100%;
  text-align: center;
  color: var(--deep);
}

.foot a:hover, .foot a:focus-visible {
  color: var(--light);
}

.viewer {
  border: 1px solid var(--dim);
  background: rgba(2, 4, 3, 0.96);
  padding: 10px;
  max-width: 94vw;
  max-height: 94vh;
  box-shadow: 0 0 60px rgba(107, 255, 122, 0.25);
}

.viewer::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.viewer img {
  display: block;
  max-width: 100%;
  max-height: 84vh;
}

.viewer .key {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 8px 12px;
  background: rgba(2, 4, 3, 0.8);
}

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 22px 80px;
  font-family: system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: normal;
  text-transform: none;
  color: var(--text);
}

.doc a {
  color: var(--green);
}

.doc h1 {
  font-family: var(--heavy);
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--light);
  margin: 0 0 8px;
  text-shadow: 0 0 22px rgba(107, 255, 122, 0.5);
}

.doc h2 {
  font-family: var(--heavy);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green);
  margin: 40px 0 10px;
  text-shadow: none;
}

.doc p, .doc li {
  margin: 0 0 14px;
}

.doc ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.doc strong {
  color: var(--light);
}

.doc .dated {
  font-family: var(--heavy);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--dim);
  margin-bottom: 28px;
}

.doc .short {
  border-left: 2px solid var(--green);
  padding: 14px 18px;
  background: linear-gradient(90deg, rgba(107, 255, 122, 0.1), rgba(107, 255, 122, 0));
  color: var(--light);
}

.fill-in {
  font-family: var(--heavy);
  font-size: 0.82em;
  letter-spacing: 0.06em;
  color: var(--red);
  border: 1px dashed var(--red);
  padding: 1px 6px;
}

.lost {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
  padding: 24px;
  text-align: center;
}

.lost h1 {
  font-size: clamp(34px, 9vw, 96px);
  line-height: 1;
  color: var(--red);
  text-shadow: 0 0 40px rgba(255, 69, 41, 0.6);
}

.lost p {
  max-width: 520px;
  font-size: 13px;
  line-height: 1.9;
}

html:not(.live) #you {
  min-height: 0;
  padding: 40px 0 0;
}

html:not(.live) .sheet {
  width: auto;
  max-width: 1024px;
  margin: 0 auto;
}

@media (max-width: 760px) {
  .home .mark, .long {
    display: none;
  }

  .home .bar {
    justify-content: center;
  }

  .mark img {
    width: 84px;
  }

  .tabs a {
    padding: 9px 11px;
    font-size: 10px;
  }

  html.live #you {
    min-height: 100vh;
    min-height: 100svh;
    align-items: flex-end;
    padding-bottom: 34px;
  }

  .sheet, html.live .sheet {
    width: auto;
    margin: 0 12px;
    padding: 14px 14px 12px 16px;
    transform: none;
    background: linear-gradient(90deg, rgba(107, 255, 122, 0.12), rgba(107, 255, 122, 0.02)), rgba(2, 4, 3, 0.7);
  }

  h2, .note h2 {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .sheet p, .note p, #join p {
    font-size: 12px;
    line-height: 1.65;
    margin-bottom: 10px;
  }

  #say {
    left: 50%;
    bottom: auto;
    top: 64%;
    font-size: 13px;
  }

  #say.big {
    bottom: auto;
    top: 30%;
  }

  #flash {
    background: radial-gradient(circle at 50% 35%, rgba(255, 69, 41, 0.55), rgba(255, 69, 41, 0.15) 60%, rgba(255, 69, 41, 0.3));
  }

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

  .shots {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .shots li:first-child {
    grid-column: span 2;
  }

  .key {
    font-size: 11px;
    padding: 11px 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cue, .do::after, #say.show {
    animation: none;
  }
}
