/* Perfect DOS VGA 437 by Zeh Fernando. Its pixel grid is 1/16 em, so it only
   renders sharp at multiples of 16px. */
@font-face {
  font-family: "Perfect DOS VGA 437";
  src: url("/fonts/PerfectDOSVGA437.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #0b0b0a;
  --surface: #11110f;
  --text: #f2f0e9;
  --muted: #9b9a94;
  --line: rgba(242, 240, 233, 0.14);
  --line-strong: rgba(242, 240, 233, 0.28);
  --accent: #d8c59a;
  --label: #8fb855;
  --font-dos: "Perfect DOS VGA 437", ui-monospace, monospace;
  --max-width: 1240px;
  --header-height: 76px;
  --section-pad: clamp(7rem, 14vw, 12rem);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(216, 197, 154, 0.08), transparent 34rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' 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='.55'/%3E%3C/svg%3E");
  z-index: 10;
}

a {
  color: inherit;
}

/* Green text uses the DOS pixel font at its native 16px size. */
.brand,
.site-nav a,
.eyebrow,
.scroll-cue,
.section-label,
.form-field label,
.site-footer {
  font-family: var(--font-dos);
  font-size: 16px;
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: 0;
}

.site-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.25rem, 4vw, 3.5rem);
  background: rgba(11, 11, 10, 0.72);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand {
  text-decoration: none;
  color: #99e550;
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin: 0 -0.35rem 0 0;
  border: 0;
  border-radius: 0;
  padding: 0.35rem;
  background: transparent;
  color: #99e550;
  line-height: 0;
}

.nav-toggle:hover:not(:disabled),
.nav-toggle:focus-visible:not(:disabled) {
  background: transparent;
  color: #99e550;
  transform: none;
  opacity: 0.7;
}

.nav-toggle .icon-close,
.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.75rem);
}

.site-nav a {
  position: relative;
  text-decoration: none;
  color: var(--label);
  text-transform: uppercase;
  transition: color 180ms ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -6px;
  height: 1px;
  background: #99e550;
  transition: right 180ms ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: #99e550;
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after {
  right: 0;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-height) + 2rem) 1.5rem 5rem;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.hero::before {
  width: min(70vw, 850px);
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(216, 197, 154, 0.08), transparent 66%);
  transform: translateY(-10%);
}

.hero::after {
  width: min(80vw, 1000px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  bottom: 13%;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  animation: hero-in 900ms cubic-bezier(.22, 1, .36, 1) both;
}

.eyebrow {
  margin: 0 0 1.4rem;
  color: var(--label);
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-size: clamp(4rem, 13vw, 10rem);
  line-height: 0.84;
  letter-spacing: -0.075em;
  font-weight: 650;
}

.hero-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.35rem);
}

.scroll-cue {
  position: absolute;
  z-index: 1;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.7rem;
  align-items: center;
  color: var(--label);
  text-decoration: none;
  text-transform: uppercase;
}

.scroll-cue span:last-child {
  color: var(--label);
}

.section {
  width: min(100% - 3rem, var(--max-width));
  margin: 0 auto;
  padding: var(--section-pad) 0;
  /* Anchor jumps land with the section label just under the header. */
  scroll-margin-top: calc(2rem - var(--section-pad));
  display: grid;
  grid-template-columns: minmax(130px, 0.3fr) minmax(0, 1fr);
  gap: clamp(2rem, 8vw, 8rem);
  border-top: 1px solid var(--line);
}

.section-label {
  color: var(--label);
  text-transform: uppercase;
}

.section-content {
  min-width: 0;
}

.about h2 {
  max-width: 900px;
  margin-bottom: 0;
  font-size: clamp(2.3rem, 5.3vw, 5.2rem);
  line-height: 1.03;
  letter-spacing: -0.055em;
  font-weight: 500;
}

.contact-heading {
  margin-bottom: clamp(3rem, 7vw, 5rem);
}

.contact-heading h2 {
  margin-bottom: 0.9rem;
  font-size: clamp(2.8rem, 6vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 550;
}

.contact-heading p {
  max-width: 480px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
}

.contact-form {
  max-width: 760px;
}

.form-field {
  margin-bottom: 2.25rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.7rem;
  color: var(--label);
  text-transform: uppercase;
}

.form-field input,
.form-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  outline: none;
  padding: 0.25rem 0 0.9rem;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.05rem;
  resize: vertical;
  transition: border-color 180ms ease;
}

.form-field textarea {
  min-height: 9rem;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
}

.form-field input:user-invalid:not(:focus),
.form-field textarea:user-invalid:not(:focus) {
  border-color: rgba(220, 90, 90, 0.8);
}

