:root{
  --bg:#0f1115;
  --text:#f5f7fa;
  --soft:#d7dde5;
  --muted:#a8b0ba;
  --line:#23262b;
  --shadow: 0 16px 44px rgba(0,0,0,.35);
  --radius: 22px;
  --max: 980px; /* book reading width */
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Inter,Arial,sans-serif;
  background:
    radial-gradient(1200px 800px at 25% 10%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(900px 600px at 70% 0%, rgba(255,255,255,.04), transparent 60%),
    var(--bg);
  color:var(--text);
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
}

.container{
  max-width:var(--max);
  margin:0 auto;
  padding:0 22px;
}

.topbar{
  position:sticky;
  top:0;
  z-index:100;
  backdrop-filter: blur(12px);
  background: rgba(15,17,21,.78);
  border-bottom:1px solid var(--line);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
  color:var(--text);
  font-weight:650;
  letter-spacing:.02em;
}

.dot{
  width:8px;height:8px;border-radius:999px;
  background:rgba(255,255,255,.95);
  box-shadow:0 0 0 5px rgba(255,255,255,.06);
}

.menu{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  justify-content:center;
}

.menu a{
  color:var(--soft);
  text-decoration:none;
  font-size:13px;
  opacity:.85;
  padding:6px 0;
  border-bottom:1px solid transparent;
}
.menu a:hover{ opacity:1; border-bottom-color:rgba(255,255,255,.28); }

.lang-btn{
  border:1px solid rgba(255,255,255,.18);
  background:transparent;
  color:var(--text);
  padding:8px 12px;
  border-radius:999px;
  font-size:13px;
  cursor:pointer;
}
.lang-btn:hover{ border-color:rgba(255,255,255,.28); }

.hero{
  padding:86px 0 44px;
}

.kicker{
  font-size:14px;
  letter-spacing:0.04em;
  color:var(--muted);
  margin-bottom:18px;
}

.hero-title{
  font-size:56px;
  line-height:1.55;
  font-weight:680;
  margin:0 0 14px;
}
.hero-sub{
  margin:0;
  font-size:18px;
  color:var(--soft);
}

.chapter{
  padding:56px 0;
}

.chapter-label{
  font-size:44px;
  font-weight:650;
  letter-spacing:0.01em;
  color:var(--text);
  margin:0 0 18px;
}


.section-title{
  margin:0 0 10px;
  font-size:24px;
  font-weight:650;
  color:var(--text);
}


.section-sub{
  margin:12px 0 0;
  font-size:16px;
  color:var(--soft);
}

.book-section{
  margin-top:28px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:22px 22px 18px;
}

.section-body{
  color:var(--soft);
  font-size:16px;
}


.pre{ white-space:pre-wrap; }

.media{
  margin-top:18px;
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}

.video{
  width:100%;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:#000;
}

.list{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.list-item{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  padding:16px 16px 14px;
}

.list-title{
  margin:0 0 8px;
  font-weight:700;
  color:var(--text);
}

.list-body{
  margin:0;
  color:var(--soft);
}

.divider{
  height:1px;
  background:rgba(255,255,255,.10);
  margin:26px 0;
}

.table{
  margin-top:14px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  overflow:hidden;
}

.row{
  display:grid;
  grid-template-columns: 220px 1fr 1fr;
}

.cell{
  padding:14px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  color:var(--soft);
  font-size:14px;
  background:rgba(0,0,0,.10);
}

.cell.head{
  font-weight:750;
  color:var(--text);
  background:rgba(255,255,255,.06);
}

.row:last-child .cell{ border-bottom:none; }

.faq{
  margin-top:18px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.faq-item{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border:1px solid rgba(255,255,255,.10);
  border-radius:18px;
  padding:16px 16px 14px;
}
.faq-q{
  margin:0 0 8px;
  font-weight:750;
  color:var(--text);
}
.faq-a{
  margin:0;
  color:var(--soft);
}

.footer{
  padding:44px 0 70px;
  border-top:1px solid rgba(255,255,255,.10);
}

.footer-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap:14px;
}


.footer-block{
  padding:10px 0;
  border-top:1px solid rgba(255,255,255,.10);
}

.footer-kicker{
  letter-spacing:.16em;
  
  font-size:12px;
  color:var(--muted);
  margin-bottom:10px;
}

.footer-text{
  color:var(--soft);
  font-size:14px;
}

@media (max-width: 860px){
  .menu{ display:none; }
  .hero-title{ font-size:42px; }
  .section-title{ font-size:26px; }
  .row{ grid-template-columns: 1fr; }
  .cell.head{ display:none; }
  .footer-grid{ grid-template-columns:1fr; }
}

.footer-block:first-child{ border-top:none; }

.footer-stack{display:flex;flex-direction:column;gap:16px;}


/* 16:5 fixed video frame */
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 5;
  overflow: hidden;
  border-radius: 12px;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  color: #fff;
  cursor: pointer;
}

/* Mobile layout */
@media (max-width: 768px) {
  .menu {
    display: none;
    position: absolute;
    top: 60px;
    right: 0;
    width: 100%;
    background: #0b0f14;
    padding: 20px;
  }

  .menu.open {
    display: block;
  }

  .menu-toggle {
    display: inline-block;
    margin-right: 12px;
  }
}


/* Mobile menu fix */
@media (max-width: 768px) {
  .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .nav-menu a {
    display: block;
    padding: 8px 0;
  }
}


/* Paragraph readability fix */
.story-paragraph,
.story p {
  line-height: 1.55 !important;
  letter-spacing: 0.005em;
  max-width: 720px;
}


/* === Mobile menu correct behavior === */
@media (max-width: 768px) {

  .menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: #0b0f14;
    padding: 24px;
    flex-direction: column;
    gap: 20px;
    z-index: 999;
  }

  .menu.open {
    display: flex;
  }

  .menu a {
    font-size: 18px;
    padding: 12px 0;
  }
}
