/*
Theme Name: ck77 Cinematic Guide
Theme URI: https://ck77.beer/
Author: ck77 Editorial
Description: A dark cinematic Bengali editorial theme for the independent ck77 information site.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: ck77
*/

:root {
  --bg: #0b0c0d;
  --surface: #141618;
  --card: #1b1d20;
  --gold: #f2c94c;
  --gold-deep: #d8a928;
  --text: #f5f5f2;
  --muted: #b9bab6;
  --border: #303236;
  --notice: #20231f;
  --warning: #e1a64b;
  --focus: #ffe28a;
  --max: 1240px;
  --reading: 820px;
  --radius: 18px;
  --shadow: 0 24px 64px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  overflow-wrap: anywhere;
  background:
    radial-gradient(circle at 85% 8%, rgba(242,201,76,.08), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: "Noto Sans Bengali", "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.72;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gold); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: var(--focus); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  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; background: var(--gold); color: #111; }

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  min-height: 70px;
  border-bottom: 1px solid rgba(242,201,76,.18);
  background: rgba(11,12,13,.9);
  backdrop-filter: blur(14px);
}
.header-inner { width: min(calc(100% - 40px), var(--max)); min-height: 70px; margin-inline: auto; display: flex; align-items: center; gap: 28px; }
.site-brand { flex: 0 0 auto; color: var(--text); font-size: 1.55rem; font-weight: 800; letter-spacing: -.04em; text-decoration: none; }
.site-brand span { color: var(--gold); }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; margin-left: auto; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--text); font: inherit; font-size: .95rem; cursor: pointer; }
.primary-navigation { margin-left: auto; }
.primary-navigation ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.primary-navigation a { display: flex; min-height: 44px; align-items: center; padding: 8px 12px; border-radius: 999px; color: var(--text); font-size: .92rem; font-weight: 650; text-decoration: none; }
.primary-navigation a:hover, .primary-navigation .current-menu-item > a, .primary-navigation .current_page_item > a { background: var(--card); color: var(--gold); }
.primary-navigation .menu-item-help > a, .primary-navigation li:last-child > a { margin-left: 5px; background: var(--gold); color: #101112; }
.primary-navigation .menu-item-help > a:hover, .primary-navigation li:last-child > a:hover { background: var(--focus); color: #101112; }

.site-main { min-height: 55vh; }
.article-header { width: min(calc(100% - 40px), 960px); margin: 0 auto; padding: 88px 0 38px; text-align: center; }
.eyebrow { margin: 0 0 12px; color: var(--gold); font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; color: var(--text); line-height: 1.18; letter-spacing: -.025em; text-wrap: balance; }
h1 { margin-bottom: 24px; font-size: clamp(2.25rem, 6vw, 4.75rem); }
h2 { margin-bottom: 24px; font-size: clamp(2rem, 4vw, 2.75rem); }
h3 { margin-bottom: 14px; font-size: clamp(1.35rem, 2.5vw, 1.7rem); }
.article-lead { max-width: 820px; margin: 0 auto; color: #deded9; font-size: clamp(1.08rem, 2vw, 1.3rem); }
.updated-line { margin: 22px 0 0; color: var(--muted); font-size: .88rem; }

.entry-content > section, .entry-content > .content-section { padding: 78px 20px; }
.entry-content > section:nth-of-type(even) { border-block: 1px solid rgba(255,255,255,.035); background: linear-gradient(180deg, rgba(255,255,255,.018), transparent); }
.section-inner { width: min(100%, var(--reading)); margin-inline: auto; }
.section-wide { width: min(100%, var(--max)); margin-inline: auto; }
.entry-content p { margin: 0 0 1.25em; }
.entry-content ul, .entry-content ol { padding-left: 1.35em; }
.entry-content li + li { margin-top: .65em; }
.entry-content strong { color: #fff7cf; }
.section-label { display: inline-block; margin-bottom: 14px; color: var(--gold); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.button, .wp-element-button, input[type="submit"] { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 11px 22px; border: 1px solid var(--gold); border-radius: 999px; background: var(--gold); color: #111; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover, input[type="submit"]:hover { background: var(--focus); color: #111; }
.button.secondary { background: transparent; color: var(--gold); }
.button.secondary:hover { background: rgba(242,201,76,.09); color: var(--focus); }

.editorial-image { width: min(100%, var(--max)); margin: 38px auto 0; }
.editorial-image img { width: 100%; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.editorial-image figcaption { width: min(100%, var(--reading)); margin: 12px auto 0; color: var(--muted); font-size: .84rem; }
.content-section + .editorial-image { margin-top: -30px; margin-bottom: 54px; }

.toc { width: min(100%, var(--reading)); margin: 10px auto 54px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.toc summary { min-height: 52px; padding: 12px 18px; color: var(--text); font-weight: 800; cursor: pointer; }
.toc ol { margin: 0; padding: 0 24px 22px 46px; }
.toc a { color: var(--muted); }

.table-wrap { margin: 30px 0; overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
table { width: 100%; min-width: 660px; border-collapse: collapse; background: var(--surface); font-size: .93rem; }
th, td { padding: 15px 16px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #202225; color: var(--gold); font-weight: 800; }
tr:last-child td { border-bottom: 0; }
.steps { margin: 30px 0; padding: 0; list-style: none; counter-reset: steps; }
.steps li { position: relative; min-height: 64px; padding: 2px 0 22px 72px; counter-increment: steps; }
.steps li::before { position: absolute; top: 0; left: 0; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid var(--gold-deep); border-radius: 50%; color: var(--gold); content: counter(steps, bengali); font-weight: 800; }
.checklist { padding: 0; list-style: none; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before { position: absolute; left: 0; color: var(--gold); content: "✓"; font-weight: 900; }
.notice { margin: 28px 0; padding: 22px 24px; border: 1px solid #4b4b38; border-left: 4px solid var(--gold); border-radius: 12px; background: var(--notice); color: #deded7; }
.notice.warning { border-left-color: var(--warning); }
.related-links { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; margin-top: 28px; }
.related-links a { min-height: 72px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text); font-weight: 750; text-decoration: none; }
.related-links a:hover { border-color: var(--gold-deep); color: var(--gold); }

.faq-list { display: grid; gap: 12px; margin-top: 28px; }
.faq-list details { border: 1px solid var(--border); border-radius: 14px; background: var(--card); }
.faq-list summary { min-height: 54px; padding: 14px 50px 14px 18px; color: var(--text); font-weight: 800; cursor: pointer; }
.faq-list details > div { padding: 0 18px 18px; color: var(--muted); }

.contact-form { margin-top: 30px; padding: 26px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { display: block; margin-bottom: 6px; color: var(--text); font-weight: 700; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: #101214; color: var(--text); font: inherit; }
.form-field textarea { min-height: 150px; resize: vertical; }
.form-help { color: var(--muted); font-size: .84rem; }
.form-status { margin-bottom: 20px; padding: 14px 16px; border-radius: 10px; background: var(--notice); }

.site-footer { margin-top: 44px; border-top: 1px solid rgba(242,201,76,.3); background: #08090a; }
.footer-inner { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 58px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 42px; }
.footer-title { margin-bottom: 14px; color: var(--gold); font-size: 1rem; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li + li { margin-top: 7px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { color: var(--muted); font-size: .88rem; }
.footer-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--border); color: #898b88; font-size: .78rem; }

.not-found { width: min(calc(100% - 40px), var(--reading)); margin: 0 auto; padding: 100px 0; text-align: center; }

@media (max-width: 900px) {
  .header-inner { min-height: 60px; }
  .site-header { min-height: 60px; }
  .js .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .primary-navigation { width: 100%; margin: 0; }
  .header-inner { flex-wrap: wrap; }
  .primary-navigation ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); width: 100%; padding: 0 0 14px; }
  .js .primary-navigation { display: none; }
  .js .primary-navigation.is-open { display: block; }
  .primary-navigation a { justify-content: center; }
  .primary-navigation .menu-item-help > a, .primary-navigation li:last-child > a { margin-left: 0; }
  .article-header { padding-top: 64px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .header-inner, .article-header, .footer-inner { width: min(calc(100% - 32px), var(--max)); }
  .primary-navigation ul { grid-template-columns: 1fr; }
  h1 { font-size: clamp(2.25rem, 12vw, 3.25rem); }
  .entry-content > section, .entry-content > .content-section { padding: 56px 16px; }
  .editorial-image { margin-top: 28px; }
  .editorial-image img { border-radius: 12px; }
  .related-links, .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-grid > :first-child { grid-column: auto; }
  .contact-form { padding: 18px; }
}

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

