/* KGame – k-game-app.monster */
:root {
  --ink: #152033;
  --ink-soft: #3a465c;
  --muted: #6b778c;
  --line: #d8dee8;
  --paper: #f4f6f9;
  --surface: #ffffff;
  --navy: #0b1f3a;
  --navy-mid: #143356;
  --gold: #b8893d;
  --gold-soft: #d4a85a;
  --teal: #1a6b5c;
  --danger: #9b2c2c;
  --shadow: 0 12px 40px rgba(11, 31, 58, 0.08);
  --radius: 14px;
  --nav-h: 68px;
  --max: 1120px;
  --font: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --display: "Cormorant Garamond", "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(184, 137, 61, 0.12), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(26, 107, 92, 0.1), transparent 50%),
    linear-gradient(180deg, #eef2f7 0%, var(--paper) 28%, #e9edf3 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--navy-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--gold);
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--navy);
  margin: 0 0 0.6em;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.15rem);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.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);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(216, 222, 232, 0.9);
  box-shadow: 0 4px 24px rgba(11, 31, 58, 0.05);
}

.nav-inner {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--navy);
  flex-shrink: 0;
  max-width: 48%;
}

.brand img {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.brand-name {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--navy);
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] {
  color: var(--navy);
  border-bottom-color: var(--gold);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  font-family: inherit;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, #0e2748 0%, #1a4068 100%);
}

.btn-outline {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: #fff;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, #9a712f 100%);
  color: #fff;
}

.btn-gold:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.85);
  color: #fff;
}

.btn-ghost:hover {
  background: #fff;
  color: var(--navy);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  color: var(--navy);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 1rem 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  z-index: 999;
}

.nav-mobile.is-open {
  display: block;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-mobile ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.nav-mobile a {
  display: block;
  padding: 0.7rem 0;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.nav-mobile-actions .btn {
  width: 100%;
}

main {
  padding-top: var(--nav-h);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: min(72vh, 560px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 20, 38, 0.88) 0%, rgba(8, 20, 38, 0.55) 48%, rgba(8, 20, 38, 0.25) 100%),
    linear-gradient(0deg, rgba(8, 20, 38, 0.75) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 3rem;
  max-width: 640px;
  color: #fff;
  animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.35rem;
  letter-spacing: 0.03em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  color: #f5e6c8;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.hero p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.02rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

/* ===== Sections ===== */
.section {
  padding: 3.5rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}

.section-head p {
  margin-bottom: 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(216, 222, 232, 0.7);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2.5rem;
  align-items: center;
}

.intro-visual {
  position: relative;
}

.intro-visual img {
  width: 100%;
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 16px 32px rgba(11, 31, 58, 0.15));
  animation: floatSoft 5s ease-in-out infinite;
}

@keyframes floatSoft {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 1.75rem;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.brand-strip img {
  height: 28px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  opacity: 0.75;
  filter: grayscale(0.2);
  transition: opacity 0.2s;
}

.brand-strip img:hover {
  opacity: 1;
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.15rem;
}

.cat-item {
  text-decoration: none;
  color: inherit;
  text-align: center;
  padding: 1.15rem 0.75rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s;
}

.cat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: rgba(184, 137, 61, 0.45);
  color: inherit;
}

.cat-item img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto 0.85rem;
}

.cat-item h3 {
  font-family: var(--font);
  font-size: 0.98rem;
  margin: 0 0 0.35rem;
}

.cat-item p {
  font-size: 0.82rem;
  margin: 0;
  color: var(--muted);
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.article-card a.card-media {
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #e6ebf2;
}

.article-card a.card-media.landscape {
  aspect-ratio: 16 / 10;
}

.article-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.article-card:hover img {
  transform: scale(1.04);
}

.card-body {
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.card-body h3 {
  font-family: var(--font);
  font-size: 1.02rem;
  margin-bottom: 0.45rem;
}

.card-body h3 a {
  text-decoration: none;
  color: var(--navy);
}

.card-body h3 a:hover {
  color: var(--gold);
}

.card-body p {
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
  flex: 1;
}

.card-body .more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}

/* Guides list */
.guide-list {
  display: grid;
  gap: 1rem;
}

.guide-row {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.1rem;
  align-items: center;
  padding: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.guide-row:hover {
  border-color: rgba(184, 137, 61, 0.5);
  box-shadow: var(--shadow);
  color: inherit;
}

.guide-row img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

.guide-row h3 {
  font-family: var(--font);
  font-size: 1.05rem;
  margin: 0 0 0.3rem;
}

.guide-row p {
  margin: 0;
  font-size: 0.9rem;
}

.guide-row .arrow {
  color: var(--gold);
  font-size: 1.4rem;
  padding-right: 0.5rem;
}

/* FAQ */
.faq-list {
  max-width: 760px;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 1rem 0;
}

.faq-item summary {
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  color: var(--gold);
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.95rem;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  list-style: none;
  padding: 0;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.35rem;
  color: var(--line);
}

.prose {
  max-width: 720px;
}

.prose h2 {
  margin-top: 2rem;
}

.prose h3 {
  margin-top: 1.5rem;
  font-family: var(--font);
}

.prose ul,
.prose ol {
  color: var(--ink-soft);
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose figure {
  margin: 1.5rem 0;
}

.prose figcaption {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
  padding: 2.5rem 0 3.5rem;
}

.sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.sidebar-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  margin-bottom: 1rem;
}

.sidebar-box h3 {
  font-family: var(--font);
  font-size: 1rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-list li {
  margin-bottom: 0.75rem;
}

.related-list a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  display: block;
}

.related-list a:hover {
  color: var(--gold);
}

.related-list span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.15rem;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--nav-h) - 200px);
  display: flex;
  align-items: center;
  text-align: center;
  padding: 4rem 0;
}

.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  color: var(--gold);
  line-height: 1;
  margin: 0;
}

.error-page h1 {
  margin: 0.5rem 0 1rem;
}

/* Footer */
.site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  color: #fff;
  font-family: var(--font);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold-soft);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.footer-brand img {
  height: 32px;
  width: auto;
}

.footer-brand span {
  font-family: var(--display);
  font-size: 1.35rem;
  color: #fff;
  font-weight: 700;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
}

.ext-link {
  color: var(--teal);
  font-weight: 500;
}

/* Promo band */
.promo-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem 1.75rem;
  background: linear-gradient(120deg, var(--navy) 0%, #1a3a5c 55%, #1a6b5c 100%);
  border-radius: var(--radius);
  color: #fff;
}

.promo-band h2 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.promo-band p {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.promo-band img {
  max-height: 72px;
  width: auto;
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 960px) {
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .content-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .guide-row {
    grid-template-columns: 90px 1fr;
  }

  .guide-row .arrow {
    display: none;
  }

  .promo-band {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .promo-band img {
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-h: 60px;
  }

  .brand img {
    height: 30px;
    max-width: 110px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand {
    max-width: calc(100% - 100px);
    overflow: hidden;
  }

  .nav-desktop,
  .nav-actions {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .hero {
    min-height: 58vh;
  }

  .hero-content {
    padding: 2.5rem 0 2rem;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2.5rem 0;
  }
}

@media (max-width: 480px) {
  .cat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .cat-item {
    padding: 0.85rem 0.5rem;
  }

  .cat-item img {
    width: 64px;
    height: 64px;
  }
}
