/* ====== TOKENS ====== */
:root {
  --ink: #1A1A1A;
  --ink-soft: #2a2a2a;
  --paper: #F5F1E8;
  --paper-deep: #EFE9DA;
  --cinnabar: #C8392E;
  --cinnabar-deep: #A12C22;
  --faded: #6B6B6B;
  --wash: #D4CFC2;
  --gold: #B8893A;

  --serif: "Cormorant Garamond", "EB Garamond", serif;
  --cn-serif: "Noto Serif SC", "Source Han Serif", serif;
  --sans: "Inter", "Söhne", -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  /* Inkwash-substitute (free Google Fonts): brush feel for accent h1s */
  --inkwash: "Caveat Brush", "Permanent Marker", cursive;
  --cn-brush: "Liu Jian Mao Cao", "Long Cang", "Noto Serif SC", serif;

  --easeZen: cubic-bezier(0.65, 0, 0.35, 1);
  --easeThunk: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ====== BASE ====== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ====== PAPER TEXTURE OVERLAY ====== */
.paper-grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  opacity: 0.5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0 0.1  0 0 0 0.18 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
}

/* ====== INK CURSOR TRAIL ====== */
.ink-drop {
  position: fixed; pointer-events: none; z-index: 9998;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #2a2a2a 0%, #0a0a0a 60%, rgba(0,0,0,0) 80%);
  transform: translate(-50%, -50%);
  animation: inkFade 800ms var(--easeZen) forwards;
  mix-blend-mode: multiply;
}
@keyframes inkFade {
  0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.6); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.8); }
}
.ink-splatter {
  position: fixed; pointer-events: none; z-index: 9998;
  width: 60px; height: 60px;
  transform: translate(-50%, -50%);
  animation: splatter 700ms var(--easeZen) forwards;
}
@keyframes splatter {
  0% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.2); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.2); }
}

/* ====== TYPOGRAPHY HELPERS ====== */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cinnabar);
}
.eyebrow-ink {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow-ink::before {
  content: "";
  display: block;
  width: 28px;
  height: 1px;
  background: var(--ink);
}
.pinyin {
  font-family: var(--serif);
  font-style: italic;
  color: var(--faded);
  font-weight: 400;
}
.cn { font-family: var(--cn-serif); }
.serif { font-family: var(--serif); }

/* ====== LAYOUT ====== */
.shell { position: relative; z-index: 2; }
.container { max-width: 1340px; margin: 0 auto; padding: 0 40px; }
.container-wide { max-width: 1500px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) {
  .container, .container-wide { padding: 0 24px; }
}

/* ====== SECTION DIVIDER STROKE ====== */
.brush-divider {
  height: 18px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  opacity: 0.75;
}

/* ====== SEAL STAMP ====== */
.seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  background: var(--cinnabar);
  color: var(--paper);
  font-family: var(--cn-serif);
  font-weight: 700;
  font-size: 28px;
  border-radius: 6px;
  transform: rotate(-6deg);
  box-shadow: inset 0 0 0 2px rgba(245,241,232,0.4);
  position: relative;
}
.seal::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100'><filter id='n'><feTurbulence baseFrequency='1.2' numOctaves='3'/></filter><rect width='100' height='100' filter='url(%23n)' opacity='0.45'/></svg>");
  mix-blend-mode: screen;
  opacity: 0.6;
  border-radius: 6px;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 12px 22px;
  border-radius: 2px;
  transition: all 280ms var(--easeZen);
}
.btn-ghost { color: var(--ink); }
.btn-ghost:hover { color: var(--cinnabar); }
.btn-seal {
  background: var(--cinnabar);
  color: var(--paper);
  font-weight: 600;
  letter-spacing: 0.03em;
  position: relative;
  overflow: hidden;
}
.btn-seal::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='1.2' numOctaves='3'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.35'/></svg>");
  mix-blend-mode: screen;
  opacity: 0.5;
  pointer-events: none;
}
.btn-seal:hover { background: var(--cinnabar-deep); transform: translateY(-1px); }
.btn-outline {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* ====== NAV ====== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  background: rgba(245, 241, 232, 0.72);
  border-bottom: 1px solid rgba(26,26,26,0.06);
  transition: padding 350ms var(--easeZen);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 22px 40px; transition: padding 350ms var(--easeZen); }
.nav.slim .nav-inner { padding: 12px 40px; }
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo .zh { font-family: var(--cn-serif); font-weight: 700; font-size: 26px; letter-spacing: -0.02em; }
.nav-logo .wm { font-family: var(--serif); font-size: 17px; letter-spacing: 0.01em; font-weight: 500; }
.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  position: relative; padding: 4px 0;
  transition: color 240ms var(--easeZen);
}
.nav-links a:hover { color: var(--cinnabar); }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  height: 2px; width: 0; background: var(--cinnabar);
  transition: width 280ms var(--easeZen);
}
.nav-links a:hover::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang-toggle {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  padding: 6px 10px;
  border: 1px solid rgba(26,26,26,0.15);
  border-radius: 2px;
  color: var(--faded);
}
.lang-toggle span.active { color: var(--ink); font-weight: 600; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  transition: background 240ms var(--easeZen);
}
.icon-btn:hover { background: rgba(26,26,26,0.06); }
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-inner { padding: 16px 24px; }
}

