/* KGame – k-game-web.beauty */
@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap");

:root {
  --ink: #0c1524;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #dbe3ef;
  --bg: #eef3f9;
  --surface: #ffffff;
  --brand: #0891b2;
  --brand-deep: #0e7490;
  --brand-light: #ecfeff;
  --accent: #ca8a04;
  --nav: #07101c;
  --nav-text: #e2e8f0;
  --ok: #059669;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(7, 16, 28, 0.08);
  --header-h: 72px;
  --max: 1120px;
  --font: "Be Vietnam Pro", sans-serif;
  --display: "Sora", "Be Vietnam Pro", sans-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(8, 145, 178, 0.12), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(202, 138, 4, 0.08), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 40%, #e8eef6 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  font-family: var(--display);
  line-height: 1.25;
  margin: 0 0 0.75rem;
  color: var(--ink);
}

p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(7, 16, 28, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: min(180px, 42vw);
  text-decoration: none;
}

.brand-link img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  color: var(--nav-text);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  background: rgba(8, 145, 178, 0.2);
  color: #fff;
  text-decoration: none;
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  color: #fff;
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.35);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-outline {
  background: var(--surface);
  color: var(--brand-deep);
  border-color: #a5f3fc;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
  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;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: #0b1626;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 1.25rem 1.25rem;
  z-index: 999;
  box-shadow: var(--shadow);
}

.mobile-panel.is-open {
  display: block;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-panel a {
  display: block;
  color: var(--nav-text);
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  font-weight: 500;
}

.mobile-panel a:hover {
  color: #67e8f9;
}

.mobile-auth {
  display: flex;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mobile-auth .btn {
  flex: 1;
}

.site-main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #050b14;
}

.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(5, 11, 20, 0.88) 0%, rgba(5, 11, 20, 0.55) 48%, rgba(5, 11, 20, 0.35) 100%),
    linear-gradient(0deg, rgba(5, 11, 20, 0.85) 0%, transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 3.5rem 0 3rem;
  max-width: 640px;
  animation: fadeUp 0.7s 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, 6vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 0.6rem;
}

.hero h1 {
  color: #f8fafc;
  font-size: clamp(1.35rem, 3.2vw, 1.85rem);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.hero p {
  color: #cbd5e1;
  font-size: 1.05rem;
  max-width: 34rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(219, 227, 239, 0.8);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 40rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.9rem);
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 0.5rem;
}

/* Intro / prose */
.prose {
  max-width: 48rem;
}

.prose a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.prose li {
  margin-bottom: 0.45rem;
}

/* Category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.cat-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #0b1220;
  min-height: 160px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
  text-decoration: none;
}

.cat-item img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.cat-item:hover img {
  transform: scale(1.05);
  opacity: 1;
}

.cat-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
}

/* Cards / articles */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(7, 16, 28, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.article-card a {
  text-decoration: none;
  color: inherit;
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0b1220;
}

.article-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.article-card:hover .thumb img {
  transform: scale(1.04);
}

.article-card .body {
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card .meta {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.article-card p {
  font-size: 0.92rem;
  margin-bottom: 0;
  flex: 1;
}

/* Brand strip */
.brand-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.brand-strip img {
  margin: 0 auto;
  max-height: 42px;
  width: auto;
  opacity: 0.85;
  filter: grayscale(0.2);
}

/* Promo band */
.promo-band {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}

.promo-band img {
  border-radius: var(--radius);
  width: 100%;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 48rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 650;
  font-family: var(--display);
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--brand);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-a {
  padding: 0 1.15rem 1.1rem;
  color: var(--ink-soft);
  margin: 0;
}

/* Page hero small */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(8, 145, 178, 0.08), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb span {
  color: var(--ink-soft);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.page-hero .lead {
  max-width: 40rem;
  margin-bottom: 0;
}

/* Article layout */
.article-layout {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 3.5rem;
}

.article-cover {
  border-radius: var(--radius);
  overflow: hidden;
  background: #0b1220;
  margin-bottom: 1.5rem;
}

.article-cover img {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  margin: 0 auto;
}

.related-grid {
  display: grid;
  gap: 1rem;
}

.related-grid a {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.85rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.65rem;
  text-decoration: none;
  color: inherit;
}

.related-grid a img {
  width: 88px;
  height: 66px;
  object-fit: cover;
  border-radius: 8px;
  background: #0b1220;
}

.related-grid h3 {
  font-size: 0.95rem;
  margin: 0;
}

/* Category page tiles */
.tile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
}

.tile-visual {
  background: #0b1220;
  min-height: 180px;
}

.tile-visual img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: contain;
  padding: 1rem;
}

.tile-body {
  padding: 1.25rem;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: #07101c;
  color: #94a3b8;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  color: #f1f5f9;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.site-footer a {
  color: #94a3b8;
  display: block;
  margin-bottom: 0.45rem;
  text-decoration: none;
}

.site-footer a:hover {
  color: #67e8f9;
}

.footer-brand img {
  height: 36px;
  width: auto;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  color: #94a3b8;
  font-size: 0.92rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.25rem;
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (min-width: 720px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .brand-strip {
    grid-template-columns: repeat(8, 1fr);
  }

  .promo-band {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .tile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tile {
    grid-template-columns: 160px 1fr;
  }

  .tile-visual {
    min-height: 100%;
  }

  .tile-visual img {
    min-height: 140px;
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }

  .article-layout {
    grid-template-columns: 1fr 280px;
  }
}

@media (min-width: 980px) {
  .nav-desktop {
    display: flex;
  }

  .header-actions {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-panel {
    display: none !important;
  }

  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid.two-col {
    grid-template-columns: repeat(2, 1fr);
  }
}
