/* ============================================================
   Machine Child 中文官网 — CSS Design System
   机甲科幻主题 / 浅色背景 / 钛金灰·电光蓝·能源橙
   ============================================================ */

/* ---------- FONTS ---------- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;700;900&family=Noto+Sans+SC:wght@300;400;500;700&display=swap');

/* ---------- CSS VARIABLES ---------- */
:root {
  /* Core palette */
  --bg:            #FAFAFA;
  --bg-alt:        #ECEFF1;
  --bg-card:       #FFFFFF;
  --text:          #263238;
  --text-soft:     #546E7A;
  --text-muted:    #90A4AE;

  /* Accent — mecha sci-fi */
  --titanium:      #B0BEC5;
  --titanium-dk:   #78909C;
  --titanium-lt:   #CFD8DC;
  --blue:          #1565C0;
  --blue-dk:       #0D47A1;
  --blue-lt:       #42A5F5;
  --blue-bg:       #E3F2FD;
  --orange:        #FF6D00;
  --orange-dk:     #E65100;
  --orange-lt:     #FFAB40;
  --orange-bg:     #FFF3E0;

  /* Status */
  --success:       #2E7D32;
  --warning:       #F9A825;
  --danger:        #C62828;

  /* Typography */
  --font-serif:    'Noto Serif SC', 'STSong', 'SimSun', serif;
  --font-sans:     'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;

  /* Sizing */
  --nav-h:         64px;
  --max-w:         1200px;
  --radius:        6px;
  --radius-lg:     12px;
  --shadow:        0 2px 12px rgba(0,0,0,.08);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.12);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--blue-dk); }
ul, ol { list-style: none; }

/* ---------- SCREEN READER ONLY ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--blue);
  height: var(--nav-h);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue-dk);
  display: flex;
  align-items: center;
  gap: 10px;
}
.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--blue);
  flex-shrink: 0;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-soft);
  padding: 6px 0;
  position: relative;
}
.site-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--blue);
  transition: width .25s;
}
.site-nav a:hover::after,
.site-nav a.active::after { width: 100%; }
.site-nav a.active { color: var(--blue); }

/* Header CTA button */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--orange);
  color: #fff !important;
  padding: 8px 20px !important;
  border-radius: var(--radius);
  font-weight: 600 !important;
  transition: background .2s, transform .15s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--orange-dk); transform: translateY(-1px); }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all .3s;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 520px;
  padding: 80px 24px 100px;
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,71,161,.85) 0%, rgba(38,50,56,.8) 60%, rgba(230,81,0,.55) 100%);
}
/* Circuit overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, var(--blue-lt) 1px, transparent 1px) 0 0 / 40px 100%,
    linear-gradient(0deg, var(--blue-lt) 1px, transparent 1px) 0 0 / 100% 40px;
  opacity: .06;
  pointer-events: none;
}
.hero-bg,
.hero > * { position: relative; z-index: 2; }

/* Hero backgrounds per page */
.hero-home .hero-bg { background-image: url('../img/header.webp'); }
.hero-guide .hero-bg { background-image: url('../img/screenshot-01.jpg'); }
.hero-story .hero-bg { background-image: url('../img/screenshot-02.jpg'); }
.hero-characters .hero-bg { background-image: url('../img/screenshot-03.jpg'); }
.hero-faq .hero-bg { background-image: url('../img/header.webp'); }

/* Hero title (index page — visible div, not h1) */
.hero-title-main {
  font-family: var(--font-serif);
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-shadow: 0 2px 16px rgba(0,0,0,.4);
  margin-bottom: 16px;
}
.hero-subtitle {
  font-size: 1.2rem;
  font-weight: 400;
  color: rgba(255,255,255,.9);
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.7;
}
.hero-tagline {
  font-size: .95rem;
  color: var(--orange-lt);
  font-weight: 500;
  letter-spacing: .04em;
}

/* Sub-page hero (smaller) */
.hero-subpage { min-height: auto; padding: 48px 24px 56px; }
.hero-subpage .hero-subpage-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.content-section { padding: 56px 0; }