/* ====== HERO ====== */
.hero {
  position: relative;
  padding: 100px 0 140px;
  overflow: hidden;
}
.hero-bg-char {
  position: absolute;
  right: -80px; top: 40px;
  font-family: var(--cn-serif);
  font-size: 520px;
  font-weight: 700;
  line-height: 0.85;
  color: var(--ink);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
}
.hero-eyebrow { margin-bottom: 36px; }
.hero-headline {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(56px, 8.5vw, 116px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin: 0 0 40px;
  max-width: 14ch;
}
.hero-headline .em { color: var(--cinnabar); font-style: italic; position: relative; }
.hero-headline .em::after {
  content: "";
  position: absolute; left: -3%; right: -3%; bottom: 4%;
  height: 0.12em;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 16' preserveAspectRatio='none'><path d='M2,9 C40,3 80,13 120,8 C160,4 200,12 240,9 C268,7 285,10 298,8' stroke='%23C8392E' stroke-width='3' stroke-linecap='round' fill='none' opacity='0.7'/></svg>");
  background-repeat: no-repeat; background-size: 100% 100%;
}
.hero-line { display: block; opacity: 0; transform: translateY(28px); animation: lineRise 900ms var(--easeZen) forwards; }
.hero-line:nth-child(1) { animation-delay: 100ms; }
.hero-line:nth-child(2) { animation-delay: 280ms; }
.hero-line:nth-child(3) { animation-delay: 460ms; }
@keyframes lineRise { to { opacity: 1; transform: translateY(0); } }

.hero-sub {
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 56ch;
  margin: 0 0 56px;
  opacity: 0; animation: lineRise 900ms var(--easeZen) 700ms forwards;
}

/* Living search bar */
.search-wrap { position: relative; max-width: 760px; opacity: 0; animation: lineRise 900ms var(--easeZen) 900ms forwards; }
.search-bar {
  position: relative;
  display: flex; align-items: center;
  background: var(--paper);
  padding: 22px 24px 22px 70px;
  font-family: var(--serif);
  font-size: 22px;
  color: var(--ink);
  width: 100%;
  border: none;
  outline: none;
  z-index: 2;
}
.search-bar::placeholder { color: var(--faded); font-style: italic; }
.search-icon {
  position: absolute; left: 22px; top: 50%; transform: translateY(-50%); z-index: 3;
}
.search-border {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
}
.search-border svg { width: 100%; height: 100%; }
.search-border path {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 12 6;
  opacity: 0.85;
  animation: breathe 4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { stroke-dashoffset: 0; opacity: 0.85; }
  50% { stroke-dashoffset: -36; opacity: 1; }
}
.search-wrap.focused .search-border path {
  stroke: var(--cinnabar);
  stroke-dasharray: none;
  stroke-width: 3;
  animation: focusGrow 700ms var(--easeZen) forwards;
}
@keyframes focusGrow {
  0% { stroke-dashoffset: 1500; opacity: 0; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

.suggest-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.chip {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border: 1px solid rgba(26,26,26,0.18);
  border-radius: 999px;
  background: transparent;
  transition: all 220ms var(--easeZen);
  display: inline-flex; align-items: center; gap: 8px;
}
.chip .cn { font-family: var(--cn-serif); color: var(--cinnabar); font-weight: 600; }
.chip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip:hover .cn { color: var(--paper); }

.stats-row {
  margin-top: 64px;
  display: flex; gap: 48px; flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--faded);
  letter-spacing: 0.04em;
  opacity: 0; animation: lineRise 900ms var(--easeZen) 1100ms forwards;
}
.stat-num { color: var(--ink); font-weight: 600; font-size: 15px; }

/* ====== MARQUEE ====== */
.marquee-section { padding: 90px 0; border-top: 1px solid rgba(26,26,26,0.08); border-bottom: 1px solid rgba(26,26,26,0.08); position: relative; overflow: hidden; }
.marquee-head { display: flex; align-items: baseline; gap: 24px; padding: 0 40px; margin-bottom: 50px; }
.marquee-head .cn { font-family: var(--cn-serif); font-size: 28px; font-weight: 600; }
.marquee-head .en { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--faded); }
.marquee-track-wrap { display: flex; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track {
  display: flex; gap: 80px; flex-shrink: 0;
  animation: marquee 80s linear infinite;
  padding-right: 80px;
}
@keyframes marquee { to { transform: translateX(-100%); } }
.marquee-item {
  display: flex; flex-direction: column; align-items: flex-start;
  flex-shrink: 0; cursor: pointer;
  transition: transform 420ms var(--easeThunk);
}
.marquee-item:hover { transform: scale(1.08); }
.marquee-item .cn {
  font-family: var(--cn-serif);
  font-size: 84px;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
  transition: color 240ms var(--easeZen);
}
.marquee-item:hover .cn { color: var(--cinnabar); }
.marquee-item .reveal {
  max-height: 0; overflow: hidden;
  opacity: 0;
  transition: all 420ms var(--easeZen);
  margin-top: 6px;
}
.marquee-item:hover .reveal { max-height: 60px; opacity: 1; }
.marquee-item .py { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--faded); }
.marquee-item .meaning { font-family: var(--sans); font-size: 13px; color: var(--ink); margin-top: 2px; }

/* ====== CATEGORIES ====== */
.section { padding: 130px 0; position: relative; }
.section-head { margin-bottom: 64px; max-width: 720px; }
.section-head h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  margin: 18px 0 0;
}
.section-head h2 .cn { display: block; font-size: 0.6em; color: var(--faded); margin-top: 6px; }

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: rgba(26,26,26,0.1);
  border-top: 1px solid rgba(26,26,26,0.1);
  border-bottom: 1px solid rgba(26,26,26,0.1);
}
.cat-tile {
  position: relative;
  background: var(--paper);
  padding: 48px 36px 40px;
  min-height: 320px;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
}
.cat-tile::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--ink);
  transform: translate(-105%, 105%) skewX(-10deg) scale(1.4);
  transition: transform 700ms var(--easeZen);
  z-index: 0;
  pointer-events: none;
}
.cat-tile { clip-path: inset(0); }
@media (hover: none), (max-width: 980px) {
  .cat-tile::before { display: none; }
}
.cat-tile > * { position: relative; z-index: 1; transition: color 480ms var(--easeZen); }
@media (hover: hover) {
  .cat-tile:hover::before { transform: translate(0, 0) skewX(-10deg) scale(1.4); }
  .cat-tile:hover, .cat-tile:hover * { color: var(--paper); }
  .cat-tile:hover .cat-count { color: rgba(245,241,232,0.6); }
  .cat-tile:hover .cat-example { color: rgba(245,241,232,0.7); }
}
.cat-icon {
  width: 56px; height: 56px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.cat-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--faded);
  letter-spacing: 0.1em;
  position: absolute; top: 24px; right: 28px;
}
.cat-name { font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.05; letter-spacing: -0.01em; }
.cat-name .cn { display: block; font-family: var(--cn-serif); font-size: 18px; color: var(--faded); margin-top: 6px; font-weight: 500; }
.cat-count { font-family: var(--mono); font-size: 12px; color: var(--faded); margin-top: 12px; letter-spacing: 0.05em; }
.cat-example {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(26,26,26,0.12);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--faded);
}
@media (max-width: 980px) { .cat-grid { grid-template-columns: 1fr; } }

