/*
Theme Name: jt999 Guide
Theme URI: https://jt999.pw/
Author: jt999 Editorial
Description: A cinematic Bengali information guide theme for jt999.pw.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: jt999-guide
*/

:root {
  --bg: #090a0c;
  --bg-alt: #12151a;
  --panel: #181c22;
  --info: #1d2228;
  --text: #f2f2ef;
  --muted: #b4b6b9;
  --line: #30343a;
  --accent: #d8a64a;
  --accent-2: #7da7c7;
  --focus: #f3ce7b;
  --content: 1320px;
  --reading: 820px;
  --radius: 22px;
  --shadow: 0 28px 72px rgba(0, 0, 0, .38);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans Bengali", "Nirmala UI", "Vrinda", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.74;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: .08em; text-underline-offset: .2em; }
a:hover { color: #f0c875; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
.site-shell { width: min(calc(100% - 48px), var(--content)); margin-inline: auto; }
.reading-width { width: min(calc(100% - 48px), var(--reading)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 999; padding: 12px 18px; background: var(--text); color: var(--bg); }
.skip-link:focus { top: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 72px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(9,10,12,.9);
  backdrop-filter: blur(16px);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { color: var(--text); font-size: 1.4rem; font-weight: 800; letter-spacing: .04em; text-decoration: none; }
.brand-dot { color: var(--accent); }
.primary-nav ul { display: flex; align-items: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.primary-nav a { display: inline-flex; min-height: 44px; align-items: center; color: var(--text); text-decoration: none; }
.menu-toggle { display: none; min-width: 48px; min-height: 48px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text); font: inherit; }

.hero { padding: clamp(72px, 10vw, 132px) 0 64px; text-align: center; background: radial-gradient(circle at 50% 15%, rgba(216,166,74,.12), transparent 42%); }
.hero-copy { width: min(calc(100% - 48px), 960px); margin-inline: auto; }
.eyebrow { margin: 0 0 18px; color: var(--accent); font-size: .82rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.18; text-wrap: balance; }
h1 { margin-bottom: 26px; font-size: clamp(42px, 6.2vw, 80px); letter-spacing: -.035em; }
h2 { margin-bottom: 24px; font-size: clamp(30px, 4vw, 50px); letter-spacing: -.025em; }
h3 { margin: 42px 0 16px; font-size: clamp(22px, 2.4vw, 30px); }
.hero-summary { max-width: 760px; margin: 0 auto 32px; color: var(--muted); font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 12px 24px; border: 1px solid var(--accent); border-radius: 999px; background: var(--accent); color: #111; font-weight: 800; text-decoration: none; }
.button:hover { background: #efc66e; color: #111; }
.button-secondary { background: transparent; color: var(--text); border-color: var(--line); }
.button-secondary:hover { background: var(--panel); color: var(--text); }

.hero-media, .chapter-media { width: min(calc(100% - 48px), var(--content)); margin: 54px auto 0; }
.chapter-media { margin-top: 44px; }
.hero-media img, .chapter-media img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); object-fit: cover; }
.hero-media img { aspect-ratio: 16 / 9; }
.chapter-media img { aspect-ratio: 3 / 2; }
.chapter-media.portrait-safe img { aspect-ratio: 4 / 3; }
figcaption { margin-top: 12px; color: var(--muted); font-size: .88rem; text-align: center; }

.intro { padding: 58px 0 0; }
.intro p:first-child { font-size: 1.12rem; color: var(--text); }
.chapter { padding: 104px 0; border-top: 1px solid var(--line); }
.chapter:nth-of-type(even) { background: var(--bg-alt); }
.chapter p { color: #d8d9d7; }
.notice { margin: 34px 0; padding: 24px; border: 1px solid rgba(216,166,74,.38); border-left: 4px solid var(--accent); border-radius: 14px; background: var(--info); }
.table-wrap { margin: 34px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; min-width: 680px; border-collapse: collapse; background: var(--panel); }
th, td { padding: 17px 18px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--accent); font-size: .94rem; }
tr:last-child td { border-bottom: 0; }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; min-height: 58px; padding: 18px 44px 18px 0; font-weight: 800; list-style-position: outside; }
.faq details p { margin: 0 0 22px; color: var(--muted); }

.page-main { min-height: 70vh; }
.page-hero { padding: 94px 0 44px; text-align: center; }
.page-hero h1 { font-size: clamp(40px, 6vw, 68px); }
.page-content { padding: 0 0 104px; }
.page-content p { color: #d8d9d7; }
.page-content p:first-child { color: var(--text); font-size: 1.1rem; }
.page-content ul { padding-left: 1.25em; }
.page-links { margin-top: 40px; padding: 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }

.site-footer { border-top: 1px solid var(--line); padding: 56px 0; background: #07080a; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.footer-copy { max-width: 620px; color: var(--muted); }
.footer-links ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px 24px; margin: 0; padding: 0; list-style: none; }
.footer-links a { min-height: 44px; display: inline-flex; align-items: center; color: var(--text); text-decoration: none; }
.copyright { margin-top: 24px; color: #7f8388; font-size: .86rem; }

.not-found { padding: 120px 0; text-align: center; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-shell, .reading-width, .hero-copy, .hero-media, .chapter-media { width: min(calc(100% - 32px), var(--content)); }
  .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .primary-nav { position: absolute; top: 72px; left: 0; right: 0; display: none; padding: 16px; border-bottom: 1px solid var(--line); background: var(--bg-alt); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { display: block; }
  .primary-nav a { width: 100%; padding: 8px 0; }
  .hero { padding-top: 64px; }
  h1 { font-size: clamp(36px, 11vw, 46px); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .hero-media, .chapter-media { margin-top: 36px; }
  .hero-media img, .chapter-media img { border-radius: 14px; }
  .hero-media img, .chapter-media img, .chapter-media.portrait-safe img { aspect-ratio: 4 / 5; object-fit: cover; }
  .chapter { padding: 56px 0; }
  .intro { padding-top: 40px; }
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-links ul { justify-content: flex-start; }
}

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