/*
Theme Name: kg999 Independent Guide
Theme URI: https://kg999.beer/
Author: kg999.beer editorial team
Description: A Bengali long-form independent information guide theme.
Version: 1.0.0
Text Domain: kg999-guide
*/

:root {
  --kg-bg: #071915;
  --kg-surface: #0b211c;
  --kg-surface-2: #102a24;
  --kg-info: #15372f;
  --kg-gold: #e8c45b;
  --kg-mint: #3bc29a;
  --kg-text: #f4f8f6;
  --kg-muted: #afc2ba;
  --kg-border: #29483e;
  --kg-focus: #79e0be;
  --kg-max: 1180px;
  --kg-reading: 760px;
  --kg-radius: 16px;
  --kg-shadow: 0 18px 42px rgba(0, 0, 0, .2);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--kg-bg);
  color: var(--kg-text);
  font-family: "Noto Sans Bengali", "Hind Siliguri", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-wrap: anywhere;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--kg-mint); text-decoration-thickness: .1em; text-underline-offset: .2em; }
a:hover { color: var(--kg-gold); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--kg-focus); outline-offset: 4px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 9999; top: 8px; left: 8px; width: auto; height: auto; padding: 10px 14px; margin: 0; clip: auto; background: var(--kg-gold); color: #071915; }
.site-shell { width: min(calc(100% - 40px), var(--kg-max)); margin-inline: auto; }

.site-header { position: sticky; top: 0; z-index: 100; min-height: 68px; background: rgba(7, 25, 21, .98); border-bottom: 1px solid var(--kg-border); }
.header-inner { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-branding { flex: 0 0 auto; }
.site-title { color: var(--kg-text); font-size: 1.45rem; font-weight: 800; letter-spacing: .03em; text-decoration: none; }
.site-title::before { content: ""; display: inline-block; width: 22px; height: 3px; margin-right: 10px; vertical-align: middle; background: var(--kg-gold); border-radius: 2px; }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; padding: 8px 11px; border: 1px solid var(--kg-border); border-radius: 8px; color: var(--kg-text); background: var(--kg-surface-2); font: inherit; cursor: pointer; }
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after { display: block; width: 24px; height: 2px; background: currentColor; content: ""; }
.menu-toggle-bars { position: relative; }
.menu-toggle-bars::before { position: absolute; top: -7px; }
.menu-toggle-bars::after { position: absolute; top: 7px; }
.primary-menu, .footer-menu { display: flex; align-items: center; gap: 24px; padding: 0; margin: 0; list-style: none; }
.primary-menu a { display: inline-flex; align-items: center; min-height: 44px; color: var(--kg-text); font-weight: 650; text-decoration: none; border-bottom: 2px solid transparent; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--kg-gold); border-color: var(--kg-gold); }

