/* ==========================================================================
   GameKyn — Design System
   Static CSS. No external fonts, no frameworks, no JS dependency.
   Edit tokens in :root to restyle the entire site.
   ========================================================================== */

:root {
  /* Color tokens */
  --bg:            #0a0c10;
  --bg-elevated:   #11151b;
  --surface:       #161b23;
  --surface-hover: #1d232d;
  --border:        #262d38;
  --border-strong: #38404e;

  --text:          #e8ecf3;
  --text-muted:    #a3adbd;
  --text-dim:      #6d7787;

  --accent:        #8b5cf6;
  --accent-bright: #a78bfa;
  --accent-soft:   rgba(139, 92, 246, 0.12);
  --cyan:          #22d3ee;
  --lime:          #a3e635;
  --amber:         #fbbf24;
  --rose:          #fb7185;

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  /* Layout */
  --wrap:      1180px;
  --wrap-read: 760px;
  --radius:    14px;
  --radius-sm: 8px;

  --shadow: 0 10px 40px -12px rgba(0, 0, 0, 0.7);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent-bright); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.22;
  letter-spacing: -0.022em;
  font-weight: 750;
  margin: 0;
}

/* ------------------------------------------------------------- Layout -- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 22px;
}

.wrap-read {
  width: 100%;
  max-width: var(--wrap-read);
  margin-inline: auto;
  padding-inline: 22px;
}

/* ------------------------------------------------------------- Header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 16, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 66px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }

.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 900;
  color: #0a0c10;
  flex-shrink: 0;
}

.logo-kyn { color: var(--accent-bright); }

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.93rem;
  font-weight: 550;
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

.nav-toggle { display: none; }

/* --------------------------------------------------------------- Hero -- */
.hero {
  padding: 74px 0 54px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(900px 380px at 15% -10%, rgba(139, 92, 246, 0.16), transparent 70%),
    radial-gradient(700px 340px at 88% 0%, rgba(34, 211, 238, 0.10), transparent 70%);
}

.hero h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.5rem);
  max-width: 17ch;
  margin-bottom: 18px;
}

.hero p {
  font-size: 1.13rem;
  color: var(--text-muted);
  max-width: 62ch;
  margin: 0;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 16px;
}

/* -------------------------------------------------------- Section head -- */
.section {
  padding: 60px 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-head h2 {
  font-size: 1.45rem;
}

.section-head .count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ------------------------------------------------------------- Cards -- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 26px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-3px);
}

.card-media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elevated);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-media img { transform: scale(1.045); }

.card-body {
  padding: 20px 21px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 11px;
}

.card h3 {
  font-size: 1.13rem;
  line-height: 1.35;
}

.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent-bright); text-decoration: none; }

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.62;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

/* Featured card (first item on the homepage) */
.card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.card-featured .card-media {
  flex: 0 0 52%;
  aspect-ratio: auto;
}

.card-featured .card-body {
  justify-content: center;
  padding: 34px 36px;
  gap: 14px;
}

.card-featured h3 { font-size: 1.75rem; letter-spacing: -0.025em; }
.card-featured p { font-size: 1.02rem; flex: 0; }

/* --------------------------------------------------------------- Tag -- */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
}

.tag-guide  { background: rgba(34, 211, 238, 0.12);  color: var(--cyan); }
.tag-opinion{ background: rgba(251, 191, 36, 0.12);  color: var(--amber); }
.tag-news   { background: rgba(251, 113, 133, 0.12); color: var(--rose); }
.tag-list   { background: rgba(163, 230, 53, 0.12);  color: var(--lime); }

/* ------------------------------------------------------------ Article -- */
.article-head {
  padding: 52px 0 30px;
  background:
    radial-gradient(800px 340px at 20% -20%, rgba(139, 92, 246, 0.14), transparent 70%);
}

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-dim); }
.breadcrumb a:hover { color: var(--text-muted); }

.article-head h1 {
  font-size: clamp(1.95rem, 4.6vw, 2.85rem);
  margin: 14px 0 20px;
}

.byline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.byline .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #0a0c10;
  font-size: 0.95rem;
}

.byline .sep { color: var(--text-dim); }
.byline strong { color: var(--text); font-weight: 650; }

.article-hero {
  margin: 34px 0 8px;
}

.article-hero img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.article-hero figcaption {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
}

/* ------------------------------------------------------- Article body -- */
.article-body {
  padding: 12px 0 60px;
  font-size: 1.075rem;
  line-height: 1.78;
}

.article-body > p { margin: 0 0 1.32em; color: #dbe2ec; }

.article-body h2 {
  font-size: 1.62rem;
  margin: 2.15em 0 0.6em;
  padding-top: 0.2em;
  scroll-margin-top: 90px;
}

.article-body h3 {
  font-size: 1.22rem;
  margin: 1.85em 0 0.5em;
  color: var(--text);
  scroll-margin-top: 90px;
}

.article-body ul, .article-body ol {
  margin: 0 0 1.4em;
  padding-left: 1.35em;
  color: #dbe2ec;
}

.article-body li { margin-bottom: 0.6em; }
.article-body li::marker { color: var(--accent); }

.article-body strong { color: #fff; font-weight: 650; }

.article-body figure { margin: 2em 0; }

.article-body figure img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.article-body figcaption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--text-dim);
  text-align: center;
}