/* ====== FEATURED ENTRY ====== */
.featured {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 80px;
  align-items: start;
  position: relative;
}
.featured-stamp-row { display: flex; gap: 16px; align-items: center; margin-bottom: 18px; }
.featured-date {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--cinnabar);
}
.featured-char {
  font-family: var(--cn-serif);
  font-weight: 700;
  font-size: clamp(120px, 18vw, 240px);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 18px 0 12px;
  position: relative;
}
.featured-char .tone-marks {
  position: absolute; top: -28px; left: 0; right: 0;
  display: flex; gap: 16%;
  padding: 0 6%;
}
.featured-py {
  font-family: var(--serif);
  font-style: italic;
  font-size: 32px;
  color: var(--cinnabar);
  margin-bottom: 24px;
}
.featured-en { font-family: var(--serif); font-size: 30px; font-weight: 500; line-height: 1.15; max-width: 520px; }
.featured-literal { font-family: var(--mono); font-size: 13px; color: var(--faded); margin-top: 14px; letter-spacing: 0.04em; }
.featured-tags { display: flex; gap: 8px; margin-top: 26px; flex-wrap: wrap; }
.tag-seal {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--paper);
  background: var(--cinnabar);
  padding: 5px 10px;
  border-radius: 2px;
  transform: rotate(-1.5deg);
  position: relative;
}
.tag-seal:nth-child(2) { transform: rotate(1.2deg); }
.tag-seal:nth-child(3) { transform: rotate(-0.8deg); background: var(--ink); }

.featured-side { padding-top: 40px; }
.quote-block {
  position: relative;
  padding: 36px 28px;
  background: rgba(255,255,255,0.4);
}
.quote-block::before, .quote-block::after {
  content: ""; position: absolute; left: 0; right: 0; height: 6px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 6' preserveAspectRatio='none'><path d='M2,3 C50,1 90,5 140,3 C200,1 240,5 300,3 C340,2 380,4 398,3' stroke='%231A1A1A' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-size: 100% 100%;
  opacity: 0.7;
}
.quote-block::before { top: 0; }
.quote-block::after { bottom: 0; }
.quote-cn { font-family: var(--cn-serif); font-size: 30px; font-weight: 500; line-height: 1.35; margin: 0 0 12px; }
.quote-py { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--faded); margin: 0 0 16px; }
.quote-en { font-family: var(--serif); font-size: 18px; color: var(--ink); line-height: 1.5; margin: 0; }

.origin-note {
  margin-top: 32px;
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-soft);
}
.origin-note .label {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cinnabar);
  margin-bottom: 10px;
}
.featured-actions { display: flex; gap: 12px; margin-top: 28px; align-items: center; }
.audio-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 500;
  transition: all 220ms var(--easeZen);
}
.audio-btn:hover { background: var(--ink); color: var(--paper); }
.audio-bars { display: flex; gap: 2px; align-items: center; height: 14px; }
.audio-bars span {
  width: 2px; background: currentColor; height: 100%; transform-origin: bottom;
  animation: bars 1.4s ease-in-out infinite;
}
.audio-bars span:nth-child(2) { animation-delay: 0.18s; height: 60%; }
.audio-bars span:nth-child(3) { animation-delay: 0.36s; height: 80%; }
.audio-bars span:nth-child(4) { animation-delay: 0.54s; height: 50%; }
.audio-bars span:nth-child(5) { animation-delay: 0.72s; height: 70%; }
@keyframes bars { 0%, 100% { transform: scaleY(0.4); } 50% { transform: scaleY(1); } }
.action-link {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  padding: 10px 16px; color: var(--ink);
  transition: color 200ms var(--easeZen);
}
.action-link:hover { color: var(--cinnabar); }

@media (max-width: 980px) {
  .featured { grid-template-columns: 1fr; gap: 40px; }
  .featured-side { padding-top: 0; }
}