.site-main { min-height: 70vh; }
.hero { padding: 72px 0 38px; border-bottom: 1px solid var(--kg-border); }
.hero-copy { max-width: 900px; }
.eyebrow { margin: 0 0 10px; color: var(--kg-gold); font-size: .84rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1, h2, h3 { color: var(--kg-text); line-height: 1.22; text-wrap: balance; }
h1 { margin: 0 0 24px; font-size: clamp(2.5rem, 5.4vw, 4.25rem); letter-spacing: -.035em; }
h2 { position: relative; margin: 0 0 26px; padding-top: 18px; font-size: clamp(1.8rem, 3.5vw, 2.7rem); letter-spacing: -.02em; }
h2::before { content: ""; position: absolute; top: 0; left: 0; width: 64px; height: 3px; border-radius: 2px; background: var(--kg-gold); }
h3 { margin: 30px 0 10px; color: var(--kg-mint); font-size: 1.25rem; }
.hero-lead { max-width: 780px; margin: 0; color: var(--kg-muted); font-size: clamp(1.08rem, 2vw, 1.25rem); }
.hero-answer { max-width: 780px; margin: 22px 0 0; font-weight: 650; }
.hero-actions, .inline-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.button-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px; border: 1px solid var(--kg-gold); border-radius: 8px; color: #071915; background: var(--kg-gold); font-weight: 800; text-decoration: none; }
.button-link.secondary { color: var(--kg-text); background: transparent; border-color: var(--kg-border); }
.button-link:hover { color: #071915; background: #f2d780; }
.button-link.secondary:hover { color: var(--kg-gold); background: var(--kg-surface-2); border-color: var(--kg-gold); }
.hero-figure { margin: 40px auto 0; }
.hero-figure img, .section-figure img { width: 100%; border: 1px solid var(--kg-border); border-radius: var(--kg-radius); box-shadow: var(--kg-shadow); }
figcaption { margin-top: 10px; color: var(--kg-muted); font-size: .92rem; }

.article-layout { display: grid; grid-template-columns: minmax(0, var(--kg-reading)) 240px; justify-content: center; gap: 72px; padding: 0 0 88px; }
.article-body { min-width: 0; }
.article-section { padding: 86px 0 0; }
.article-section + .article-section { margin-top: 4px; }
.article-section p { margin: 0 0 22px; }
.section-figure { margin: 30px 0 34px; }
.notice { margin: 28px 0; padding: 20px 22px; background: var(--kg-info); border: 1px solid var(--kg-border); border-left: 4px solid var(--kg-gold); border-radius: 8px; }
.notice p:last-child { margin-bottom: 0; }
.table-wrap { max-width: 100%; overflow-x: auto; margin: 28px 0; border: 1px solid var(--kg-border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; min-width: 620px; background: var(--kg-surface); }
th, td { padding: 15px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--kg-border); }
th { color: var(--kg-gold); background: var(--kg-surface-2); }
tr:last-child td { border-bottom: 0; }
.article-nav { position: sticky; top: 96px; align-self: start; margin-top: 86px; padding: 18px 18px 12px; border: 1px solid var(--kg-border); border-radius: 8px; background: var(--kg-surface); }
.article-nav strong { display: block; margin-bottom: 8px; color: var(--kg-gold); }
.article-nav ul { padding: 0; margin: 0; list-style: none; }
.article-nav a { display: block; min-height: 44px; padding: 8px 0; color: var(--kg-muted); font-size: .92rem; text-decoration: none; border-bottom: 1px solid var(--kg-border); }
.article-nav li:last-child a { border-bottom: 0; }
.article-nav a:hover { color: var(--kg-gold); }
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--kg-border); border-radius: 8px; background: var(--kg-surface); }
.faq-list summary { min-height: 52px; padding: 14px 44px 14px 16px; color: var(--kg-text); font-weight: 750; cursor: pointer; }
.faq-answer { padding: 0 16px 16px; color: var(--kg-muted); }
.faq-answer p { margin: 0; }

.page-header { padding: 64px 0 30px; }
.page-header p { max-width: 760px; color: var(--kg-muted); }
.page-content { max-width: var(--kg-reading); padding-bottom: 88px; }
.page-content h2 { margin-top: 62px; }
.page-content p { margin: 0 0 22px; }
.content-links { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--kg-border); }
.content-links a { min-height: 44px; display: inline-flex; align-items: center; }

.site-footer { padding: 58px 0 28px; background: #061511; border-top: 1px solid var(--kg-border); }
.footer-grid { display: grid; grid-template-columns: 1.35fr .8fr; gap: 64px; }
.footer-brand { margin: 0 0 12px; font-size: 1.35rem; font-weight: 800; }
.footer-copy { max-width: 650px; color: var(--kg-muted); }
.footer-menu { align-items: flex-start; flex-direction: column; gap: 4px; }
.footer-menu a { min-height: 44px; display: inline-flex; align-items: center; color: var(--kg-text); }
.site-info { margin-top: 36px; padding-top: 22px; color: var(--kg-muted); font-size: .88rem; border-top: 1px solid var(--kg-border); }

@media (max-width: 1023px) {
  .article-layout { grid-template-columns: minmax(0, var(--kg-reading)); gap: 0; }
  .article-nav { position: static; order: -1; margin-top: 44px; }
  .article-nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
}

@media (max-width: 767px) {
  body { font-size: 16px; }
  .site-shell { width: min(calc(100% - 32px), var(--kg-max)); }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-navigation { position: fixed; inset: 69px 0 auto 0; max-height: calc(100vh - 69px); overflow-y: auto; padding: 18px 16px 28px; background: var(--kg-bg); border-bottom: 1px solid var(--kg-border); transform: translateY(-120%); visibility: hidden; transition: transform .2s ease, visibility .2s ease; }
  .site-navigation.is-open { transform: translateY(0); visibility: visible; }
  .primary-menu { align-items: stretch; flex-direction: column; gap: 4px; }
  .primary-menu a { min-height: 48px; padding: 4px 8px; }
  .hero { padding: 48px 0 30px; }
  h1 { font-size: clamp(2.15rem, 11vw, 2.7rem); }
  .hero-actions .button-link { width: 100%; }
  .article-section { padding-top: 48px; }
  .article-layout, .page-content { padding-bottom: 54px; }
  .article-nav ul { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

