:root {
  --ink: #1c1a17;
  --ink-soft: #4a453e;
  --paper: #f7f4ee;
  --paper-2: #efeae0;
  --line: #d9d2c5;
  --accent: #a4482c;
  --accent-soft: #c97a5e;
  --max: 1180px;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

.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;
}

.skip-to-main {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: var(--paper);
  padding: 8px 16px; border-radius: 8px; z-index: 100;
  text-decoration: none; transition: top .2s ease;
}
.skip-to-main:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 244, 238, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 14px 22px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px;
}
.brand-block { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--ink); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; flex: 0 0 auto;
}
.brand-text { font-weight: 700; letter-spacing: .18em; }
.main-nav { display: flex; align-items: center; }
.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 4px 14px;
}
.nav-list a {
  text-decoration: none; font-size: .92rem; color: var(--ink-soft);
  padding: 4px 2px; border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}
.nav-list a:hover { color: var(--ink); border-color: var(--accent-soft); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 10px; cursor: pointer;
  flex-direction: column; gap: 4px;
}
.nav-toggle-bar { width: 20px; height: 2px; background: var(--ink); display: block; }

/* sections */
main { display: block; }
section { padding: 76px 22px; }
section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 34px; max-width: var(--max); }
.section-head h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  margin: 0 0 10px; letter-spacing: .04em; line-height: 1.35;
}
.section-head p { margin: 0; color: var(--ink-soft); max-width: 640px; }