/* ============================================================
   CARDS
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 28px;
  border-left: 4px solid var(--blue);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card-icon { font-size: 2.2rem; margin-bottom: 12px; }
.card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--blue-dk);
}
.card p { font-size: .92rem; color: var(--text-soft); line-height: 1.7; }

/* Screenshot gallery */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.screenshot-grid a {
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  transition: transform .2s;
}
.screenshot-grid a:hover { transform: scale(1.03); }
.screenshot-grid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }

/* Feature cards (index) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--orange);
  transition: transform .2s;
}
.feature-card:hover { transform: translateY(-4px); }
.feature-card .fc-icon { font-size: 2.8rem; margin-bottom: 14px; }
.feature-card h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue-dk);
  margin-bottom: 8px;
}
.feature-card p { font-size: .88rem; color: var(--text-soft); }

/* Character cards */
.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
  margin-top: 32px;
}
.char-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .2s;
}
.char-card:hover { transform: translateY(-3px); }
.char-card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--bg-alt);
}
.char-card-body { padding: 24px; }
.char-card-body h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--blue-dk);
  margin-bottom: 6px;
}
.char-card-body .char-role {
  display: inline-block;
  font-size: .8rem;
  background: var(--blue-bg);
  color: var(--blue);
  padding: 2px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}
.char-card-body p { font-size: .9rem; color: var(--text-soft); }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  background: linear-gradient(135deg, var(--blue-dk) 0%, var(--blue) 50%, #0D47A1 100%);
  color: #fff;
  text-align: center;
  padding: 64px 24px;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(255,109,0,.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(66,165,245,.15) 0%, transparent 50%);
}
.cta-banner h2 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 12px;
  position: relative;
}
.cta-banner p {
  font-size: 1rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 28px;
  position: relative;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  padding: 14px 40px;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 700;
  transition: background .2s, transform .15s;
  position: relative;
}
.cta-btn:hover { background: var(--orange-dk); color: #fff; transform: translateY(-2px); }

/* ============================================================
   REVIEWS
   ============================================================ */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.review-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
}
.review-card::before {
  content: '"';
  position: absolute;
  top: 8px;
  left: 16px;
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--titanium-lt);
  line-height: 1;
}
.review-card p { font-size: .92rem; color: var(--text-soft); padding-left: 20px; }
.review-author {
  margin-top: 12px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--blue);
}

/* ============================================================
   FAQ ACCORDION
   ============================================================ */
.faq-list { max-width: 800px; margin: 32px auto 0; }
.faq-item {
  border: 1px solid var(--titanium-lt);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  padding: 16px 24px;
  background: var(--bg-card);
  border: none;
  font-family: var(--font-sans);
  font-size: .98rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text);
  transition: background .2s;
}
.faq-q:hover { background: var(--blue-bg); }
.faq-q .faq-icon { font-size: 1.3rem; color: var(--blue); transition: transform .3s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 24px;
  font-size: .9rem;
  color: var(--text-soft);
  line-height: 1.8;
  background: var(--bg);
}
.faq-item.open .faq-a { max-height: 500px; padding: 16px 24px; }

/* ============================================================
   GUIDE PAGE
   ============================================================ */
.guide-step {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--orange);
}
.guide-step h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--blue-dk);
  margin-bottom: 8px;
}
.guide-step p { font-size: .92rem; color: var(--text-soft); }
.guide-intro { font-size: 1.05rem; color: var(--text-soft); margin-bottom: 28px; line-height: 1.8; }
.route-heading {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--orange);
  margin-top: 28px;
  margin-bottom: 10px;
}
.route-desc { font-size: .92rem; color: var(--text-soft); margin-bottom: 16px; line-height: 1.75; }
.tip-box {
  background: var(--blue-bg);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: .9rem;
  color: var(--blue-dk);
  border-left: 3px solid var(--blue);
}

/* ============================================================
   STORY PAGE
   ============================================================ */
