/* KGame – k-gameapp.quest | Game info portal */
:root {
  --bg: #f3f6f4;
  --bg-alt: #e8efeb;
  --surface: #ffffff;
  --ink: #14201c;
  --ink-soft: #3d4f47;
  --muted: #6b7c74;
  --line: #cfdad3;
  --brand: #0a6b5c;
  --brand-deep: #064d42;
  --accent: #d97706;
  --accent-soft: #fef3c7;
  --danger: #b91c1c;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(20, 32, 28, 0.08);
  --header-h: 72px;
  --font-display: "Outfit", "Be Vietnam Pro", sans-serif;
  --font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --max: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(10, 107, 92, 0.12), transparent 60%),
    radial-gradient(900px 400px at 90% 0%, rgba(217, 119, 6, 0.1), transparent 55%),
    linear-gradient(180deg, #f7faf8 0%, var(--bg) 40%, #eef3f0 100%);
  line-height: 1.65;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

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(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(207, 218, 211, 0.9);
  box-shadow: 0 4px 18px rgba(20, 32, 28, 0.05);
}

.header-inner {
  height: var(--header-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(--ink);
  min-width: 0;
  flex-shrink: 1;
}

.brand img {
  height: 40px;
  width: auto;
  max-height: 40px;
  object-fit: contain;
}

.brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-text span {
  color: var(--brand);
}

@media (max-width: 380px) {
  .brand-text {
    display: none;
  }
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.nav-desktop a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--brand-deep);
  background: rgba(10, 107, 92, 0.08);
}

.header-actions {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.1rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(10, 107, 92, 0.28);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--ink);
}

.btn-accent {
  background: linear-gradient(135deg, #f59e0b, var(--accent));
  color: #fff;
  box-shadow: 0 8px 18px rgba(217, 119, 6, 0.28);
}

.btn-accent:hover {
  color: #fff;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.45rem 0.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.menu-toggle svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.mobile-panel {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 1rem 0 1.25rem;
  z-index: 999;
}

.mobile-panel.open {
  display: block;
  animation: slideDown 0.25s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg-alt);
}

.mobile-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-top: 1rem;
}

.mobile-auth .btn {
  width: 100%;
}

main {
  padding-top: var(--header-h);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 640px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0b2f2a;
}

.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(6, 35, 30, 0.88) 0%, rgba(6, 35, 30, 0.55) 48%, rgba(6, 35, 30, 0.25) 100%),
    linear-gradient(0deg, rgba(6, 35, 30, 0.75) 0%, transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3.5rem 0 3rem;
  max-width: 640px;
  color: #fff;
  animation: fadeUp 0.7s ease both;
}

.hero-content h1 {
  color: #fff;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  margin-bottom: 0.85rem;
}

.hero-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid rgba(207, 218, 211, 0.55);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 720px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-head p {
  margin-bottom: 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

/* Intro */
.intro-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

@media (min-width: 900px) {
  .intro-grid {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

.intro-visual {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0b2f2a;
}

.intro-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.checklist li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  color: var(--ink-soft);
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--brand);
}

/* Categories */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 700px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1000px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.cat-item {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  background: #12352f;
  min-height: 160px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.cat-item:hover {
  transform: translateY(-4px);
}

.cat-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  opacity: 0.85;
  transition: transform 0.35s ease, opacity 0.35s ease;
}

.cat-item:hover img {
  transform: scale(1.05);
  opacity: 1;
}

.cat-item span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.85rem 1rem;
  color: #fff;
  font-weight: 700;
  font-family: var(--font-display);
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.75), transparent);
}

/* Cards / articles */
.card-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 700px) {
  .card-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(20, 32, 28, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.article-card .thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #12352f;
}

.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;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.article-card .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
  text-decoration: none;
  color: var(--ink);
}

.article-card h3 a:hover {
  color: var(--brand);
}

.article-card p {
  font-size: 0.92rem;
  margin-bottom: 1rem;
  flex: 1;
}

.article-card .more {
  font-weight: 600;
  text-decoration: none;
  color: var(--brand);
}

/* Brands strip */
.brand-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  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: 36px;
  width: auto;
  object-fit: contain;
  opacity: 0.85;
  filter: grayscale(0.2);
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.75rem;
  max-width: 860px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  font-family: var(--font-display);
  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(--brand);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item .faq-body {
  padding: 0 1.15rem 1.1rem;
  color: var(--ink-soft);
}

/* Page hero (inner) */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 107, 92, 0.08), transparent);
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--brand);
}

.breadcrumb span {
  color: var(--line);
}

/* Article layout */
.article-layout {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0 3.5rem;
}

@media (min-width: 980px) {
  .article-layout {
    grid-template-columns: 1fr 300px;
    align-items: start;
  }
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
}

@media (min-width: 700px) {
  .prose {
    padding: 2rem;
  }
}

.prose .cover {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: #12352f;
}

.prose .cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.prose h2 {
  margin-top: 1.75rem;
  font-size: 1.35rem;
}

.prose h3 {
  margin-top: 1.35rem;
  font-size: 1.1rem;
}

.prose ul, .prose ol {
  padding-left: 1.25rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.sidebar {
  display: grid;
  gap: 1rem;
}

.side-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
}

.side-box h3 {
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.side-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.side-links li {
  margin-bottom: 0.65rem;
}

.side-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-soft);
}

.side-links a:hover {
  color: var(--brand);
}

/* Legal */
.legal-content {
  max-width: 820px;
  padding: 2.5rem 0 3.5rem;
}

.legal-content h2 {
  margin-top: 1.75rem;
  font-size: 1.25rem;
}

/* Error pages */
.error-page {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  background: #0d241f;
  color: rgba(255, 255, 255, 0.82);
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
}

.site-footer h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.85rem;
}

.site-footer p,
.site-footer a {
  color: rgba(255, 255, 255, 0.75);
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover {
  color: #fbbf24;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

/* Utilities */
.cta-banner {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, rgba(10, 107, 92, 0.95), rgba(6, 77, 66, 0.92)),
    #064d42;
  color: #fff;
  box-shadow: var(--shadow);
}

@media (min-width: 800px) {
  .cta-banner {
    grid-template-columns: 1.2fr 0.8fr;
  }
}

.cta-banner h2,
.cta-banner p {
  color: #fff;
}

.cta-banner img {
  justify-self: center;
  max-height: 180px;
  width: auto;
}

.notice {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  padding: 0.9rem 1rem;
  border-radius: 0 10px 10px 0;
  color: #78350f;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.related-grid {
  margin-top: 2rem;
}

.text-link-out {
  font-weight: 600;
}

/* Desktop nav */
@media (min-width: 980px) {
  .nav-desktop,
  .header-actions {
    display: flex;
  }

  .menu-toggle {
    display: none;
  }

  .mobile-panel {
    display: none !important;
  }
}

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
