/* ==========================================================================
   Long Shot Software
   Colours come from the brand palette (Palette06.png).
   ========================================================================== */

:root {
  --lime: #c5e19b;
  --lime-soft: #dcedc2;
  --mist: #f3f9e9;
  --ink: #111111;
  --panel: #1a1a1a;
  --panel-2: #2a2a2a;
  --black: #000000;

  --text: var(--mist);
  --text-muted: rgba(243, 249, 233, 0.7);
  --text-faint: rgba(243, 249, 233, 0.45);
  --line: rgba(243, 249, 233, 0.12);

  --font-head: "Rubik", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 14px;
  --radius-sm: 10px;
  --container: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
}

/* ---------- Base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg,
video,
canvas,
iframe {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-head);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.5rem, 6.5vw, 4.75rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.35rem; }

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

a {
  color: var(--lime);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--lime-soft);
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--lime);
  color: var(--black);
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--black);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(64px, 10vw, 120px);
}

.section--panel {
  background: var(--black);
  border-block: 1px solid var(--line);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}

.lead {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  color: var(--text-muted);
  max-width: 38em;
}

.muted {
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.7em 1.4em;
  border: 1px solid var(--lime);
  border-radius: var(--radius-sm);
  background: var(--lime);
  color: var(--black);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.btn:hover {
  background: var(--lime-soft);
  border-color: var(--lime-soft);
  color: var(--black);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn--ghost {
  background: transparent;
  color: var(--lime);
}

.btn--ghost:hover {
  background: rgba(197, 225, 155, 0.1);
  color: var(--lime-soft);
}

/* Until a Steam link is set, the button after it becomes the primary one. */
[data-steam-link][hidden] + .btn--ghost {
  background: var(--lime);
  color: var(--black);
}

.btn--small {
  min-height: 40px;
  padding: 0.5em 1.1em;
  font-size: 0.95rem;
}

.btn svg {
  width: 1.2em;
  height: 1.2em;
  flex: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 2rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 500;
  white-space: nowrap;
}

.brand:hover {
  color: var(--text);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav__links a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-head);
  font-size: 1rem;
  text-decoration: none;
}

.nav__links a:hover {
  background: rgba(243, 249, 233, 0.07);
  color: var(--text);
}

.nav__links a[aria-current="page"] {
  color: var(--lime);
}

.nav .btn {
  margin-left: 8px;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  margin: auto;
}

.nav-toggle .icon-close {
  display: none;
}

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

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

@media (max-width: 760px) {
  .nav-toggle {
    display: grid;
  }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px var(--gutter) 24px;
    background: var(--black);
    border-bottom: 1px solid var(--line);
    display: none;
  }

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

  .nav__links {
    flex-direction: column;
    align-items: stretch;
  }

  .nav__links a {
    padding: 12px 8px;
    font-size: 1.15rem;
  }

  .nav .btn {
    margin-left: 0;
  }
}

/* ---------- Starfield backdrop ---------- */

.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* ---------- Home hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: min(88vh, 820px);
  padding-block: 96px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 75% 40%, rgba(197, 225, 155, 0.09), transparent 70%),
    var(--black);
}

.hero .starfield {
  z-index: -1;
}

/* Keep copy readable over passing stars */
.hero .container,
.page-head .container,
.game-hero .feature__body,
.lost .container {
  text-shadow: 0 0 18px #000, 0 0 4px #000;
}

.hero .btn,
.game-hero .btn,
.lost .btn {
  text-shadow: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(to bottom, transparent, var(--ink));
  z-index: -1;
}

.hero h1 {
  max-width: 13ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--lime);
}

/* ---------- Badge ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid rgba(197, 225, 155, 0.35);
  border-radius: 999px;
  background: rgba(197, 225, 155, 0.08);
  color: var(--lime);
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 500;
}

.badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 0 rgba(197, 225, 155, 0.6);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(197, 225, 155, 0.55); }
  70%, 100% { box-shadow: 0 0 0 10px rgba(197, 225, 155, 0); }
}

/* ---------- Featured game ---------- */

.feature {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.feature__art {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #242424;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px -30px rgba(197, 225, 155, 0.18);
}

.feature__art img {
  width: 100%;
  aspect-ratio: 663 / 850;
  object-fit: cover;
}

.feature__body h2 {
  margin-top: 1rem;
}

.meta-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.meta-list strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

@media (max-width: 760px) {
  .feature {
    grid-template-columns: 1fr;
  }

  .feature__art {
    max-width: 420px;
  }

  .feature__art img {
    aspect-ratio: 4 / 3;
    object-fit: contain;
  }

  .game-hero .feature__body {
    order: -1;
  }

  .game-hero h1 {
    margin-bottom: 0.3em;
  }
}

/* ---------- Studio facts ---------- */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: start;
}

@media (max-width: 760px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.facts {
  display: grid;
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
}

.facts li {
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--ink);
}

.facts .fact__num {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 500;
  line-height: 1;
  color: var(--lime);
}

.section--panel .facts li {
  background: var(--black);
}

/* ---------- Newsletter ---------- */

.signup {
  position: relative;
  padding: clamp(32px, 6vw, 64px);
  border: 1px solid rgba(197, 225, 155, 0.25);
  border-radius: calc(var(--radius) + 6px);
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(197, 225, 155, 0.12), transparent 60%),
    var(--panel);
  overflow: hidden;
}

.signup__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

@media (max-width: 860px) {
  .signup__grid {
    grid-template-columns: 1fr;
  }
}

.signup h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
}

.signup p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.signup .signup__alt {
  margin-top: 14px;
  font-size: 0.95rem;
}