/* ====== RECENT ENTRIES ====== */
.recent-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: rgba(26,26,26,0.1);
  border: 1px solid rgba(26,26,26,0.1);
}
.entry-card {
  background: var(--paper);
  padding: 32px 28px 28px;
  position: relative;
  min-height: 260px;
  display: flex; flex-direction: column; justify-content: space-between;
  cursor: pointer;
  overflow: hidden;
  transition: background 280ms var(--easeZen);
}
.entry-card:hover { background: #FAF7F0; }
.entry-card .stamp-hover {
  position: absolute;
  top: 18px; right: 18px;
  width: 50px; height: 50px;
  background: var(--cinnabar);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--cn-serif);
  font-weight: 700;
  font-size: 22px;
  border-radius: 4px;
  transform: scale(0) rotate(-25deg);
  opacity: 0;
  transition: all 420ms var(--easeThunk);
  box-shadow: inset 0 0 0 2px rgba(245,241,232,0.4);
}
.entry-card:hover .stamp-hover { transform: scale(1) rotate(6deg); opacity: 1; }
.entry-cn { font-family: var(--cn-serif); font-size: 56px; font-weight: 600; line-height: 1; margin-bottom: 10px; letter-spacing: -0.02em; }
.entry-py { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--cinnabar); margin-bottom: 8px; }
.entry-meaning { font-family: var(--serif); font-size: 16px; color: var(--ink-soft); line-height: 1.4; margin-bottom: 20px; }
.entry-meta { display: flex; align-items: center; justify-content: space-between; }
.entry-cat { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--faded); }
.entry-diff { display: flex; gap: 3px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(26,26,26,0.18); }
.dot.on { background: var(--ink); }
@media (max-width: 1100px) { .recent-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .recent-grid { grid-template-columns: 1fr; } }

/* ====== LEARN PROMO ====== */
.learn-promo {
  display: grid; grid-template-columns: 5fr 7fr;
  gap: 80px; align-items: center;
}
.phone-frame {
  position: relative;
  width: 320px; height: 640px;
  background: var(--ink);
  border-radius: 42px;
  padding: 14px;
  margin: 0 auto;
  box-shadow: 0 40px 80px -20px rgba(26,26,26,0.35), 0 2px 4px rgba(26,26,26,0.1);
  transform: rotate(-3deg);
  transition: transform 600ms var(--easeZen);
}
.phone-frame:hover { transform: rotate(-1deg) translateY(-6px); }
.phone-frame::before {
  content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; background: var(--ink); border-radius: 0 0 14px 14px; z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%;
  background: var(--paper);
  border-radius: 30px;
  padding: 50px 22px 22px;
  display: flex; flex-direction: column;
  overflow: hidden;
  position: relative;
}
.phone-eyebrow { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--cinnabar); margin-bottom: 6px; }
.phone-progress { display: flex; gap: 4px; margin-bottom: 30px; }
.phone-progress span { flex: 1; height: 3px; background: rgba(26,26,26,0.15); border-radius: 2px; }
.phone-progress span.done { background: var(--cinnabar); }
.phone-progress span.now { background: var(--ink); }
.flashcard {
  flex: 1;
  background: var(--paper);
  border: 1px solid rgba(26,26,26,0.1);
  border-radius: 18px;
  padding: 28px 22px;
  display: flex; flex-direction: column;
  position: relative;
}
.flashcard .cn-big { font-family: var(--cn-serif); font-size: 72px; font-weight: 700; line-height: 1; text-align: center; margin: 30px 0 14px; }
.flashcard .py-big { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--cinnabar); text-align: center; }
.flashcard .hint { font-family: var(--sans); font-size: 11px; color: var(--faded); text-align: center; margin-top: 30px; letter-spacing: 0.1em; text-transform: uppercase; }
.flashcard-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 18px; }
.flashcard-actions .b {
  flex: 1; padding: 12px 0; border-radius: 10px;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-align: center;
}
.flashcard-actions .b.again { background: var(--paper-deep); color: var(--ink); }
.flashcard-actions .b.got { background: var(--ink); color: var(--paper); }

.learn-features { list-style: none; padding: 0; margin: 36px 0; display: flex; flex-direction: column; gap: 22px; }
.learn-features li { display: flex; gap: 18px; align-items: flex-start; font-family: var(--serif); font-size: 21px; line-height: 1.4; max-width: 56ch; }
.learn-features .check {
  flex-shrink: 0; margin-top: 6px;
}

@media (max-width: 980px) {
  .learn-promo { grid-template-columns: 1fr; gap: 40px; }
}

/* ====== CONTRIBUTORS ====== */
.contrib-row {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 28px; margin-top: 50px;
}
.contrib-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.contrib-avatar {
  position: relative;
  width: 96px; height: 96px;
  margin-bottom: 18px;
}
.contrib-avatar .ring {
  position: absolute; inset: -6px;
  pointer-events: none;
}
.contrib-avatar .photo {
  width: 100%; height: 100%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 32px; font-weight: 500;
  color: var(--paper);
}
.contrib-name { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.contrib-loc { font-family: var(--mono); font-size: 11px; color: var(--faded); letter-spacing: 0.08em; margin-top: 4px; }
.contrib-count { font-family: var(--sans); font-size: 12px; color: var(--cinnabar); margin-top: 6px; font-weight: 500; }
@media (max-width: 980px) { .contrib-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .contrib-row { grid-template-columns: repeat(2, 1fr); } }

/* ====== TESTIMONIALS ====== */
.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.testi-card {
  background: var(--paper);
  border: 1px solid rgba(26,26,26,0.12);
  padding: 36px 32px;
  position: relative;
  display: flex; flex-direction: column;
  min-height: 260px;
}
.testi-mark { font-family: var(--serif); font-size: 72px; line-height: 0.6; color: var(--cinnabar); height: 30px; margin-bottom: 14px; }
.testi-quote { font-family: var(--serif); font-size: 19px; line-height: 1.5; flex: 1; margin: 0 0 24px; }
.testi-author { font-family: var(--sans); font-size: 13px; color: var(--faded); }
.testi-author strong { color: var(--ink); font-weight: 600; }
.testi-stamp {
  position: absolute; bottom: 24px; right: 24px;
  width: 44px; height: 44px;
  background: var(--cinnabar); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--cn-serif); font-weight: 700; font-size: 18px;
  border-radius: 4px;
  transform: rotate(8deg);
  box-shadow: inset 0 0 0 2px rgba(245,241,232,0.4);
}
@media (max-width: 980px) { .testi-grid { grid-template-columns: 1fr; } }

