/* 91PO — Crimson Ember Theme */
:root {
  --bg-void: #0c0608;
  --bg-surface: #160c10;
  --bg-panel: #1f1218;
  --bg-card: #26161e;
  --ember: #ff5c1a;
  --crimson: #d42a4a;
  --rose-glow: #ff3d6e;
  --amber: #e8a317;
  --gold-light: #f5c842;
  --text-bright: #faf3f0;
  --text-soft: #c4aeb6;
  --text-faint: #7a6670;
  --line: rgba(212, 42, 74, 0.22);
  --glow-ember: rgba(255, 92, 26, 0.28);
  --glow-crimson: rgba(212, 42, 74, 0.22);
  --nav-h: 58px;
  --radius: 12px;
  --radius-xl: 20px;
  --font-ui: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-ui);
  background: var(--bg-void);
  color: var(--text-bright);
  line-height: 1.8;
  min-height: 100vh;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 10% -5%, var(--glow-crimson), transparent 58%),
    radial-gradient(ellipse 55% 35% at 92% 8%, var(--glow-ember), transparent 52%),
    radial-gradient(ellipse 40% 25% at 50% 105%, rgba(232, 163, 23, 0.07), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--amber); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--gold-light); }

.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(12, 6, 8, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 1100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-bright);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(255, 92, 26, 0.25);
}

.nav-desktop {
  display: none;
  gap: 4px;
  list-style: none;
}

.nav-desktop a {
  color: var(--text-soft);
  font-size: 0.86rem;
  padding: 7px 13px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text-bright);
  background: rgba(212, 42, 74, 0.15);
}

.nav-desktop a.nav-entry {
  color: var(--ember);
  border: 1px solid rgba(255, 92, 26, 0.35);
}

.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--text-bright);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  background: rgba(12, 6, 8, 0.97);
  border-bottom: 1px solid var(--line);
  z-index: 1090;
  padding: 12px 0 18px;
}

.nav-mobile.open { display: block; }

.nav-mobile ul { list-style: none; }

.nav-mobile a {
  display: block;
  color: var(--text-soft);
  padding: 12px 20px;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.nav-mobile a:hover { color: var(--ember); background: rgba(255, 92, 26, 0.06); }

/* Sticky ads bar */
.ads-sticky-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  z-index: 1050;
  background: rgba(12, 6, 8, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 8px 10px;
  transform: translateY(-120%);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.ads-sticky-bar.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#ads-sticky {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  max-width: 1080px;
  margin: 0 auto;
}

#ads-sticky > div {
  width: 12.5%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 4px;
  box-sizing: border-box;
}

#ads-sticky img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

#ads-sticky .caption {
  font-size: 10px;
  color: var(--text-faint);
  text-align: center;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
}

/* Main ads zone */
.download-zone {
  padding: calc(var(--nav-h) + 20px) 0 24px;
  background: linear-gradient(180deg, rgba(212, 42, 74, 0.08) 0%, transparent 100%);
}

.download-zone-label {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

#ads {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
}

#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
}

#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24, 24, 24, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border: 1px solid rgba(255, 92, 26, 0.15);
}

#ads a { display: inline-block; border-radius: 18px; }

#ads img:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 10px 24px rgba(255, 92, 26, 0.2);
}

#ads .caption {
  height: 15px;
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}

/* Hero */
.hero {
  padding: 36px 0 48px;
}

.hero-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--ember);
  background: rgba(255, 92, 26, 0.12);
  border: 1px solid rgba(255, 92, 26, 0.3);
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(1.45rem, 5vw, 2.1rem);
  line-height: 1.35;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-bright) 30%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
}

.hero-lead {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-chips span {
  font-size: 0.78rem;
  color: var(--text-soft);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  padding: 5px 12px;
  border-radius: 6px;
}

.hero-frame {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
}

.hero-frame::before {
  content: "";
  position: absolute;
  inset: -8px;
  background: linear-gradient(145deg, var(--crimson), var(--ember));
  border-radius: var(--radius-xl);
  opacity: 0.35;
  filter: blur(18px);
  z-index: -1;
}

.hero-frame img {
  border-radius: var(--radius-xl);
  border: 2px solid rgba(255, 92, 26, 0.25);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* Sections */
.section {
  padding: 44px 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-tag {
  font-size: 0.72rem;
  color: var(--crimson);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(1.2rem, 4vw, 1.65rem);
  font-weight: 700;
  line-height: 1.4;
}

.section-head p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-top: 8px;
}

/* Feature blocks */
.feature-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 40px;
  align-items: center;
}

.feature-row.reverse .feature-visual { order: -1; }

.feature-visual img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.feature-body h3 {
  font-size: 1.1rem;
  color: var(--amber);
  margin-bottom: 10px;
}

.feature-body p {
  color: var(--text-soft);
  font-size: 0.92rem;
  margin-bottom: 10px;
}

.feature-body ul {
  list-style: none;
  margin-top: 12px;
}

.feature-body li {
  color: var(--text-soft);
  font-size: 0.88rem;
  padding: 6px 0 6px 18px;
  position: relative;
}

.feature-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  background: var(--ember);
  border-radius: 50%;
}

/* Text blocks */
.prose-block {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
  margin-bottom: 20px;
}

.prose-block h3 {
  font-size: 1.05rem;
  color: var(--text-bright);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.prose-block p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.prose-block p:last-child { margin-bottom: 0; }

.prose-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

/* Pillars */
.pillar-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  transition: border-color 0.2s;
}

.pillar-card:hover { border-color: rgba(255, 92, 26, 0.4); }