.signup-form__row {
  display: flex;
  gap: 10px;
}

.signup-form input[type="email"] {
  flex: 1;
  min-width: 0;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(243, 249, 233, 0.22);
  border-radius: var(--radius-sm);
  background: var(--black);
  color: var(--text);
  font: inherit;
}

.signup-form input[type="email"]::placeholder {
  color: var(--text-faint);
}

.signup-form input[type="email"]:focus {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(197, 225, 155, 0.25);
}

.signup-form .btn {
  min-height: 52px;
  flex: none;
}

.signup-form .btn[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.signup-form__note {
  margin-top: 12px !important;
  font-size: 0.875rem;
  color: var(--text-faint) !important;
}

.signup-form__status {
  margin-top: 12px !important;
  font-size: 0.95rem;
  font-weight: 500;
}

.signup-form__status.is-success {
  color: var(--lime) !important;
}

.signup-form__status.is-error {
  color: #f2a7a0 !important;
}

.hp-field {
  position: absolute;
  left: -9999px;
}

@media (max-width: 480px) {
  .signup-form__row {
    flex-direction: column;
  }
}

/* ---------- Page header (inner pages) ---------- */

.page-head {
  position: relative;
  isolation: isolate;
  padding-block: clamp(72px, 12vw, 140px) clamp(40px, 6vw, 72px);
  overflow: hidden;
  background: var(--black);
  border-bottom: 1px solid var(--line);
}

.page-head .starfield {
  z-index: -1;
  opacity: 0.7;
}

.page-head h1 {
  max-width: 16ch;
}

/* ---------- Games grid ---------- */

.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 24px;
}

.game-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s;
}

a.game-card:hover {
  color: var(--text);
  border-color: rgba(197, 225, 155, 0.5);
  transform: translateY(-3px);
}

.game-card__art {
  background: #242424;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.game-card__art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.4s;
}

a.game-card:hover .game-card__art img {
  transform: scale(1.04);
}

.game-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 10px;
  padding: 24px;
}

.game-card__body h2 {
  font-size: 1.6rem;
  margin: 4px 0 0;
}

.game-card__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.game-card__more {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-head);
  color: var(--lime);
}

.game-card--placeholder {
  justify-content: center;
  align-items: center;
  min-height: 320px;
  padding: 32px;
  border-style: dashed;
  background: transparent;
  text-align: center;
  color: var(--text-faint);
}

.game-card--placeholder svg {
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* ---------- Game page ---------- */

.game-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(56px, 9vw, 112px);
  overflow: hidden;
  background:
    radial-gradient(ellipse 50% 70% at 20% 50%, rgba(91, 168, 199, 0.12), transparent 70%),
    var(--black);
  border-bottom: 1px solid var(--line);
}

.game-hero .starfield {
  z-index: -1;
}

.game-hero h1 {
  margin-top: 1rem;
}

.prose {
  max-width: 40em;
}

.prose p {
  color: var(--text-muted);
}

.prose p:first-of-type {
  font-size: 1.2rem;
  color: var(--text);
}

.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--black);
}

.video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gallery a {
  display: block;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel);
  cursor: zoom-in;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.gallery a:hover img {
  transform: scale(1.03);
}

/* ---------- Lightbox ---------- */

.lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.94);
  color: var(--text);
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.lightbox__stage {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 64px 72px;
}

.lightbox__stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox button {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(26, 26, 26, 0.8);
  color: var(--text);
  cursor: pointer;
}

.lightbox button:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

@media (max-width: 600px) {
  .lightbox__stage {
    padding: 72px 12px;
  }

  .lightbox__prev,
  .lightbox__next {
    top: auto;
    bottom: 16px;
    transform: none;
  }
}

/* ---------- About ---------- */

.socials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s;
}

.social-card:hover {
  color: var(--text);
  border-color: rgba(197, 225, 155, 0.5);
}

.social-card svg {
  flex: none;
  width: 28px;
  height: 28px;
  color: var(--lime);
}

.social-card strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 1.1rem;
}

.social-card span {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---------- Legal (privacy policy) ---------- */

.legal {
  max-width: 46em;
  color: var(--text-muted);
}

.legal h2 {
  margin-top: 2.2em;
  font-size: 1.5rem;
  color: var(--text);
}

.legal ul {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
}

.legal li {
  margin-bottom: 0.7em;
}

.legal li::marker {
  color: var(--lime);
}

.legal strong {
  color: var(--text);
  font-weight: 600;
}

.legal__summary {
  padding: 20px 24px;
  border: 1px solid rgba(197, 225, 155, 0.25);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 1.1rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-block: 48px;
  background: var(--black);
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer__links a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-footer__links a:hover {
  color: var(--lime);
}

.social-links {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  transition: color 0.15s, border-color 0.15s;
}

.social-links a:hover {
  color: var(--lime);
  border-color: var(--lime);
}

.social-links svg {
  width: 18px;
  height: 18px;
}

.site-footer__legal {
  width: 100%;
  margin: 8px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 0.875rem;
}

.site-footer__legal a,
.signup-form__note a {
  color: inherit;
}

.site-footer__legal a:hover,
.signup-form__note a:hover {
  color: var(--lime);
}

/* ---------- 404 ---------- */

.lost {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-h));
  padding-block: 80px;
  overflow: hidden;
  background: var(--black);
  text-align: center;
}

.lost .starfield {
  z-index: -1;
}

.lost .btn-row {
  justify-content: center;
}

.lost__code {
  font-family: var(--font-head);
  font-size: clamp(5rem, 18vw, 10rem);
  font-weight: 600;
  line-height: 1;
  color: var(--lime);
}

/* ---------- Motion ---------- */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