/* ====== PRICING ====== */
.price-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; align-items: stretch; }
.price-card {
  position: relative;
  background: var(--paper);
  padding: 44px 36px 40px;
  border: 1px solid rgba(26,26,26,0.15);
  margin-left: -1px;
  display: flex; flex-direction: column;
}
.price-card:first-child { margin-left: 0; }
.price-card.popular {
  background: #FAF7EE;
  z-index: 2;
  transform: translateY(-12px) scale(1.03);
}
.price-card.popular::before {
  content: "";
  position: absolute; inset: -2px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 600' preserveAspectRatio='none'><path d='M5,5 L395,4 L396,594 L4,596 Z' stroke='%231A1A1A' stroke-width='2.5' fill='none' stroke-linejoin='round'/></svg>");
  background-size: 100% 100%;
  pointer-events: none;
}
.price-card.scholar { background: var(--ink); color: var(--paper); }
.price-card.scholar .price-tier { color: var(--gold); }
.price-card.scholar .price-desc { color: rgba(245,241,232,0.7); }
.price-card.scholar .price-feat { color: rgba(245,241,232,0.85); border-bottom-color: rgba(245,241,232,0.12); }
.price-card.scholar .btn-outline { border-color: var(--gold); color: var(--gold); }
.price-card.scholar .btn-outline:hover { background: var(--gold); color: var(--ink); }
.price-popular-stamp {
  position: absolute; top: -22px; right: 28px;
  background: var(--cinnabar); color: var(--paper);
  font-family: var(--cn-serif); font-weight: 700;
  font-size: 12px; letter-spacing: 0.18em;
  padding: 8px 14px;
  transform: rotate(4deg);
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px rgba(245,241,232,0.4);
}
.price-tier { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cinnabar); }
.price-amt { font-family: var(--serif); font-size: 56px; font-weight: 500; line-height: 1; margin: 14px 0 4px; }
.price-amt .per { font-size: 16px; color: var(--faded); font-style: italic; }
.price-desc { font-family: var(--serif); font-size: 16px; color: var(--ink-soft); line-height: 1.5; margin: 0 0 28px; }
.price-feats { list-style: none; padding: 0; margin: 0 0 32px; flex: 1; }
.price-feat { padding: 12px 0; border-bottom: 1px solid rgba(26,26,26,0.1); font-family: var(--serif); font-size: 15px; display: flex; align-items: center; gap: 12px; }
.price-card .btn { width: 100%; }
@media (max-width: 980px) { .price-row { grid-template-columns: 1fr; } .price-card.popular { transform: none; } }

/* ====== NEWSLETTER ====== */
.newsletter {
  position: relative;
  padding: 140px 0;
  background: var(--paper-deep);
  overflow: hidden;
  border-top: 1px solid rgba(26,26,26,0.08);
  border-bottom: 1px solid rgba(26,26,26,0.08);
}
.newsletter-bg-char {
  position: absolute;
  left: -40px; top: 50%; transform: translateY(-50%);
  font-family: var(--cn-serif); font-weight: 700;
  font-size: 520px; line-height: 0.9;
  color: var(--ink); opacity: 0.05;
  pointer-events: none;
}
.newsletter-inner { max-width: 760px; margin: 0 auto; text-align: center; padding: 0 40px; position: relative; }
.newsletter h2 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1.02; letter-spacing: -0.025em;
  margin: 22px 0 22px;
}
.newsletter p { font-family: var(--serif); font-size: 21px; color: var(--ink-soft); line-height: 1.55; max-width: 56ch; margin: 0 auto 44px; }
.newsletter-form { display: flex; gap: 14px; max-width: 540px; margin: 0 auto; align-items: flex-end; flex-wrap: wrap; justify-content: center; }
.brush-input {
  flex: 1; min-width: 260px;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--ink);
  padding: 14px 4px;
  font-family: var(--serif); font-size: 19px;
  outline: none;
}
.brush-input::placeholder { color: var(--faded); font-style: italic; }
.newsletter-fine { margin-top: 26px; font-family: var(--mono); font-size: 11px; color: var(--faded); letter-spacing: 0.08em; }

