/* KGame – kg-web.autos | Game knowledge portal */
:root {
  --bg: #0a1018;
  --bg-elevated: #121a26;
  --bg-soft: #182233;
  --surface: #1c2738;
  --line: rgba(148, 163, 184, 0.18);
  --text: #e8eef7;
  --muted: #9aadc4;
  --accent: #2f9bff;
  --accent-2: #1dd1a1;
  --gold: #e0b24a;
  --danger: #ff6b6b;
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 72px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --font-display: "Sora", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", sans-serif;
  --max: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(47, 155, 255, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(29, 209, 161, 0.08), transparent 50%),
    linear-gradient(180deg, #0b121c 0%, var(--bg) 40%, #070b12 100%);
  min-height: 100vh;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #7ec4ff;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 1rem;
  color: var(--muted);
}

ul, ol {
  color: var(--muted);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* ===== Header / Nav ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10, 16, 24, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.28);
  background: rgba(8, 12, 20, 0.94);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: var(--nav-h);
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 1002;
  max-height: calc(var(--nav-h) - 20px);
}

.brand img {
  height: 42px;
  width: auto;
  max-height: 42px;
  object-fit: contain;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-left: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #2f9bff, #1a7fe0);
  color: #fff !important;
  box-shadow: 0 8px 24px rgba(47, 155, 255, 0.28);
}

.btn-primary:hover {
  color: #fff !important;
  box-shadow: 0 10px 28px rgba(47, 155, 255, 0.4);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text) !important;
}

.btn-ghost:hover {
  border-color: rgba(47, 155, 255, 0.45);
  background: rgba(47, 155, 255, 0.08);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.9rem;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  z-index: 1002;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.menu-toggle .icon-close {
  display: none;
}

.menu-toggle.is-open .icon-menu {
  display: none;
}

.menu-toggle.is-open .icon-close {
  display: block;
}

.nav-mobile {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(5, 8, 14, 0.72);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.nav-mobile.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.nav-mobile-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(86vw, 340px);
  height: 100%;
  background: linear-gradient(180deg, #121a26, #0a1018);
  border-left: 1px solid var(--line);
  padding: calc(var(--nav-h) + 1.2rem) 1.25rem 2rem;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  box-shadow: var(--shadow);
}

.nav-mobile.is-open .nav-mobile-panel {
  transform: translateX(0);
}

.nav-mobile a {
  color: var(--text);
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-mobile a:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.nav-mobile-actions .btn {
  width: 100%;
}

/* ===== Hero ===== */
.page-main {
  padding-top: var(--nav-h);
}

.hero {
  position: relative;
  min-height: min(78vh, 680px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 11, 18, 0.92) 0%, rgba(7, 11, 18, 0.72) 42%, rgba(7, 11, 18, 0.35) 100%),
    linear-gradient(0deg, rgba(7, 11, 18, 0.95) 0%, transparent 48%);
}

.hero-content {
  width: min(100% - 2rem, var(--max));
  margin: 0 auto 4.5rem;
  max-width: 640px;
  margin-right: auto;
  margin-left: max(1rem, calc((100% - var(--max)) / 2));
  animation: rise 0.8s ease both;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 0.6rem;
  background: linear-gradient(135deg, #fff 20%, #8ec8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  font-size: clamp(1.35rem, 2.8vw, 1.85rem);
  font-weight: 650;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.hero p {
  font-size: 1.05rem;
  max-width: 34rem;
  margin-bottom: 1.5rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  animation: fade-up 0.7s ease both;
}

.reveal-delay-1 { animation-delay: 0.1s; }
.reveal-delay-2 { animation-delay: 0.2s; }
.reveal-delay-3 { animation-delay: 0.3s; }

/* ===== Sections ===== */
.section {
  padding: 4.25rem 0;
}

.section-alt {
  background: linear-gradient(180deg, rgba(24, 34, 51, 0.45), transparent);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 640px;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

/* Brand intro */
.intro-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.intro-copy h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
}

.intro-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.intro-visual::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.cat-item {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #000;
  border: 1px solid var(--line);
  min-height: 180px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 155, 255, 0.45);
}

.cat-item img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.cat-item:hover img {
  transform: scale(1.05);
}

.cat-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.1rem 1rem 0.95rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.88));
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.15rem;
  transition: opacity 0.2s ease;
}

