/* LETHEON site. Dark, flat, one gold accent (the logo and the main download button). */

@font-face {
  font-family: "Russo One";
  src: url("fonts/RussoOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Rubik";
  src: url("fonts/Rubik-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0e0f12;
  --text: #e9e5dc;
  --muted: #a3a097;
  --dim: #858279;
  --rule: rgba(233, 229, 220, 0.1);
  --hair: rgba(233, 229, 220, 0.16);
  --gold: #d9a441;
  --gold-hi: #e7b75c;
  --on-gold: #17130b;
  --gutter: 16px;
  --display: "Russo One", "Arial Black", system-ui, sans-serif;
  --body: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

/* Language: both texts live in the markup, the inactive one is hidden. */
html[lang="ru"] body [lang="en"],
html[lang="en"] body [lang="ru"] { display: none !important; }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html:has(dialog[open]) { overflow: hidden; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

::selection { background: rgba(217, 164, 65, 0.35); color: #fff; }

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

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

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

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--text);
  color: var(--bg);
  text-decoration: none;
  border-radius: 4px;
  font-size: 15px;
}
.skip:focus { top: 12px; }

/* Top bar: just the language switch. */
.top {
  display: flex;
  justify-content: flex-end;
  padding: 16px var(--gutter) 0;
  max-width: 1600px;
  margin-inline: auto;
}
.lang { display: flex; gap: 2px; }
.lang button {
  appearance: none;
  background: none;
  border: 0;
  padding: 8px 10px;
  min-width: 44px;
  min-height: 40px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--dim);
  cursor: pointer;
  border-radius: 4px;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { color: var(--text); }
.lang button[aria-pressed="true"]::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 3px;
  background: var(--text);
  opacity: 0.6;
}

/* Hero */
.hero {
  text-align: center;
  padding-top: 32px;
  padding-bottom: 48px;
}
.emblem {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
}
.logo {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(52px, 14vw, 96px);
  line-height: 0.95;
  letter-spacing: 0.06em;
  /* letter-spacing adds a trailing gap; pull it back so the word stays centred */
  margin-right: -0.06em;
  color: var(--gold);
}
.tagline {
  margin: 18px auto 0;
  max-width: 34ch;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.35;
  font-weight: 400;
  color: var(--text);
  text-wrap: balance;
}
.lead {
  margin: 14px auto 0;
  max-width: 64ch;
  color: var(--muted);
  text-wrap: pretty;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--hair);
  border-radius: 4px;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: rgba(233, 229, 220, 0.34); }
/* The visitor's own system gets the solid gold button and comes first. main.js sets
   html.mac in <head>, before the first paint, so nothing swaps or fades after load. */
html:not(.mac) .btn[data-os="win"],
html.mac .btn[data-os="mac"] {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--on-gold);
}
html:not(.mac) .btn[data-os="win"]:hover,
html.mac .btn[data-os="mac"]:hover { background: var(--gold-hi); border-color: var(--gold-hi); }
html.mac .btn[data-os="mac"] { order: -1; }
.btn:active { transform: translateY(1px); }

/* Phones cannot run the game: say so once, quietly, above the buttons. */
.phone-note {
  display: none;
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}
@media (max-width: 599px), (pointer: coarse) {
  .phone-note { display: block; }
}

.note {
  margin-top: 16px;
  font-size: 14px;
  color: var(--dim);
}

.firstrun {
  margin: 10px auto 0;
  max-width: 58ch;
  font-size: 14px;
  color: var(--dim);
}
.firstrun summary {
  display: inline-block;
  cursor: pointer;
  padding: 4px 2px;
  text-decoration: underline;
  text-decoration-color: var(--hair);
  text-underline-offset: 4px;
  list-style: none;
}
.firstrun summary::-webkit-details-marker { display: none; }
.firstrun summary:hover { color: var(--muted); }
.firstrun p {
  margin-top: 8px;
  text-align: left;
  color: var(--muted);
  line-height: 1.55;
}

/* Screenshot band */
.band {
  max-width: 1600px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
/* No frames: the pictures sit straight on the page; hover lifts them a little. */
.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: #13151a;
  cursor: zoom-in;
  overflow: hidden;
  line-height: 0;
}
.shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  opacity: 0.94;
}
.shot:hover img { opacity: 1; }

/* Sections */
.section { margin-top: 112px; }
.section h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  margin-bottom: 36px;
}
.cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 48px;
  row-gap: 44px;
}
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.item {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
}
.item h3,
.cls h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
  margin-bottom: 10px;
}
.item p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

/* Classes */
/* The picker shows the three cards side by side; the three descriptions sit under them,
   each under its own card. */