/* ====== FAQ ====== */
.faq-list { border-top: 1px solid var(--ink); }
.faq-item { border-bottom: 1px solid var(--ink); }
.faq-q {
  width: 100%; text-align: left;
  padding: 32px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  font-family: var(--serif); font-size: 26px; font-weight: 500;
  color: var(--ink);
  transition: color 220ms var(--easeZen);
}
.faq-q:hover { color: var(--cinnabar); }
.faq-icon {
  width: 36px; height: 36px;
  position: relative; flex-shrink: 0;
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  background: currentColor;
  transition: transform 380ms var(--easeZen), opacity 380ms var(--easeZen);
}
.faq-icon::before { width: 22px; height: 2px; transform: translate(-50%, -50%); }
.faq-icon::after { width: 2px; height: 22px; transform: translate(-50%, -50%); }
.faq-item.open .faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); opacity: 0; }
.faq-a {
  max-height: 0; overflow: hidden;
  transition: max-height 480ms var(--easeZen), padding 280ms var(--easeZen);
  font-family: var(--serif); font-size: 19px; line-height: 1.6;
  color: var(--ink-soft);
  position: relative;
}
.faq-item.open .faq-a { max-height: 320px; padding-bottom: 32px; }
.faq-a::before {
  content: ""; position: absolute; left: 0; top: 0;
  width: 60px; height: 4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 4'><path d='M2,2 C15,1 25,3 40,2 C50,1.5 56,2.5 58,2' stroke='%23C8392E' stroke-width='1.6' fill='none' stroke-linecap='round'/></svg>");
  background-size: 100% 100%;
}

/* ====== FOOTER ====== */
.footer { background: var(--ink); color: var(--paper); padding: 100px 0 40px; position: relative; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 48px; padding-bottom: 60px; border-bottom: 1px solid rgba(245,241,232,0.12); }
.footer-brand .zh { font-family: var(--cn-serif); font-weight: 700; font-size: 32px; }
.footer-brand .wm { font-family: var(--serif); font-size: 19px; margin-top: 4px; }
.footer-tag { font-family: var(--serif); font-size: 16px; color: rgba(245,241,232,0.65); margin-top: 18px; max-width: 32ch; line-height: 1.5; }
.footer-col h4 { font-family: var(--sans); font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(245,241,232,0.55); margin: 8px 0 22px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-col a { font-family: var(--serif); font-size: 16px; color: var(--paper); transition: color 200ms var(--easeZen); }
.footer-col a:hover { color: var(--cinnabar); }
.footer-bottom { padding-top: 32px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: rgba(245,241,232,0.55); }
.footer-bottom a:hover { color: var(--cinnabar); }
.footer-lang { display: flex; gap: 16px; }
.footer-lang span { color: rgba(245,241,232,0.4); }
.footer-lang span.active { color: var(--paper); }
.footer-social { display: flex; gap: 18px; align-items: center; }
.footer-stamp {
  position: absolute; bottom: 36px; right: 40px;
  width: 50px; height: 50px;
  background: var(--cinnabar);
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  font-family: var(--cn-serif); font-weight: 700; font-size: 22px;
  border-radius: 4px;
  transform: rotate(-8deg);
  box-shadow: inset 0 0 0 2px rgba(245,241,232,0.4);
}
@media (max-width: 980px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

/* ====== SCROLL FILL HEADING ====== */
.fill-head {
  background-image: linear-gradient(90deg, var(--cinnabar) 0%, var(--cinnabar) 100%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-clip: text; -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  transition: background-size 1200ms var(--easeZen);
}
.fill-head.in { background-size: 100% 100%; }
.fill-head-ink {
  background-image: linear-gradient(90deg, var(--ink) 0%, var(--ink) 100%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-clip: text; -webkit-background-clip: text;
  -webkit-text-fill-color: rgba(26,26,26,0.18);
  transition: background-size 1400ms var(--easeZen);
}
.fill-head-ink.in { background-size: 100% 100%; }

/* ====== COUNTER ROLL ====== */
.roll {
  display: inline-flex; overflow: hidden; height: 1em; line-height: 1; vertical-align: bottom;
}
.roll-digit {
  display: inline-block; transition: transform 1400ms var(--easeZen);
}

/* ====== EASTER EGG SEAL ====== */
.falling-seal {
  position: fixed; top: -80px;
  width: 50px; height: 50px;
  background: var(--cinnabar); color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--cn-serif); font-weight: 700; font-size: 22px;
  border-radius: 4px;
  box-shadow: inset 0 0 0 2px rgba(245,241,232,0.4), 0 4px 12px rgba(0,0,0,0.2);
  z-index: 9999; pointer-events: none;
  animation: sealFall 3.4s cubic-bezier(0.45, 0.05, 0.6, 0.3) forwards;
}
@keyframes sealFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0.6; }
}

/* ====== PAGE INK WIPE (transition) ====== */
.page-wipe {
  position: fixed; inset: 0; z-index: 99999;
  pointer-events: none;
}
.page-wipe.run {
  animation: wipeIn 700ms var(--easeZen), wipeOut 700ms var(--easeZen) 700ms forwards;
}
@keyframes wipeIn {
  0% { transform: translateX(-105%); }
  100% { transform: translateX(0); }
}
@keyframes wipeOut {
  0% { transform: translateX(0); }
  100% { transform: translateX(105%); }
}

/* ====== UTIL ====== */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity 900ms var(--easeZen), transform 900ms var(--easeZen); }
.fade-in.in { opacity: 1; transform: translateY(0); }

/* Stroke draw */
.draw path {
  stroke-dasharray: var(--len, 1200);
  stroke-dashoffset: var(--len, 1200);
  animation: drawStroke 2.6s var(--easeZen) forwards;
}
.draw path:nth-child(2) { animation-delay: 0.5s; }
.draw path:nth-child(3) { animation-delay: 1.0s; }
@keyframes drawStroke { to { stroke-dashoffset: 0; } }

/* ====== ORNAMENT POSITIONING ====== */
.ornament { position: absolute; pointer-events: none; }
.ornament-rotate-slow { animation: rotateSlow 60s linear infinite; }
@keyframes rotateSlow { to { transform: rotate(360deg); } }

