/* ============================================================
   Surf China — the blog post stylesheet, one file.

   Every pages/blog-*.html links this in place of its own <style>; a post keeps
   no inline stylesheet (tools/check_publish.py fails one that does). Change the
   post design here and bump ?v= on the link in every post.

   Linked after /Assets/nav.css, so a rule here can still override the nav.
   ============================================================ */

picture{display:contents}picture>source{display:none}

/* --- Modern UX additions (2026-08-24) --- */
@view-transition { navigation: auto; }
h1, h2, h3 { text-wrap: balance; }
@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
}
section:not([id]):not(.page-hero):not(.hero) {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

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

:root {
  --radius-media: 14px;
  --ocean: #0a4d68;
  --ocean-light: #1a7a9b;
  --sand: #f5f0e8;
  --sand-dark: #e8dfd2;
  --charcoal: #1a1a1a;
  --warm-gray: #6b6560;
  --white: #ffffff;
  --teal: #2d8a94;
  --coral: #d4856a;
  --gold: #c4a265;
  --ink-blue: #1f4788;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --transition: cubic-bezier(0.23, 1, 0.32, 1);
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3, h4 { font-family: 'Montserrat', 'Inter', sans-serif; font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); }
.overline { font-family: 'Inter', sans-serif; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--teal); margin-bottom: 1rem; display: block; }
p { max-width: 680px; }
.lead { font-size: 1.125rem; color: var(--warm-gray); line-height: 1.8; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 4rem); }
.container-narrow { max-width: 780px; margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 4rem); }
section { padding: clamp(4rem, 8vw, 7rem) 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.95rem 2.1rem; font-family: 'Inter', sans-serif; font-size: 0.85rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; border: none; cursor: pointer; transition: background 0.3s var(--ease-out), color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), transform 0.16s var(--ease-out), box-shadow 0.3s var(--ease-out); border-radius: 980px; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--ocean); color: var(--white); }
.btn-primary:hover { background: var(--ocean-light); }
.btn-outline { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.7); }
.btn-outline:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }
.btn-outline-dark { background: transparent; color: var(--ocean); border: 1px solid var(--ocean); }
.btn-outline-dark:hover { background: var(--ocean); color: var(--white); }
.btn-arrow::after { content: '\2192'; transition: transform 0.3s; }
.btn-arrow:hover::after { transform: translateX(4px); }

.section-divider { width: 48px; height: 2px; background: var(--teal); margin: 1.2rem 0 1.8rem; }

/* ======= HERO ======= */
.page-hero {
  position: relative;
  min-height: 78vh;
  padding-top: 6rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.page-hero .hero-bg { position: absolute; inset: 0; z-index: 0; }
.page-hero .hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.page-hero .hero-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.25) 55%, rgba(0,0,0,0.15) 100%);
}
.page-hero-content {
  position: relative; z-index: 2; color: var(--white);
  padding-bottom: clamp(3rem, 8vw, 5rem);
  max-width: 900px;
}
.page-hero-content .overline { color: var(--gold); }
.page-hero-content h1 { color: var(--white); margin-bottom: 1.2rem; max-width: 22ch; }
.page-hero-content p { color: rgba(255,255,255,0.88); font-size: 1.12rem; max-width: 600px; line-height: 1.7; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.2); }
.hero-meta-item { color: rgba(255,255,255,0.85); }
.hero-meta-item .label { font-size: 0.72rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); font-weight: 600; display: block; margin-bottom: 0.25rem; }
.hero-meta-item .value { font-size: 0.95rem; font-weight: 500; color: var(--white); }

/* ======= BREADCRUMB ======= */
.breadcrumb { padding: 1.1rem 0 0; font-size: 0.8rem; color: var(--warm-gray); }
.breadcrumb a { color: var(--warm-gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--ocean); }
.breadcrumb span.sep { margin: 0 0.5rem; opacity: 0.5; }