/* Turnstile stays hidden unless a visitor needs to interact with it. */
.captcha-wrap {
  margin: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  align-items: center;
}

button {
  border: 1px solid #99e550;
  border-radius: 999px;
  padding: 0.85rem 1.5rem;
  background: #99e550;
  color: var(--bg);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

button:hover:not(:disabled),
button:focus-visible:not(:disabled) {
  background: transparent;
  color: #99e550;
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.form-status {
  min-height: 1.4rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.form-status.success {
  color: #99e550;
}

.form-status.error {
  color: #e3a7a7;
}

.honeypot {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.site-footer {
  width: min(100% - 3rem, var(--max-width));
  margin: 0 auto;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--label);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.discord-link {
  display: inline-flex;
  color: #99e550;
  transition: opacity 180ms ease;
}

.discord-link:hover,
.discord-link:focus-visible {
  opacity: 0.7;
}

.game-tag {
  margin-bottom: 1.2rem;
  font-family: var(--font-dos);
  font-size: 16px;
  color: var(--label);
  text-transform: uppercase;
}

.game h2 {
  margin-bottom: 1.2rem;
  font-size: clamp(2.8rem, 6vw, 6rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  font-weight: 550;
}

.game-description {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
  color: var(--muted);
  font-size: 1.1rem;
}

.game-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.shot {
  margin: 0;
  aspect-ratio: 2000 / 1249;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
}

.shot a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.shot a:focus-visible {
  outline: 2px solid #99e550;
  outline-offset: -2px;
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot img {
  transition: transform 300ms ease, filter 300ms ease;
}

.shot a:hover img {
  transform: scale(1.03);
  filter: brightness(1.1);
}

.shot-placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-dos);
  font-size: 16px;
  color: var(--muted);
  text-transform: uppercase;
}

/* Screenshot gallery overlay. */
html.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.97);
  color: #99e550;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: transparent;
}

.lb-img {
  display: block;
  max-width: calc(100% - 10rem);
  max-height: calc(100% - 7rem);
  object-fit: contain;
  border: 1px solid var(--line-strong);
}

.lb-btn {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: #99e550;
  line-height: 0;
}

.lb-btn:hover:not(:disabled),
.lb-btn:focus-visible:not(:disabled) {
  background: transparent;
  color: #99e550;
  transform: none;
  opacity: 0.7;
}

.lb-btn:focus-visible {
  outline: 2px solid #99e550;
}

.lb-prev {
  left: 1.25rem;
  top: calc(50% - 1.5rem);
}

.lb-next {
  right: 1.25rem;
  top: calc(50% - 1.5rem);
}

.lb-close {
  top: 1rem;
  right: 1.25rem;
}

.lb-count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 1.25rem;
  margin: 0;
  text-align: center;
  font-family: var(--font-dos);
  font-size: 16px;
}

@media (max-width: 680px) {
  .lb-img {
    max-width: calc(100% - 1.5rem);
    max-height: calc(100% - 9rem);
  }

  /* On phones the arrows sit over the image edges. */
  .lb-prev,
  .lb-next {
    background: rgba(0, 0, 0, 0.55);
    width: 2.5rem;
    height: 3.5rem;
    top: calc(50% - 1.75rem);
  }

  .lb-prev { left: 0.75rem; }
  .lb-next { right: 0.75rem; }
}

@media (max-width: 680px) {
  .game-shots {
    grid-template-columns: 1fr;
  }
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  .hero-inner {
    animation: none;
  }

  * {
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 68px;
  }

  .site-header {
    padding: 0 1.25rem;
  }

  .nav-toggle {
    display: inline-flex;
  }

  /* Links collapse into a black dropdown panel under the header. */
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #000;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line-strong);
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    padding: 1.1rem 1.25rem;
  }

  .site-nav a + a {
    border-top: 1px solid var(--line);
  }

  .site-nav a::after {
    display: none;
  }

  .hero {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  h1 {
    font-size: clamp(3.25rem, 17vw, 6rem);
  }

  .section {
    width: min(100% - 2.5rem, var(--max-width));
    grid-template-columns: 1fr;
    gap: 2rem;
    --section-pad: 6rem;
    padding: var(--section-pad) 0;
  }

  .section-label {
    margin-bottom: 0;
  }

  .about h2 {
    font-size: clamp(2.15rem, 10vw, 4rem);
  }

  .contact-heading h2 {
    font-size: clamp(2.7rem, 14vw, 5rem);
  }

  .site-footer {
    width: min(100% - 2.5rem, var(--max-width));
  }
}