.lead {
  font-size: 1.2rem !important;
  line-height: 1.68;
  color: var(--text) !important;
  margin-bottom: 1.5em !important;
}

/* Pull quote */
.pullquote {
  margin: 2em 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--accent);
  font-size: 1.2rem;
  line-height: 1.55;
  font-weight: 550;
  color: #fff;
  letter-spacing: -0.015em;
}

/* Callout box */
.callout {
  margin: 2em 0;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.callout-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 9px;
}

.callout p:last-child { margin-bottom: 0; }
.callout p { font-size: 1rem; color: var(--text-muted); margin: 0 0 0.8em; }

/* Verdict box */
.verdict {
  margin: 2.4em 0;
  padding: 24px 26px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.10), rgba(34, 211, 238, 0.05));
  border: 1px solid var(--border-strong);
}

.verdict h3 { margin-top: 0; }
.verdict p:last-child { margin-bottom: 0; }

/* Spec / comparison table */
.table-scroll { overflow-x: auto; margin: 2em 0; }

.article-body table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.article-body th, .article-body td {
  text-align: left;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border);
}

.article-body th {
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
  font-size: 0.83rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.article-body td { color: var(--text-muted); }
.article-body tr:last-child td { border-bottom: none; }

/* --------------------------------------------- Affiliate disclosure -- */
.affiliate-note {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 26px 0 6px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.22);
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.affiliate-note .icon { flex-shrink: 0; font-size: 1rem; line-height: 1.4; }
.affiliate-note a { color: var(--amber); }

/* Inline affiliate CTA block */
.aff-cta {
  margin: 2.2em 0;
  padding: 22px 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.aff-cta-text { flex: 1 1 260px; }
.aff-cta-text strong { display: block; color: #fff; font-size: 1.03rem; margin-bottom: 4px; }
.aff-cta-text span { color: var(--text-muted); font-size: 0.9rem; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 650;
  font-size: 0.93rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent-bright); text-decoration: none; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-hover); }

/* ------------------------------------------------------ Author block -- */
.author-box {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 46px 0 0;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.author-box .avatar-lg {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--cyan) 100%);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 1.35rem;
  color: #0a0c10;
  flex-shrink: 0;
}

.author-box h4 { font-size: 1.02rem; margin-bottom: 6px; }
.author-box p { margin: 0; font-size: 0.92rem; color: var(--text-muted); line-height: 1.62; }

/* ---------------------------------------------------- Related posts -- */
.related {
  padding: 54px 0 70px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.related h2 { font-size: 1.3rem; margin-bottom: 26px; }

.related-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.related-item {
  display: block;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.related-item:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  text-decoration: none;
}

.related-item .kicker {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 7px;
}

.related-item span.t { font-weight: 600; font-size: 0.97rem; line-height: 1.42; display: block; }

/* --------------------------------------------------------- Prose page -- */
.page-body {
  padding: 42px 0 70px;
  font-size: 1.03rem;
  line-height: 1.75;
}

.page-body h2 {
  font-size: 1.35rem;
  margin: 2em 0 0.6em;
}

.page-body h3 { font-size: 1.08rem; margin: 1.6em 0 0.5em; }
.page-body p { margin: 0 0 1.25em; color: #d5dce7; }
.page-body ul { color: #d5dce7; padding-left: 1.3em; margin-bottom: 1.3em; }
.page-body li { margin-bottom: 0.5em; }
.page-body li::marker { color: var(--accent); }

.updated {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ------------------------------------------------------------ Footer -- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 46px 0 32px;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 34px;
  margin-bottom: 34px;
}

.footer-grid h5 {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 0 0 14px;
  font-weight: 600;
}

.footer-grid p { margin: 12px 0 0; color: var(--text-muted); max-width: 42ch; line-height: 1.62; }

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 9px; }
.footer-links a { color: var(--text-muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--text-dim);
  font-size: 0.83rem;
}

/* -------------------------------------------------------- Responsive -- */
@media (max-width: 860px) {
  .card-featured { flex-direction: column; }
  .card-featured .card-media { flex: none; aspect-ratio: 16 / 9; }
  .card-featured .card-body { padding: 24px 22px 26px; }
  .card-featured h3 { font-size: 1.4rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .header-inner { height: 60px; }
  .nav { gap: 16px; }
  .nav a { font-size: 0.86rem; }
  .nav a.hide-sm { display: none; }
  .hero { padding: 50px 0 40px; }
  .section { padding: 44px 0; }
  .grid { grid-template-columns: 1fr; gap: 22px; }
  .article-body { font-size: 1.04rem; }
  .article-hero img { aspect-ratio: 16 / 10; }
  .author-box { flex-direction: column; gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .pullquote { font-size: 1.08rem; padding-left: 18px; }
  .aff-cta { flex-direction: column; align-items: flex-start; }
}

/* -------------------------------------------------------------- A11y -- */
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
