/*
Theme Name: 22bd Independent Guide
Theme URI: https://22bd.beer/
Author: 22bd Editorial Guide
Description: A dark emerald long-form Bengali information theme for 22bd.beer.
Version: 1.0.0
Text Domain: 22bd-guide
*/

:root {
  --bg: #071915;
  --surface: #0b211c;
  --surface-2: #102a24;
  --surface-info: #15372f;
  --text: #f4f8f6;
  --muted: #afc2ba;
  --border: #29483e;
  --accent: #e8c45b;
  --accent-2: #3bc29a;
  --focus: #79e0be;
  --warning: #e0a54b;
  --max: 1180px;
  --article: 760px;
  --radius: 16px;
  --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(--bg);
  color: var(--text);
  font-family: "Noto Sans Bengali", "Nirmala UI", "Vrinda", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  overflow-wrap: anywhere;
  background-image: linear-gradient(rgba(59,194,154,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(59,194,154,.025) 1px, transparent 1px);
  background-size: 28px 28px;
}
body.menu-open { overflow: hidden; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
.container { width: min(calc(100% - 40px), var(--max)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 999; padding: 10px 16px; color: #071915; background: var(--focus); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { position: sticky; top: 0; z-index: 40; height: 68px; background: rgba(7,25,21,.96); border-bottom: 1px solid var(--border); backdrop-filter: blur(10px); }
.header-inner { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { color: var(--text); text-decoration: none; font-size: 1.45rem; font-weight: 850; letter-spacing: -.03em; }
.wordmark span { color: var(--accent); }
.primary-nav ul { display: flex; list-style: none; gap: 12px; margin: 0; padding: 0; }
.primary-nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 6px 16px; color: var(--text); text-decoration: none; border-radius: 8px; }
.primary-nav a:hover { background: var(--surface-2); }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; padding: 10px; color: var(--text); background: transparent; border: 1px solid var(--border); border-radius: 8px; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 24px; height: 2px; margin: 5px auto; background: currentColor; }

.hero { padding: clamp(56px, 9vw, 112px) 0 44px; }
.hero-copy { max-width: 920px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: .86rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
h1 { max-width: 920px; margin: 0 0 24px; font-size: clamp(2.45rem, 5.4vw, 4.25rem); line-height: 1.1; letter-spacing: -.035em; }
.lead { max-width: 790px; margin: 0; color: #d9e6e1; font-size: clamp(1.12rem, 2vw, 1.35rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border: 1px solid var(--accent); border-radius: 8px; color: #071915; background: var(--accent); font-weight: 800; text-decoration: none; }
.button.secondary { color: var(--text); background: transparent; border-color: var(--border); }
.button:hover { color: #071915; filter: brightness(1.08); }
.button.secondary:hover { color: var(--text); border-color: var(--accent-2); background: var(--surface-2); }
.hero-media { margin: 46px auto 0; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--surface); }
.hero-media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
figcaption { padding: 12px 16px; color: var(--muted); font-size: .88rem; background: var(--surface); border-top: 1px solid var(--border); }

.disclosure { max-width: var(--article); margin: 0 auto 36px; padding: 18px 20px; border-left: 4px solid var(--accent); background: var(--surface-info); color: #deebe6; border-radius: 0 8px 8px 0; }
.article-shell { display: grid; grid-template-columns: minmax(0, var(--article)) 240px; gap: 80px; align-items: start; justify-content: center; }
.article-body { min-width: 0; }
.toc { position: sticky; top: 96px; padding: 20px; border: 1px solid var(--border); border-radius: 12px; background: rgba(11,33,28,.92); }
.toc strong { display: block; margin-bottom: 10px; color: var(--accent); }
.toc ol { margin: 0; padding-left: 22px; }
.toc a { display: inline-block; padding: 6px 0; color: var(--muted); }
.content-section { padding: 72px 0; border-top: 1px solid var(--border); }
.content-section h2, .page-content h2 { position: relative; margin: 0 0 28px; padding-top: 16px; font-size: clamp(1.7rem, 3.2vw, 2.35rem); line-height: 1.22; letter-spacing: -.02em; }
.content-section h2::before, .page-content h2::before { content: ""; position: absolute; top: 0; left: 0; width: 62px; height: 3px; background: var(--accent); border-radius: 4px; }
h3 { margin: 34px 0 14px; color: var(--accent-2); font-size: 1.25rem; line-height: 1.35; }
p { margin: 0 0 1.25em; }
.section-media { margin: 32px 0; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.section-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.table-wrap { max-width: 100%; margin: 30px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { color: var(--accent); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.note { margin: 28px 0; padding: 20px; background: var(--surface-info); border: 1px solid var(--border); border-radius: 10px; }
.note strong { color: var(--accent); }
.inline-links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 28px; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.faq-list summary { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; cursor: pointer; font-weight: 800; }
.faq-list summary::after { content: "+"; color: var(--accent); font-size: 1.35rem; }
.faq-list details[open] summary::after { content: "−"; }
.faq-answer { padding: 0 18px 18px; color: #d8e4df; }

.page-main { padding: clamp(54px, 8vw, 96px) 0; }
.page-header, .page-content { max-width: var(--article); margin-inline: auto; }
.page-header { margin-bottom: 42px; }
.page-header h1 { font-size: clamp(2.35rem, 5vw, 3.75rem); }
.page-content { font-size: 1.04rem; }
.page-cta { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--border); }
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; }

.site-footer { margin-top: 76px; padding: 58px 0 32px; border-top: 1px solid var(--border); background: #061410; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, .6fr); gap: 64px; }
.footer-title { margin: 0 0 12px; font-size: 1.35rem; font-weight: 850; }
.footer-copy { max-width: 650px; color: var(--muted); }
.footer-nav { display: grid; gap: 8px; align-content: start; }
.footer-nav a { min-height: 44px; display: flex; align-items: center; }
.footer-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }

@media (max-width: 1023px) {
  .article-shell { grid-template-columns: minmax(0, var(--article)); gap: 26px; }
  .toc { position: static; grid-row: 1; }
  .article-body { grid-row: 2; }
}
@media (max-width: 767px) {
  body { font-size: 16px; }
  .container { width: min(calc(100% - 32px), var(--max)); }
  .menu-toggle { display: block; }
  .primary-nav { display: none; position: fixed; inset: 68px 0 auto; padding: 18px 16px 24px; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .primary-nav.open { display: block; }
  .primary-nav ul { display: grid; gap: 6px; }
  .primary-nav a { width: 100%; }
  .hero { padding-top: 54px; }
  h1 { font-size: clamp(2.2rem, 11vw, 2.75rem); }
  .actions { display: grid; }
  .button { width: 100%; }
  .content-section { padding: 52px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .table-wrap { border: 0; overflow: visible; }
  table, thead, tbody, th, td, tr { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  tr { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); }
  td { padding: 12px 14px 12px 43%; position: relative; min-height: 52px; }
  td::before { content: attr(data-label); position: absolute; left: 14px; top: 12px; width: 36%; color: var(--accent); font-weight: 800; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

