/* lastlightrpg.com — the game's website. Same palette and pixel fonts as the game (self-hosted, no third parties). */
@font-face {
  font-family: 'Pixelify Sans';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/pixelify-sans-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Jersey 15';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jersey-15-latin-400-normal.woff2') format('woff2');
}

:root {
  --bg: #120d16;
  --bg2: #1a1220;
  --panel: #1f1628;
  --panel2: #281c33;
  --border: #3f2d50;
  --text: #f3e9dc;
  --muted: #a596b3;
  --dim: #7b6d8c;
  --ember: #ff9a2e;
  --ember2: #ffb75e;
  --gold: #ffd36b;
  --pixel: 'Jersey 15', 'Pixelify Sans', ui-monospace, monospace;
  --logo: 'Pixelify Sans', ui-monospace, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  /* The pixel fonts' fi/fl ligatures draw as odd shapes ("flame" read as "Aame"). */
  font-variant-ligatures: none;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--sans);
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
img.px {
  image-rendering: pixelated;
}
a {
  color: var(--ember2);
}
a:hover {
  color: var(--gold);
}
.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Header ─────────────────────────────────────────────────────────── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(18, 13, 22, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(63, 45, 80, 0.6);
}
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--logo);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.5px;
}
.brand img {
  width: 32px;
  height: 32px;
}
.site-head nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-head nav a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 19px;
}
.site-head nav a:not(.btn):hover {
  color: var(--text);
}
@media (max-width: 560px) {
  .site-head nav a:not(.btn) {
    display: none;
  }
}

/* ── Buttons ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  font-family: var(--pixel);
  font-size: 20px;
  text-decoration: none;
  line-height: 1;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover {
  color: var(--text);
  filter: brightness(1.12);
  transform: translateY(-1px);
}
.btn.primary {
  border: none;
  color: #2a1203;
  background: linear-gradient(180deg, #ffc46b, #ff9a2e 55%, #e2701a);
  box-shadow: inset 0 -4px 0 rgba(120, 40, 0, 0.45), 0 0 28px rgba(255, 140, 40, 0.35);
}
.btn.primary:hover {
  color: #2a1203;
}
.btn.big {
  padding: 16px 28px;
  font-size: 26px;
  border-radius: 14px;
}
.btn.small {
  padding: 8px 14px;
  font-size: 18px;
}

/* ── Hero section ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 0;
  text-align: center;
  background: radial-gradient(ellipse 80% 70% at 50% 18%, #3a1d3a 0%, rgba(18, 13, 22, 0) 70%);
}
.embers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.embers i {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  background: var(--ember2);
  box-shadow: 0 0 8px var(--ember);
  opacity: 0;
  animation: rise linear infinite;
}
@keyframes rise {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  100% {
    transform: translate(var(--drift, 20px), -520px);
    opacity: 0;
  }
}
.logo {
  font-family: var(--logo);
  font-weight: 700;
  text-align: center;
  font-size: clamp(52px, 11vw, 96px);
  line-height: 0.95;
  letter-spacing: 1px;
  margin: 0;
  background: linear-gradient(180deg, #fff2b0, #ff9a2e 55%, #c2410c);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 #2a0f05) drop-shadow(0 0 26px rgba(255, 140, 40, 0.35));
}
.logo small {
  display: block;
  font-size: 0.42em;
  letter-spacing: 4px;
  margin-top: 10px;
}
.hero .lead {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 18px;
}
.cta {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.cta .note {
  font-family: var(--pixel);
  font-size: 18px;
  color: var(--dim);
  letter-spacing: 0.5px;
}
.party {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(4px, 2vw, 22px);
  margin: 40px auto 0;
  padding-bottom: 18px;
}
.party::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: min(560px, 92%);
  height: 18px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #2b2a2a, #1b1720);
  border-top: 3px solid #4a4250;
  border-radius: 4px;
}
.party img {
  position: relative;
  z-index: 1;
  width: clamp(72px, 19vw, 144px);
  height: auto;
  margin-bottom: -6px;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.35));
  animation: bob 2.6s ease-in-out infinite;
}
.party img:nth-child(2) {
  animation-delay: -0.6s;
}
.party img:nth-child(3) {
  animation-delay: -1.3s;
}
.party img:nth-child(4) {
  animation-delay: -1.9s;
}
@keyframes bob {
  50% {
    transform: translateY(-5px);
  }
}

/* ── Screens ────────────────────────────────────────────────────────── */
section {
  padding: 72px 0 0;
}
.kicker {
  font-family: var(--pixel);
  color: var(--ember);
  font-size: 20px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 6px;
}
h2 {
  font-family: var(--logo);
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.1;
  margin: 0 0 12px;
}
.sub {
  color: var(--muted);
  max-width: 600px;
  margin: 0;
}
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(186px, 1fr);
  gap: 18px;
  margin-top: 28px;
  padding: 6px 2px 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.shot {
  margin: 0;
  scroll-snap-align: center;
}
.phone {
  border-radius: 28px;
  padding: 7px;
  background: linear-gradient(180deg, #3a2c48, #1d1526);
  border: 1px solid #4d3a60;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.5) inset;
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  border-radius: 22px;
}
.shot figcaption {
  margin-top: 10px;
  text-align: center;
  font-family: var(--pixel);
  font-size: 20px;
  color: var(--muted);
}

/* ── Features ───────────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 28px;
}
.feature {
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
}
.feature h3 {
  font-family: var(--logo);
  font-size: 21px;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.feature h3 b {
  color: var(--ember2);
  font-family: var(--pixel);
  font-size: 26px;
  line-height: 1;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}
.classes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 28px;
}
@media (max-width: 640px) {
  .classes {
    grid-template-columns: repeat(2, 1fr);
  }
}
.class {
  text-align: center;
  padding: 16px 10px 18px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 30%, #2f2140, var(--panel) 70%);
}
.class img {
  width: 96px;
  height: 96px;
}
.class h3 {
  font-family: var(--logo);
  margin: 6px 0 2px;
  font-size: 20px;
}
.class p {
  margin: 0;
  font-family: var(--pixel);
  font-size: 18px;
  color: var(--muted);
}

/* ── FAQ ────────────────────────────────────────────────────────────── */
.faq {
  margin-top: 24px;
  display: grid;
  gap: 10px;
  max-width: 760px;
}
.faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px 18px;
}
.faq summary {
  cursor: pointer;
  font-family: var(--logo);
  font-size: 18px;
}
.faq p {
  margin: 10px 0 2px;
  color: var(--muted);
}