.story-block {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--blue);
}
.story-block h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--blue-dk);
  margin-bottom: 10px;
}
.story-block p { font-size: .92rem; color: var(--text-soft); line-height: 1.8; }
.chapter-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--orange);
  margin-top: 20px;
  margin-bottom: 6px;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-scroll { overflow-x: auto; margin: 20px 0; }
.table-scroll table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.table-scroll th {
  background: var(--blue);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}
.table-scroll td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--titanium-lt);
  color: var(--text-soft);
}
.table-scroll tr:nth-child(even) td { background: var(--bg-alt); }
.td-highlight { color: var(--orange-dk) !important; font-weight: 700; }

/* Sys reqs heading */
.sys-reqs-h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--blue-dk);
  margin: 28px 0 12px;
}
.sys-reqs-h3:first-of-type { margin-top: 12px; }

/* Sys note */
.sys-note {
  color: var(--text-muted);
  font-size: .85rem;
}

/* Section sub-heading (characters page) */
.section-subheading {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--blue-dk);
  margin: 44px 0 24px;
}

/* Section heading */
.section-heading {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--blue-dk);
  margin-bottom: 0;
}

/* Intro paragraph */
.intro-text {
  max-width: 800px;
  margin: 24px auto 0;
  text-align: center;
  color: var(--text-soft);
  font-size: .95rem;
  line-height: 1.85;
}

/* ============================================================
   CONTENT UTILITIES
   ============================================================ */
.prose { max-width: 800px; margin: 0 auto; }
.content-section h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}
.content-section h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  color: var(--blue-dk);
  margin: 32px 0 12px;
}
.content-section p { font-size: .95rem; color: var(--text-soft); margin-bottom: 14px; line-height: 1.85; }

/* Lists */
.content-list { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.content-list-num { list-style: decimal; padding-left: 24px; margin-bottom: 16px; }
.content-li { margin-bottom: 5px; color: var(--text-soft); font-size: .93rem; }
.content-li-sm { margin-bottom: 4px; color: var(--text-soft); font-size: .88rem; }
.content-li-md { margin-bottom: 8px; color: var(--text-soft); font-size: .93rem; }
.content-li-lg { margin-bottom: 10px; color: var(--text-soft); font-size: .93rem; }

/* Strong colors */
.strong-blue { color: var(--blue); }
.strong-orange { color: var(--orange-dk); }
.strong-muted { color: var(--text-muted); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,.88);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); }
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  font-size: 2.5rem;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--titanium-lt);
  text-align: center;
  padding: 28px 24px;
  font-size: .85rem;
  color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    background: var(--bg-card);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow-lg);
    gap: 12px;
  }
  .site-nav.open { display: flex; }
  .hamburger { display: flex; }

  .hero { min-height: 380px; padding: 60px 20px 72px; }
  .hero-title-main { font-size: 2.2rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-subpage .hero-subpage-title { font-size: 1.5rem; }

  .card-grid,
  .feature-grid,
  .review-grid,
  .char-grid { grid-template-columns: 1fr; }

  .section { padding: 40px 0; }
  .content-section { padding: 40px 0; }

  .cta-banner { padding: 44px 20px; }
  .cta-banner h2 { font-size: 1.5rem; }

  .content-section h2 { font-size: 1.7rem; }
}

@media (max-width: 480px) {
  .hero { min-height: 300px; padding: 48px 16px 56px; }
  .hero-title-main { font-size: 1.7rem; }
  .hero-subtitle { font-size: .9rem; }
  .hero-subpage .hero-subpage-title { font-size: 1.25rem; }

  .card { padding: 20px; }
  .feature-card { padding: 24px 20px; }

  .faq-q { padding: 14px 16px; font-size: .9rem; }
  .faq-a { padding: 0 16px; font-size: .85rem; }
  .faq-item.open .faq-a { padding: 12px 16px; }

  .nav-cta { padding: 6px 14px !important; font-size: .85rem; }
}