/* ======= ARTICLE ======= */
.post-body { padding-top: clamp(2.5rem, 5vw, 4rem); }
.post-body h2 { margin: 2.8rem 0 1rem; }
.post-body h3 { margin: 2rem 0 0.8rem; color: var(--ocean); }
.post-body p { margin-bottom: 1.2rem; }
.post-body p.lead { margin-bottom: 1.4rem; }
.post-body a { color: var(--ocean); text-decoration: underline; text-decoration-color: rgba(10,77,104,0.3); text-underline-offset: 3px; }
.post-body a:hover { text-decoration-color: var(--ocean); }
.post-body figure { margin: 2.2rem 0; }
.post-body figure img { width: 100%; height: auto; display: block; border-radius: var(--radius-media); }
.post-body figcaption { font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warm-gray); margin-top: 0.8rem; }
.post-body ul { margin: 0 0 1.2rem 1.2rem; max-width: 680px; }
.post-body ul li { margin-bottom: 0.5rem; }
.story-pull { font-family: 'Montserrat', sans-serif; font-size: clamp(1.2rem, 1.9vw, 1.45rem); line-height: 1.45; color: var(--charcoal); font-weight: 500; max-width: 680px; padding: 1.8rem 0; border-top: 1px solid var(--sand-dark); border-bottom: 1px solid var(--sand-dark); margin: 2.4rem 0; font-style: italic; }

/* at-a-glance box */
.glance {
  background: var(--sand); border-radius: 12px;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  margin: 2.4rem 0;
}
.glance h3 { margin: 0 0 1.2rem; color: var(--charcoal); }
.glance-row { display: flex; gap: 1rem; padding: 0.8rem 0; border-top: 1px solid var(--sand-dark); }
.glance-row:first-of-type { border-top: none; }
.glance-day { flex: 0 0 92px; font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); padding-top: 2px; }
.glance-what { font-size: 0.95rem; color: var(--charcoal); }

/* ======= FAQ ======= */
.faq { background: var(--sand); }
.faq details {
  background: var(--white); border-radius: 12px; margin-bottom: 0.8rem;
  border: 1px solid rgba(0,0,0,0.05);
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.2rem 1.5rem; font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.4rem; font-weight: 400; color: var(--teal); transition: transform 0.3s; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 1.5rem 1.3rem; color: var(--warm-gray); max-width: none; }

/* ======= RELATED ======= */
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.related-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid rgba(0,0,0,0.08); border-radius: 12px; overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
  background: var(--white);
}
.related-card:hover { box-shadow: 0 14px 40px rgba(0,0,0,0.1); transform: translateY(-3px); }
.related-card img { width: 100%; height: 190px; object-fit: cover; display: block; }
.related-card .rc-body { padding: 1.3rem 1.4rem 1.5rem; }
.related-card .rc-tag { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); display: block; margin-bottom: 0.5rem; }
.related-card h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.related-card p { font-size: 0.88rem; color: var(--warm-gray); max-width: none; }

/* ======= FINAL CTA ======= */
.final-cta {
  position: relative; height: 60vh; min-height: 440px;
  display: flex; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.final-cta .hero-bg { position: absolute; inset: 0; z-index: 0; }
.final-cta .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.final-cta .hero-bg::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.55); }
.final-cta-content { position: relative; z-index: 2; color: var(--white); max-width: 640px; padding: 0 1.5rem; }
.final-cta-content h2 { color: var(--white); margin-bottom: 1rem; }
.final-cta-content p { color: rgba(255,255,255,0.88); margin: 0 auto 2rem; font-size: 1.05rem; }
.final-cta-content .overline { color: var(--gold); }

@media (max-width: 900px) {
  .related-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 1.2rem; }
}

/* fade-in */
.fade-in { opacity: 0; }
.fade-in.visible { opacity: 1; animation: fadeUp 0.65s var(--ease-out) backwards; animation-delay: var(--stagger, 0ms); }
@keyframes fadeUp { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
/* REDUCED-MOTION (site standard): keep the fades, drop the movement. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  @keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }
  .fade-in { opacity: 1; }
  .fade-in.visible { animation-name: fadeOnly; animation-duration: 0.25s; animation-delay: 0ms; }
  .hero-scroll, .cal-status__dot { animation: none; }
  .mobile-menu { translate: 0 0; transition: opacity 0.2s; }
}
/* TOUCH-HOVER (site standard): taps fire false hovers on touch screens. */
@media (hover: none) {
  .btn-arrow:hover::after,
  .related-card:hover { transform: none; scale: none; translate: none; }
}
