:root {
  --night: #f2f4f7;
  --glass: #ffffff;
  --ink: #132033;
  --muted: #5a6578;
  --nav-ink: #3f4652;
  --accent: #2563eb;
  --hover: #f1f3f7;
  --green: #43b047;
  --green-ink: #23752e;
  --green-soft: #e8f7ea;
  --pixel: "Press Start 2P", ui-monospace, monospace;
  /* Press Start 2P has no ą ę į ų, so Lithuanian copy uses Pixelify Sans */
  --pixel-lt: "Pixelify Sans", ui-monospace, monospace;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--pixel);
}

/* Stair-step corners, like an 8-bit window */
:root {
  --pixel-corners: polygon(
    8px 0, calc(100% - 8px) 0, calc(100% - 8px) 4px, calc(100% - 4px) 4px, calc(100% - 4px) 8px, 100% 8px,
    100% calc(100% - 8px), calc(100% - 4px) calc(100% - 8px), calc(100% - 4px) calc(100% - 4px), calc(100% - 8px) calc(100% - 4px), calc(100% - 8px) 100%,
    8px 100%, 8px calc(100% - 4px), 4px calc(100% - 4px), 4px calc(100% - 8px), 0 calc(100% - 8px),
    0 8px, 4px 8px, 4px 4px, 8px 4px
  );
}

/* Top bar: white pixel window with a hard 8-bit drop shadow */
.topbar {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(880px, 100% - 32px);
  height: 56px;
  margin: 14px auto 0;
  padding: 0 12px 0 16px;
  filter: drop-shadow(0 4px 0 rgb(19 32 51 / 0.14));
}

/* Background lives on a pseudo-element so the clip-path does not cut off the shadow */
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--glass);
  clip-path: var(--pixel-corners);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-self: start;
  color: var(--ink);
  text-decoration: none;
}

.brand__icon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.brand__block {
  fill: #2563eb;
}

.brand__v {
  fill: #fff;
}

.brand__name {
  font-size: 11px;
  white-space: nowrap;
}

.nav {
  position: relative;
  display: flex;
  gap: 2px;
}

.nav__link {
  position: relative;
  padding: 10px 12px;
  color: var(--nav-ink);
  font-size: 10px;
  text-decoration: none;
}

.nav__indicator {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: #fbd000;
  box-shadow: inset 0 -3px 0 #d9a400;
  clip-path: var(--pixel-corners);
  opacity: 0;
  transition: transform 300ms var(--ease), width 300ms var(--ease), opacity 200ms ease-out;
}

.nav:focus-within .nav__indicator {
  opacity: 1;
}

/* Touch screens leave :hover stuck after a tap, so only real pointers get the hover box */
@media (hover: hover) {
  .nav:hover .nav__indicator {
    opacity: 1;
  }
}

.status {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px 9px 12px;
  background: var(--green-soft);
  clip-path: var(--pixel-corners);
  color: var(--green-ink);
  font-family: var(--pixel-lt);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.status__dot {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--green);
}

.status__dot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--green);
  animation: ping 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  to {
    transform: scale(2.6);
    opacity: 0;
  }
}

/* Hero */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(86vh - 80px);
  padding: 40px 20px;
  text-align: center;
}

.hero__row {
  position: relative;
  animation: rise 900ms var(--ease) both;
}

.hero__title {
  margin: 0;
  font-size: clamp(18px, 5.4vw, 64px);
  font-weight: 400;
  line-height: 1.25;
}

/* Small heroes standing on top of the first and last letter */
.hero__sprite {
  position: absolute;
  bottom: 88%;
  left: 1%;
  width: clamp(20px, 3.2vw, 40px);
  aspect-ratio: 10 / 14;
  animation: sprite-jump 2.6s steps(1, end) infinite;
}

.hero__sprite--right {
  left: auto;
  right: 1%;
  animation-delay: -1.3s;
}

.hero__sprite svg {
  display: block;
  width: 100%;
  height: 100%;
}

.hero__sprite--right svg {
  transform: scaleX(-1);
}

/* Stepped jump so the heroes move like an old console sprite */
@keyframes sprite-jump {
  0%,
  70%,
  100% {
    transform: translateY(0);
  }
  76% {
    transform: translateY(-14%);
  }
  82% {
    transform: translateY(-24%);
  }
  88% {
    transform: translateY(-14%);
  }
  94% {
    transform: translateY(0);
  }
}

