/*
Theme Name: nnok Editorial
Theme URI: https://nnok.beer/
Author: nnok Editorial
Description: A light editorial help-center theme for the independent nnok Bengali information site.
Version: 1.0.1
Text Domain: nnok-editorial
*/

:root {
  --paper: #f7f4ee;
  --surface: #ffffff;
  --surface-soft: #f0ebe2;
  --ink: #242321;
  --muted: #68645e;
  --brick: #a83e32;
  --brick-dark: #8e332a;
  --amber: #d89a32;
  --sage: #2f7764;
  --info: #eef4f1;
  --warn: #fff4d9;
  --warn-ink: #7f5212;
  --danger: #b43b3b;
  --line: #ddd5c8;
  --shadow: 0 12px 32px rgba(58, 45, 30, .09);
  --radius: 12px;
  --content: 1160px;
  --reading: 780px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans Bengali", "Nirmala UI", "Vrinda", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.76;
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--brick-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--brick); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--sage); outline-offset: 3px; }
.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; clip: auto; padding: 10px 14px; margin: 0; background: var(--surface); color: var(--ink); }

.site-header { position: sticky; top: 0; z-index: 50; height: 68px; background: rgba(255,255,255,.97); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.header-inner { width: min(calc(100% - 40px), var(--content)); height: 100%; margin-inline: auto; display: flex; align-items: center; gap: 24px; }
.site-brand { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
.site-brand::before { display: none; }
.site-brand img { width: auto; height: 34px; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: 3px; padding: 0; margin: 0; list-style: none; }
.primary-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 11px; border-radius: 9px; color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.primary-nav a:hover, .primary-nav .current-menu-item > a, .primary-nav .current_page_item > a { background: var(--surface-soft); color: var(--brick-dark); }
.header-cta { min-height: 46px; padding: 9px 17px; border-radius: 10px; background: var(--brick); color: #fff; font-weight: 800; text-decoration: none; white-space: nowrap; }
.header-cta:hover { background: var(--brick-dark); color: #fff; }
.mobile-nav-cta { display: none; }
.menu-toggle { display: none; width: 46px; height: 46px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 22px; height: 2px; margin: 5px auto; background: currentColor; transition: .2s ease; }

.site-main { min-height: 60vh; }
.article-shell { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; padding: 38px 0 80px; }
.article-panel { width: min(100%, 900px); margin-inline: auto; padding: 46px 56px 60px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.home .article-panel { width: 100%; }
.breadcrumbs { margin: 0 auto 22px; color: var(--muted); font-size: 14px; }
.breadcrumbs a { color: var(--muted); }
.page-intro { width: min(100%, var(--reading)); margin: 0 auto 42px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; letter-spacing: -.022em; text-wrap: balance; }
h1 { margin: 0 0 20px; font-size: clamp(2.2rem, 5vw, 3.45rem); }
h2 { position: relative; margin: 72px 0 22px; padding-top: 8px; font-size: clamp(1.75rem, 3.4vw, 2.3rem); }
h2::before { content: ""; position: absolute; top: 0; left: 0; width: 48px; height: 4px; border-radius: 3px; background: linear-gradient(90deg, var(--brick), var(--amber)); }
h3 { margin: 36px 0 14px; font-size: clamp(1.3rem, 2.2vw, 1.55rem); }
p { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.35em; }
li + li { margin-top: .45em; }
.lead { color: #36332f; font-size: clamp(1.08rem, 2vw, 1.23rem); line-height: 1.72; }
.review-line { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.eyebrow { margin: 0 0 12px; color: var(--brick-dark); font-size: .82rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.section-body { width: min(100%, var(--reading)); margin-inline: auto; }
.section-wide { width: 100%; }
.toc { width: min(100%, var(--reading)); margin: 30px auto 50px; padding: 24px 28px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius); }
.toc strong { display: block; margin-bottom: 9px; }
.toc ol { columns: 2; margin: 0; }
.toc a { display: inline-block; min-height: 38px; padding-block: 4px; }

.editorial-figure { width: min(100%, 920px); margin: 30px auto 44px; overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.editorial-figure img { width: 100%; }
.editorial-figure figcaption { padding: 12px 17px; color: var(--muted); font-size: 14px; }
.image-copy { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(280px, .95fr); gap: 38px; align-items: center; width: 100%; margin: 38px auto; }
.image-copy .editorial-figure { margin: 0; }

.table-wrap { width: 100%; margin: 28px 0 38px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; min-width: 690px; border-collapse: collapse; background: var(--surface); font-size: 15px; line-height: 1.55; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-soft); color: var(--ink); font-weight: 800; }
tr:last-child td { border-bottom: 0; }

.steps { margin: 28px 0 40px; padding: 0; list-style: none; counter-reset: item; }
.steps > li { position: relative; min-height: 70px; margin: 0; padding: 0 0 28px 68px; counter-increment: item; }
.steps > li::before { content: counter(item); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--brick); color: #fff; font-weight: 800; }
.steps > li::after { content: ""; position: absolute; left: 22px; top: 49px; bottom: 3px; width: 2px; background: var(--line); }
.steps > li:last-child::after { display: none; }
.steps strong { display: block; margin-bottom: 5px; color: var(--ink); }
.checklist { padding: 24px 28px 24px 50px; background: var(--info); border-left: 4px solid var(--sage); border-radius: var(--radius); }
.note, .warning, .danger { margin: 28px 0; padding: 19px 22px; border-radius: var(--radius); }
.note { background: var(--info); border-left: 4px solid var(--sage); }
.warning { background: var(--warn); border-left: 4px solid var(--amber); color: var(--warn-ink); }
.danger { background: #fff0ef; border-left: 4px solid var(--danger); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 18px; border: 2px solid var(--brick); border-radius: 10px; background: var(--brick); color: #fff; font-weight: 800; text-decoration: none; }
.button:hover { background: var(--brick-dark); border-color: var(--brick-dark); color: #fff; }
.button.secondary { background: transparent; color: var(--brick-dark); }
.button.secondary:hover { background: var(--surface-soft); }

.faq-list { margin: 26px 0 42px; }
.faq-list details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.faq-list details + details { margin-top: 10px; }
.faq-list details[open] { border-left: 4px solid var(--brick); }
.faq-list summary { min-height: 54px; padding: 14px 52px 14px 18px; cursor: pointer; color: var(--ink); font-weight: 800; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; float: right; margin-right: -32px; color: var(--brick); font: 700 26px/1 sans-serif; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list .answer { padding: 0 18px 18px; color: #3c3935; }
.related-links { margin-top: 50px; padding: 26px 28px; background: var(--surface-soft); border-radius: var(--radius); }
.related-links h2 { margin-top: 0; font-size: 1.5rem; }
.related-links h2::before { display: none; }

.site-footer { background: var(--ink); color: #f9f6ef; }
.footer-inner { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; padding: 52px 0 30px; }
.footer-top { display: grid; grid-template-columns: 1.25fr 1fr; gap: 50px; }
.footer-brand { margin-bottom: 12px; color: #fff; font: 800 28px/1 system-ui, sans-serif; }
.footer-note { max-width: 650px; color: #ddd7cc; }
.footer-address { margin: 14px 0 0; color: #c7c0b5; font-style: normal; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px 18px; padding: 0; margin: 0; list-style: none; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: #fff; }
.footer-bottom { margin-top: 32px; padding-top: 22px; border-top: 1px solid #4e4b47; color: #c7c0b5; font-size: 14px; }

.not-found { width: min(calc(100% - 40px), 720px); margin: 80px auto; padding: 50px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; text-align: center; }

@media (max-width: 980px) {
  .menu-toggle { display: block; margin-left: auto; }
  .primary-nav { position: absolute; top: 67px; left: 0; right: 0; display: none; padding: 14px 20px 20px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 2px; }
  .primary-nav a { justify-content: flex-start; width: 100%; min-height: 46px; }
  .header-cta { display: none; }
  .mobile-nav-cta { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 10px; border-radius: 10px; background: var(--brick); color: #fff !important; font-weight: 800; text-decoration: none; }
  .image-copy { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  body { font-size: 16px; }
  .site-header { height: 58px; }
  .header-inner, .article-shell, .footer-inner { width: min(calc(100% - 32px), var(--content)); }
  .primary-nav { top: 57px; }
  .site-brand { font-size: 26px; }
  .article-shell { padding: 22px 0 48px; }
  .article-panel { padding: 30px 22px 42px; border-radius: 14px; }
  h1 { font-size: clamp(2.05rem, 10vw, 2.55rem); }
  h2 { margin-top: 48px; font-size: clamp(1.65rem, 7vw, 2rem); }
  .toc { padding: 20px; }
  .toc ol { columns: 1; }
  .image-copy { gap: 20px; }
  .footer-top { grid-template-columns: 1fr; gap: 26px; }
}

@media (max-width: 390px) {
  .header-inner, .article-shell, .footer-inner { width: calc(100% - 32px); }
  .article-panel { padding-inline: 18px; }
  .editorial-figure.ratio-wide img { aspect-ratio: 4 / 5; object-fit: cover; }
  .cta-row { flex-direction: column; }
  .button { width: 100%; }
  .footer-links { grid-template-columns: 1fr; }
  .steps > li { padding-left: 58px; }
}

.bottom-enter-btn {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 11px 26px;
  min-width: 120px;

  background: #ff5a36;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;

  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);

  transition: transform 0.2s ease, opacity 0.2s ease;
}

.bottom-enter-btn:hover {
  color: #fff;
  opacity: 0.92;
  transform: translateX(-50%) translateY(-2px);
}

@media (max-width: 768px) {
  .site-brand img { height: 30px; }

  .bottom-enter-btn {
    bottom: 16px;
    padding: 10px 22px;
    min-width: 110px;
    font-size: 15px;
  }
}

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