/* ── Closing call ───────────────────────────────────────────────────── */
.closing {
  margin-top: 80px;
  padding: 56px 16px;
  text-align: center;
  background: radial-gradient(ellipse 70% 90% at 50% 100%, #4a2412 0%, rgba(18, 13, 22, 0) 70%);
  border-top: 1px solid rgba(63, 45, 80, 0.5);
}
.closing h2 {
  margin-bottom: 18px;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
.site-foot {
  border-top: 1px solid rgba(63, 45, 80, 0.6);
  padding: 26px 0 40px;
  color: var(--dim);
  font-size: 14px;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: space-between;
}
.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.site-foot a {
  color: var(--muted);
  text-decoration: none;
}
.site-foot a:hover {
  color: var(--text);
}

/* ── Legal pages ────────────────────────────────────────────────────── */
.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 16px 24px;
}
.doc h1 {
  font-family: var(--logo);
  font-size: clamp(32px, 6vw, 44px);
  line-height: 1.1;
  margin: 0 0 6px;
}
.doc .meta {
  color: var(--dim);
  margin: 0 0 22px;
}
.doc .summary {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 14px 18px;
  margin-bottom: 28px;
}
.doc .summary p {
  margin: 0 0 8px;
  font-family: var(--logo);
}
.doc .summary ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}
.doc h2 {
  font-size: 24px;
  margin: 34px 0 8px;
  scroll-margin-top: 76px;
}
.doc h3 {
  font-size: 17px;
  margin: 18px 0 4px;
}
.doc p,
.doc li {
  color: #ddd2e6;
}
.doc ul,
.doc ol {
  padding-left: 22px;
}
.doc li {
  margin: 4px 0;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 15px;
}
.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}
.doc th {
  color: var(--muted);
  font-weight: 600;
}
@media (max-width: 560px) {
  .doc table,
  .doc tbody,
  .doc tr,
  .doc td {
    display: block;
  }
  .doc thead {
    display: none;
  }
  .doc tr {
    border-bottom: 1px solid var(--border);
    padding: 6px 0;
  }
  .doc td {
    border: none;
    padding: 2px 0;
  }
  .doc td:first-child {
    font-weight: 600;
    color: var(--text);
  }
}

@media (prefers-reduced-motion: reduce) {
  .embers,
  .party img {
    animation: none !important;
  }
  .embers i {
    display: none;
  }
  html {
    scroll-behavior: auto;
  }
}
