@font-face {
  font-family: "BingMing ZhiMangXing";
  src: url("./fonts/ZhiMangXing-BingMing-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BingMing MaShanZheng";
  src: url("./fonts/MaShanZheng-BingMing-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-color: #FBF8EF; /* Paper light */
  --text-main: #1D1712; /* Deep ink */
  --text-muted: #5F574F; /* Warm gray */
  --accent-orange: #B9572A; /* Cinnabar orange */
  --accent-gold: #C8A45D; /* Dawn gold */
  --accent-mist: #9FBDB8; /* River mist */
  --line-color: rgba(26, 19, 17, 0.1);
  --font-serif: "Source Han Serif SC", "Noto Serif SC", "Noto Serif CJK SC", "Songti SC", "STSong", "SimSun", serif;
  --font-sans: "Source Han Sans SC", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", Arial, sans-serif;
  --font-art: "BingMing ZhiMangXing", "Zhi Mang Xing", "STXingkai", "华文行楷", "KaiTi", "楷体", "SimKai", serif;
  --font-brush: "BingMing MaShanZheng", "Ma Shan Zheng", "STKaiti", "KaiTi", "楷体", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  position: relative; /* CRITICAL: Allows .site-bg and .light-layer to span the entire document height */
  width: 100%;
  max-width: 100%;
  margin: 0;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Base Texture Background (Scrollable Seamless Paper) */
.site-bg {
  position: absolute;
  top: 100vh; /* Start below the hero section so the hero image is completely clear */
  left: 0;
  right: 0;
  bottom: 0; /* Covers the rest of the scrolling document */
  background-color: var(--bg-color); 
  background-image: 
    linear-gradient(to bottom, rgba(232, 106, 51, 0.05) 0%, rgba(212, 175, 55, 0.02) 20vh, transparent 100vh),
    url('./images/paper_seamless.jpg');
  background-size: 100% 100%, 800px; 
  background-repeat: no-repeat, repeat; 
  z-index: -2;
  pointer-events: none;
}

/* Imagery Layer (Water waves & river flow) */
.site-bg::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-image: url('./images/waves_bg.jpg');
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-position: top center;
  mix-blend-mode: multiply;
  opacity: 0.4; /* Increased wave clarity */
}

/* Bing Layer (Scattered Atmospheric Sunlight) */
.bing-glow {
  position: absolute; /* Changed from fixed so it scrolls naturally with the page */
  top: 100vh; left: 0; right: 0; bottom: 0;
  /* Scattered warm sunlight "painted" onto the scroll at different heights */
  background: 
    radial-gradient(circle at 85% 200px, rgba(232, 106, 51, 0.4) 0%, rgba(212, 175, 55, 0.2) 500px, transparent 1000px),
    /* 调整位置：往下、往右移动的太阳 */
    radial-gradient(circle at 15% 1100px, rgba(232, 106, 51, 0.45) 0%, rgba(212, 175, 55, 0.25) 400px, transparent 900px),
    radial-gradient(circle at 10% 1300px, rgba(212, 175, 55, 0.25) 0%, transparent 800px),
    radial-gradient(circle at 75% 2200px, rgba(232, 106, 51, 0.3) 0%, transparent 900px),
    radial-gradient(circle at 20% 3200px, rgba(212, 175, 55, 0.2) 0%, transparent 800px);
  pointer-events: none;
  z-index: -1; 
}

/* Scrollable Light Layer */
.light-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0; /* Spans the entire document height perfectly */
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: multiply;
  animation: floatLight 20s ease-in-out infinite alternate;
}

.glow-1 {
  /* Top right: Dawn orange */
  top: 10%; right: -10vw;
  width: 70vw; height: 70vw;
  max-width: 1000px; max-height: 1000px;
  background: radial-gradient(circle, rgba(232, 106, 51, 0.25) 0%, rgba(212, 175, 55, 0.12) 30%, rgba(252, 251, 250, 0) 70%);
}

.glow-2 {
  /* Middle left: Golden daylight */
  top: 45%; left: -20vw;
  width: 80vw; height: 80vw;
  max-width: 1200px; max-height: 1200px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.20) 0%, rgba(252, 251, 250, 0) 70%);
  animation-delay: -5s;
}

.glow-3 {
  /* Bottom right: Sunset warmth */
  top: 85%; right: -15vw;
  width: 90vw; height: 90vw;
  max-width: 1400px; max-height: 1400px;
  background: radial-gradient(circle, rgba(232, 106, 51, 0.15) 0%, rgba(212, 175, 55, 0.15) 40%, rgba(252, 251, 250, 0) 70%);
  animation-delay: -10s;
}

@keyframes bgBreathe {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

@keyframes floatLight {
  0% { transform: translate(0, 0) scale(1); opacity: 0.7; }
  100% { transform: translate(-5vw, 5vh) scale(1.15); opacity: 1; }
}

/* Base Layout Constraints */
.editorial-section, .divider, .footer-inner {
  width: min(100% - 48px, 1100px);
  margin-left: auto;
  margin-right: auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 36px clamp(24px, 3.6vw, 72px);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100%;
  margin: 0;
  z-index: 10;
  overflow: hidden;
}

.brand {
  flex: 0 0 auto;
}

.brand-text {
  font-family: var(--font-serif);
  font-size: clamp(22px, 1.5vw, 28px);
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--text-main);
  transition: color 0.3s;
  text-shadow: 0 0 16px rgba(252, 251, 250, 0.82);
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  gap: clamp(18px, 2vw, 34px);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-main);
  transition: color 0.3s;
}

.site-nav a {
  flex: 0 0 auto;
  white-space: nowrap;
  text-shadow: 0 0 16px rgba(252, 251, 250, 0.82);
}