.pillar-card h4 {
  font-size: 0.95rem;
  color: var(--ember);
  margin-bottom: 8px;
}

.pillar-card p {
  font-size: 0.86rem;
  color: var(--text-soft);
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-bright);
  font-size: 0.92rem;
  font-family: inherit;
  padding: 16px 18px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-q::after {
  content: "+";
  color: var(--ember);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.faq-item.open .faq-q::after { content: "−"; }

.faq-a {
  display: none;
  padding: 0 18px 16px;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.faq-item.open .faq-a { display: block; }

/* CTA strip */
.cta-strip {
  text-align: center;
  padding: 36px 20px;
  background: linear-gradient(135deg, rgba(212, 42, 74, 0.15), rgba(255, 92, 26, 0.1));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  margin: 20px 0;
}

.cta-strip h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.cta-strip p {
  color: var(--text-soft);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.btn-ember {
  display: inline-block;
  background: linear-gradient(135deg, var(--crimson), var(--ember));
  color: var(--text-bright);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(212, 42, 74, 0.35);
}

.btn-ember:hover {
  color: var(--text-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 92, 26, 0.4);
}

/* Breadcrumb */
.breadcrumb {
  padding: calc(var(--nav-h) + 16px) 0 0;
  font-size: 0.82rem;
  color: var(--text-faint);
}

.breadcrumb a { color: var(--text-soft); }
.breadcrumb span { margin: 0 6px; }

/* Subpage */
.page-main {
  padding: 20px 0 60px;
  min-height: 60vh;
}

.page-main h1 {
  font-size: clamp(1.3rem, 4vw, 1.8rem);
  margin-bottom: 20px;
  color: var(--text-bright);
}

.page-content {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.page-content h2 {
  font-size: 1.05rem;
  color: var(--amber);
  margin: 24px 0 10px;
}

.page-content h2:first-child { margin-top: 0; }

.page-content p,
.page-content li {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 10px;
}

.page-content ul,
.page-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

/* Error pages */
.error-page {
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 0 60px;
}

.error-code {
  font-size: 5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--crimson), var(--ember));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.error-page h1 {
  font-size: 1.3rem;
  margin: 16px 0 10px;
}

.error-page p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

/* Footer */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--line);
  padding: 36px 0 28px;
  margin-top: 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.footer-brand p {
  color: var(--text-faint);
  font-size: 0.84rem;
  margin-top: 10px;
  line-height: 1.7;
}

.footer-links h4 {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-bottom: 10px;
}

.footer-links ul { list-style: none; }

.footer-links li { margin-bottom: 6px; }

.footer-links a {
  font-size: 0.84rem;
  color: var(--text-faint);
}

.footer-links a:hover { color: var(--ember); }

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-faint);
}

/* Responsive */
@media (min-width: 640px) {
  .prose-grid { grid-template-columns: 1fr 1fr; }
  .pillar-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .nav-desktop { display: flex; }
  .nav-mobile { display: none !important; }

  .hero-wrap {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
  }

  .hero-frame { margin: 0; max-width: 100%; }

  .feature-row {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .feature-row.reverse .feature-visual { order: 0; }

  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

@media (max-width: 767px) {
  #ads-sticky > div { width: 25%; }
  #ads-sticky img { width: 48px; height: 48px; }
}

@media (min-width: 768px) {
  #ads-sticky > div { width: 12.5%; }
}

/* Editorial long-form */
.editorial-long {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 22px;
}

.editorial-long h3 {
  font-size: 1.08rem;
  color: var(--amber);
  margin: 28px 0 12px;
}

.editorial-long h3:first-child { margin-top: 0; }

.editorial-long p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 14px;
  text-align: justify;
}

.editorial-long p:last-child { margin-bottom: 0; }

/* Channel matrix */
.channel-matrix {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.channel-item {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  border-left: 3px solid var(--ember);
}

.channel-item h4 {
  font-size: 0.92rem;
  color: var(--text-bright);
  margin-bottom: 6px;
}

.channel-item p {
  font-size: 0.86rem;
  color: var(--text-soft);
  line-height: 1.75;
}

/* Showcase gallery */
.showcase-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.showcase-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.showcase-card:hover {
  border-color: rgba(255, 92, 26, 0.35);
  transform: translateY(-2px);
}

.showcase-card img {
  width: 100%;
  aspect-ratio: 9 / 14;
  object-fit: cover;
  object-position: top;
}

.showcase-card figcaption {
  padding: 12px 14px;
}

.showcase-card h4 {
  font-size: 0.82rem;
  color: var(--amber);
  margin-bottom: 5px;
}

.showcase-card p {
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.6;
}

.showcase-card.wide {
  grid-column: span 2;
}

.showcase-card.wide img {
  aspect-ratio: 16 / 9;
}

/* Text band */
.text-band {
  background: linear-gradient(135deg, rgba(212, 42, 74, 0.1), rgba(31, 18, 24, 0.9));
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
}

.text-band h2 {
  font-size: clamp(1.15rem, 3.5vw, 1.5rem);
  margin-bottom: 16px;
  line-height: 1.4;
}

.text-band p {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 12px;
  text-align: justify;
}

.text-columns {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .channel-matrix { grid-template-columns: 1fr 1fr; }
  .showcase-gallery { grid-template-columns: repeat(3, 1fr); }
  .showcase-card.wide { grid-column: span 1; }
  .showcase-card.wide img { aspect-ratio: 9 / 14; }
  .text-columns { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .showcase-gallery { grid-template-columns: repeat(4, 1fr); }
  .channel-matrix { grid-template-columns: repeat(3, 1fr); }
}