.hero__lead {
  margin: 28px 0 0;
  color: var(--muted);
  font-family: var(--pixel-lt);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 500;
  line-height: 1.5;
  animation: rise 900ms var(--ease) 120ms both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

/* Energy trail: crisp grid squares along the curve, soft neon glow behind */
.trail {
  position: relative;
  width: min(900px, 100% - 40px);
  aspect-ratio: 900 / 400;
  margin: 60px auto 22vh;
}

.trail__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.trail__path {
  stroke: none;
}

.trail__glow {
  stroke: rgb(37 99 235 / 0.35);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.trail__px rect {
  fill: transparent;
}

.trail__px rect.is-track {
  fill: rgb(37 99 235 / 0.28);
}

.trail__px rect.is-on {
  fill: var(--accent);
}

.trail__px rect.is-tip {
  fill: #7aa2ff;
}

.trail__can {
  opacity: 0;
  transition: opacity 250ms ease-out;
}

.trail.is-charging .trail__can {
  opacity: 1;
}

.trail__liquid {
  fill: var(--accent);
}

.trail__cta {
  position: absolute;
  left: 35.5%;
  top: 92.5%;
  color: var(--accent);
  font-size: clamp(14px, 3vw, 32px);
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  /* drop-shadow (not text-shadow) so the drawn ą hook gets the same shadow */
  filter: drop-shadow(2px 2px 0 var(--ink));
  transform: translateY(-50%);
  user-select: none;
  -webkit-user-drag: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 400ms ease-out, visibility 0s linear 400ms;
}

/* Press Start 2P draws ą as a raised a: show a normal a plus a pixel hook under its stem */
.ogonek {
  position: relative;
  display: inline-block;
}

.ogonek::after {
  content: "";
  position: absolute;
  left: 0.625em;
  top: 0.875em;
  width: 0.25em;
  height: 0.25em;
  background: currentColor;
  clip-path: polygon(0 0, 50% 0, 50% 50%, 100% 50%, 100% 100%, 0 100%);
}

/* CTA click: the text is replaced by a canvas of squares that rebuild the thank-you line */
.trail.is-done .trail__cta.is-boom {
  opacity: 0;
  pointer-events: none;
  transition: none;
}

/* Fixed to the viewport and above the topbar, so nothing clips the flying squares */
.trail__morph {
  position: fixed;
  inset: 0;
  z-index: 20;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.trail.is-done .trail__cta {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

/* Footer: blurred bands drawn on a tiny canvas, same trick as vateko.fun */
.footer {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: 150px 20px 28px;
  background: linear-gradient(var(--night), #6e0d12);
  color: #fff;
  text-align: center;
}

/* Oversized so the blur never shows a soft edge at the sides or bottom */
.footer__wave {
  position: absolute;
  z-index: -1;
  top: 0;
  left: -5%;
  width: 110%;
  height: calc(100% + 60px);
  filter: blur(18px);
}

.footer__card {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 32px;
  width: min(960px, 100%);
  margin: 0 auto 56px;
  padding: 28px;
  border: 1px solid rgb(255 255 255 / 0.8);
  border-radius: 16px;
  background: rgb(255 255 255 / 0.78);
  backdrop-filter: blur(16px) saturate(140%);
  color: var(--ink);
  text-align: left;
}

.footer__logo {
  width: 28px;
  height: 28px;
  border-radius: 4px;
}

.footer__about p {
  max-width: 34ch;
  margin: 18px 0 0;
  font-family: var(--pixel-lt);
  font-size: 16px;
  line-height: 1.5;
}

.footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.footer__col h2 {
  margin: 4px 0 6px;
  font-size: 11px;
  font-weight: 400;
}

.footer__col a {
  color: var(--muted);
  font-family: var(--pixel-lt);
  font-size: 16px;
  text-decoration: none;
  transition: color 200ms ease-out;
}

.footer__col a:hover {
  color: var(--ink);
}

.footer__word {
  margin: 0;
  font-size: min(12.5vw, 190px);
  line-height: 1.2;
}

.footer__copy {
  margin: 18px 0 0;
  font-family: var(--pixel-lt);
  font-size: 15px;
}

/* Anketa page */
.apply {
  width: min(1160px, 100% - 40px);
  margin: 0 auto;
  padding: 72px 0 120px;
  text-align: center;
}

.apply__title {
  margin: 0;
  color: #ffd23f;
  font-size: clamp(22px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.3;
  text-shadow: 3px 3px 0 #e8590c, 6px 6px 0 var(--ink);
}

.apply__lead {
  margin: 24px 0 40px;
  color: var(--muted);
  font-family: var(--pixel-lt);
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 500;
}

.apply__banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 24px 48px -28px rgb(15 23 42 / 0.45);
}

.roles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
  text-align: left;
}

.role {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 16px 36px -22px rgb(15 23 42 / 0.3);
}

.role__cover {
  display: block;
  width: calc(100% + 56px);
  height: auto;
  margin: -28px -28px 0;
  border-radius: 20px 20px 0 0;
}

/* Same look as the supplied cover images, drawn in CSS for the designer card */
.role__cover--drawn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6%;
  aspect-ratio: 2000 / 1116;
  background: radial-gradient(70% 55% at 50% 100%, #2fa043, #0b2a12 55%, #000 80%);
  text-align: center;
}

.cover__title {
  color: #ffd23f;
  font-family: "Jersey 10", var(--pixel-lt);
  font-size: clamp(30px, 4.4vw, 48px);
  line-height: 1;
  text-shadow: -2px 0 #e8452c, 2px 0 #e8452c, 0 -2px #e8452c, 0 2px #e8452c, 3px 4px 0 #a3161a;
}

.cover__sub {
  color: #fff;
  font-size: clamp(9px, 1vw, 12px);
}

.role__title {
  margin: 24px 0 10px;
  font-size: 18px;
  font-weight: 400;
}

.role__desc {
  margin: 0 0 22px;
  color: var(--muted);
  font-family: var(--pixel-lt);
  font-size: 18px;
  line-height: 1.45;
}

.role__list {
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  font-family: var(--pixel-lt);
  font-size: 17px;
}

.role__list li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tick,
.cross {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.tick {
  background: var(--green);
}

.cross {
  background: var(--ink);
}

.tick svg,
.cross svg {
  width: 16px;
  height: 16px;
}

.tick svg {
  fill: #fff;
}

.cross svg {
  fill: #ff3b30;
}

.role__no {
  font-weight: 700;
}

.tech {
  flex: none;
  display: flex;
  gap: 6px;
}

.tech img {
  width: 20px;
  height: 20px;
}

/* Adobe asked Simple Icons to drop their logos, so Photoshop gets a drawn badge */
.tech__ps {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: #001e36;
  color: #31a8ff;
  font-family: var(--pixel-lt);
  font-size: 11px;
  font-weight: 700;
}

.role__cta {
  align-self: flex-start;
  margin-top: auto;
  padding: 14px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--green);
  box-shadow: 0 5px 0 var(--green-ink);
  color: #fff;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out;
}

.role__cta:active {
  transform: translateY(5px);
  box-shadow: 0 0 0 var(--green-ink);
}

.role__cta:disabled {
  cursor: progress;
  opacity: 0.7;
}

/* Anketa form page (forma.html): the page still scrolls, only the bar is hidden */
html:has(.form) {
  scrollbar-width: none;
}

html:has(.form)::-webkit-scrollbar {
  display: none;
}

.form {
  display: block;
  width: min(680px, 100% - 32px);
  margin: 48px auto 120px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04), 0 16px 36px -22px rgb(15 23 42 / 0.3);
}

.form__inner {
  position: relative;
  padding: 32px;
}

.form__close {
  position: absolute;
  top: 24px;
  right: 24px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--night);
  transition: background 120ms ease-out;
}

.form__close:hover {
  background: #e4e8ee;
}

/* 16px = 2px per icon pixel, so every stroke stays the same width */
.form__close svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: var(--ink);
}

.form__title {
  margin: 0 48px 12px 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.4;
}

.form__lead {
  margin: 0 0 28px;
  color: var(--muted);
  font-family: var(--pixel-lt);
  font-size: 17px;
}

.form__questions {
  display: grid;
  gap: 40px;
  margin-bottom: 32px;
}

.form__section {
  display: grid;
  gap: 24px;
}

.form__section-title {
  margin: 0;
  padding-top: 24px;
  border-top: 2px solid var(--night);
  color: var(--accent);
  font-size: 13px;
  font-weight: 400;
}

.form__section:first-child .form__section-title {
  padding-top: 0;
  border-top: 0;
}

.field {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field__label {
  padding: 0;
  font-family: var(--pixel-lt);
  font-size: 17px;
  font-weight: 700;
}

legend.field__label {
  margin-bottom: 10px;
}

.field__opt {
  color: var(--muted);
  font-weight: 500;
}

.field__input {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--night);
  color: var(--ink);
  font: 500 17px var(--pixel-lt);
  box-shadow: inset 0 0 0 2px transparent;
  transition: box-shadow 120ms ease-out, background 120ms ease-out;
}

/* Discord names, ages and links are plain ASCII: Press Start 2P keeps 5 and S apart */
.field__input:is([type="text"], [type="number"], [type="url"]) {
  font: 400 13px var(--pixel);
  line-height: 1.6;
}

.field__input[type="number"] {
  appearance: textfield;
}

.field__input[type="number"]::-webkit-inner-spin-button {
  appearance: none;
}

textarea.field__input {
  min-height: 110px;
  resize: vertical;
}

.field__input::placeholder {
  color: #8a93a3;
}

.field__input:focus {
  outline: none;
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--accent);
}