.site-nav a:hover {
  color: var(--accent-orange);
}

/* Light Header variation for dark backgrounds */
.header-light .brand-text {
  color: #FCFBFA;
}
.header-light .site-nav {
  color: rgba(252, 251, 250, 0.85);
}
.header-light .site-nav a:hover {
  color: var(--accent-gold);
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(128px, 18vh, 180px) 24px 96px;
  background-image: url('./images/sun_river.jpg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: clip;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  /* background: rgba(28, 25, 23, 0.35);  Removed: Let the pure image shine through */
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  width: min(100%, 980px);
  margin: 0 auto;
  transform: translateY(2vh);
}

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--text-main);
  text-transform: uppercase;
  margin: 0 0 18px;
  text-shadow: 0 0 16px rgba(252, 251, 250, 0.9);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(48px, 6vw, 84px);
  font-weight: 700;
  line-height: 1.15;
  color: #FCFBFA;
  margin: 0 0 40px;
  letter-spacing: 2px;
}

.hero-desc {
  font-size: 22px;
  max-width: 680px;
  color: var(--text-main);
  font-weight: 500;
  line-height: 1.8;
  margin: 0 auto;
  text-shadow: 0 0 20px rgba(252, 251, 250, 1), 0 0 40px rgba(252, 251, 250, 0.8);
}

.art-text {
  font-family: var(--font-art);
  font-size: clamp(76px, 9vw, 118px);
  font-weight: 400;
  line-height: 1.2;
  background: linear-gradient(120deg, var(--text-main), var(--accent-orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  margin: 0 0 24px;
  letter-spacing: 0;
}

/* Editorial Sections */
.editorial-section {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 64px;
  padding: 100px 0;
}

.section-meta {
  position: relative;
}

.meta-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 16px;
}

.section-meta h2 {
  font-family: var(--font-serif);
  font-size: 40px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  letter-spacing: 1px;
}

.meta-desc {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 16px;
  max-width: 240px;
  line-height: 1.8;
}

/* Text Blocks (Cards replaced by typography) */
.text-block {
  max-width: 640px;
}

.mt-large {
  margin-top: 80px;
}

.block-category {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--accent-orange);
  padding-bottom: 4px;
  margin-bottom: 20px;
}

.text-block h3 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 24px;
}

.highlight-text {
  background: linear-gradient(120deg, var(--accent-orange), var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-block p {
  font-family: var(--font-sans);
  font-size: 18px;
  color: var(--text-muted);
  margin: 0;
  line-height: 2;
}

.lead-text {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.7;
  color: var(--text-main);
  margin: 0;
  max-width: 720px;
}

/* Divider */
.divider {
  height: 1px;
  background-color: var(--line-color);
}

/* Footer */
.site-footer {
  padding: 60px 0;
  border-top: 1px solid var(--line-color);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-inner a:hover {
  color: var(--accent-orange);
}

/* Animations */
.fade-in {
  animation: fadeIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(20px);
}
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.4s; }
.delay-4 { animation-delay: 0.5s; }
.delay-5 { animation-delay: 0.6s; }
.delay-6 { animation-delay: 0.7s; }

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 900px) {
  .editorial-section {
    grid-template-columns: 1fr;
    gap: 48px;
    padding: 80px 0;
  }
  
  .hero {
    padding: 150px 24px 88px;
    background-attachment: scroll;
  }

  .hero-copy {
    transform: translateY(0);
  }
  
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    padding: 28px 20px;
  }
  
  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 8px;
    gap: clamp(16px, 5vw, 22px);
  }
}

@media (max-width: 600px) {
  .hero {
    min-height: 92svh;
    padding: 142px 20px 72px;
  }

  .eyebrow {
    font-size: 12px;
    letter-spacing: 3px;
    margin-bottom: 16px;
  }

  .hero-title {
    margin-bottom: 22px;
    letter-spacing: 0;
  }

  .art-text {
    font-size: clamp(44px, 13vw, 56px);
    line-height: 1.22;
    letter-spacing: 0;
    margin: 0 0 22px;
  }

  .hero-desc {
    font-size: 16px;
    line-height: 1.9;
    margin-top: 0;
  }

  .text-block h3 {
    font-size: 28px;
  }
  
  .lead-text {
    font-size: 22px;
  }
}

/* Scroll Animation Classes */
.reveal-on-scroll {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 1.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax Section */
.parallax-section {
  position: relative;
  width: 100%;
  height: 85vh;
  margin-left: 0;
  margin-top: 80px;
  margin-bottom: 80px;
  background-image: url('./images/sun_river.jpg');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Edge blending to remove abrupt cutoffs */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0%, black 20%, black 80%, transparent 100%);
}

.parallax-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(42, 36, 33, 0.25); /* Subtle dark overlay for text contrast */
}

.parallax-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #FCFBFA;
}

.parallax-quote {
  font-family: var(--font-serif);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: 6px;
  margin: 0;
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* =========================================
   Bing Ming (丙明) Visual Motifs
   ========================================= */

/* Light Beam Divider (Ming) */
.divider.light-beam {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 50%, transparent 100%);
  opacity: 0.5;
  box-shadow: 0 0 10px var(--accent-gold);
}

/* Sun Motif (Bing) in About Section */
.brand-meaning {
  position: relative;
  padding: 40px;
  background: rgba(252, 251, 250, 0.4);
  border: 1px solid var(--line-color);
  border-radius: 8px;
  backdrop-filter: blur(10px);
}

.brand-meaning blockquote {
  font-family: var(--font-brush) !important;
  font-size: 26px !important;
  letter-spacing: 1px;
}

.brand-meaning blockquote span {
  font-family: var(--font-serif) !important;
}