.article-card:hover {
  opacity: 0.92;
}

.article-card .thumb {
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  margin-bottom: 0.95rem;
  aspect-ratio: 16 / 10;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .meta {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.article-card .tag {
  color: var(--accent-2);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.45rem;
}

.article-card h3 a {
  color: var(--text);
}

.article-card h3 a:hover {
  color: var(--accent);
}

.article-card p {
  font-size: 0.92rem;
  margin-bottom: 0;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 820px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 650;
  font-family: var(--font-display);
  color: var(--text);
  position: relative;
  padding-right: 2.5rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.2rem;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-body {
  padding: 0 1.15rem 1.1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.75rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(700px 280px at 0% 0%, rgba(47, 155, 255, 0.12), transparent 60%);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.84rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb span {
  opacity: 0.5;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  max-width: 820px;
}

.page-hero .lead {
  max-width: 680px;
  font-size: 1.05rem;
  margin-bottom: 0;
}

/* Article detail */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
  padding: 2.5rem 0 4rem;
}

.article-body {
  max-width: 760px;
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 1.75rem;
  background: #000;
}

.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-body h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
}

.article-body h3 {
  font-size: 1.12rem;
  margin-top: 1.5rem;
}

.article-body p,
.article-body li {
  font-size: 1.02rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 1.25rem;
}

.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar-block {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
}

.sidebar-block h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.related-list a {
  color: var(--text);
  font-weight: 550;
  font-size: 0.94rem;
  display: block;
}

.related-list a:hover {
  color: var(--accent);
}

.related-list span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.2rem;
  font-weight: 400;
}

.promo-banner {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}

.promo-banner img {
  width: 100%;
}

/* Content prose blocks on listing pages */
.prose {
  max-width: 760px;
}

.prose h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.prose p + h2 {
  margin-top: 2.25rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: start;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.feature-item {
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}

.feature-item h3 {
  font-size: 1.08rem;
}

.feature-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  background: #000;
}

/* Brand strip */
.brand-strip {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 1.5rem 0;
}

.brand-strip img {
  width: 100%;
  height: 48px;
  object-fit: contain;
  opacity: 0.75;
  filter: grayscale(0.2);
  transition: opacity 0.2s ease;
}

.brand-strip img:hover {
  opacity: 1;
}

/* Guide / category lists */
.list-stack {
  display: grid;
  gap: 1.25rem;
}

.list-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
}

.list-item .thumb {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
  aspect-ratio: 16 / 10;
}

.list-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-item h2,
.list-item h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.list-item h2 a,
.list-item h3 a {
  color: var(--text);
}

.list-item h2 a:hover,
.list-item h3 a:hover {
  color: var(--accent);
}

/* Legal / about */
.legal-body {
  max-width: 780px;
  padding: 2.5rem 0 4rem;
}

.legal-body h2 {
  margin-top: 2rem;
  font-size: 1.25rem;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.6rem;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #070b12;
  padding: 3rem 0 1.75rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 280px;
}

.footer-col h3 {
  font-size: 0.92rem;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  padding: 0.28rem 0;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--muted);
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-link {
  color: var(--accent);
  font-weight: 600;
}

.note-box {
  border-left: 3px solid var(--gold);
  padding: 0.85rem 1rem;
  background: rgba(224, 178, 74, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.two-col-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.two-col-media figure {
  margin: 0;
  background: #000;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}

.two-col-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.two-col-media figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: var(--bg-elevated);
}

/* Responsive */
@media (max-width: 980px) {
  .intro-grid,
  .content-grid,
  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .cat-grid,
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero {
    min-height: min(70vh, 560px);
  }
}

@media (min-width: 761px) {
  .nav-mobile {
    display: none !important;
  }
}

@media (max-width: 760px) {
  :root {
    --nav-h: 64px;
  }

  .nav-desktop,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .brand img {
    height: 36px;
    max-height: 36px;
  }

  .cat-grid,
  .card-grid,
  .feature-row,
  .two-col-media {
    grid-template-columns: 1fr;
  }

  .list-item {
    grid-template-columns: 1fr;
  }

  .list-item .thumb {
    max-width: 100%;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .brand-strip {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-content {
    margin-bottom: 3rem;
  }

  .section {
    padding: 3.25rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