.ink-splash-hero {
  position: absolute;
  right: -60px; top: 60px;
  width: 260px; height: 260px;
  opacity: 0.16;
  z-index: 0;
  transform: rotate(8deg);
}
.ink-splash-fr {
  position: absolute;
  left: -30px; top: -50px;
  width: 200px; height: 200px;
  opacity: 0.12;
  z-index: 0;
  transform: rotate(-18deg);
}

.annot-circle {
  position: absolute;
  inset: -22px -16px -18px -16px;
  width: calc(100% + 32px);
  height: calc(100% + 40px);
  opacity: 0;
  animation: drawCircle 1400ms var(--easeZen) 1300ms forwards;
  pointer-events: none;
}
@keyframes drawCircle { to { opacity: 1; } }
.annot-circle path { stroke-dasharray: 900; stroke-dashoffset: 900; animation: dashIn 1800ms var(--easeZen) 1400ms forwards; }
@keyframes dashIn { to { stroke-dashoffset: 0; } }

.big-num {
  position: absolute;
  top: -120px; right: 40px;
  z-index: 0;
}

.section-ribbon { margin: 20px 0 0; max-width: 280px; }

.seal-column-side {
  position: absolute;
  right: 60px; top: 130px;
  z-index: 1;
}

.vertical-kanji-side {
  position: absolute;
  right: 24px; top: 50%; transform: translateY(-50%);
  z-index: 1;
}

.wave-strike-between {
  width: 100%;
  height: 80px;
  margin: 0 auto;
  display: block;
  opacity: 0.5;
}

.diag-sweep-corner {
  position: absolute;
  top: -10px; left: -10px;
  width: 320px; height: 200px;
  opacity: 0.55;
  z-index: 0;
  transform: scaleX(-1);
}
.diag-sweep-corner.tr {
  left: auto; right: -10px;
  transform: scaleX(1);
}

.bracket {
  position: absolute;
  width: 28px;
  height: 70%;
  top: 15%;
  opacity: 0.55;
}
.bracket.l { left: -16px; }
.bracket.r { right: -16px; }

.crosshair-mark {
  width: 36px; height: 36px;
  position: absolute;
}

.dot-grid-block {
  position: absolute;
  width: 120px; height: 120px;
  opacity: 0.6;
}

.hero-circle-wrap {
  position: relative;
  display: inline-block;
}

.featured-wrap { position: relative; }
.featured-num {
  position: absolute;
  top: -90px; left: -10px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 180px;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px #1A1A1A;
  opacity: 0.14;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.section { position: relative; }
.section-with-decor { position: relative; overflow: hidden; }

.hanging-seal-fixed {
  position: absolute;
  top: 40px;
  z-index: 2;
}

.testi-card { position: relative; overflow: visible; }
.testi-bracket-l, .testi-bracket-r {
  position: absolute; top: 32px; width: 18px; height: 60px; opacity: 0.5;
}
.testi-bracket-l { left: 14px; }
.testi-bracket-r { right: 14px; }

/* ====== INKWASH ACCENT (free Google Fonts substitute) ======
   Apply .inkwash for Latin display words, .cn-brush for Chinese.
   Use sparingly on h1 emphasis — too much and it becomes noise.
*/
.inkwash {
  font-family: var(--inkwash);
  font-weight: 400;
  letter-spacing: 0.005em;
  /* slight wet-ink double-shadow for hand-painted depth */
  text-shadow:
    0 0 0.04em rgba(26,26,26,0.18),
    0.012em 0.018em 0 rgba(200,57,46,0.08);
}
.cn-brush {
  font-family: var(--cn-brush);
  font-weight: 400;
  letter-spacing: 0.02em;
}
/* tilt + bleed for h1 inkwash emphasis */
.hero-headline .inkwash {
  display: inline-block;
  transform: rotate(-1.2deg) translateY(0.04em);
  position: relative;
  padding: 0 0.05em;
}
.hero-headline .inkwash::after {
  content: "";
  position: absolute;
  left: -2%; right: -4%; bottom: -0.04em;
  height: 0.18em;
  background: radial-gradient(ellipse at 30% 50%, rgba(26,26,26,0.14) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(2px);
  z-index: -1;
}

/* ====== MODERN 2026 ANIMATIONS ====== */

/* 1. Magnetic CTA — JS adds CSS vars for offset */
.magnetic {
  transition: transform 320ms var(--easeThunk);
  will-change: transform;
}
.magnetic.pulled {
  transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1.04);
}

/* 2. Mouse-aware hero spotlight */
.hero {
  --spot-x: 50%;
  --spot-y: 30%;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(
    600px circle at var(--spot-x) var(--spot-y),
    rgba(200, 57, 46, 0.06) 0%,
    rgba(200, 57, 46, 0.02) 30%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 0;
  transition: opacity 600ms var(--easeZen);
}

/* 3. SplitText — per-char hero reveal */
.split-char {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.6em) rotate(6deg);
  animation: charRise 720ms var(--easeZen) forwards;
  animation-delay: calc(var(--i, 0) * 28ms + 200ms);
}
@keyframes charRise {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* 4. Scroll-driven progress bar (top of page) */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px;
  background: var(--cinnabar);
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  z-index: 100;
  pointer-events: none;
  mix-blend-mode: multiply;
  transition: transform 80ms linear;
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: progressFill linear;
    animation-timeline: scroll(root);
    transition: none;
  }
  @keyframes progressFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* 5. Scroll-snap reveal on cards using view-timeline */
@supports (animation-timeline: view()) {
  .reveal-up {
    animation: revealUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 30%;
  }
  @keyframes revealUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); filter: blur(4px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
  }
}
@supports not (animation-timeline: view()) {
  .reveal-up { opacity: 1; transform: translateY(20px); transition: opacity 600ms var(--easeZen), transform 600ms var(--easeZen); }
  .reveal-up.in { opacity: 1; transform: translateY(0); }
}