.classes {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}
.class-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 32px;
}
.cls-note { grid-column: 1 / -1; margin-top: 8px; }
.classes-shot .shot img { aspect-ratio: auto; object-fit: contain; }
.cls-note {
  border-top: 1px solid var(--rule);
  padding-top: 16px;
  font-size: 14px;
  color: var(--dim);
}
.cls {
  border-top: 1px solid var(--rule);
  padding: 18px 0 22px;
}

.cls h3 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 21px;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}
.cls p { color: var(--muted); font-size: 16px; }
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--text);
  opacity: 0.86;
}
/* Each skill gets its own small marker, so a wrapped line never starts with a stray dot. */
.skills li { white-space: nowrap; }
.skills li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 8px;
  vertical-align: middle;
  transform: rotate(45deg) translateY(-1px);
  background: var(--dim);
}

/* Coming soon: same rhythm, a touch quieter */
.soon .item { border-top-style: dashed; }
.soon .item h3 { color: var(--muted); }
.soon .item p { color: var(--dim); }

/* The end of the page: the same download, no heading, no box. */
.outro {
  margin-top: 112px;
  text-align: center;
}
.outro .cta { margin-top: 0; }

/* Online counter */
.online {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 8px;
  font-size: 15px;
  color: var(--muted);
}
.online[hidden] { display: none; }
.online .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  opacity: 0.7;
  margin-right: 4px;
}
.online-n {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Footer: the rule lines up with the content, not with the gutter */
.foot.wrap {
  width: calc(100% - 2 * var(--gutter));
  max-width: calc(1120px - 2 * var(--gutter));
  padding-inline: 0;
}
.foot {
  margin-top: 56px;
  padding-top: 28px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--dim);
}
.foot img { width: 22px; height: 22px; opacity: 0.55; }

/* Lightbox */
.lb {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 9, 11, 0.96);
  color: var(--text);
  overflow: hidden;
}
.lb[open] { display: flex; align-items: center; justify-content: center; }
.lb:focus-visible { outline: none; }
.lb::backdrop { background: rgba(8, 9, 11, 0.6); }
.lb-fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: calc(100vw - 32px);
  padding: 56px 0 24px;
}
/* main.js sets --nw (the natural width) and --ar (width / height) before the picture
   arrives, so the box has its final size at once: no sliver, no jump. Above 600px the
   width leaves room for the round prev / next buttons at the sides. */
#lb-img {
  --side: 32px;
  display: block;
  width: min(var(--nw, 1600px), calc(100vw - var(--side)), calc((100dvh - 140px) * var(--ar, 1.7778)));
  height: auto;
  aspect-ratio: var(--ar, 1.7778);
  border-radius: 3px;
  background: #13151a;
}
@media (min-width: 600px) {
  #lb-img { --side: 128px; }
}
.lb-fig figcaption {
  max-width: 70ch;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(14, 15, 18, 0.7);
  color: var(--text);
  cursor: pointer;
}
.lb-btn:hover { background: rgba(233, 229, 220, 0.1); }
.lb-btn svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

/* Motion, only when welcome */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .lang button, .lb-btn { transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
  .shot img { transition: opacity 0.15s; }
  .lb[open] { animation: lb-in 0.16s ease-out; }
  @keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
}

/* Tablet and down */
@media (max-width: 899px) {
  .cols, .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
  .class-list { column-gap: 20px; }
  .shots {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    margin-inline: calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 8px;
    scrollbar-width: thin;
  }
  .shots li { flex: 0 0 84%; scroll-snap-align: start; }
}

/* Phones */
@media (max-width: 599px) {
  body { font-size: 16px; }
  .hero { padding-top: 20px; padding-bottom: 40px; }
  .emblem { width: 56px; height: 56px; margin-bottom: 18px; }
  .cta { flex-direction: column; align-items: stretch; margin-top: 18px; }
  .btn { width: 100%; }
  .section { margin-top: 80px; }
  .section h2 { margin-bottom: 26px; }
  .cols, .cols-2 { grid-template-columns: minmax(0, 1fr); row-gap: 32px; }
  .class-list { grid-template-columns: minmax(0, 1fr); }
  .outro { margin-top: 80px; }
  .lb-prev, .lb-next { top: auto; bottom: 12px; transform: none; }
  .lb-prev { left: calc(50% - 56px); }
  .lb-next { right: calc(50% - 56px); }
  .lb-fig { padding-bottom: 72px; }
}

/* Wide screens: a little more air */
@media (min-width: 1200px) {
  :root { --gutter: 32px; }
  .hero { padding-top: 36px; padding-bottom: 40px; }
}
