/* ============================================================
   CHINA UNLOCKED — Direction A: Editorial
   Warm paper · ink · seal red · Fraunces serif + Inter
   ============================================================ */

/* Self-hosted fonts (Google Fonts woff2, latin subset) */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/fraunces-400.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/fraunces-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/fraunces-700.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/inter-700.woff2") format("woff2");
}

:root {  --paper: #FAF7F1;
  --paper-deep: #F1EAE0;
  --card: #FFFFFF;
  --ink: #1B1B1D;
  --ink-soft: #403A33;
  --muted: #8A8177;
  --faint: #B9B0A2;
  --seal: #B0201E;
  --seal-deep: #8C1815;
  --gold: #A8842C;
  --line: #E4DAC8;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); background: var(--paper);
  font-family: var(--sans); line-height: 1.7; font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--seal); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 28px; }

/* Skip link + keyboard focus */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px;
  text-decoration: none; font-weight: 600; font-size: 15px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2.5px solid var(--seal); outline-offset: 3px; border-radius: 4px; }
.hero-home :focus-visible, .site-footer :focus-visible, .newsletter :focus-visible {
  outline-color: #F2C978;
}
/* Sticky header would cover jumped-to headings */
[id] { scroll-margin-top: 88px; }

/* Scrollable tables on narrow screens */
.table-wrap { overflow-x: auto; margin: 26px 0; }
.prose .table-wrap table { margin: 0; }

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

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
/* transparent header over the home hero */
body.home .site-header {
  position: absolute; top: 0; left: 0; right: 0;
  background: transparent; border-bottom: none; backdrop-filter: none;
}
body.home .brand-name { color: #FFF8EC; }
body.home .brand-name small { color: rgba(255, 248, 236, 0.72); }
body.home .site-nav a { color: rgba(255, 248, 236, 0.88); }
body.home .site-nav a:hover { color: #fff; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 14px; padding-bottom: 14px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; border-radius: 9px; display: block; }
.brand-name { font-weight: 700; letter-spacing: 3px; font-size: 14px; }
.brand-name small { display: block; letter-spacing: 2px; font-size: 9px; color: var(--muted); font-weight: 500; }
.site-nav a {
  margin-left: 30px; color: var(--ink-soft); text-decoration: none;
  font-size: 14.5px; font-weight: 500; letter-spacing: 0.4px;
}
.site-nav a:hover { color: var(--seal); }

/* ---------- hero (home) ---------- */
.hero-home {
  position: relative; min-height: 88vh;
  display: flex; align-items: flex-end;
  background: #141210 url("../hero-shanghai-dusk-1920.webp") center 38% / cover no-repeat;
  color: #FFF8EC;
}
@media (max-width: 700px) {
  .hero-home { background-image: url("../hero-shanghai-dusk-960.webp"); }
}
.hero-home::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,8,6,0.25) 0%, rgba(10,8,6,0.05) 35%, rgba(10,8,6,0.72) 100%);
}
.hero-inner { position: relative; z-index: 2; padding-bottom: 84px; width: 100%; }
.eyebrow {
  font-size: 12.5px; letter-spacing: 4px; font-weight: 600;
  color: #E9C989; margin: 0 0 18px;
}
.hero-home h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(52px, 8.5vw, 118px);
  line-height: 1.02; letter-spacing: -1.5px; margin: 0 0 20px;
}
.hero-lede { font-size: 19px; max-width: 560px; color: #F2E7D3; margin: 0 0 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 600; font-size: 15.5px;
  padding: 14px 28px; border-radius: 999px; letter-spacing: 0.3px;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-seal { background: var(--seal); color: #fff; }
.btn-ghost { border: 1.5px solid rgba(255,248,236,0.65); color: #FFF8EC; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); background: transparent; }

/* ---------- trust strip ---------- */
.trust-strip { border-bottom: 1px solid var(--line); background: var(--paper); }
.trust-strip .wrap {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding-top: 22px; padding-bottom: 22px; gap: 20px;
}
.trust-item { display: flex; gap: 13px; align-items: flex-start; }
.trust-item .tick {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--seal); color: #fff; font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.trust-item strong { display: block; font-size: 15px; }
.trust-item span { font-size: 13.5px; color: var(--muted); }

/* ---------- sections ---------- */
.section { padding: 88px 0; }
.section-head { margin-bottom: 44px; max-width: 680px; }
.section-head .eyebrow { color: var(--seal); }
.section-head h2 {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.5px;
  font-size: clamp(30px, 4vw, 44px); line-height: 1.12; margin: 0 0 14px;
}
.section-head p { color: var(--ink-soft); margin: 0; font-size: 17.5px; }

/* ---------- guide cards ---------- */
.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 34px; }
.guide-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.guide-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -18px rgba(27,27,29,0.25); }
.guide-card .img { aspect-ratio: 16/8.2; overflow: hidden; background: var(--paper-deep); }
.guide-card .img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
.guide-card:hover .img img { transform: scale(1.035); }
.guide-card .body { padding: 28px 30px 30px; }
.guide-card .kicker { font-size: 12px; letter-spacing: 3px; color: var(--seal); font-weight: 700; margin-bottom: 10px; }
.guide-card h3 { font-family: var(--serif); font-size: 27px; margin: 0 0 10px; letter-spacing: -0.3px; }
.guide-card p { color: var(--ink-soft); font-size: 15.5px; margin: 0 0 16px; }
.guide-card .meta { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }
.guide-card .price { color: var(--seal); font-weight: 700; }

/* ---------- why / trust ---------- */
.why { background: var(--paper-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; }
.why-item { border-top: 3px solid var(--seal); padding-top: 22px; }
.why-item h3 { font-family: var(--serif); font-size: 22px; margin: 0 0 10px; }
.why-item p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }
.why-item .num { font-family: var(--serif); color: var(--faint); font-size: 15px; display: block; margin-bottom: 8px; }

/* ---------- toolkit cards ---------- */
.toolkit-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.toolkit-card {
  display: block; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px;
  background: var(--card); transition: border-color 0.15s ease, transform 0.15s ease;
}
.toolkit-card:hover { border-color: var(--seal); transform: translateY(-3px); }
.toolkit-card .kicker { font-size: 11.5px; letter-spacing: 2.5px; color: var(--gold); font-weight: 700; margin-bottom: 12px; }
.toolkit-card h3 { font-family: var(--serif); font-size: 21px; margin: 0 0 8px; }
.toolkit-card p { font-size: 14.5px; color: var(--muted); margin: 0 0 14px; }
.toolkit-card .go { font-size: 14px; font-weight: 600; color: var(--seal); }
.toolkit-card.soon { opacity: 0.62; border-style: dashed; cursor: default; }
.toolkit-card.soon:hover { border-color: var(--line); transform: none; }
.toolkit-card.soon .go { color: var(--muted); }

/* ---------- newsletter ---------- */
.newsletter { background: var(--ink); color: #F4EDE0; border-radius: 24px; padding: 64px 60px; position: relative; overflow: hidden; }
.newsletter::before {
  content: "解锁"; position: absolute; right: -30px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-size: 300px; color: rgba(250,247,241,0.045); line-height: 1;
  pointer-events: none;
}
.newsletter h2 { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 42px); margin: 0 0 12px; letter-spacing: -0.5px; position: relative; }
.newsletter p { color: #C9BFAE; max-width: 520px; margin: 0 0 28px; position: relative; }
.nl-form { display: flex; gap: 12px; max-width: 520px; position: relative; }
.nl-form input {
  flex: 1; padding: 15px 20px; border-radius: 999px; border: 1px solid #4a453c;
  background: #26231f; color: #F4EDE0; font-size: 15.5px; font-family: var(--sans);
}
.nl-form input::placeholder { color: #8a8177; }
.nl-form input:focus { outline: 2.5px solid #F2C978; outline-offset: 2px; border-color: var(--seal); }
.nl-note { font-size: 13px; color: #8a8177; margin-top: 14px; position: relative; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #B7AD9C; margin-top: 0; padding: 60px 0 36px; font-size: 14.5px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.site-footer .brand-name { color: #F4EDE0; }
.site-footer p { margin: 0 0 12px; max-width: 340px; }
.site-footer h4 { color: #F4EDE0; font-size: 13px; letter-spacing: 2px; margin: 0 0 16px; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: #B7AD9C; text-decoration: none; }
.site-footer a:hover { color: #F4EDE0; }
.site-footer .base { border-top: 1px solid #35302a; padding-top: 24px; display: flex; justify-content: space-between; font-size: 13px; color: #7d766a; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding: 72px 0 40px; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-family: var(--serif); font-size: clamp(38px, 5.4vw, 62px); letter-spacing: -1px; margin: 0 0 14px; line-height: 1.05; }
.page-hero .lede { font-size: 19px; color: var(--ink-soft); max-width: 640px; margin: 0; }

/* ---------- article ---------- */
.article-head { padding: 64px 0 36px; max-width: 780px; }
.article-head .kicker { font-size: 12.5px; letter-spacing: 3.5px; color: var(--seal); font-weight: 700; margin-bottom: 16px; }
.article-head .kicker a { color: var(--seal); text-decoration: none; }
.article-head h1 { font-family: var(--serif); font-size: clamp(36px, 5vw, 58px); line-height: 1.08; letter-spacing: -1px; margin: 0 0 18px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: center; color: var(--muted); font-size: 14.5px; }
.verified {
  display: inline-flex; align-items: center; gap: 7px;
  background: #EFF6EC; color: #2F6B2F; border: 1px solid #CBDFC2;
  font-size: 13px; font-weight: 600; padding: 5px 13px; border-radius: 999px;
}
.article-layout { display: grid; grid-template-columns: 230px 1fr; gap: 56px; align-items: start; }
.toc {
  position: sticky; top: 96px; font-size: 14px;
  border-left: 2px solid var(--line); padding-left: 20px;
  max-height: calc(100vh - 120px); overflow: auto;
}
.toc strong { font-size: 11.5px; letter-spacing: 2.5px; color: var(--muted); display: block; margin-bottom: 12px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin-bottom: 9px; line-height: 1.45; }
.toc a { color: var(--ink-soft); text-decoration: none; }
.toc a:hover { color: var(--seal); }
.toc ul ul { margin-top: 6px; padding-left: 12px; }
.toc ul ul a { color: var(--muted); font-size: 13px; }
.prose { font-size: 18px; line-height: 1.82; color: #2A2622; }
.prose > p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 3.4em; float: left;
  line-height: 0.92; padding-right: 10px; padding-top: 4px; color: var(--seal);
}
.prose h2 { font-family: var(--serif); font-size: 31px; letter-spacing: -0.4px; margin: 58px 0 18px; line-height: 1.2; }
.prose h3 { font-size: 21px; margin: 36px 0 12px; }
.prose p { margin: 0 0 22px; }
.prose table { border-collapse: collapse; width: 100%; margin: 26px 0; font-size: 15.5px; line-height: 1.6; }
.prose th, .prose td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; }
.prose th { background: var(--paper-deep); font-weight: 600; }
.prose blockquote {
  border-left: 3px solid var(--seal); margin: 30px 0; padding: 4px 0 4px 24px;
  font-family: var(--serif); font-size: 21px; font-style: italic; color: var(--ink-soft); line-height: 1.6;
}
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 24px; }
.prose li { margin-bottom: 8px; }
.fine { color: var(--muted); font-size: 13.5px; }

/* CTA box (editorial) */
.cta-box {
  background: var(--paper-deep); border: 1px solid var(--line); border-radius: 18px;
  padding: 34px 36px; margin: 44px 0; display: flex; gap: 24px;
  align-items: center; justify-content: space-between; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
.cta-box::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--seal); }
.cta-box strong { font-family: var(--serif); font-size: 21px; display: block; margin-bottom: 6px; }
.cta-box p { margin: 0; color: var(--ink-soft); font-size: 15px; max-width: 480px; }

/* related */
.related { margin: 80px 0 0; }
.related h2 { font-family: var(--serif); font-size: 30px; margin: 0 0 26px; }

/* about */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.about-grid .prose { font-size: 17.5px; }
.seal-big { width: 100%; max-width: 340px; border-radius: 20px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; margin-top: 56px; }
.principle { border-top: 3px solid var(--seal); padding-top: 20px; }
.principle h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 8px; }
.principle p { font-size: 15px; color: var(--ink-soft); margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .guide-grid, .why-grid, .toolkit-grid { grid-template-columns: 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .trust-strip .wrap { grid-template-columns: 1fr; }
  .nl-form { flex-direction: column; }
  .newsletter { padding: 44px 30px; }
  .site-nav a { margin-left: 18px; }
  .section { padding: 60px 0; }
  .principles { grid-template-columns: 1fr; }
}

/* ---------- mobile (700px) ---------- */
@media (max-width: 700px) {
  body { font-size: 16px; }
  .wrap, .wrap-narrow { padding: 0 20px; }
  .section { padding: 44px 0; }
  .brand-name { font-size: 12px; letter-spacing: 2px; }
  .brand-name small { display: none; }
  .site-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; }
  .site-nav a { margin-left: 16px; font-size: 13.5px; }
  .hero-home h1 { font-size: 42px; }
  .hero-inner { padding-bottom: 64px; }
  .hero-lede { font-size: 17px; }
  .page-hero { padding: 52px 0 30px; }
  .page-hero h1 { font-size: 34px; }
  .site-footer .base { flex-direction: column; gap: 8px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 26px; }
  .guide-card .body { padding: 22px 22px 24px; }
  .newsletter { padding: 36px 24px; }
}

/* ---------- print / PDF (unchanged pipeline) ---------- */
.pdf-cover { text-align: center; padding: 90px 30px 60px; page-break-after: always; }
.pdf-brand { letter-spacing: 3px; text-transform: uppercase; color: var(--muted); font-size: 14px; }
.pdf-cover h1 { font-size: 38px; font-family: var(--serif); }
.pdf-sub { font-size: 18px; color: #374151; }
.pdf-note { margin-top: 60px; color: var(--muted); font-size: 14px; }
.pdf-back { margin-top: 50px; border-top: 2px solid var(--ink); padding-top: 24px; page-break-before: always; }

@media print {
  .no-print { display: none !important; }
  body { font-size: 12.5pt; line-height: 1.6; }
  .wrap { max-width: none; padding: 0; }
  .prose h2 { page-break-after: avoid; }
  .prose table, .prose blockquote { page-break-inside: avoid; }
  @page {
    size: A4; margin: 22mm 17mm 20mm 17mm;
    @bottom-center {
      content: counter(page);
      font-size: 9pt; color: #9ca3af;
      font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    }
    @top-center {
      content: string(guide-title);
      font-size: 8.5pt; color: #9ca3af; letter-spacing: 1.5px; text-transform: uppercase;
      font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    }
  }
}

/* ---------- premium print edition ---------- */
.premium .pdf-cover { padding: 110px 30px 70px; }
.premium .pdf-cover h1 { font-size: 44px; letter-spacing: -1px; }
.premium .pdf-brand { font-size: 13px; }
.premium .pdf-cover .rule {
  width: 64px; height: 3px; background: var(--seal);
  margin: 26px auto;
}
.premium .prose h1:first-of-type { string-set: guide-title content(); }
.premium .prose h2 {
  background: #1c1c1e; color: #fff;
  font-size: 17pt; padding: 9px 16px; border-radius: 8px;
  page-break-after: avoid; margin-top: 40px;
}
.premium .prose h3 { font-size: 14pt; color: var(--seal); margin-top: 26px; }
.premium .prose blockquote {
  border-left: none; border-radius: 10px;
  background: #fef6ec; border: 1px solid #f0dcae;
  padding: 14px 18px;
}
.premium .prose table { font-size: 11pt; }
.premium .prose th { background: #1c1c1e; color: #fff; border-color: #1c1c1e; }
.premium .pdf-back { border-top: 3px solid var(--seal); }

/* Attraction photos embedded in guides */
.guide-photo { margin: 36px 0; }
.guide-photo img {
  width: 100%; height: auto; display: block;
  border-radius: 3px;
}
.guide-photo figcaption {
  font-size: 13px; color: var(--muted);
  margin-top: 10px; line-height: 1.55;
}
.guide-photo .photo-credit { color: var(--faint); }

@media print {
  .guide-photo { break-inside: avoid; margin: 24px 0; }
}