.field__input:user-invalid {
  box-shadow: inset 0 0 0 2px #e5484d;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.chip > span {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--night);
  font-family: var(--pixel-lt);
  font-size: 16px;
  font-weight: 500;
  transition: background 120ms ease-out, color 120ms ease-out;
}

.chip img {
  width: 18px;
  height: 18px;
  border-radius: 4px;
}

.chip .tech__ps {
  width: 18px;
  height: 18px;
  font-size: 10px;
}

.chip .num {
  font-family: var(--pixel);
  font-size: 11px;
}

.chip:hover > span {
  background: #e4e8ee;
}

/* Picked answers turn green, like the ticks on the role cards */
.chip input:checked + span {
  background: var(--green);
  color: #fff;
}

/* White backing keeps brand-coloured icons readable on green */
.chip input:checked + span img {
  background: #fff;
  box-shadow: 0 0 0 2px #fff;
}

.chip input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.field--confirm {
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 12px;
  font-family: var(--pixel-lt);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.field--confirm input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.form__trap {
  position: absolute;
  left: -9999px;
}

.form__error {
  margin: 0 0 20px;
  color: #c62a2f;
  font-family: var(--pixel-lt);
  font-size: 17px;
  font-weight: 700;
}

.form__sent {
  padding: 24px 0 8px;
  text-align: center;
}

.form__sent .tick {
  width: 56px;
  height: 56px;
  margin: 0 auto 24px;
  border-radius: 12px;
}

.form__sent .tick svg {
  width: 28px;
  height: 28px;
}

.form__sent .form__title {
  margin-right: 0;
}

@media (max-width: 520px) {
  .form {
    margin-top: 28px;
  }

  .form__inner {
    padding: 24px 20px;
  }

  .form__close {
    top: 16px;
    right: 16px;
  }

  .form__title {
    font-size: 16px;
  }
}

@media (pointer: coarse) {
  /* iPhone zooms into any field with text under 16px */
  .field__input:is([type="text"], [type="number"], [type="url"]) {
    font-size: 16px;
  }

  .chip > span {
    padding: 12px 14px;
  }
}

@media (max-width: 1000px) {
  .roles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .roles {
    grid-template-columns: 1fr;
  }
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .status {
    display: none;
  }

  .nav {
    justify-self: end;
  }

  .nav__link {
    padding: 15px 8px;
    font-size: 9px;
  }

  .footer__card {
    grid-template-columns: 1fr 1fr;
  }

  .footer__about {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .brand__name {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .status__dot::after,
  .hero__row,
  .hero__sprite,
  .hero__lead {
    animation: none;
  }

  .role__cta {
    transition: none;
  }


  .nav__indicator,
  .trail__can,
  .trail__cta {
    transition: none;
  }
}