/* hero */
.hero-section {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 48px; align-items: center;
  padding-top: 88px; padding-bottom: 84px;
  max-width: var(--max); margin: 0 auto;
}
.hero-eyebrow {
  font-size: .82rem; letter-spacing: .28em;
  color: var(--accent); margin: 0 0 18px;
}
.hero-section h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  line-height: 1.22; margin: 0 0 22px; letter-spacing: .02em;
}
.hero-section h1 a { text-decoration: none; border-bottom: 3px solid var(--accent-soft); }
.hero-section h1 a:hover { border-color: var(--accent); }
.hero-lead { font-size: 1.02rem; color: var(--ink-soft); max-width: 34em; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 36px; }
.btn-primary, .btn-ghost {
  display: inline-block; text-decoration: none;
  padding: 11px 24px; border-radius: 999px; font-size: .95rem;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); transform: translateY(-2px); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 28px; margin: 0;
  padding-top: 22px; border-top: 1px solid var(--line);
}
.stat-item dt { font-size: .78rem; color: var(--ink-soft); letter-spacing: .1em; }
.stat-item dd { margin: 2px 0 0; font-size: 1.12rem; font-weight: 700; }
.hero-figure { margin: 0; }
.hero-figure img {
  width: 100%; height: 460px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.hero-figure figcaption {
  font-size: .82rem; color: var(--ink-soft);
  margin-top: 10px; text-align: right;
}

/* features */
.features-section { background: var(--paper-2); }
.feature-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.feature-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px 22px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(28,26,23,.08); }
.feature-num { font-size: .8rem; letter-spacing: .2em; color: var(--accent); }
.feature-card h3 { font-size: 1.08rem; margin: 10px 0 8px; }
.feature-card p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* trending */
.trending-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; }
.trend-main {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: #fff;
}
.trend-img { width: 100%; height: 300px; object-fit: cover; }
.trend-body { padding: 24px 26px 28px; }
.trend-tag { font-size: .78rem; letter-spacing: .2em; color: var(--accent); margin: 0 0 8px; }
.trend-body h3 { margin: 0 0 10px; font-size: 1.28rem; }
.trend-body p { margin: 0 0 14px; color: var(--ink-soft); font-size: .95rem; }
.text-link { color: var(--accent); text-decoration: none; font-size: .92rem; }
.text-link:hover { text-decoration: underline; }
.trend-list { display: flex; flex-direction: column; gap: 14px; }
.trend-item {
  border-left: 3px solid var(--accent-soft);
  padding: 4px 0 4px 18px;
}
.trend-item time { font-size: .78rem; color: var(--accent); letter-spacing: .1em; }
.trend-item h3 { margin: 4px 0 6px; font-size: 1.02rem; }
.trend-item p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* library */
.library-section { background: var(--paper-2); }
.library-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
.lib-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease;
}
.lib-card:hover { transform: translateY(-5px); box-shadow: 0 16px 34px rgba(28,26,23,.1); }
.lib-media { overflow: hidden; }
.lib-media img { width: 100%; height: 180px; object-fit: cover; transition: transform .4s ease; }
.lib-card:hover .lib-media img { transform: scale(1.05); }
.lib-body { padding: 18px 20px 22px; }
.lib-body h3 { margin: 0 0 6px; font-size: 1.08rem; }
.lib-meta { font-size: .8rem; color: var(--accent); letter-spacing: .08em; margin: 0 0 10px; }
.lib-body p:last-child { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* ranking */
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-row {
  display: flex; gap: 20px; align-items: flex-start;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.rank-row:first-child { border-top: 1px solid var(--line); }
.rank-num {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.rank-body h3 { margin: 0 0 4px; font-size: 1.06rem; }
.rank-body p { margin: 0; font-size: .92rem; color: var(--ink-soft); }

/* experience */
.experience-section { background: var(--paper-2); }
.experience-inner {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 44px; align-items: center;
}
.experience-text h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 0 0 16px; }
.experience-text p { color: var(--ink-soft); margin: 0 0 14px; }
.exp-list { margin: 0 0 24px; padding-left: 20px; color: var(--ink-soft); }
.exp-list li { margin-bottom: 6px; }
.experience-figure { margin: 0; }
.experience-figure img {
  width: 100%; height: 380px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--line);
}
.experience-figure figcaption { font-size: .82rem; color: var(--ink-soft); margin-top: 10px; text-align: right; }

/* guide */
.guide-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.guide-step {
  border-top: 3px solid var(--ink); padding-top: 18px;
}
.step-num { font-size: .8rem; letter-spacing: .2em; color: var(--accent); }
.guide-step h3 { margin: 6px 0 8px; font-size: 1.04rem; }
.guide-step p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

/* reviews */
.reviews-section { background: var(--paper-2); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review-card {
  margin: 0; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px;
}
.review-card p { margin: 0 0 14px; font-size: .94rem; color: var(--ink-soft); }
.review-card footer { font-size: .82rem; color: var(--accent); }
.review-card cite { font-style: normal; }

/* faq */
.faq-list { max-width: 820px; }
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 6px 0;
}
.faq-item summary {
  cursor: pointer; padding: 14px 0; font-weight: 700;
  list-style: none; position: relative; padding-right: 30px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%;
  transform: translateY(-50%); color: var(--accent); font-size: 1.2rem;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0 0 16px; color: var(--ink-soft); font-size: .94rem; }

/* cta */
.cta-section { text-align: center; }
.cta-inner {
  background: var(--ink); color: var(--paper);
  border-radius: 20px; padding: 56px 28px;
  max-width: var(--max); margin: 0 auto;
}
.cta-inner h2 { font-size: clamp(1.4rem, 2.8vw, 2rem); margin: 0 0 12px; }
.cta-inner p { color: #cfc8ba; margin: 0 0 26px; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.cta-inner .btn-primary { background: var(--paper); color: var(--ink); }
.cta-inner .btn-primary:hover { background: var(--accent-soft); }
.cta-inner .btn-ghost { border-color: #6b6357; color: var(--paper); }
.cta-inner .btn-ghost:hover { border-color: var(--paper); }

/* about */
.about-inner { max-width: 760px; }
.about-inner h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin: 0 0 16px; }
.about-inner p { color: var(--ink-soft); margin: 0 0 14px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); background: var(--paper-2); padding: 34px 22px; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 16px; }
.footer-nav a { text-decoration: none; font-size: .88rem; color: var(--ink-soft); }
.footer-nav a:hover { color: var(--accent); }
.footer-note { margin: 0; font-size: .8rem; color: var(--ink-soft); }

/* reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 960px) {
  .hero-section { grid-template-columns: 1fr; gap: 34px; padding-top: 56px; }
  .hero-figure img { height: 320px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .trending-layout { grid-template-columns: 1fr; }
  .library-grid { grid-template-columns: repeat(2, 1fr); }
  .experience-inner { grid-template-columns: 1fr; gap: 30px; }
  .guide-steps { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-list {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 14px 22px 20px; gap: 10px;
  }
  .nav-list.is-open { display: flex; }
  .main-nav { position: relative; }
  section { padding: 54px 18px; }
  .library-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .guide-steps { grid-template-columns: 1fr; }
  .hero-stats { gap: 18px; }
  .rank-row { gap: 14px; }
}

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