/* 6. Conic shimmer on Pro pricing border */
.price-card.popular {
  position: relative;
}
.price-card.popular::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--shim, 0deg),
    transparent 0deg,
    rgba(200,57,46,0.45) 40deg,
    transparent 80deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 2px;
  pointer-events: none;
  animation: conicSpin 6s linear infinite;
}
@property --shim {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes conicSpin { to { --shim: 360deg; } }

/* 7. Aurora gradient bg on newsletter */
.newsletter {
  background:
    radial-gradient(40rem 30rem at 20% 30%, rgba(200,57,46,0.08), transparent 60%),
    radial-gradient(30rem 24rem at 80% 70%, rgba(184,137,58,0.10), transparent 60%),
    var(--paper-deep);
}

/* 8. Tilt-on-hover entry cards (modern 3D feel, GPU only) */
.entry-card {
  transform-style: preserve-3d;
  perspective: 800px;
}
.entry-card:hover {
  animation: tiltWobble 700ms var(--easeThunk);
}
@keyframes tiltWobble {
  0% { transform: rotateY(0) rotateX(0); }
  35% { transform: rotateY(-3deg) rotateX(2deg); }
  100% { transform: rotateY(0) rotateX(0); }
}

/* 9. Marquee crossfade on item hover — bg glow */
.marquee-item::before {
  content: "";
  position: absolute;
  inset: -10px -16px;
  background: radial-gradient(ellipse at center, rgba(200,57,46,0.12), transparent 70%);
  opacity: 0;
  transition: opacity 480ms var(--easeZen);
  z-index: -1;
}
.marquee-item { position: relative; }
.marquee-item:hover::before { opacity: 1; }

/* 10. FAQ ink-drip when open (left edge) */
.faq-item.open::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--cinnabar), transparent 80%);
  animation: dripDown 520ms var(--easeZen);
}
.faq-item { position: relative; }
@keyframes dripDown {
  from { transform: scaleY(0); transform-origin: top; }
  to { transform: scaleY(1); }
}

/* ====== INDONESIAN BIZ INFO BLOCK (mock — replace later) ====== */
.legal-band {
  background: var(--ink);
  color: rgba(245, 241, 232, 0.75);
  padding: 28px 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.7;
  border-top: 1px solid rgba(245,241,232,0.08);
}
.legal-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.legal-block .label {
  display: block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--cinnabar);
  margin-bottom: 6px;
}
.legal-block .val {
  display: block;
  color: rgba(245,241,232,0.92);
  font-family: var(--mono);
}
.legal-block .val.serif { font-family: var(--serif); font-size: 14px; letter-spacing: 0; }
@media (max-width: 980px) {
  .legal-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .legal-grid { grid-template-columns: 1fr; }
}

/* ====== MOBILE OVERFLOW GUARDS ====== */
html, body { max-width: 100%; overflow-x: hidden; }

@media (max-width: 720px) {
  /* Nav: hide non-essential right items + wordmark, shrink CTA */
  .nav-right .btn-ghost { display: none; }
  .nav-right .lang-toggle { display: none; }
  .nav-right { gap: 8px; }
  .nav-right .btn-seal { padding: 9px 14px; font-size: 12px; }
  .nav-logo .wm { display: none; }
  .nav-inner { padding: 12px 18px; gap: 8px; }
  .nav.slim .nav-inner { padding: 10px 18px; }

  /* Decorative absolutely-positioned ornaments — hide on mobile (they cause overflow) */
  .hero-bg-char { display: none; }
  .ink-splash-hero { display: none; }
  .newsletter-bg-char { display: none; }
  .diag-sweep-corner { display: none; }
  .hanging-seal-fixed { display: none; }
  .seal-column-side { display: none; }
  .big-num { display: none; }
  .featured-num { font-size: 110px; top: -56px; left: 0; }

  /* Layout shrinks */
  .container, .container-wide { padding: 0 18px; }
  .hero { padding: 70px 0 90px; }
  .hero-headline { font-size: clamp(40px, 11vw, 56px); max-width: none; }
  .hero-sub { font-size: 17px; margin-bottom: 32px; }
  .search-bar { padding: 16px 18px 16px 54px; font-size: 17px; }
  .search-icon { left: 14px; }
  .stats-row { gap: 22px; margin-top: 36px; }
  .section { padding: 70px 0; }
  .section-head { margin-bottom: 36px; }
  .section-head h2 { font-size: clamp(28px, 7vw, 40px); }
  .featured-en { font-size: clamp(22px, 5.5vw, 28px); }
  .testi-quote { font-size: 17px; }
  .featured-char { font-size: clamp(90px, 26vw, 140px); }
  .featured-py { font-size: 24px; }
  .marquee-head { padding: 0 18px; margin-bottom: 28px; }
  .marquee-head .cn { font-size: 22px; }
  .marquee-item .cn { font-size: 44px; }
  .marquee-track { gap: 36px; }
  .marquee-section { padding: 60px 0; }
  .footer { padding: 60px 0 30px; }
  .footer-stamp { right: 18px; bottom: 18px; width: 40px; height: 40px; font-size: 18px; }
  .legal-band { padding: 22px 0; }
  .price-card.popular { transform: none; }
  .quote-block { padding: 22px 18px; }
  .quote-cn { font-size: 22px; }
}

@media (max-width: 380px) {
  .nav-right .icon-btn { display: none; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .marquee-track { animation: none !important; }
  .price-card.popular::after { animation: none !important; }
}
