@import url("https://fonts.googleapis.com/css2?family=Asap+Condensed:wght@500;700;800&family=Source+Sans+3:wght@400;600;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #050d18;
  --bg-elevated: #0a1624;
  --panel: rgba(12, 24, 38, 0.92);
  --panel-border: rgba(85, 217, 255, 0.18);
  --line: rgba(135, 170, 205, 0.22);
  --text: #eef8ff;
  --muted: #9fb6c9;
  --cyan: #55d9ff;
  --green: #79ff68;
  --gold: #f2d37a;
  --radius: 12px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  --font-display: "Asap Condensed", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --header-h: 68px;
}

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

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 18% 8%, rgba(85, 217, 255, 0.14), transparent 34%),
    radial-gradient(circle at 88% 0%, rgba(242, 211, 122, 0.1), transparent 28%),
    linear-gradient(180deg, #07111d 0%, var(--bg) 42%, #03070f 100%);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 13, 24, 0.88);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 -2px 0 rgba(85, 217, 255, 0.34);
}

.site-header__inner,
.site-main,
.site-footer__inner {
  width: min(1140px, calc(100% - 24px));
  margin: 0 auto;
}

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

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 11px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.12),
    0 10px 28px rgba(0, 0, 0, 0.32);
}

.brand-lockup__copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-lockup__copy strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.brand-lockup__copy span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.site-nav::-webkit-scrollbar {
  display: none;
}

.site-nav a {
  flex-shrink: 0;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0 12px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  border-color: rgba(85, 217, 255, 0.34);
  color: var(--text);
  background: rgba(85, 217, 255, 0.08);
}

.site-nav a[aria-current="page"] {
  box-shadow: inset 0 -2px 0 rgba(85, 217, 255, 0.55);
}

.site-nav {
  margin-left: auto;
}

/* AAA-147: six languages, each by its short code; the full name is the link's title. */
.site-langs {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.site-langs a {
  min-width: 34px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.site-langs a:hover,
.site-langs a[aria-current="true"] {
  color: var(--text);
  background: rgba(85, 217, 255, 0.08);
}

.site-langs a[aria-current="true"] {
  box-shadow: inset 0 -2px 0 rgba(85, 217, 255, 0.55);
}

.site-main {
  flex: 1;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

.hero__copy,
.hero__visual,
.panel,
.wiki-card,
.metadata-card {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(16, 32, 49, 0.96), rgba(6, 14, 24, 0.98));
  box-shadow: var(--shadow);
}

.hero__copy {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: clamp(22px, 4vw, 40px);
  border-bottom: 2px solid rgba(85, 217, 255, 0.28);
}

.eyebrow {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 14ch;
  margin-bottom: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.4vw, 3.6rem);
  font-weight: 800;
  line-height: 0.96;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

h2 {
  margin-bottom: 10px;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.02em;
}

h3 {
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

p {
  color: var(--muted);
  line-height: 1.65;
}

.lead {
  max-width: 58ch;
  margin-bottom: 0;
  color: #c7d8e7;
  font-size: 1.02rem;
}

.hero__actions,
.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(85, 217, 255, 0.34);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  color: var(--text);
  background: rgba(85, 217, 255, 0.08);
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  border-color: rgba(85, 217, 255, 0.52);
  background: rgba(85, 217, 255, 0.14);
}

.button--primary {
  border-color: rgba(121, 255, 104, 0.55);
  color: #0b1a12;
  background: linear-gradient(180deg, #8dff78 0%, #5fd84d 100%);
  box-shadow: 0 10px 24px rgba(95, 216, 77, 0.18);
}

.button--primary:hover {
  background: linear-gradient(180deg, #9dff8a 0%, #6ae658 100%);
}

.hero__visual {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 18px;
  background:
    radial-gradient(circle at 50% 0%, rgba(85, 217, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(16, 32, 49, 0.96), rgba(6, 14, 24, 0.98));
}

.hero-screenshots {
  margin-top: 18px;
}

.screenshot-rail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: min(1140px, calc(100% - 24px));
  margin: 0 auto;
}

.screenshot-rail img {
  width: 100%;
  /* The tag's height="1920" would otherwise win over aspect-ratio and crop a tall strip. */
  height: auto;
  min-width: 0;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(85, 217, 255, 0.22);
  border-radius: 10px;
  object-fit: cover;
  object-position: top center;
  background: #07101a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.hero-feature {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  object-fit: cover;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.hero-feature--fallback {
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 18px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(85, 217, 255, 0.12), rgba(242, 211, 122, 0.08)),
    rgba(8, 18, 30, 0.96);
  font-family: var(--font-display);
  text-align: center;
}

.hero-feature--fallback strong {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-feature--fallback span {
  color: var(--muted);
  font-size: 0.78rem;
}

.grid,
.wiki-grid,
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.panel {
  padding: 22px;
  border-left: 3px solid rgba(85, 217, 255, 0.42);
}

.panel ul,
.metadata-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.wiki-card,
.metadata-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  text-decoration: none;
  border-left: 3px solid rgba(242, 211, 122, 0.42);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.wiki-card:hover,
.metadata-card:hover {
  transform: translateY(-2px);
  border-color: rgba(85, 217, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(18, 36, 54, 0.98), rgba(8, 16, 28, 0.98));
}

.wiki-card span,
.metadata-card span {
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.wiki-card p,
.metadata-card p {
  margin-bottom: 0;
}

.legal-page .panel,
.wiki-page .panel {
  max-width: 920px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(4, 10, 18, 0.92);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 12px;
  align-items: center;
  padding: 20px 0 24px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .hero,
  .grid,
  .wiki-grid,
  .metadata-grid {
    grid-template-columns: 1fr;
  }

  .hero__copy {
    order: 1;
  }

  .hero__visual {
    order: 2;
    min-height: auto;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 10px 0 12px;
    min-height: auto;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
  }

  .site-langs {
    padding-left: 0;
    border-left: 0;
  }

  h1 {
    max-width: none;
    font-size: clamp(1.85rem, 8vw, 2.4rem);
  }

  .hero__actions .button {
    flex: 1 1 calc(50% - 10px);
    min-width: 140px;
  }

  .screenshot-rail {
    grid-template-columns: repeat(3, minmax(100px, 1fr));
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scroll-snap-type: x mandatory;
  }

  .screenshot-rail img {
    scroll-snap-align: start;
  }
}

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

  .button,
  .wiki-card,
  .metadata-card,
  .site-nav a {
    transition: none;
  }
}
